/* ==========================================================================
   ilmYo‘li - Online Educational Platform
   Pixel-Perfect Stylesheet (Dark Mode & Light Mode)
   SPA Architecture + Complete Auth Workflow + Exam Simulator
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

/* --------------------------------------------------------------------------
   THEME COLOR PALETTES & VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* LIGHT MODE (Soft warm ivory background: #fbf8f3, clean white cards: #ffffff) */
  --bg-app: #fbf8f3;
  --bg-sidebar: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.9);
  --bg-card: #ffffff;
  --bg-card-hover: #fcfbfa;
  --bg-card-inner: #f5f2eb;
  --bg-input: #f2eee6;
  --bg-input-focus: #ffffff;

  --border-subtle: #ede6dc;
  --border-focus: #3b82f6;
  --border-card: #e8e1d5;
  --border-glow: rgba(59, 130, 246, 0.15);

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;

  --accent-cyan: #0284c7;
  --accent-cyan-light: #e0f2fe;
  --accent-blue: #2563eb;
  --accent-indigo: #4f46e5;
  --accent-indigo-light: #eef2ff;
  --accent-purple: #7c3aed;
  --accent-emerald: #059669;
  --accent-emerald-light: #ecfdf5;
  --accent-amber: #d97706;
  --accent-amber-light: #fffbeb;
  --accent-rose: #e11d48;
  --accent-rose-light: #fff1f2;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-glow: 0 0 25px rgba(37, 99, 235, 0.1);

  --hero-gradient: linear-gradient(135deg, #fff7ed 0%, #ffedd5 45%, #fef3c7 100%);
  --hero-border: #fed7aa;
  --hero-glow: rgba(249, 115, 22, 0.12);

  --badge-bg: #f1ede5;
  --badge-text: #475569;

  --sidebar-width: 260px;
  --header-height: 76px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* DARK MODE (Default: #0b0f19 canvas, #111827 / #161f30 cards, #1e293b borders) */
[data-theme="dark"] {
  --bg-app: #0b0f19;
  --bg-sidebar: #0f1626;
  --bg-header: rgba(15, 22, 38, 0.9);
  --bg-card: #111827;
  --bg-card-hover: #161f30;
  --bg-card-inner: #0d1424;
  --bg-input: #151d30;
  --bg-input-focus: #1a253e;

  --border-subtle: #1e293b;
  --border-focus: #38bdf8;
  --border-card: #1f293d;
  --border-glow: rgba(56, 189, 248, 0.22);

  --text-primary: #f9fafb;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0b0f19;

  --accent-cyan: #38bdf8;
  --accent-cyan-light: rgba(56, 189, 248, 0.14);
  --accent-blue: #3b82f6;
  --accent-indigo: #6366f1;
  --accent-indigo-light: rgba(99, 102, 241, 0.14);
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-emerald-light: rgba(16, 185, 129, 0.14);
  --accent-amber: #f59e0b;
  --accent-amber-light: rgba(245, 158, 11, 0.14);
  --accent-rose: #f43f5e;
  --accent-rose-light: rgba(244, 63, 94, 0.14);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 30px -4px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 35px rgba(56, 189, 248, 0.16);

  --hero-gradient: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 50%, rgba(17, 24, 39, 0.92) 100%);
  --hero-border: rgba(56, 189, 248, 0.25);
  --hero-glow: rgba(56, 189, 248, 0.18);

  --badge-bg: #1e293b;
  --badge-text: #e2e8f0;
}

/* --------------------------------------------------------------------------
   GLOBAL RESETS & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
  position: relative;
}

/* Background glowing accent orbs */
body::before {
  content: '';
  position: fixed;
  top: -140px;
  right: -80px;
  width: 580px;
  height: 580px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.02) 55%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(45px);
}

