/* ==========================================================================
   SAAT DURUM — KÜTÜPHANE MODÜLÜ (LIBRARY MODULE) v2.5
   Minimalist Glassmorphism • Ethereal Aurora Ambient • Zen Focus Mode
   ========================================================================== */

:root {
  --lib-bg: #050608;
  --lib-surface: rgba(18, 20, 28, 0.65);
  --lib-surface-border: rgba(255, 255, 255, 0.08);
  --lib-text: #FFFFFF;
  --lib-text-secondary: rgba(255, 255, 255, 0.65);
  --lib-text-muted: rgba(255, 255, 255, 0.42);
  --lib-accent-blue: #7AA7FF;
  --lib-accent-violet: #8B5CF6;
  --lib-accent-cyan: #38BDF8;
  --lib-accent-emerald: #34D399;
  --lib-accent-red: #EF4444;
}

/* ── Ana Konteyner ── */
.sd-library-container {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif);
  color: var(--lib-text);
  -webkit-font-smoothing: antialiased;
}

/* ── Canlılık Göstergesi (Pulsing Green Dot — Sistem ve Sekmeler İçin) ── */
.lib-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success, #30D158);
  box-shadow: 0 0 8px rgba(48, 209, 88, 0.6);
  flex-shrink: 0;
  animation: libDotPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes libDotPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 0 8px rgba(48, 209, 88, 0.6);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.9);
    box-shadow: 0 0 3px rgba(48, 209, 88, 0.2);
  }
}

/* ══════════════════════════════════════════
   1. GİRİŞ EKRANI (AŞIRI SADE, KOMPAKT & ORTALANMIŞ)
   ══════════════════════════════════════════ */
.lib-landing-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
  padding: 16px;
  position: relative;
  z-index: 1;
}

.lib-landing-box {
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  background: rgba(16, 18, 25, 0.78);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 30px 24px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  text-align: center;
  box-sizing: border-box;
}

.lib-landing-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.lib-landing-title {
  font-family: var(--font-display, -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif);
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.025em;
  color: #FFFFFF;
  margin: 0;
}

.lib-landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--lib-text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3px 10px;
  border-radius: 9999px;
}

.lib-gate-desc {
  font-size: 0.84375rem;
  color: var(--lib-text-secondary);
  margin: 0 0 6px 0;
  line-height: 1.45;
}

/* ── Zarif Özel Ders Seçici (Custom Select) ── */
.lib-custom-select {
  position: relative;
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}

.lib-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--lib-text);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  box-sizing: border-box;
}

.lib-select-trigger:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
}

.lib-select-trigger.is-open {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 3px rgba(122, 167, 255, 0.15);
}

.lib-select-trigger-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.lib-select-chevron {
  color: var(--lib-text-muted);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}

.lib-select-trigger.is-open .lib-select-chevron {
  transform: rotate(180deg);
}

.lib-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: rgba(20, 23, 32, 0.96);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
  box-sizing: border-box;
}

.lib-select-menu::-webkit-scrollbar {
  width: 4px;
}

.lib-select-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.lib-select-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: var(--lib-text);
  transition: background 0.12s ease;
  user-select: none;
}

.lib-select-option:hover {
  background: rgba(255, 255, 255, 0.07);
}

.lib-select-option.selected {
  background: rgba(122, 167, 255, 0.15);
  font-weight: 600;
}

.lib-select-opt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lib-select-opt-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-select-check {
  color: var(--lib-accent-blue);
  margin-left: auto;
  display: none;
  flex-shrink: 0;
}

.lib-select-option.selected .lib-select-check {
  display: block;
}

