:root {
  --bg-primary: #0a0b10;
  --bg-secondary: #12141c;
  --bg-card: rgba(23, 26, 38, 0.75);
  --bg-card-hover: rgba(32, 36, 52, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.35);
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-glow: rgba(239, 68, 68, 0.4);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* EKRANLAR ALMASHINUVI */
.screen {
  display: none;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.screen.active {
  display: flex;
}

/* ═══════════════════════════════════════════════
   LOBBY EKRANI
   ═══════════════════════════════════════════════ */
#lobbyScreen {
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
              var(--bg-primary);
}

.lobby-container {
  width: 100%;
  max-width: 1000px;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.lobby-header {
  text-align: center;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 12px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.lobby-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.lobby-header .subtitle {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

.lobby-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .lobby-grid {
    grid-template-columns: 1fr;
  }
}

.preview-card, .join-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.video-preview-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.video-preview-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1); /* Oyna effekti */
}

.avatar-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e1b4b, #312e81);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 700;
  color: #c7d2fe;
}

.avatar-placeholder.hidden {
  display: none !important;
}

.preview-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.mic-level-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  pointer-events: auto;
}

.mic-meter-bar {
  width: 50px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.mic-meter-fill {
  width: 0%;
  height: 100%;
  background: #10b981;
  transition: width 0.05s ease;
}

.preview-controls {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.icon-btn-round {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-btn-round:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.icon-btn-round.disabled {
  background: var(--danger);
  border-color: var(--danger);
}

.icon-btn-round svg {
  width: 20px;
  height: 20px;
}

.device-selectors {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.select-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.device-select {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.device-select:focus {
  border-color: var(--primary);
}

/* Kirish kartasi */
.join-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.join-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.4;
}

#joinForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.quality-info-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0;
}

.quality-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quality-item .icon {
  font-size: 1.2rem;
}

.quality-item strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #e2e8f0;
}

.quality-item small {
  display: block;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary), #4338ca);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px var(--primary-glow);
  margin-top: auto;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7073ff, #4f46e5);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   CALL EKRANI (VIDEO MAYDONI VA BOSHQARUV)
   ═══════════════════════════════════════════════ */
#callScreen {
  flex-direction: column;
  background: #000;
  position: relative;
}

/* Yuqori sarlavha */
.call-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 20;
  pointer-events: auto;
}

.call-header-left, .call-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.room-pill:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

.room-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
}

.room-pill strong {
  font-family: var(--font-mono);
  color: #fff;
  letter-spacing: 0.04em;
}

.copy-icon {
  opacity: 0.7;
}

.call-timer {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.call-header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .call-header-center {
    display: none;
  }
}

.stats-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: #cbd5e1;
  font-family: var(--font-mono);
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
}

.status-indicator.live {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.stat-sep {
  opacity: 0.3;
}

.header-action-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Video Arena (Stage) */
.video-stage {
  flex: 1;
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Kutilmoqda oynasi */
.waiting-notice {
  position: absolute;
  z-index: 10;
  text-align: center;
  max-width: 500px;
  padding: 30px;
  background: rgba(18, 20, 28, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.waiting-notice.hidden {
  display: none !important;
}

.waiting-spinner {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: ripple 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-ring-inner {
  position: absolute;
  width: 70%;
  height: 70%;
  border-radius: 50%;
  border: 2px solid #a5b4fc;
  animation: ripple 2s cubic-bezier(0.215, 0.61, 0.355, 1) 0.5s infinite;
}

@keyframes ripple {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.waiting-icon {
  font-size: 2rem;
}

.waiting-notice h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.waiting-notice p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 18px;
}

.share-box {
  display: flex;
  gap: 8px;
}

.share-box input {
  flex: 1;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  color: #a5b4fc;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  outline: none;
}

/* Remote & Local Video Containers */
.remote-video-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: #090a0f;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remote-video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 1080p sifatni qirqmasdan to'liq ko'rsatish */
}

/* O'z videosi (PiP) */
.local-video-container {
  position: absolute;
  bottom: 96px;
  right: 24px;
  width: 260px;
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  z-index: 15;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: grab;
}

.local-video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.switch-layout-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.local-video-container:hover .switch-layout-btn {
  opacity: 1;
}

@media (max-width: 640px) {
  .local-video-container {
    bottom: 84px;
    right: 12px;
    width: 140px;
  }
}

.video-user-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}

.mini-status {
  font-size: 0.7rem;
}

/* Pastki boshqaruv doki */
.call-controls-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 20;
  pointer-events: none;
}

.controls-dock {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(18, 20, 28, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.control-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.control-btn .btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.control-btn .btn-icon svg {
  width: 22px;
  height: 22px;
}

.control-btn .btn-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
}

.control-btn:hover .btn-icon {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.control-btn.active .btn-icon {
  background: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
}

.control-btn.disabled .btn-icon {
  background: var(--danger);
  box-shadow: 0 0 12px var(--danger-glow);
}

.control-btn.btn-danger .btn-icon {
  background: var(--danger);
  width: 52px;
  border-radius: var(--radius-full);
}

.control-btn.btn-danger:hover .btn-icon {
  background: var(--danger-hover);
  transform: scale(1.05);
}

.chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  border: 2px solid #12141c;
}

.relative {
  position: relative;
}

.mobile-only {
  display: none;
}

@media (max-width: 768px) {
  .mobile-only {
    display: flex;
  }
  .controls-dock {
    gap: 6px;
    padding: 6px 10px;
  }
  .control-btn .btn-label {
    display: none;
  }
  .control-btn .btn-icon {
    width: 40px;
    height: 40px;
  }
  .control-btn .btn-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* ═══════════════════════════════════════════════
   CHAT YON PANELI (DRAWER)
   ═══════════════════════════════════════════════ */
.chat-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  max-width: 90vw;
  background: rgba(18, 20, 28, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-color);
  z-index: 30;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
}

.chat-drawer.open {
  transform: translateX(0);
}

.chat-drawer-header {
  height: 64px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-title h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.close-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-welcome-notice {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  padding: 10px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  animation: fadeInMsg 0.2s ease;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.mine {
  align-self: flex-end;
}

.chat-msg.theirs {
  align-self: flex-start;
}

.msg-bubble {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-msg.mine .msg-bubble {
  background: var(--primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg.theirs .msg-bubble {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-bottom-left-radius: 4px;
}

.msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chat-msg.mine .msg-meta {
  justify-content: flex-end;
}

.chat-input-form {
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
}

.chat-input-form input {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
}

.chat-input-form input:focus {
  border-color: var(--primary);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-send-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════════
   MODAL STATISTIKA
   ═══════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-body {
  padding: 20px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.stat-box strong {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #fff;
}

/* TOAST BILDIRISHNOMALAR */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 20, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  z-index: 200;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast.hidden {
  opacity: 0;
  transform: translate(-50%, 15px);
}

.hidden {
  display: none !important;
}
