/* ===== VARIABLES ===== */
:root {
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.2s ease;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.18);
}

/* ===== DARK THEME ===== */
[data-theme="dark"] {
  --bg-primary: #0D0D14;
  --bg-secondary: #13131F;
  --bg-card: #18182A;
  --bg-elevated: #1E1E30;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --text-primary: #F0F0FF;
  --text-secondary: #8888AA;
  --text-muted: #55556A;
  --accent: #7C5CFC;
  --accent-hover: #9175FF;
  --accent-light: rgba(124,92,252,0.15);
  --accent-text: #BBA8FF;
  --success: #22C55E;
  --success-light: rgba(34,197,94,0.12);
  --error: #F43F5E;
  --error-light: rgba(244,63,94,0.12);
  --warning: #F59E0B;
  --warning-light: rgba(245,158,11,0.12);
  --info: #3B82F6;
  --info-light: rgba(59,130,246,0.12);
  --nav-bg: rgba(13,13,20,0.92);
}

/* ===== LIGHT THEME ===== */
[data-theme="light"] {
  --bg-primary: #F5F5FF;
  --bg-secondary: #EEEEFF;
  --bg-card: #FFFFFF;
  --bg-elevated: #F8F8FF;
  --border: rgba(0,0,0,0.07);
  --border-strong: rgba(0,0,0,0.12);
  --text-primary: #1A1A2E;
  --text-secondary: #5A5A7A;
  --text-muted: #9999BB;
  --accent: #534AB7;
  --accent-hover: #4438A0;
  --accent-light: #EEEDFE;
  --accent-text: #534AB7;
  --success: #16A34A;
  --success-light: #F0FFF4;
  --error: #DC2626;
  --error-light: #FEF2F2;
  --warning: #D97706;
  --warning-light: #FFFBEB;
  --info: #2563EB;
  --info-light: #EFF6FF;
  --nav-bg: rgba(245,245,255,0.92);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}
.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.logo-icon .material-icons-round { font-size: 18px; }
.logo-icon.small { width: 24px; height: 24px; border-radius: 6px; }
.logo-icon.small .material-icons-round { font-size: 14px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  padding: 6px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  font-weight: 500;
}
.nav-link:hover, .nav-link.active {
  background: var(--accent-light);
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 2px;
}
.lang-btn {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--transition);
  letter-spacing: 0.5px;
}
.lang-btn.active {
  background: var(--accent);
  color: #fff;
}
.lang-btn:hover:not(.active) {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.theme-toggle:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}
.theme-toggle .material-icons-round { font-size: 18px; }

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-outline-sm {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.btn-outline-sm:hover {
  background: var(--bg-elevated);
  border-color: var(--accent);
}
.btn-primary-sm {
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  display: inline-block;
}
.btn-primary-sm:hover { background: var(--accent-hover); }

.mobile-right {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex-shrink: 0;
}
.mobile-menu-btn {
  display: flex;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.mobile-menu-btn:hover { background: var(--bg-elevated); }
.mobile-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}
.mobile-login-btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.mobile-login-btn:hover { background: var(--accent-hover); color: #fff; }

/* ── MOB ICON BTN (Testlarim) ── */
.mob-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  flex-shrink: 0;
  transition: background 0.15s;
}
.mob-icon-btn .material-icons-round { font-size: 18px; }
.mob-icon-btn:hover { background: var(--accent-light); color: var(--accent); }

/* ── MOB LANG PICKER ── */
.mob-lang-wrap {
  position: relative;
  flex-shrink: 0;
}
.mob-lang-btn {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  transition: background 0.15s, border-color 0.15s;
  height: 34px;
}
.mob-lang-btn:hover { border-color: var(--accent); background: var(--accent-light); }
.mob-lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 150px;
  z-index: 2000;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  pointer-events: none;
}
.mob-lang-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.mob-lang-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.12s;
  text-align: left;
}
.mob-lang-opt:hover { background: var(--bg-elevated); }
.mob-lang-opt.active { color: var(--accent); font-weight: 700; background: var(--accent-light); }