/* ── Başlat Butonu ── */
.lib-btn-primary,
.lib-btn-start {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: linear-gradient(135deg, #FFFFFF 0%, #E6EDF8 100%);
  color: #080A10;
  border: none;
  border-radius: 980px;
  padding: 13px 22px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.8);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.lib-btn-primary:hover,
.lib-btn-start:hover {
  background: #FFFFFF;
  transform: translateY(-1.5px) scale(1.01);
  box-shadow: 0 6px 26px rgba(255, 255, 255, 0.25);
}

.lib-btn-primary:active,
.lib-btn-start:active {
  transform: translateY(0) scale(0.98);
}

/* ══════════════════════════════════════════
   2. TAM ODAK MODU: NAVİGASYON VE DİKKAT DAĞITICILARI GİZLEME
   ══════════════════════════════════════════ */
body.library-study-active,
body.library-deep-focus-active {
  overflow: hidden !important;
  touch-action: pan-y !important;
}

body.library-study-active #site-header,
body.library-study-active .site-header,
body.library-study-active .nav-dropdown,
body.library-study-active #nav-dropdown,
body.library-study-active .online-top-tabs-nav,
body.library-study-active #mobile-bottom-nav,
body.library-study-active .mobile-bottom-nav,
body.library-study-active #clock-mobile-popup,
body.library-study-active #online-mobile-popup,
body.library-study-active .ypt-header-bar,
body.library-study-active #btn-online-notif,
body.library-study-active #btn-focus,
body.library-study-active #sd-ctx-portal,
body.library-study-active .theme-wrapper,
body.library-study-active #progress-bar-wrap,
body.library-study-active .progress-bar-wrap,
body.library-study-active #sd-chat-floating-btn,
body.library-study-active .chat-float-btn,
body.library-study-active #app-footer,
body.library-study-active footer,
body.library-deep-focus-active #site-header,
body.library-deep-focus-active .site-header,
body.library-deep-focus-active .nav-dropdown,
body.library-deep-focus-active #nav-dropdown,
body.library-deep-focus-active .online-top-tabs-nav,
body.library-deep-focus-active #mobile-bottom-nav,
body.library-deep-focus-active .mobile-bottom-nav,
body.library-deep-focus-active #clock-mobile-popup,
body.library-deep-focus-active #online-mobile-popup,
body.library-deep-focus-active .ypt-header-bar,
body.library-deep-focus-active #btn-online-notif,
body.library-deep-focus-active #btn-focus,
body.library-deep-focus-active #sd-ctx-portal,
body.library-deep-focus-active .theme-wrapper,
body.library-deep-focus-active #progress-bar-wrap,
body.library-deep-focus-active .progress-bar-wrap,
body.library-deep-focus-active #sd-chat-floating-btn,
body.library-deep-focus-active .chat-float-btn,
body.library-deep-focus-active #app-footer,
body.library-deep-focus-active footer {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Kütüphane Görünümünü Tüm Ekranı Kaplayan Lüks Odak Alanına Çevir */
body.library-study-active #sd-library-view-wrap,
body.library-deep-focus-active #sd-library-view-wrap {
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  background-color: #030406 !important;
  background-image: linear-gradient(180deg, #020204 0%, #030407 60%, #05070d 100%) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)) !important;
  overflow: hidden !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  box-sizing: border-box !important;
  animation: libFocusFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes libFocusFadeIn {
  from {
    opacity: 0;
    transform: scale(0.99);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ══════════════════════════════════════════
   3. AURORA ETHEREAL AMBİYANS IŞIĞI (ALT UFUKTA HAFİF & CANLI)
   ══════════════════════════════════════════ */
.lib-aurora-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  /* Başka türlü çok hafif: dinlenme/sessiz modda zarif, derin ve sakin ambiyans */
  opacity: 0.28;
  filter: saturate(1.15) brightness(0.96);
  transition: opacity 1.3s cubic-bezier(0.16, 1, 0.3, 1),
              filter 1.3s cubic-bezier(0.16, 1, 0.3, 1);
  /* Yukarısı tamamen simsiyah kalsın diye yukarıya doğru kusursuz maskeleme */
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.95) 18%, rgba(0, 0, 0, 0.45) 42%, rgba(0, 0, 0, 0) 62%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.95) 18%, rgba(0, 0, 0, 0.45) 42%, rgba(0, 0, 0, 0) 62%);
}

/* Zen Ambient modunda (hareketsizlikte) daha da hafif, derin odak */
.lib-study-container.is-ambient .lib-aurora-bg {
  opacity: 0.18;
  filter: saturate(1.05) brightness(0.9);
}

/* Ekrana dokununca / tıklayınca renkler hafif belirgin hale gelir */
.lib-aurora-touched .lib-aurora-bg,
#sd-library-view-wrap.lib-aurora-touched .lib-aurora-bg,
.lib-study-container.lib-aurora-touched .lib-aurora-bg,
.lib-landing-container.lib-aurora-touched .lib-aurora-bg,
.lib-study-container:active .lib-aurora-bg,
.lib-landing-container:active .lib-aurora-bg {
  opacity: 0.64;
  filter: saturate(1.45) brightness(1.22);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Alt ufuk yumuşak zemin ışıması (Ground Mist Beam) */
.lib-aurora-bg::after {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -40px;
  height: min(290px, 40vh);
  background: radial-gradient(ellipse 110% 65% at 50% 100%,
    rgba(99, 102, 241, 0.45) 0%,
    rgba(56, 189, 248, 0.28) 32%,
    rgba(52, 211, 153, 0.15) 58%,
    transparent 78%
  );
  filter: blur(44px);
  opacity: 0.72;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 1.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lib-aurora-touched .lib-aurora-bg::after,
#sd-library-view-wrap.lib-aurora-touched .lib-aurora-bg::after,
.lib-study-container.lib-aurora-touched .lib-aurora-bg::after,
.lib-landing-container.lib-aurora-touched .lib-aurora-bg::after,
.lib-study-container:active .lib-aurora-bg::after,
.lib-landing-container:active .lib-aurora-bg::after {
  opacity: 1;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Aurora Küreleri (Aşağıda konumlu, optimize GPU katmanları) */
.lib-aurora-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(75px);
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: transform;
  transform-origin: center bottom;
  transition: filter 0.5s ease;
}

.lib-aurora-touched .lib-aurora-glow,
#sd-library-view-wrap.lib-aurora-touched .lib-aurora-glow,
.lib-study-container.lib-aurora-touched .lib-aurora-glow,
.lib-landing-container.lib-aurora-touched .lib-aurora-glow,
.lib-study-container:active .lib-aurora-glow,
.lib-landing-container:active .lib-aurora-glow {
  filter: blur(65px) brightness(1.18);
}

/* 1. Küre: Sol-alt Ufuk Işıması (Derin Elektrik İndigo & Kozmik Menekşe) */
.lib-aurora-1 {
  bottom: -160px;
  left: -12%;
  width: min(780px, 120vw);
  height: min(460px, 62vh);
  background: radial-gradient(ellipse 70% 55% at 45% 65%,
    rgba(99, 102, 241, 0.72) 0%,
    rgba(139, 92, 246, 0.48) 32%,
    rgba(67, 56, 202, 0.18) 60%,
    transparent 75%
  );
  animation: libAuroraDrift1 26s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

/* 2. Küre: Sağ-alt Ufuk Işıması (Canlı Elektrik Cyan & Okyanus Mavisi) */
.lib-aurora-2 {
  bottom: -150px;
  right: -10%;
  width: min(740px, 115vw);
  height: min(440px, 58vh);
  background: radial-gradient(ellipse 65% 52% at 55% 65%,
    rgba(6, 182, 212, 0.68) 0%,
    rgba(56, 189, 248, 0.44) 30%,
    rgba(14, 165, 233, 0.18) 62%,
    transparent 75%
  );
  animation: libAuroraDrift2 32s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

/* 3. Küre: Alt-orta Geçiş Işıması (Gök Zümrüt / Nane & Canlı Mor Vurgusu) */
.lib-aurora-3 {
  bottom: -190px;
  left: 18%;
  width: min(680px, 100vw);
  height: min(410px, 54vh);
  background: radial-gradient(ellipse 62% 50% at 50% 60%,
    rgba(52, 211, 153, 0.54) 0%,
    rgba(45, 212, 191, 0.36) 32%,
    rgba(168, 85, 247, 0.22) 58%,
    transparent 75%
  );
  animation: libAuroraDrift3 22s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

/* Çok Hafif, Akıcı ve Sakin Animasyonlar (GPU Optimized translate3d) */
@keyframes libAuroraDrift1 {
  0% {
    transform: translate3d(-14px, 0, 0) scale(0.98);
  }
  50% {
    transform: translate3d(16px, -12px, 0) scale(1.04);
  }
  100% {
    transform: translate3d(8px, 6px, 0) scale(1);
  }
}

@keyframes libAuroraDrift2 {
  0% {
    transform: translate3d(14px, -6px, 0) scale(1.02);
  }
  50% {
    transform: translate3d(-18px, 10px, 0) scale(0.97);
  }
  100% {
    transform: translate3d(8px, -8px, 0) scale(1.03);
  }
}

@keyframes libAuroraDrift3 {
  0% {
    transform: translate3d(0, 8px, 0) scale(0.96);
  }
  50% {
    transform: translate3d(16px, -14px, 0) scale(1.04);
  }
  100% {
    transform: translate3d(-12px, 6px, 0) scale(0.99);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lib-aurora-1,
  .lib-aurora-2,
  .lib-aurora-3 {
    animation: none !important;
  }
}

/* ══════════════════════════════════════════
   4. AYRI ÇALIŞMA EKRANI (STUDY CONTAINER)
   ══════════════════════════════════════════ */
.lib-study-container {
  width: 100%;
  max-width: 580px;
  height: 100%;
  min-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* ── Üst Bar: Minimal Kütüphane Bilgisi ve Şık Çıkış Kontrolü ── */
.lib-study-topbar,
.lib-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 2px 14px;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.65s ease;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lib-topbar-left,
.lib-top-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84375rem;
}

.lib-topbar-title,
.lib-top-title {
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: -0.01em;
}

.lib-topbar-divider,
.lib-top-divider {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
}

.lib-topbar-count,
.lib-top-count {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 400;
}

/* ── Şık Yuvarlak Bitir / Çıkış Butonu (Siteyle Tam Uyumlu Liquid Glass) ── */
.lib-topbar-right,
.lib-top-right {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.lib-btn-exit,
.lib-exit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.lib-btn-exit:hover,
.lib-exit-btn:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.38);
  color: #EF4444;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 16px rgba(239, 68, 68, 0.28);
  transform: translateY(-1px) scale(1.05);
}

.lib-btn-exit:active,
.lib-exit-btn:active {
  transform: translateY(0) scale(0.94);
  background: rgba(239, 68, 68, 0.24);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.lib-btn-exit svg,
.lib-exit-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.lib-btn-exit:hover svg,
.lib-exit-btn:hover svg {
  transform: scale(1.08);
}

.lib-exit-icon {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #EF4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.lib-btn-exit:hover .lib-exit-icon,
.lib-exit-btn:hover .lib-exit-icon {
  transform: scale(1.15);
}

/* ══════════════════════════════════════════
   5. SAAT TAM ORTADA & ZARİF DERS ADI
   ══════════════════════════════════════════ */
.lib-timer-hero,
.lib-focus-hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: auto 0;
  z-index: 2;
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Zamanlayıcı Arkası Hafif Soluyan Işık (Breathing Light Aura) */
.lib-timer-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(260px, 65vw, 420px);
  height: clamp(140px, 35vw, 220px);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.25) 0%, rgba(56, 189, 248, 0.12) 45%, transparent 75%);
  filter: blur(48px);
  pointer-events: none;
  animation: libTimerGlow 5s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes libTimerGlow {
  0% {
    opacity: 0.38;
    transform: translate(-50%, -50%) scale(0.92);
  }
  100% {
    opacity: 0.72;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

.lib-timer-digits {
  position: relative;
  z-index: 1;
  font-family: var(--font-digits, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Rounded", monospace);
  font-size: clamp(3.8rem, 14vw, 5.8rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: #FFFFFF;
  line-height: 1;
  text-shadow: 0 0 35px rgba(255, 255, 255, 0.12), 0 0 75px rgba(139, 92, 246, 0.18);
  user-select: none;
}

/* Dokunulamaz, Kutucuksuz, Sadece Hafif Gri Ders Adı */
.lib-subject-text {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: 0.9375rem;
  font-weight: 450;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.42);
  cursor: default;
  user-select: none;
  pointer-events: none;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  text-align: center;
}

/* Eski kapsül stili desteği (eğer dışarıdan çağrılırsa) */
.lib-subject-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 4px 12px;
  border-radius: 980px;
  background: transparent;
  border: none;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

/* ══════════════════════════════════════════
   6. BİRLİKTE ÇALIŞANLAR AÇILIR MENÜSÜ (PEERS ACCORDION & DROPDOWN)
   ══════════════════════════════════════════ */
.lib-peers-dropdown-wrap,
.lib-peers-card,
.lib-peers-section {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: auto auto 4px auto;
  box-sizing: border-box;
  flex-shrink: 0;
  z-index: 25;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.65s ease;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Şık & Sade Açılır Menü Tetikleyici Butonu (Siteyle Uyumlu) */
.lib-peers-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 14px 8px 14px;
  background: rgba(16, 19, 28, 0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9999px;
  color: #FFFFFF;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.lib-peers-toggle-btn:hover {
  background: rgba(22, 26, 38, 0.88);
  border-color: rgba(139, 92, 246, 0.38);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42), 0 0 16px rgba(139, 92, 246, 0.16);
  transform: translateY(-1px);
}

.lib-peers-toggle-btn:active {
  transform: translateY(0) scale(0.985);
}

.lib-peers-dropdown-wrap.is-open .lib-peers-toggle-btn,
.lib-peers-toggle-btn.is-open {
  background: rgba(26, 30, 44, 0.95);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2), 0 10px 28px rgba(0, 0, 0, 0.5);
}

.lib-peers-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.lib-peers-toggle-icon {
  color: #A78BFA;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.lib-peers-toggle-btn:hover .lib-peers-toggle-icon {
  transform: scale(1.1);
  color: #C4B5FD;
}

.lib-peers-toggle-label {
  font-size: 0.8125rem;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-peers-toggle-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Şık Yuvarlak İçinde Kişi Sayısı Rozeti */
.lib-peers-circle-badge,
.lib-peers-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32) 0%, rgba(99, 102, 241, 0.22) 100%);
  border: 1px solid rgba(139, 92, 246, 0.48);
  color: #FFFFFF;
  font-family: var(--font-digits, -apple-system, BlinkMacSystemFont, "SF Pro Display", monospace);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.28);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.lib-peers-toggle-btn:hover .lib-peers-circle-badge,
.lib-peers-dropdown-wrap.is-open .lib-peers-circle-badge {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.52) 0%, rgba(99, 102, 241, 0.38) 100%);
  border-color: rgba(196, 181, 253, 0.7);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.5);
  transform: scale(1.08);
}

.lib-peers-toggle-chevron {
  color: rgba(255, 255, 255, 0.45);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
  flex-shrink: 0;
}

.lib-peers-toggle-btn:hover .lib-peers-toggle-chevron {
  color: rgba(255, 255, 255, 0.85);
}

.lib-peers-dropdown-wrap.is-open .lib-peers-toggle-chevron,
.lib-peers-toggle-btn.is-open .lib-peers-toggle-chevron {
  transform: rotate(180deg);
  color: #C4B5FD;
}

/* Açılır Menü Paneli (Floating Glass Card — Akıcı Animasyonlar) */
.lib-peers-dropdown-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(14, 17, 26, 0.94);
  backdrop-filter: blur(36px) saturate(180%);
  -webkit-backdrop-filter: blur(36px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 20px 48px -6px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(255, 255, 255, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 14px 14px 12px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.96);
  transform-origin: bottom center;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.28s ease;
}

.lib-peers-dropdown-wrap.is-open .lib-peers-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.lib-peers-dropdown-header,
.lib-peers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 8px;
}

.lib-peers-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lib-peers-title {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.lib-peers-header-sub {
  font-size: 0.6875rem;
  font-weight: 550;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(139, 92, 246, 0.16);
  color: #C4B5FD;
}

.lib-peers-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.lib-peers-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  transform: scale(1.08);
}

.lib-peers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: clamp(140px, 32vh, 230px);
  overflow-y: auto;
  padding-right: 4px;
}

.lib-peers-list::-webkit-scrollbar {
  width: 4px;
}

.lib-peers-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 4px;
}