body::after {
  content: '';
  position: fixed;
  bottom: -140px;
  left: 220px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.06) 0%, rgba(56, 189, 248, 0.02) 55%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(50px);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input {
  font-family: inherit;
  outline: none;
  border: none;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* --------------------------------------------------------------------------
   AUTHENTICATION VIEW (LOGIN SCREEN - INSIDEBOX AESTHETIC)
   -------------------------------------------------------------------------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 50;
  background: radial-gradient(circle at 50% 30%, rgba(56, 189, 248, 0.08) 0%, transparent 60%), var(--bg-app);
}

.auth-header-top-bar {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 52;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 28px;
  padding: 40px 36px;
  box-shadow: var(--shadow-lg), 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 51;
  pointer-events: auto;
  animation: modal-pop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-brand-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.auth-logo-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.35);
  color: #ffffff;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-left {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 42px;
  border-radius: 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.auth-input:focus {
  background-color: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.password-toggle-btn {
  position: absolute;
  right: 14px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.password-toggle-btn:hover {
  color: var(--accent-cyan);
}

.auth-row-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.remember-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.forgot-link {
  color: var(--accent-cyan);
  font-weight: 700;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.35);
  transition: var(--transition-smooth);
  margin-top: 4px;
  cursor: pointer;
  pointer-events: auto;
  border: none;
  outline: none;
  user-select: none;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(56, 189, 248, 0.45);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--border-subtle);
}

.google-sso-btn {
  width: 100%;
  height: 46px;
  border-radius: 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-smooth);
  cursor: pointer;
  pointer-events: auto;
  outline: none;
  user-select: none;
}

.google-sso-btn:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-1px);
}

.auth-footer-text {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.auth-footer-text a {
  color: var(--accent-cyan);
  font-weight: 800;
  margin-left: 4px;
}

.auth-footer-text a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   DASHBOARD WRAPPER (SHOWN WHEN LOGGED IN)
   -------------------------------------------------------------------------- */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   1. LEFT SIDEBAR
   -------------------------------------------------------------------------- */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  transition: var(--transition-smooth);
  backdrop-filter: blur(12px);
}

.sidebar-header {
  height: var(--header-height);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.brand-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-cyan-light);
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
}

.sidebar-content {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 10px 14px 4px 14px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 14px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.94rem;
  transition: var(--transition-smooth);
  position: relative;
  cursor: pointer;
  border: 1px solid transparent;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
  transition: transform 0.25s ease, stroke 0.25s ease;
  flex-shrink: 0;
}

.nav-link:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateX(3px);
}

.nav-link:hover svg {
  stroke: var(--accent-cyan);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.14) 0%, rgba(99, 102, 241, 0.08) 100%);
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
  font-weight: 700;
}

.nav-link.active svg {
  stroke: var(--accent-cyan);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 4px;
  background: linear-gradient(to bottom, #38bdf8, #6366f1);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px #38bdf8;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background-color: var(--badge-bg);
  color: var(--badge-text);
}

.nav-badge.badge-active {
  background-color: var(--accent-cyan-light);
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
}

/* Sidebar Footer (100% Free / Open info card & Logout) */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.free-platform-badge-card {
  padding: 12px 14px;
  border-radius: 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.free-platform-badge-card .badge-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.free-platform-badge-card .badge-text-bold {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.free-platform-badge-card .badge-text-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition-smooth);
  width: 100%;
}

.logout-btn:hover {
  background-color: var(--accent-rose-light);
  color: var(--accent-rose);
  transform: translateX(2px);
}

.logout-btn svg {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   MAIN WRAPPER & TOP HEADER
   -------------------------------------------------------------------------- */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  position: relative;
  z-index: 2;
}

/* TOP HEADER BAR */
.top-header {
  height: var(--header-height);
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: var(--transition-smooth);
}

.header-tabs {
  display: flex;
  align-items: center;
  background-color: var(--bg-input);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

.header-tab-btn {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
}

.header-tab-btn:hover {
  color: var(--text-primary);
}

.header-tab-btn.active {
  background-color: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  border-color: var(--border-subtle);
}

[data-theme="dark"] .header-tab-btn.active {
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* THEME TOGGLE SLIDER (Immediately to the left of the Search bar) */
.theme-switch-container {
  display: flex;
  align-items: center;
}

.theme-toggle-btn {
  position: relative;
  width: 72px;
  height: 36px;
  border-radius: 999px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  border-color: var(--border-glow);
}

.theme-icon-sun,
.theme-icon-moon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  user-select: none;
}

.theme-icon-sun {
  margin-left: 5px;
  color: #f59e0b;
}

.theme-icon-moon {
  margin-right: 5px;
  color: #38bdf8;
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 1;
}

[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(36px);
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

/* SEARCH INPUT BAR */
.search-wrapper {
  position: relative;
  width: 250px;
  transition: width 0.3s ease;
}

.search-wrapper:focus-within {
  width: 310px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.25s ease;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 40px;
  border-radius: 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  background-color: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.search-wrapper:focus-within .search-icon {
  color: var(--accent-cyan);
}

.search-shortcut {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  pointer-events: none;
}

/* Notification Bell */
.notification-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.notification-btn:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--border-glow);
}

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

.notification-ping {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-rose);
  box-shadow: 0 0 0 2px var(--bg-header);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(244, 63, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

/* User Capsule (100% Free / NO PREMIUM) */
.profile-capsule {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.profile-trigger:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-glow);
}

.profile-avatar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}

.online-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  border: 2px solid var(--bg-header);
}

