/* ═══════════════════════════════════════════════
   Navoiy AI — Global CSS
   Minimalist: Oq · Kulrang · Qora
═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg:          #0c0c0c;
  --bg-2:        #141414;
  --bg-3:        #1c1c1c;
  --bg-4:        #242424;
  --border:      #2e2e2e;
  --border-soft: #222222;
  --txt-1:       #f0f0f0;
  --txt-2:       #a0a0a0;
  --txt-3:       #606060;
  --accent:      #e8e8e8;
  --accent-dim:  #888888;
  --white:       #ffffff;
  --danger:      #e05555;
  --success:     #55b87a;
  --radius:      12px;
  --radius-sm:   8px;
  --header-h:    60px;
  --period-bar-h: 48px;
  --chat-w:      320px;
  --transition:  0.22s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--txt-1);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  overflow: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }

/* ──────────────────────────────────────────────
   HEADER
────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(12,12,12,0.94);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  z-index: 100;
}

/* Til tugmalari (UZB/ENG/RUS) va "ℹ️ Ma'lumot" endi o'rtada emas —
   "margin-left:auto" bilan o'ngga, akkaunt (header-right) yoniga
   suriladi; header'dagi "gap" har ikkisi orasida va akkaunt nomiga
   yopishib qolmasin deb bo'shliq qoldiradi. */
.header-center {
  margin-left: auto;
}

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

.logo-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(232,232,232,0.5);
}

.logo-text {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--txt-1);
}

.logo-ai {
  color: var(--txt-2);
  font-weight: 300;
}

/* Til tanlash */
.lang-switcher {
  display: flex;
  gap: 2px;
  background: var(--bg-3);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.lang-btn {
  padding: 5px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--txt-3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: var(--transition);
}

.lang-btn:hover { color: var(--txt-2); }

.lang-btn.active {
  background: var(--bg-4);
  color: var(--txt-1);
}

/* Header right */
.btn-login {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--txt-1);
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

.btn-login:hover {
  background: var(--bg-3);
  border-color: var(--accent-dim);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-icon { font-size: 18px; }

.user-name {
  color: var(--txt-1);
  font-size: 13px;
  font-weight: 500;
}

.btn-logout {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--txt-3);
  font-size: 12px;
  transition: var(--transition);
}

.btn-logout:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.btn-admin {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--txt-2);
  font-size: 12px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-admin:hover {
  color: var(--txt-1);
  text-decoration: none;
}

/* ──────────────────────────────────────────────
   MAIN LAYOUT
────────────────────────────────────────────── */
.main-layout {
  display: flex;
  height: var(--app-height, 100vh);
  padding-top: var(--header-h);
}

/* ──────────────────────────────────────────────
   AVATAR SECTION
────────────────────────────────────────────── */
.avatar-section {
  position: relative;
  flex: 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 3D halo effektlari */
.avatar-halo {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(180,180,180,0.05) 0%,
    rgba(100,100,100,0.03) 40%,
    transparent 70%);
  animation: haloPulse 4s ease-in-out infinite;
  pointer-events: none;
}

.avatar-halo-2 {
  position: absolute;
  width: 680px; height: 680px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.04);
  animation: haloRotate 12s linear infinite;
  pointer-events: none;
}

.avatar-halo-2::before {
  content: '';
  position: absolute;
  top: -1px; left: 20%;
  width: 60%; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  border-radius: 50%;
}

@keyframes haloPulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50%       { transform: scale(1.08); opacity: 1; }
}

@keyframes haloRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Particle dots */
.avatar-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px; height: 2px;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  animation: floatParticle linear infinite;
}

@keyframes floatParticle {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.5; }
  100% { transform: translateY(-120px) translateX(var(--drift)); opacity: 0; }
}

/* Avatar frame */
.avatar-frame {
  position: relative;
  width: min(65vh, 480px);
  height: min(75vh, 580px);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 0 60px rgba(0,0,0,0.8),
    0 0 120px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.08);
  background: #000;
  z-index: 1;
}

.avatar-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Gapirish indikatoru */
.speaking-indicator {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 4px;
  align-items: flex-end;
  height: 24px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.78);
  border-radius: 20px;
}