/* ===== BURGER OVERLAY ===== */
.burger-overlay {
  position: fixed;
  inset: 0;
  z-index: 1099;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}
.burger-overlay.open {
  opacity: 1 !important;
  pointer-events: all !important;
}

/* ===== NEW MOBILE MENU (slide-in drawer) ===== */
.mobile-menu {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 90vw);
  z-index: 1100;
  background: var(--bg-card);
  box-shadow: -8px 0 40px rgba(0,0,0,0.22);
  overflow-y: auto;
  overflow-x: hidden;
  transform: translateX(100%);
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  padding-bottom: 32px;
}
.mobile-menu.open {
  transform: translateX(0) !important;
  pointer-events: all !important;
}

/* Menu header */
.mm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mm-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
}
.mm-close-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}
.mm-close-btn:hover { background: var(--bg-elevated); }

/* Sections */
.mm-section { padding: 8px 12px; }
.mm-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 12px;
}

/* Links */
.mobile-link {
  padding: 11px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: background 0.13s, color 0.13s;
  position: relative;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  font-family: var(--font);
}
.mobile-link:hover, .mobile-link:focus { background: var(--bg-elevated); color: var(--text-primary); }
.mm-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--bg-elevated); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mm-icon .material-icons-round { font-size: 17px; }
.mm-label { flex: 1; font-weight: 500; text-align: left; }
.mm-arrow { color: var(--text-muted); }
.mm-arrow .material-icons-round { font-size: 18px; }

/* Accent link (Testlarim) */
.mm-accent-link .mm-icon { background: var(--accent-light, rgba(124,92,252,0.12)); }
.mm-accent-link .mm-icon .material-icons-round { color: var(--accent); }
.mm-accent-link .mm-label { color: var(--accent); font-weight: 600; }

/* Live badge */
.mm-live .mm-label { color: #ef4444; }

/* Profile card */
.mm-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 8px;
}
.mm-profile-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #9B5CFF);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.mm-profile-info { flex: 1; min-width: 0; }
.mm-profile-name { font-size: 14px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-profile-sub { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }

/* Auth buttons */
.mm-auth-btns { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }
.mm-btn-outline, .mm-btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700; text-decoration: none;
  transition: all 0.15s; font-family: var(--font);
}
.mm-btn-outline { border: 1.5px solid var(--border-strong); color: var(--text-primary); background: transparent; }
.mm-btn-outline:hover { background: var(--bg-elevated); color: var(--text-primary); }
.mm-btn-primary { background: linear-gradient(135deg, var(--accent), #9B5CFF); color: #fff; border: none; }
.mm-btn-primary:hover { opacity: 0.9; color: #fff; transform: translateY(-1px); }
.mm-btn-outline .material-icons-round, .mm-btn-primary .material-icons-round { font-size: 18px; }

/* Language pills */
.mm-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  gap: 12px;
}
.mm-setting-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.mm-setting-label .material-icons-round { font-size: 17px; }
.mm-lang-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mm-lang-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}
.mm-lang-pill.active {
  border-color: var(--accent);
  background: var(--accent-light, rgba(124,92,252,0.1));
  color: var(--accent);
}
.mm-lang-pill:hover:not(.active) { background: var(--bg-elevated); }
.mm-flag { font-size: 14px; }

/* Theme toggle */
.mm-theme-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}
.mm-theme-option {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
  white-space: nowrap;
}
.mm-theme-option .material-icons-round { font-size: 15px; }
.mm-theme-option.active {
  background: var(--accent);
  color: #fff;
}