.profile-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.25s ease;
}

.profile-capsule.open .profile-chevron {
  transform: rotate(180deg);
}

/* Profile Dropdown Menu */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 50;
  backdrop-filter: blur(16px);
  animation: dropdown-appear 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdown-appear {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.profile-capsule.open .profile-dropdown-menu {
  display: flex;
}

.dropdown-user-header {
  padding: 8px 10px 10px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.dropdown-user-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.dropdown-user-status {
  font-size: 0.76rem;
  color: var(--accent-emerald);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.dropdown-item:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-primary);
}

.dropdown-item.logout {
  color: var(--accent-rose);
  border-top: 1px solid var(--border-subtle);
  margin-top: 4px;
  padding-top: 12px;
}

.dropdown-item.logout:hover {
  background-color: var(--accent-rose-light);
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   SPA VIEWS ARCHITECTURE (STRICT DISPLAY: NONE FOR INACTIVE VIEWS)
   -------------------------------------------------------------------------- */
.hidden {
  display: none !important;
}

.spa-view {
  display: none !important;
  padding: 24px 36px 60px 36px;
  width: 100%;
  margin: 0 !important;
  box-sizing: border-box;
}

.spa-view.active {
  display: block !important;
  animation: view-fade-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.spa-view:not(.active),
.spa-view.hidden,
#view-home:not(.active),
#home-view:not(.active),
#view-mocks:not(.active),
#mocks-view:not(.active),
#view-videos:not(.active),
#videos-view:not(.active),
#view-results:not(.active),
#results-view:not(.active),
#view-profile:not(.active),
#profile-view:not(.active),
#syllabus-view:not(.active) {
  display: none !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* PROFILE VIEW CONTAINER TOP POSITIONING & ZERO GHOST SPACING */
#view-profile,
#profile-view,
.profile-view-container {
  box-sizing: border-box !important;
}

#view-profile.active,
#profile-view.active {
  display: block !important;
  position: static !important;
  width: 100% !important;
  max-width: 72rem !important;
  margin: 0 auto !important;
  padding: 24px 16px 64px 16px !important;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Tailwind-compatible utilities for Profile View */
.w-full { width: 100% !important; }
.max-w-6xl { max-width: 72rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
}
@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem !important; padding-right: 2rem !important; }
}
.py-6 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.space-y-6 > * + * { margin-top: 1.5rem !important; }
.space-y-1 > * + * { margin-top: 0.25rem !important; }
.bg-slate-900\/70 { background-color: rgba(15, 23, 42, 0.7) !important; backdrop-filter: blur(12px) !important; }
.bg-slate-900\/60 { background-color: rgba(15, 23, 42, 0.6) !important; backdrop-filter: blur(8px) !important; }
.border { border-width: 1px !important; border-style: solid !important; }
.border-slate-800 { border-color: rgba(30, 41, 59, 0.8) !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-full { border-radius: 9999px !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }
@media (min-width: 768px) {
  .md\:p-6 { padding: 1.5rem !important; }
  .md\:flex-row { flex-direction: row !important; }
  .md\:w-auto { width: auto !important; }
}
.flex { display: flex !important; }
.flex-col { flex-direction: column !important; }
.items-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-center { justify-content: center !important; }
.gap-4 { gap: 1rem !important; }
.gap-2 { gap: 0.5rem !important; }
.w-16 { width: 4rem !important; }
.h-16 { height: 4rem !important; }
.h-28 { height: 7rem !important; }
.bg-gradient-to-tr { background: linear-gradient(to top right, #06b6d4, #4f46e5) !important; }
.text-white { color: #ffffff !important; }
.text-2xl { font-size: 1.5rem !important; line-height: 2rem !important; }
.text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
.text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
.text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
.text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.font-medium { font-weight: 500 !important; }
.font-extrabold { font-weight: 800 !important; }
.shrink-0 { flex-shrink: 0 !important; }
.flex-wrap { flex-wrap: wrap !important; }
.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.py-0\.5 { padding-top: 0.125rem !important; padding-bottom: 0.125rem !important; }
.px-5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.text-center { text-align: center !important; }
.text-slate-400 { color: #94a3b8 !important; }
.text-emerald-400 { color: #34d399 !important; }
.text-amber-400 { color: #fbbf24 !important; }
.text-indigo-400 { color: #818cf8 !important; }
.text-rose-400 { color: #fb7185 !important; }
.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1) !important; }
.border-emerald-500\/20 { border-color: rgba(16, 185, 129, 0.2) !important; }
.border-rose-500\/30 { border-color: rgba(244, 63, 94, 0.3) !important; }
.bg-rose-500\/10 { background-color: rgba(244, 63, 94, 0.1) !important; }
.hover\:bg-rose-500:hover { background-color: #f43f5e !important; }
.hover\:text-white:hover { color: #ffffff !important; }
.transition-all { transition-property: all !important; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; transition-duration: 150ms !important; }
.grid { display: grid !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (min-width: 1024px) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
.min-h-screen { min-height: 100vh !important; }
.overflow-y-auto { overflow-y: auto !important; }
.h-32 { height: 8rem !important; }
@media (min-width: 768px) {
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

/* Responsive 4-Column Stats Grid */
.profile-stats-grid-4 {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (min-width: 768px) {
  .profile-stats-grid-4 {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

.profile-stat-box {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 16px !important;
  height: 128px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(30, 41, 59, 0.8) !important;
  border-radius: 16px !important;
  box-sizing: border-box !important;
  backdrop-filter: blur(10px) !important;
  transition: transform 0.2s ease, border-color 0.2s ease !important;
}

.profile-stat-box:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4) !important;
}

@keyframes view-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.page-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.page-sub-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background-color: var(--accent-cyan-light);
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
}

/* --------------------------------------------------------------------------
   VIEW A: 🏠 BOSH SAHIFA / O'QUV FANLARI (LEARNING HUB)
   -------------------------------------------------------------------------- */
.hero-banner {
  border-radius: 24px;
  background: var(--hero-gradient);
  border: 1px solid var(--hero-border);
  padding: 34px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--hero-glow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -30px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.28) 0%, rgba(99, 102, 241, 0.15) 50%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(25px);
}

.hero-text-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
}

.hero-greeting {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-subtext {
  font-size: 1.05rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 22px;
  line-height: 1.55;
}

.hero-badges-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
}

[data-theme="light"] .hero-pill-badge {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.35);
  transition: var(--transition-smooth);
}

.hero-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
}

.hero-graphic {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 170px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mesh-ribbon-3d {
  width: 130px;
  height: 130px;
  filter: drop-shadow(0 15px 25px rgba(56, 189, 248, 0.3));
  animation: float-slow 6s ease-in-out infinite;
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

/* O'QUV FANLARI CARDS (ACADEMIC CURRICULUM) */
.subjects-grid-large {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
}

.curriculum-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.curriculum-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--border-glow);
  background-color: var(--bg-card-hover);
}

.curriculum-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.subject-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.curriculum-card:hover .subject-icon-box {
  transform: scale(1.08) rotate(-4deg);
}

.curriculum-meta-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
}

.curriculum-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.curriculum-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: 3px;
}

.curriculum-progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.curriculum-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.subject-action-btn {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-primary-action {
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}

.btn-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.4);
}

.btn-secondary-action {
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary-action:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-glow);
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   VIEW B: 📝 MOCK TESTLAR (REALISTIC EXAM SIMULATOR)
   -------------------------------------------------------------------------- */
.filter-tags-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 24px;
}

.filter-tag {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.filter-tag:hover {
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.filter-tag.active {
  background-color: var(--accent-cyan-light);
  color: var(--accent-cyan);
  border-color: var(--border-glow);
  font-weight: 700;
}

.exam-sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px;
}

.exam-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.exam-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  border-color: var(--border-glow);
  background-color: var(--bg-card-hover);
}

.exam-card-top-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.exam-category-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  background-color: var(--accent-cyan-light);
  color: var(--accent-cyan);
  border: 1px solid var(--border-glow);
}

.exam-difficulty-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  background-color: var(--bg-input);
  color: var(--text-secondary);
}

.exam-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.exam-specs-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.exam-spec-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.exam-launch-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.3);
  transition: var(--transition-smooth);
}