.speaking-indicator.active {
  display: flex;
}

.wave-bar {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: waveAnim 0.8s ease-in-out infinite;
}

.wave-bar:nth-child(1) { height: 8px;  animation-delay: 0s; }
.wave-bar:nth-child(2) { height: 14px; animation-delay: 0.1s; }
.wave-bar:nth-child(3) { height: 20px; animation-delay: 0.2s; }
.wave-bar:nth-child(4) { height: 14px; animation-delay: 0.3s; }
.wave-bar:nth-child(5) { height: 8px;  animation-delay: 0.4s; }

@keyframes waveAnim {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50%       { transform: scaleY(1);   opacity: 1; }
}

/* Avatar nomi */
.avatar-name-badge {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 2;
  pointer-events: none;
}

.avatar-name-text {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  letter-spacing: 0.5px;
}

.avatar-status {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
}

/* Login overlay */
.login-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12,12,12,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border-radius: 0;
}

.overlay-content {
  text-align: center;
  padding: 40px 32px;
  max-width: 340px;
}

.overlay-icon {
  font-size: 48px;
  margin-bottom: 20px;
  display: block;
}

.overlay-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--txt-1);
  margin-bottom: 10px;
}

.overlay-desc {
  font-size: 13px;
  color: var(--txt-2);
  line-height: 1.6;
  margin-bottom: 24px;
}

.overlay-btn {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}

/* ──────────────────────────────────────────────
   CHAT SECTION
────────────────────────────────────────────── */
.chat-section {
  width: var(--chat-w);
  border-left: 1px solid var(--border-soft);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 18px 10px;
  border-bottom: 1px solid var(--border-soft);
}

.chat-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--txt-2);
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.mic-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-3);
  color: var(--txt-3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.mic-btn:hover { color: var(--txt-1); border-color: var(--accent-dim); }

.mic-btn.active {
  background: rgba(224,85,85,0.15);
  color: var(--danger);
  border-color: var(--danger);
  animation: micPulse 1s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,85,85,0.3); }
  50%       { box-shadow: 0 0 0 6px rgba(224,85,85,0); }
}

.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.messages-list::-webkit-scrollbar { width: 4px; }
.messages-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Xabarlar */
.msg {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  animation: msgSlide 0.2s ease;
}

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

.msg.user {
  align-self: flex-end;
  background: var(--bg-4);
  color: var(--txt-1);
  border: 1px solid var(--border);
  border-bottom-right-radius: 4px;
}

.msg.bot {
  align-self: flex-start;
  background: var(--bg-3);
  color: var(--txt-1);
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 4px;
}

.msg.system {
  align-self: center;
  background: transparent;
  color: var(--txt-3);
  font-size: 12px;
  text-align: center;
  max-width: 100%;
  padding: 4px 0;
}

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
}

.typing-dots span {
  width: 6px; height: 6px;
  background: var(--txt-3);
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}

/* Chat input */
.chat-input-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px 16px 14px;
  border-top: 1px solid var(--border-soft);
}

.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* "Qisqa"/"Uzun" tugmalari — javob uzunligini oldindan tanlash */
.chat-length-btn {
  flex: 1;
  padding: 5px 0;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: #cbd5e1;
  font-size: 11.5px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: var(--transition);
}
.chat-length-btn.active {
  background: linear-gradient(135deg, #f4d878, #b8860b);
  color: #241a02;
  font-weight: 700;
  border-color: transparent;
}

.chat-input {
  flex: 1;
  min-height: 48px;
  height: 48px;
  padding: 10px 16px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--txt-1);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.chat-input::placeholder { color: var(--txt-3); }

.chat-input:focus {
  border-color: var(--accent-dim);
  background: var(--bg-4);
}

.chat-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-btn {
  width: 48px; height: 48px;
  min-width: 48px; min-height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--bg-4);
  color: var(--txt-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  cursor: pointer;
}

.send-btn:hover { background: var(--accent); color: var(--bg); }
.send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ──────────────────────────────────────────────
   BUTTONS
────────────────────────────────────────────── */
.btn-primary {
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--txt-1);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  transition: var(--transition);
}