.lib-peers-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.lib-peer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.lib-peer-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.lib-peer-row.is-me {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12) 0%, rgba(99, 102, 241, 0.05) 100%);
  border: 1px solid rgba(139, 92, 246, 0.28);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
}

.lib-peer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.lib-peer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.lib-peer-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.lib-peer-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lib-peer-name {
  font-size: 0.8125rem;
  font-weight: 550;
  color: #FFFFFF;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lib-peer-me-tag {
  font-size: 0.625rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 9999px;
  background: rgba(139, 92, 246, 0.25);
  color: #C4B5FD;
  letter-spacing: 0.02em;
}

.lib-peer-subject {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lib-peer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lib-peer-duration {
  font-family: var(--font-digits, -apple-system, BlinkMacSystemFont, "SF Pro Display", monospace);
  font-size: 0.84375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.75);
}

.lib-peer-row.is-me .lib-peer-duration {
  color: #34D399;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(52, 211, 153, 0.3);
}

.lib-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 22px 16px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.015);
  border: 1px dashed rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

/* ══════════════════════════════════════════
   7. ZEN AMBIENT INACTIVITY MODU (DOKUNMAYINCA OTOMATİK SAKLAMA)
   ══════════════════════════════════════════ */
.lib-study-container.is-ambient .lib-study-topbar,
.lib-study-container.is-ambient .lib-top-bar {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(-14px) !important;
}