.exam-launch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
}

/* --------------------------------------------------------------------------
   EXAM ROOM MODAL (REALISTIC EXAMINATION ENVIRONMENT)
   -------------------------------------------------------------------------- */
.exam-room-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 26px;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 0, 0, 0.6);
  max-width: 1040px;
  width: 100%;
  height: min(860px, 92vh);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.exam-header-bar {
  flex-shrink: 0;
  padding: 18px 26px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card-inner);
}

.exam-timer-capsule {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-rose);
  padding: 6px 14px;
  border-radius: 12px;
  background-color: var(--accent-rose-light);
  border: 1px solid rgba(244, 63, 94, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Two-column exam layout: question (left) + compact navigator (right) */
.exam-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.exam-navigator {
  border-left: 1px solid var(--border-subtle);
  background-color: var(--bg-input);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.exam-navigator-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
}

.exam-navigator-head span:last-child {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-emerald);
}

.exam-pills-grid {
  display: grid;
  grid-template-columns: repeat(5, 36px);
  gap: 8px;
  justify-content: space-between;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

.exam-pill-num {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.6);
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: var(--transition-smooth);
}

[data-theme="light"] .exam-pill-num {
  background-color: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

.exam-pill-num:hover {
  border-color: #38bdf8;
}

.exam-pill-num.answered {
  background-color: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

[data-theme="light"] .exam-pill-num.answered {
  color: #059669;
}

/* Current wins over answered: glowing cyan ring */
.exam-pill-num.current {
  border: 2px solid #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18), 0 0 12px rgba(56, 189, 248, 0.45);
}

.exam-navigator-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: auto;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
  background-color: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.6);
}