.btn-primary:hover { background: var(--white); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  padding: 11px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--txt-2);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  transition: var(--transition);
}

.btn-secondary:hover { border-color: var(--accent-dim); color: var(--txt-1); }

.full-width { width: 100%; }

/* ──────────────────────────────────────────────
   MODAL
────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 400px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-box {
  transform: scale(1) translateY(0);
}

/* Modal tabs */
.modal-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
  padding: 0 20px;
}

.modal-tab {
  flex: 1;
  padding: 16px 0;
  background: transparent;
  border: none;
  color: var(--txt-3);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  position: relative;
  transition: var(--transition);
}

.modal-tab:hover { color: var(--txt-2); }

.modal-tab.active { color: var(--txt-1); }

.modal-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--txt-3);
  font-size: 18px;
  padding: 8px;
  line-height: 1;
  transition: var(--transition);
  margin-left: 4px;
}

.modal-close:hover { color: var(--txt-1); }

/* Tab content */
.tab-content {
  padding: 28px 28px 24px;
}

.tab-content.hidden { display: none; }

.modal-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 14px;
  display: block;
}

.modal-title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  color: var(--txt-1);
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--txt-2);
  text-align: center;
  margin-bottom: 26px;
}

/* Form */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--txt-2);
  margin-bottom: 6px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--txt-1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.form-input::placeholder { color: var(--txt-3); }

.form-input:focus {
  border-color: var(--accent-dim);
  background: var(--bg-4);
}

.input-eye-wrap {
  position: relative;
}

.input-eye-wrap .form-input {
  padding-right: 44px;
}

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--txt-3);
  font-size: 14px;
  line-height: 1;
  padding: 2px;
  transition: var(--transition);
}

.eye-btn:hover { color: var(--txt-2); }

.form-error {
  color: var(--danger);
  font-size: 12.5px;
  min-height: 18px;
  margin-bottom: 12px;
  text-align: center;
}

.modal-footer-text {
  text-align: center;
  margin-top: 18px;
  color: var(--txt-3);
  font-size: 12.5px;
}

.modal-footer-text a {
  color: var(--txt-2);
  margin-left: 4px;
}

.modal-footer-text a:hover { color: var(--txt-1); }

/* ──────────────────────────────────────────────
   TOAST NOTIFICATION
────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-4);
  border: 1px solid var(--border);
  color: var(--txt-1);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13.5px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  opacity: 0;
  transition: all 0.3s ease;
  /* Taqdimot/Battle Test to'liq ekranida bu element pres-player-root
     (z-index:10001) yoki pres-controls-bar (z-index:10002) ichiga/yoniga
     tushishi mumkin (showToast() qarang) — shulardan yuqorida chiqishi
     uchun z-index ancha oshirilgan. */
  z-index: 10010;
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: var(--success); color: var(--success); }
.toast.error   { border-color: var(--danger);  color: var(--danger); }
.toast.info    { border-color: var(--accent);  color: var(--accent); }

/* ──────────────────────────────────────────────
   ADMIN PAGE
────────────────────────────────────────────── */
.admin-page {
  min-height: 100vh;
  background: var(--bg);
  padding-top: var(--header-h);
}

.admin-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}

.admin-page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--txt-1);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--txt-1);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--txt-3);
  letter-spacing: 0.5px;
}

.admin-table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
}

.admin-table-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--txt-1);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 12px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--txt-3);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-3);
}

tbody tr {
  border-bottom: 1px solid var(--border-soft);
  transition: var(--transition);
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-3); }

tbody td {
  padding: 13px 20px;
  font-size: 13px;
  color: var(--txt-1);
}

.role-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
}

.role-badge.admin {
  background: rgba(232,232,232,0.1);
  color: var(--txt-1);
}

.role-badge.user {
  background: rgba(96,96,96,0.2);
  color: var(--txt-3);
}

.delete-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--txt-3);
  font-size: 12px;
  transition: var(--transition);
}

.delete-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* ──────────────────────────────────────────────
   GOOGLE AUTH MODAL
────────────────────────────────────────────── */
.modal-box-google {
  width: 380px;
  padding: 32px 28px 24px;
  position: relative;
  text-align: center;
}

.modal-close-standalone {
  position: absolute;
  top: 14px;
  right: 14px;
}