/* Logout button */
.mm-logout-btn {
  color: var(--error, #dc2626) !important;
}
.mm-icon-danger { background: rgba(220,38,38,0.1) !important; }
.mm-icon-danger .material-icons-round { color: var(--error, #dc2626) !important; }
.mm-label-danger { color: var(--error, #dc2626) !important; font-weight: 600; }
.mm-logout-btn:hover { background: rgba(220,38,38,0.08) !important; }

/* Old divider compatibility */
.mobile-menu-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}


/* ===== MESSAGES ===== */
.messages-container {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}
.alert-success { background: var(--success-light); border-color: var(--success); color: var(--success); }
.alert-error { background: var(--error-light); border-color: var(--error); color: var(--error); }
.alert-close {
  background: none; border: none; color: inherit;
  margin-left: auto; opacity: 0.6; cursor: pointer;
  display: flex; align-items: center;
}
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== HERO ===== */
.hero {
  padding: 60px 24px 52px;
  text-align: center;
  background: linear-gradient(160deg, var(--accent-light) 0%, transparent 60%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-light) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 24px;
  position: relative;
}
.hero-badge .material-icons-round { font-size: 14px; }
.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  max-width: 560px;
  margin: 0 auto 16px;
  position: relative;
}
.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto 32px;
  line-height: 1.7;
  position: relative;
}
.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,92,252,0.4); }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
}
.btn-outline:hover { background: var(--accent-light); }

/* ===== STATS ROW ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-item {
  padding: 20px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-lbl {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* ===== SECTIONS ===== */
.section {
  padding: 40px 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.see-all {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.see-all:hover { gap: 8px; }

/* ===== CATEGORY CARDS ===== */
.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  display: block;
}
.cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.cat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 10px;
}
.cat-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.cat-count {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
}

/* ===== QUIZ CARDS ===== */
.quiz-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: block;
}
.quiz-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.quiz-card-top {
  padding: 16px 18px 12px;
}
.quiz-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
}
.quiz-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}
.quiz-card-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}
.meta-item .material-icons-round { font-size: 15px; }

/* ===== DIFFICULTY BADGES ===== */
.diff-easy { background: var(--success-light); color: var(--success); }
.diff-medium { background: var(--warning-light); color: var(--warning); }
.diff-hard { background: var(--error-light); color: var(--error); }