.legend-dot.answered {
  background-color: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
}

.legend-dot.current {
  border: 2px solid #38bdf8;
}

.exam-body-area {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  min-height: 0;
}

.exam-main-layout.finished {
  grid-template-columns: 1fr;
}

.exam-main-layout.finished .exam-navigator {
  display: none;
}

@media (max-width: 760px) {
  .exam-main-layout {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .exam-navigator {
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    order: -1;
  }

  .exam-pills-grid {
    grid-template-columns: repeat(auto-fill, 36px);
    justify-content: start;
  }

  .exam-navigator-legend {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
  }
}

.exam-question-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-primary);
}

.exam-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.exam-option-card {
  padding: 14px 18px;
  border-radius: 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.94rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: left;
}

.exam-option-card:hover {
  border-color: var(--accent-cyan);
  background-color: var(--bg-card-hover);
}

.exam-option-card.selected {
  border-color: var(--accent-cyan);
  background-color: var(--accent-cyan-light);
  color: var(--accent-cyan);
  font-weight: 700;
}

.exam-option-letter {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.exam-option-card.selected .exam-option-letter {
  background-color: var(--accent-cyan);
  color: #ffffff;
  border-color: var(--accent-cyan);
}

.exam-footer-bar {
  flex-shrink: 0;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 26px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-card-inner);
}