.google-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 16px;
  min-height: 44px;
}

.modal-or-divider {
  text-align: center;
  color: #8b93a3;
  font-size: 12.5px;
  margin: -8px 0 10px;
}

.telegram-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 16px;
  min-height: 40px;
}

.btn-telegram-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: #229ED9;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-telegram-login:hover {
  background: #1c8bc2;
}

.modal-footer-muted {
  font-size: 11.5px;
  color: var(--txt-3);
  line-height: 1.5;
}

/* ──────────────────────────────────────────────
   USAGE BADGE
────────────────────────────────────────────── */
.usage-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: rgba(85, 184, 122, 0.12);
  color: var(--success);
  border: 1px solid rgba(85, 184, 122, 0.25);
}

.usage-badge.low {
  background: rgba(224, 85, 85, 0.12);
  color: var(--danger);
  border-color: rgba(224, 85, 85, 0.25);
}

.usage-badge.vip {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

/* ──────────────────────────────────────────────
   LIMIT OVERLAY (24 soat blok)
────────────────────────────────────────────── */
.limit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  animation: fadeIn 0.35s ease;
}

.limit-box {
  text-align: center;
  padding: 36px 32px;
  max-width: 360px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.limit-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.limit-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--txt-1);
  margin-bottom: 10px;
}

.limit-desc {
  font-size: 13px;
  color: var(--txt-2);
  line-height: 1.6;
  margin-bottom: 16px;
}

.limit-countdown {
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f59e0b;
  letter-spacing: 2px;
  margin-bottom: 12px;
  text-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.limit-hint {
  font-size: 12px;
  color: var(--txt-3);
  margin-bottom: 22px;
}

.btn-telegram {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #0088cc, #006699);
  color: #fff;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0, 136, 204, 0.35);
}

.btn-telegram:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0, 136, 204, 0.45);
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
#wakeToggleBtn {
  background: #2c1d0e;
  color: #d4af37;
  border: 1px solid #d4af37;
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}
#wakeToggleBtn.active {
  background: #d4af37;
  color: #1c130a;
  box-shadow: 0 0 12px rgba(212,175,55,0.6);
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px rgba(212,175,55,0.5); }
  50%      { box-shadow: 0 0 18px rgba(212,175,55,0.9); }
}
.navoiy-globe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px rgba(244, 216, 120, 0.55));
  animation: globeGlow 3s ease-in-out infinite;
}

.navoiy-globe svg {
  animation: globeSpin 12s linear infinite;
  transform-origin: 50% 50%;
}

@keyframes globeSpin {
  0%   { transform: rotate(0deg) scaleX(1); }
  50%  { transform: rotate(180deg) scaleX(0.8); }
  100% { transform: rotate(360deg) scaleX(1); }
}

@keyframes globeGlow {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(244, 216, 120, 0.4))
            drop-shadow(0 0 10px rgba(244, 216, 120, 0.15));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(244, 216, 120, 0.9))
            drop-shadow(0 0 20px rgba(244, 216, 120, 0.5));
  }
}
.chat-title-btn {
  background: transparent;
  border: none;
  color: var(--txt-2, #a0a0a0);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.25s ease;
}
.chat-title-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  color: #d4af37;
}
.chat-title-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}
.chat-title-btn {
  background: transparent;
  border: none;
  color: var(--txt-2, #a0a0a0);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.25s ease;
}
.chat-title-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  color: #d4af37;
}
.chat-title-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}
.chat-title-btn {
  background: transparent;
  border: none;
  color: var(--txt-2, #a0a0a0);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.25s ease;
}
.chat-title-btn:hover {
  background: rgba(212, 175, 55, 0.12);
  color: #d4af37;
}
.chat-title-btn.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.confetti-piece {
  position: fixed;
  top: -12px;
  pointer-events: none;
  z-index: 99999;
  animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.2; }
}
/* Test rejimida chat panelini kengaytirish, avatar qismini torайтirish */
.chat-section.quiz-wide #messagesList,
.chat-section.quiz-wide .quiz-container {
  width: 100% !important;
  max-width: 100% !important;
}
.chat-section.quiz-wide .msg.bot {
  max-width: 100% !important;
}
/* ── Test rejimida endi TO'LIQ EKRAN (Battle Test'dagi kabi) — avval
   50/50 bo'linar edi, endi savol boshlanganda avatar tomoni butunlay
   yashiriladi, "Orqaga"/tugatilganda esa shrinkQuizPanel() bu klassni
   olib tashlab, oldingi split-ekran holatiga avtomatik qaytaradi. ── */