/* ===== LEADERBOARD ===== */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lb-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}
.lb-item:hover { border-color: var(--accent); }
.lb-rank {
  font-size: 14px;
  font-weight: 700;
  min-width: 28px;
  color: var(--text-secondary);
}
.lb-rank.gold { color: #F59E0B; }
.lb-rank.silver { color: #94A3B8; }
.lb-rank.bronze { color: #C2844B; }
.lb-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.lb-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}
.lb-meta {
  font-size: 12px;
  color: var(--text-secondary);
}
.lb-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

/* ===== CTA BAND ===== */
.cta-band {
  margin: 0 24px 40px;
  background: linear-gradient(135deg, var(--accent) 0%, #9B5CFF 100%);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-text h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.cta-text p {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  margin-top: 5px;
}
.cta-band-btn {
  background: #fff;
  color: var(--accent);
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
  display: inline-block;
}
.cta-band-btn:hover { transform: scale(1.02); }

/* ===== QUIZ TAKE PAGE ===== */
.quiz-take-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}
.quiz-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  gap: 16px;
  flex-wrap: wrap;
}
.quiz-header-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.quiz-header-meta { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.timer-box {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  text-align: center;
  min-width: 100px;
}
.timer-label { font-size: 10px; color: var(--accent-text); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.timer-val { font-size: 24px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.timer-val.warning { color: var(--warning); }
.timer-val.danger { color: var(--error); animation: pulse 1s infinite; }

.progress-bar-wrap {
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.anon-warning {
  background: var(--warning-light);
  border: 1px solid var(--warning);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--warning);
  font-weight: 500;
}
.anon-warning .material-icons-round { font-size: 18px; flex-shrink: 0; }

.question-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.question-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.question-num-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.question-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  flex: 1;
}
.choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px 20px;
}
.choice-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg-elevated);
  position: relative;
  user-select: none;
  -webkit-user-select: none;
}
.choice-label .choice-letter,
.choice-label .choice-text {
  pointer-events: none;
}
.choice-label:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}
.choice-label input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.choice-label.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}
.choice-letter {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all var(--transition);
}
.choice-label.selected .choice-letter {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.choice-text {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

/* Correct / Wrong in result */
.choice-label.correct {
  border-color: var(--success);
  background: var(--success-light);
}
.choice-label.correct .choice-letter {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}
.choice-label.wrong {
  border-color: var(--error);
  background: var(--error-light);
}
.choice-label.wrong .choice-letter {
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}

/* ===== NAV NUMS (question navigation) ===== */
.nav-nums-wrap { padding: 16px 20px; border-top: 1px solid var(--border); }
.nav-nums-title {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.nav-nums {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nav-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  transition: all var(--transition);
  border: 1.5px solid var(--border);
}
.nav-num:hover { border-color: var(--accent); color: var(--accent); }
.nav-num.answered { background: var(--accent); color: #fff; border-color: var(--accent); }
.nav-num.current { border-color: var(--accent); color: var(--accent); font-weight: 700; box-shadow: 0 0 0 3px var(--accent-light); }

/* ===== QUIZ ACTIONS ===== */
.quiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.btn-submit {
  background: linear-gradient(135deg, var(--accent), #9B5CFF);
  color: #fff;
  border: none;
  padding: 13px 32px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(124,92,252,0.45); }

/* ===== RESULT PAGE ===== */
.result-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}
.result-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.result-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-light), transparent 60%);
}
.grade-circle {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  border: 4px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 36px;
  font-weight: 800;
  position: relative;
}
.result-score-big {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-primary);
  position: relative;
}
.result-score-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 8px;
  position: relative;
}
.result-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 28px;
  position: relative;
}
.result-stat {
  background: var(--bg-card);
  padding: 16px;
  text-align: center;
}
.result-stat-val { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.result-stat-lbl { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

.anon-result-warn {
  background: var(--warning-light);
  border: 1.5px solid var(--warning);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
}
.anon-result-warn .material-icons-round { font-size: 24px; color: var(--warning); flex-shrink: 0; }
.anon-result-warn h4 { font-size: 15px; font-weight: 700; color: var(--warning); margin-bottom: 6px; }
.anon-result-warn p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.anon-result-warn .register-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  background: var(--warning);
  color: #fff;
  padding: 8px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
}

/* ===== ANSWER REVIEW ===== */
.answers-review { display: flex; flex-direction: column; gap: 16px; }
.answer-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.answer-item.correct-item {
  border-color: #16a34a;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.10);
}
.answer-item.wrong-item {
  border-color: #dc2626;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.10);
}
.answer-item.unanswered-item {
  border-color: #ca8a04;
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(202,138,4,0.10);
}
/* Review choices */
.choice-label.review-correct {
  border-color: #16a34a !important;
  border-width: 2px;
  color: #166534;
}
.choice-label.review-wrong {
  border-color: #dc2626 !important;
  border-width: 2px;
  color: #991b1b;
}
.answer-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.answer-status-icon { font-size: 20px; }

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background: radial-gradient(circle at 30% 20%, var(--accent-light), transparent 50%);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 32px;
}
.auth-title { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.auth-sub { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.form-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-input::placeholder { color: var(--text-muted); }
.form-errors { font-size: 12px; color: var(--error); margin-top: 4px; }
.auth-submit {
  width: 100%;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: all var(--transition);
}
.auth-submit:hover { background: var(--accent-hover); transform: translateY(-1px); }
.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-link a { color: var(--accent); font-weight: 600; }

/* ===== PROFILE ===== */
.profile-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
}
.profile-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 26px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-name { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.profile-username { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }
.profile-stats {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.profile-stat-val { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.profile-stat-lbl { font-size: 12px; color: var(--text-secondary); }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 24px;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.footer-copy { font-size: 13px; color: var(--text-muted); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 24px;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.empty-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.empty-sub { font-size: 14px; color: var(--text-secondary); }

/* ===== PAGE HEADER ===== */
.page-header {
  padding: 40px 24px 0;
  max-width: 1280px;
  margin: 0 auto;
}
.page-title { font-size: 26px; font-weight: 800; color: var(--text-primary); }
.page-sub { font-size: 15px; color: var(--text-secondary); margin-top: 6px; }

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px 24px;
  max-width: 1280px;
  margin: 0 auto;
}
.filter-input {
  flex: 1;
  min-width: 200px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
}
.filter-input:focus { border-color: var(--accent); }
.filter-select {
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

/* ===== DETAIL PAGE ===== */
.quiz-detail-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}
.quiz-detail-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 20px;
}
.quiz-detail-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.quiz-info-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.quiz-info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}
.quiz-info-item .material-icons-round { font-size: 16px; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
td { padding: 12px 14px; font-size: 14px; color: var(--text-primary); border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-elevated); }

/* ===== CHIP ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

/* ===== PULSE ANIMATION ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}



/* ===== SHARE BUTTON ===== */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid #25D366;
  background: transparent;
  color: #25D366;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}
.btn-share:hover {
  background: #25D36618;
}

/* ===== TABLET (choices 1 column for readability) ===== */
@media (max-width: 900px) {
  .choices-grid { grid-template-columns: 1fr; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .mobile-right { display: flex; }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .quiz-cards { grid-template-columns: 1fr; }
  .choices-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 40px 20px 32px; }
  .cta-band { padding: 24px; flex-direction: column; text-align: center; }
  .result-stats-row { grid-template-columns: 1fr 1fr 1fr; }
}

/* ===== ONE-QUESTION MODE ===== */
.q-hidden { display: none !important; }
.one-question { animation: fadeInQ 0.2s ease; }
@keyframes fadeInQ {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.q-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  gap: 12px;
}

/* Dots navigation */
.q-dots-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 12px;
}
.q-dot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}
.q-dot:hover { border-color: var(--accent); color: var(--accent); }
.q-dot-current { border-color: var(--accent); color: var(--accent); background: var(--accent-light); font-weight: 700; }
.q-dot-answered { background: var(--accent); color: #fff; border-color: var(--accent); }
.q-dot-correct { background: var(--success); color: #fff; border-color: var(--success); }
.q-dot-wrong { background: var(--error); color: #fff; border-color: var(--error); }

/* Instant feedback choice styles */
.choice-label.instant-correct {
  background: var(--success-light) !important;
  border: 2px solid var(--success) !important;
}
.choice-label.instant-correct .choice-letter {
  background: var(--success) !important;
  color: #fff !important;
}
.choice-label.instant-wrong {
  background: var(--error-light) !important;
  border: 2px solid var(--error) !important;
  opacity: 0.9;
}
.choice-label.instant-wrong .choice-letter {
  background: var(--error) !important;
  color: #fff !important;
}

/* Explanation box */
.q-explanation {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 20px;
  background: var(--info-light);
  color: var(--text-secondary);
  font-size: 13px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
.q-explanation .material-icons-round { color: var(--info); margin-top: 1px; }
/* Global search */
.global-search-form {
  min-width: 180px;
  max-width: 260px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}
.global-search-form .material-icons-round { font-size: 17px; color: var(--text-muted); }
.global-search-form input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
}
@media (max-width: 980px) {
  .global-search-form { display: none; }
}

/* ===== COMMUNITY QUIZ LIST (Home page) ===== */
.community-quiz-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}
.community-quiz-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  color: inherit;
}
.community-quiz-item:last-child { border-bottom: none; }
.community-quiz-item:hover { background: var(--bg-secondary); }
.community-quiz-info { flex: 1; min-width: 0; }
.community-quiz-cat {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.community-quiz-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.community-quiz-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.community-quiz-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== LIVE CONTEST BANNER ===== */
.live-contest-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(124,92,252,0.12), rgba(155,92,255,0.08));
  border: 1px solid rgba(124,92,252,0.3);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin: 0 0 24px;
}
.live-contest-icon { font-size: 32px; flex-shrink: 0; }
.live-contest-text { flex: 1; min-width: 0; }
.live-contest-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.live-contest-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.live-contest-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--accent), #9B5CFF);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.live-contest-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.live-contest-coming {
  flex-shrink: 0;
  padding: 8px 16px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
}
@media (max-width: 640px) {
  .live-contest-banner { flex-wrap: wrap; gap: 12px; }
  .live-contest-btn, .live-contest-coming { width: 100%; text-align: center; justify-content: center; }
}