/* --------------------------------------------------------------------------
   VIEW C: 🎥 VIDEO DARSLIKLAR
   -------------------------------------------------------------------------- */
.video-dedicated-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.video-player-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.video-header-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.video-title-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-main-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-live-pill {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  background-color: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.video-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #f43f5e;
  animation: pulse-ring 1.5s infinite;
}

.video-subtitle-meta {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.video-stage-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #050811;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#lessonCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.stage-center-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}

.stage-play-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border: 2px solid rgba(56, 189, 248, 0.5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.35);
  transition: transform 0.25s ease, background-color 0.25s ease;
  pointer-events: auto;
  cursor: pointer;
}

.stage-play-btn:hover {
  transform: scale(1.1);
  background: rgba(2, 132, 199, 0.88);
  border-color: #ffffff;
}

.stage-play-btn svg {
  width: 30px;
  height: 30px;
  margin-left: 3px;
}

.video-controls-bar {
  position: relative;
  z-index: 6;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.35) 70%, transparent 100%);
  padding: 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.scrub-timeline-track {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: height 0.2s ease;
}

.scrub-timeline-track:hover {
  height: 9px;
}

.scrub-timeline-progress {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
  border-radius: 999px;
  position: relative;
  width: 54%;
}

.controls-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f9fafb;
}

.controls-left-group,
.controls-right-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ctrl-btn {
  color: #f9fafb;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.ctrl-btn:hover {
  color: #38bdf8;
  transform: scale(1.1);
}

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

.time-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #cbd5e1;
  font-weight: 500;
}

.speed-selector {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  color: #f9fafb;
  cursor: pointer;
}

.video-playlist-sidebar {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 560px;
  position: sticky;
  top: 96px;
  overflow: hidden;
}

.playlist-sidebar-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.playlist-sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  max-height: 470px;
  padding-right: 6px;
  overscroll-behavior: contain;
}

/* Sleek subtle custom scrollbar for playlist */
.playlist-sidebar-list::-webkit-scrollbar {
  width: 5px;
}

.playlist-sidebar-list::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.25);
  border-radius: 999px;
}

.playlist-sidebar-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.playlist-sidebar-list::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.65);
}

[data-theme="light"] .playlist-sidebar-list::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.5);
}

[data-theme="light"] .playlist-sidebar-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
}

[data-theme="light"] .playlist-sidebar-list::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.75);
}

.playlist-item-card {
  padding: 14px;
  border-radius: 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.playlist-item-card:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.playlist-item-card.active {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--accent-cyan);
}

.playlist-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.playlist-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.playlist-item-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item-meta {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   VIEW D: 📈 NATIJALAR (DEDICATED ANALYTICS)
   -------------------------------------------------------------------------- */
.results-dedicated-grid {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.analytics-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: var(--transition-smooth);
}

.analytics-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-glow);
}

.analytics-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.analytics-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.analytics-pill-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background-color: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.radial-progress-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  position: relative;
}

.radial-svg-box {
  width: 190px;
  height: 190px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.radial-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.radial-bg-circle {
  fill: none;
  stroke: var(--bg-input);
  stroke-width: 13;
}

.radial-meter-circle {
  fill: none;
  stroke-width: 13;
  stroke-linecap: round;
  stroke: url(#cyanBlueGradient);
  stroke-dasharray: 440;
  stroke-dashoffset: 70; /* ~84% */
  transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.5));
}

.radial-center-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.radial-percentage {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

.radial-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 4px;
}

.radial-grade-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  margin-top: 6px;
}

.breakdown-meters-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.meter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meter-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.meter-percentage {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.meter-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background-color: var(--bg-input);
  overflow: hidden;
}