.avatar-section.quiz-wide {
  display: none !important;
}

.chat-section.quiz-wide {
  flex: 1 1 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  transition: flex 0.3s ease, width 0.3s ease;
}

.chat-section.quiz-wide #messagesList,
.chat-section.quiz-wide .quiz-container {
  width: 100% !important;
  max-width: 100% !important;
}

.chat-section.quiz-wide .msg.bot {
  max-width: 100% !important;
}

/* ═══════════════════════════════════════════════
   YENGIL REJIM (lite-mode) — zaif qurilmalar uchun
   (main.js avtomatik yoqadi: kam RAM/CPU aniqlanganda).
   Sof bezak uchun DOIM ishlab turadigan fon-animatsiyalar
   (halo, particle, globus aylanishi) protsessor/GPU'ni
   behuda band qilib, video va nutqni tanish bilan
   raqobatlashadi — shuning uchun bu rejimda o'chiriladi.
═══════════════════════════════════════════════ */
.lite-mode .avatar-halo,
.lite-mode .avatar-halo-2,
.lite-mode .avatar-particles,
.lite-mode .particle {
  display: none !important;
}

.lite-mode .navoiy-globe,
.lite-mode .navoiy-globe svg {
  animation: none !important;
  filter: none !important;
}

.lite-mode #wakeToggleBtn.active {
  animation: none !important;
}

/* ═══════════════════════════════════════════════
   LIVE SUHBAT — to'liq ekran (Battle Test/Taqdimotdagi kabi).
   Kamera tasviri va boshqaruv tugmalari vh/vw asosida o'lchanadi —
   shunda kichik (masalan 6.5 dyuymli) telefon ekranida ham hech narsa
   (ayniqsa pastdagi tugmalar) ekrandan chiqib ketmaydi.
═══════════════════════════════════════════════ */
.live-fullscreen-root {
  position: fixed; inset: 0; z-index: 10001;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 0%, #1a1114, #050505 75%);
  font-family: 'Inter', sans-serif;
  padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  overflow-y: auto;
}
.live-fullscreen-inner {
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  margin: auto;
}
.live-close-btn {
  position: fixed; right: 18px; top: max(18px, env(safe-area-inset-top));
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 20px; width: 38px; height: 38px; border-radius: 50%;
  cursor: pointer; z-index: 2;
}
.live-title { margin: 10px 0 5px 0; font-size: clamp(18px, 5vw, 22px); color: #f87171; }
.live-title-badge { font-size: 12px; color: #94a3b8; font-weight: 400; }
.live-desc { color: #94a3b8; margin: 0 0 14px 0; font-size: 13.5px; }
.live-camera-preview {
  width: min(88vw, 380px);
  max-height: 42vh;
  border-radius: 16px;
  margin: 0 auto 14px auto;
  background: #000;
  object-fit: cover;
  display: none;
}
.live-controls-row {
  display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.live-btn-main {
  width: clamp(72px, 20vw, 90px); height: clamp(72px, 20vw, 90px);
  border-radius: 50%; border: none;
  background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff;
  font-size: clamp(24px, 6vw, 30px); cursor: pointer;
  box-shadow: 0 6px 20px rgba(239,68,68,0.4);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}
.live-btn-sub {
  width: clamp(46px, 14vw, 54px); height: clamp(46px, 14vw, 54px);
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08); color: #fff;
  font-size: clamp(16px, 4vw, 20px); cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.live-status { margin: 18px 0 0 0; font-size: 14px; color: #e5e7eb; }

@media (max-height: 700px) {
  .live-camera-preview { max-height: 30vh; margin-bottom: 10px; }
  .live-desc { margin-bottom: 8px; }
  .live-title { margin: 6px 0 2px 0; }
}