.lib-study-container.is-ambient .lib-peers-card,
.lib-study-container.is-ambient .lib-peers-section,
.lib-study-container.is-ambient .lib-peers-dropdown-wrap {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(18px) !important;
}

.lib-study-container.is-ambient .lib-chat-bar-wrap {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(18px) !important;
}

.lib-study-container.is-ambient .lib-timer-hero {
  transform: scale(1.04);
}

/* ══════════════════════════════════════════
   8. KÜTÜPHANE CANLI SOHBET (MINIMAL & DİKKAT DAĞITMAYAN CHAT)
   ══════════════════════════════════════════ */

/* Yüzen Akıcı Mesajlar Akışı (Instagram Live tarzı dikey akış) */
.lib-chat-stream {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 480px;
  margin: auto auto 8px auto;
  pointer-events: none;
  z-index: 10;
  min-height: 0;
  box-sizing: border-box;
  padding: 0 10px;
}

/* Instagram Tarzı, Kutucuksuz, Ultra Şık ve Akıcı Mesaj Satırı */
.lib-chat-msg {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  max-width: 100%;
  width: fit-content;
  /* KUTUCUK GÖRÜNTÜSÜ YOK: Kenarlık ve sert arka plan kutusu tamamen kaldırıldı */
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  /* Sağa doğru tamamen eriyen yumuşak organik degrade & hafif buzlu cam etkisi */
  background: linear-gradient(90deg, rgba(8, 10, 16, 0.64) 0%, rgba(8, 10, 16, 0.32) 72%, rgba(8, 10, 16, 0) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 9999px;
  padding: 3px 16px 3px 3px;
  box-sizing: border-box;
  pointer-events: auto;
  user-select: text;
  will-change: transform, opacity, filter;
  /* Premium Geliş Animasyonu: Aşağıdan yaylanarak (spring physics), buğudan netleşerek gelir */
  animation: libChatMsgIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  /* Gidiş Animasyonu Geçişi */
  transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Kendi gönderdiğimiz mesaj: Instagram / Aurora lila-mavi zarif degrade ışıması */
.lib-chat-msg.is-me {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.26) 0%, rgba(59, 130, 246, 0.14) 65%, rgba(14, 16, 24, 0) 100%);
  border: none !important;
  box-shadow: none !important;
}