.meter-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.meter-cyan { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.meter-purple { background: linear-gradient(90deg, #7c3aed, #a855f7); }
.meter-amber { background: linear-gradient(90deg, #d97706, #f59e0b); }
.meter-emerald { background: linear-gradient(90deg, #059669, #10b981); }
.meter-rose { background: linear-gradient(90deg, #e11d48, #f43f5e); }

.chart-card-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.chart-legend-row {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.82rem;
  font-weight: 700;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
}

.legend-dot-cyan {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 6px var(--accent-cyan);
}

.legend-dot-purple {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--accent-purple);
  box-shadow: 0 0 6px var(--accent-purple);
}

.chart-viewport {
  width: 100%;
  height: 250px;
  position: relative;
}

#weeklyChartSvg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.certificates-card-widget {
  padding: 20px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.08) 0%, rgba(99, 102, 241, 0.12) 100%);
  border: 1px solid var(--border-glow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.certificates-card-widget:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.25);
  border-color: var(--accent-cyan);
}

.cert-left-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cert-badge-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
  flex-shrink: 0;
}

.cert-badge-icon svg {
  width: 26px;
  height: 26px;
}

.cert-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cert-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.cert-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.cert-chevron {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  transition: transform 0.25s ease, color 0.25s ease;
}

.certificates-card-widget:hover .cert-chevron {
  transform: translateX(4px);
  color: var(--accent-cyan);
}

/* --------------------------------------------------------------------------
   VIEW E: 👤 PROFIL (DEDICATED PROFILE)
   -------------------------------------------------------------------------- */
.profile-dedicated-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.profile-summary-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.profile-avatar-big {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 800;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.35);
  position: relative;
}

.profile-online-badge-big {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  border: 3px solid var(--bg-card);
}

.profile-fullname {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.profile-email-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  word-break: break-all;
}

.profile-role-status {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
  background-color: var(--accent-emerald-light);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}

.profile-mini-stat {
  padding: 14px;
  border-radius: 14px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mini-stat-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}

.mini-stat-lbl {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.profile-details-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.info-rows-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.info-row-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.info-row-val {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badges-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.badge-item-box {
  padding: 16px;
  border-radius: 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 14px;
}

.badge-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.badge-item-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge-item-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   INTERACTIVE MODALS & OVERLAYS
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 0.25s ease;
}

.modal-backdrop.active {
  display: flex;
}

.modal-backdrop:not(.active) {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.5);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: var(--bg-input);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background-color: var(--accent-rose-light);
  color: var(--accent-rose);
}

.modal-body {
  padding: 24px;
}

.certificate-preview-box {
  border: 4px double #d97706;
  border-radius: 16px;
  padding: 30px;
  background: radial-gradient(circle, rgba(254, 243, 199, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%);
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cert-country-title {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.cert-doc-name {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cert-recipient-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  border-bottom: 2px solid #d97706;
  padding: 0 20px 4px 20px;
  margin: 6px 0;
}

.cert-id-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Toast Container (Only for action feedback, NEVER on theme toggle) */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none !important;
}

.toast-container:empty {
  pointer-events: none !important;
  display: none !important;
}

.toast {
  padding: 14px 20px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto !important;
  animation: toast-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   AUTH INTERACTIVITY & BLOCKING OVERLAY PREVENTION
   ========================================================================== */
.auth-wrapper {
  position: relative;
  z-index: 40;
}

.auth-card {
  position: relative;
  z-index: 45;
  pointer-events: auto !important;
}

.auth-form,
.auth-tabs,
.auth-tab-btn,
.auth-submit-btn,
.google-sso-btn,
#login-submit-btn,
#google-login-btn,
#auth-tab-login,
#auth-tab-register {
  pointer-events: auto !important;
  z-index: 50 !important;
  position: relative !important;
}

@keyframes toast-slide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* --------------------------------------------------------------------------
   RESPONSIVENESS & MEDIA QUERIES
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .video-dedicated-layout,
  .results-dedicated-grid,
  .profile-dedicated-layout {
    grid-template-columns: 1fr;
  }

  .video-playlist-sidebar {
    position: static;
    max-height: 480px;
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .top-header {
    padding: 0 16px;
  }

  .header-tabs {
    display: none;
  }

  .search-wrapper {
    width: 170px;
  }

  .search-wrapper:focus-within {
    width: 210px;
  }

  .spa-view {
    padding: 20px 16px 40px 16px;
  }
}

@media (max-width: 580px) {
  .hero-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }

  .hero-graphic {
    display: none;
  }

  .search-wrapper {
    display: none;
  }

  .auth-card {
    padding: 30px 20px;
  }
}

/* ==========================================================================
   AUTH TABS (SEGMENTED CONTROL)
   ========================================================================== */
.auth-tabs {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 8px;
  pointer-events: auto;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  text-align: center;
}

.auth-tab-btn.active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   FOYDALANUVCHILAR JONLI REYTINGI (LIVE LEADERBOARD) & PINNED USER CARD
   ========================================================================== */
.leaderboard-section-container {
  margin-top: 32px;
}

.leaderboard-card {
  position: relative;
  overflow: hidden;
}

.leaderboard-header-icon {
  font-size: 1.85rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
}

.live-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-live-dot 1.8s infinite;
  margin-right: 6px;
}

@keyframes pulse-live-dot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.icon-refresh-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.icon-refresh-btn:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  transform: rotate(180deg);
}

.leaderboard-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  margin-top: 14px;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
  min-width: 620px;
}

.leaderboard-table thead th {
  background: var(--bg-input);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.leaderboard-table tbody tr {
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.leaderboard-table tbody tr:last-child {
  border-bottom: none;
}

.leaderboard-table tbody tr:hover {
  background-color: var(--bg-input);
}

.leaderboard-table td {
  padding: 14px 18px;
  vertical-align: middle;
}

/* Rank Badges */
.rank-badge-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  border-radius: 10px;
  padding: 4px 12px;
  min-width: 40px;
}

.rank-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.32));
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.55);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.rank-silver {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.22), rgba(100, 116, 139, 0.32));
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 0 12px rgba(148, 163, 184, 0.25);
}