/* ===== QUIZ RESUME MODAL ===== */
.resume-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.resume-box {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 36px 32px 28px;
  max-width: 440px;
  width: 90%;
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.resume-icon { font-size: 48px; margin-bottom: 16px; }
.resume-title { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.resume-msg { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 24px; }
.resume-actions { display: flex; gap: 10px; }
.resume-continue {
  flex: 1; padding: 12px 16px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), #9B5CFF);
  color: #fff; font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; font-family: var(--font);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 0.2s;
}
.resume-continue:hover { opacity: 0.9; transform: translateY(-1px); }
.resume-exit {
  flex: 1; padding: 12px 16px; border-radius: var(--radius-md);
  background: transparent; border: 1.5px solid var(--border-strong);
  color: var(--text-primary); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: all 0.2s;
}
.resume-exit:hover { background: var(--bg-elevated); }

/* ===== PROFILE TABS ===== */
.profile-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: 20px;
  width: fit-content;
}
.profile-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: calc(var(--radius-lg) - 4px);
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.profile-tab:hover { color: var(--text-primary); background: var(--bg-card); }
.profile-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.profile-tab-panel { display: block; }

/* ===== LIVE CONTEST CARDS ===== */
.live-contest-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  margin-bottom: 16px;
  background: var(--bg-card);
  transition: all 0.2s;
}
.live-contest-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.live-card-active {
  border-color: #7c3aed;
  background: linear-gradient(135deg, rgba(124,58,237,.06), rgba(168,85,247,.04));
}
.live-card-finished { opacity: .65; }
.live-card-upcoming { border-color: var(--border); }
.live-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.live-card-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; color: var(--accent);
}
.live-card-finished .live-card-badge { color: var(--text-muted); }
.live-card-upcoming .live-card-badge { color: var(--text-secondary); }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #7c3aed; display: inline-block;
  animation: live-pulse 1.2s ease-in-out infinite;
}
@keyframes live-pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.4; transform:scale(1.4); }
}
.live-card-times {
  display: flex; align-items: center; gap: 16px;
  background: var(--bg-secondary); border-radius: var(--radius-md);
  padding: 10px 14px;
}
@keyframes pulse-btn {
  0%,100% { box-shadow: 0 0 0 0 rgba(124,58,237,.5); }
  50%      { box-shadow: 0 0 0 8px rgba(124,58,237,0); }
}

/* ===== LIVE NAV LINK ===== */
.nav-link-live {
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
  color: var(--accent) !important;
  font-weight: 700 !important;
}
.nav-link-live:hover, .nav-link-live.active {
  background: rgba(124,58,237,.12) !important;
  color: var(--accent) !important;
}

/* ===== KICHIK TELEFON (≤400px) ===== */
@media (max-width: 400px) {
  .mob-lang-btn { padding: 5px 7px; font-size: 11px; }
  .mob-icon-btn { width: 30px; height: 30px; }
  .mobile-avatar { width: 30px; height: 30px; font-size: 12px; }
  .mobile-menu-btn { width: 32px; height: 32px; }
  .mobile-right { gap: 4px; }
}