/* Premium Gidiş Animasyonu: Yukarı doğru zarifçe süzülerek, hafifçe küçülerek ve buğulanarak erir */
.lib-chat-msg.is-leaving {
  opacity: 0 !important;
  transform: translateY(-20px) scale(0.92) !important;
  filter: blur(6px) !important;
  pointer-events: none !important;
  transition: opacity 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.42s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.42s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Yeni mesaj geldiğinde eskilerin hızlandırılmış yumuşak çıkışı */
.lib-chat-msg.is-leaving.is-fast {
  transform: translateY(-24px) scale(0.88) !important;
  transition-duration: 0.24s !important;
}

/* Geliş Animasyonu Keyframe'i (Silky iOS/Instagram Spring) */
@keyframes libChatMsgIn {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.9);
    filter: blur(6px);
  }
  65% {
    opacity: 1;
    transform: translateY(-2px) scale(1.02);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

/* Instagram Story / Live Tarzı İkonik Degrade Halka Çerçevesi */
.lib-chat-msg-avatar {
  position: relative;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  padding: 1.5px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  margin-top: 1px;
}

/* Kendi mesajımızda lila / camgöbeği ışıltılı halka */
.lib-chat-msg.is-me .lib-chat-msg-avatar {
  background: linear-gradient(135deg, #38BDF8 0%, #818CF8 50%, #C084FC 100%);
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
}

.lib-chat-avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #0B0D14;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lib-chat-msg-avatar img,
.lib-chat-msg-avatar svg,
.lib-chat-avatar-inner img,
.lib-chat-avatar-inner svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.lib-chat-msg-avatar svg,
.lib-chat-avatar-inner svg {
  padding: 3px;
  box-sizing: border-box;
  color: #FFFFFF;
}

/* Instagram Tipografisi ve Doğal Metin Akışı */
.lib-chat-msg-content {
  display: block;
  min-width: 0;
  line-height: 1.36;
  padding: 3px 4px 3px 0;
  word-break: break-word;
}

.lib-chat-msg-author {
  display: inline;
  font-size: 0.8125rem;
  font-weight: 650;
  color: #FFFFFF;
  letter-spacing: -0.01em;
  margin-right: 6px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 8px rgba(0, 0, 0, 0.6);
  user-select: text;
}

.lib-chat-msg.is-me .lib-chat-msg-author {
  color: #C4B5FD;
  text-shadow: 0 0 10px rgba(167, 139, 250, 0.55), 0 1px 3px rgba(0, 0, 0, 0.95);
}

.lib-chat-msg-text {
  display: inline;
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.36;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.92), 0 2px 6px rgba(0, 0, 0, 0.55);
  word-break: break-word;
  user-select: text;
}

@media (prefers-reduced-motion: reduce) {
  .lib-chat-msg {
    animation: none !important;
    transition: opacity 0.2s ease !important;
    filter: none !important;
  }
  .lib-chat-msg.is-leaving {
    transform: none !important;
    filter: none !important;
  }
}

/* Mesaj Gönderme Çubuğu Kapsülü */
.lib-chat-bar-wrap {
  width: 100%;
  margin-top: 6px;
  margin-bottom: 2px;
  position: relative;
  z-index: 3;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.65s ease;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  box-sizing: border-box;
}

.lib-chat-form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: rgba(14, 16, 24, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  padding: 4px 6px 4px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.lib-chat-form:focus-within {
  border-color: rgba(122, 167, 255, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(122, 167, 255, 0.15);
  background: rgba(18, 21, 30, 0.88);
}

.lib-chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
  padding: 6px 0;
  min-width: 0;
  line-height: 1.4;
}

.lib-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.lib-chat-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  padding: 0;
  outline: none;
}

.lib-chat-send-btn:hover {
  background: rgba(122, 167, 255, 0.22);
  border-color: rgba(122, 167, 255, 0.38);
  color: #FFFFFF;
  transform: scale(1.05);
}

.lib-chat-send-btn:active {
  transform: scale(0.95);
}

/* ══════════════════════════════════════════
   9. MOBİL UYUMLULUK (RESPONSIVE)
   ══════════════════════════════════════════ */
@media (max-width: 600px) {
  .sd-library-container {
    padding: 0;
  }

  .lib-landing-box {
    padding: 24px 18px;
    border-radius: 20px;
    max-width: 320px;
  }

  .lib-timer-digits {
    font-size: clamp(3.2rem, 13vw, 4.4rem);
  }

  .lib-peers-card,
  .lib-peers-section,
  .lib-peers-dropdown-wrap {
    max-width: 100%;
    padding: 0;
    border-radius: 0;
    margin-bottom: 2px;
  }

  .lib-peers-dropdown-menu {
    border-radius: 18px;
    padding: 12px 10px 10px;
    bottom: calc(100% + 8px);
  }

  .lib-peers-list {
    max-height: clamp(120px, 30vh, 190px);
  }

  .lib-chat-stream {
    max-width: 100%;
    margin-bottom: 6px;
    padding: 0 6px;
  }

  .lib-chat-msg-avatar {
    width: 25px;
    height: 25px;
    min-width: 25px;
  }

  .lib-chat-msg-author,
  .lib-chat-msg-text {
    font-size: 0.78125rem;
  }

  .lib-chat-form {
    max-width: 100%;
  }
}