.rank-bronze {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.2), rgba(180, 83, 9, 0.3));
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.5);
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.25);
}

.rank-regular {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* User Info Cell */
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.88rem;
  color: #fff;
  background: linear-gradient(135deg, #0284c7, #6366f1);
  border: 2px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  text-transform: uppercase;
}

.user-name-wrapper {
  display: flex;
  flex-direction: column;
}

.user-full-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.94rem;
}

.user-sub-tag {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

/* Highlighted Current User Row in Leaderboard */
.leaderboard-table tbody tr.current-user-row {
  background: rgba(56, 189, 248, 0.08) !important;
  border-left: 3px solid var(--accent-cyan);
  box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.12);
}

.leaderboard-table tbody tr.current-user-row .user-full-name {
  color: var(--accent-cyan);
  font-weight: 800;
}

/* Pinned Current User Rank Card */
.pinned-user-rank-card {
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 41, 59, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 18px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 8px 32px rgba(56, 189, 248, 0.16);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.pinned-user-rank-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #38bdf8, #6366f1);
}

.pinned-left-side {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.pinned-rank-badge {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #fff;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  padding: 6px 16px;
  border-radius: 12px;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
  white-space: nowrap;
}

.pinned-user-details {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pinned-meta-items {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.pinned-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.pinned-meta-item span.meta-val {
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}

.pinned-target-hint {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Skeleton Loading Animation */
.leaderboard-skeleton-row td {
  padding: 16px 18px;
}

.skeleton-box {
  background: linear-gradient(90deg, var(--bg-input) 25%, var(--border-subtle) 50%, var(--bg-input) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
  height: 20px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty State */
.leaderboard-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

/* Topic Practice Test Navigator Scrollbar */
#topicPracticePills::-webkit-scrollbar {
  height: 6px;
}
#topicPracticePills::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 999px;
}
#topicPracticePills::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 999px;
}
#topicPracticePills::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

