/* =============================================
   SPORTS NEWS VIP — PROFESSIONAL MOBILE-FIRST CSS
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;700;800;900&family=Cairo:wght@400;600;700;800&display=swap');

:root {
  --bg-primary:    #080c18;
  --bg-secondary:  #0e1525;
  --bg-card:       #131d30;
  --bg-card-hover: #192540;
  --accent-gold:   #f5c518;
  --accent-gold2:  #ffd700;
  --accent-blue:   #3b82f6;
  --accent-blue2:  #60a5fa;
  --accent-green:  #22c55e;
  --accent-red:    #ef4444;
  --accent-orange: #f97316;
  --text-primary:  #f0f4ff;
  --text-secondary:#94a3b8;
  --text-muted:    #64748b;
  --border:        rgba(255,255,255,0.07);
  --border-accent: rgba(59,130,246,0.3);
  --radius:        14px;
  --radius-lg:     20px;
  --radius-xl:     26px;
  --font-ar:       'Cairo', sans-serif;
  --font-en:       'Exo 2', sans-serif;
  --header-h:      56px;
  --safe-bottom:   env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-en);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.rtl, body[dir="rtl"] {
  font-family: var(--font-ar);
  direction: rtl;
}

::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 2px; }

/* =============================================
   LOADING
   ============================================= */
#loading-screen {
  position: fixed; inset: 0;
  background: var(--bg-primary);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 9999; gap: 18px;
  background: radial-gradient(ellipse at top, rgba(59,130,246,.08), transparent 60%),
              var(--bg-primary);
}
.loading-logo {
  width: 110px; height: 110px;
  border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 40px rgba(245,197,24,0.5), 0 0 80px rgba(245,197,24,0.2);
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 40px rgba(245,197,24,0.5), 0 0 80px rgba(245,197,24,0.2); }
  50%       { box-shadow: 0 0 60px rgba(245,197,24,0.7), 0 0 100px rgba(245,197,24,0.3); }
}
.loading-bar {
  width: 200px; height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px; overflow: hidden;
}
.loading-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-gold));
  border-radius: 2px;
  animation: loadFill 1.8s ease-in-out;
}
@keyframes loadFill { 0%{width:0} 100%{width:100%} }

/* =============================================
   AUTH
   ============================================= */
#auth-container {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background:
    radial-gradient(ellipse at top left, rgba(59,130,246,.12), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(245,197,24,.07), transparent 50%),
    var(--bg-primary);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: var(--radius-xl);
  padding: 28px 20px 24px;
  width: 100%; max-width: 420px;
  position: relative;
  box-shadow: 0 24px 70px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo-img {
  width: 82px; height: 82px;
  border-radius: 50%; object-fit: cover;
  display: block; margin: 0 auto 12px;
  box-shadow: 0 0 24px rgba(245,197,24,0.35);
}
.auth-logo h1 {
  font-size: 18px; font-weight: 900;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}
.auth-logo p { color: var(--text-secondary); font-size: 12px; margin-top: 4px; }

.lang-toggle {
  position: absolute; top: 14px;
  right: 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 10px;
  color: var(--text-secondary); cursor: pointer;
  font-size: 12px; font-family: inherit;
  transition: all .2s;
}
.lang-toggle:hover { border-color: var(--accent-blue); color: var(--accent-blue); }
body.rtl .lang-toggle { right: auto; left: 14px; }

.form-group { margin-bottom: 13px; }
.form-group label {
  display: block; font-size: 11px; font-weight: 700;
  color: var(--text-secondary); margin-bottom: 6px;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.input-wrapper { position: relative; }
.input-icon {
  position: absolute; top: 50%; transform: translateY(-50%);
  right: 13px; font-size: 16px; pointer-events: none;
  z-index: 1;
}
body:not(.rtl) .input-icon { right: auto; left: 13px; }

.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 42px 13px 14px;
  color: var(--text-primary);
  font-size: 15px; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
  appearance: none;
}
body:not(.rtl) .form-input { padding: 13px 14px 13px 42px; }
.form-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.form-input::placeholder { color: var(--text-muted); }

.btn-primary {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
  border: none; border-radius: var(--radius);
  color: #fff; font-size: 15px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  transition: transform .15s, box-shadow .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  box-shadow: 0 6px 20px rgba(59,130,246,0.3);
  margin-top: 4px;
}
.btn-primary:active { transform: scale(0.97); }

.error-msg, .success-msg {
  padding: 10px 14px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 12px; display: none;
  line-height: 1.5;
}
.error-msg.show   { display: block; background: rgba(239,68,68,.12); color: #fca5a5; border: 1px solid rgba(239,68,68,.25); }
.success-msg.show { display: block; background: rgba(34,197,94,.12); color: #86efac; border: 1px solid rgba(34,197,94,.25); }
.auth-link { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-secondary); }
.auth-link a { color: var(--accent-blue); cursor: pointer; font-weight: 700; }

/* =============================================
   APP LAYOUT
   ============================================= */
.app-wrapper {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

/* SIDEBAR — off-canvas on mobile */
.sidebar {
  position: fixed; top: 0; bottom: 0;
  width: 270px;
  background: var(--bg-secondary);
  border-inline-end: 1px solid var(--border);
  z-index: 300;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body:not(.rtl) .sidebar { transform: translateX(-100%); }
.sidebar.open { transform: translateX(0) !important; }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 299; display: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.sidebar-logo {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(59,130,246,0.06), transparent);
}
.logo-text { display: flex; align-items: center; gap: 12px; }
.sidebar-logo-img {
  width: 44px; height: 44px;
  border-radius: 50%; object-fit: cover; flex-shrink: 0;
  box-shadow: 0 0 12px rgba(245,197,24,0.3);
}
.logo-title { font-size: 13px; font-weight: 900; color: var(--accent-gold); letter-spacing: .5px; }
.logo-sub   { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.sidebar-nav { padding: 12px 10px; flex: 1; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; border-radius: var(--radius);
  border: none; background: transparent;
  color: var(--text-secondary); font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; text-align: start;
  transition: all .2s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item:hover, .nav-item.active {
  background: rgba(59,130,246,0.1);
  color: var(--accent-blue);
}
.nav-icon { font-size: 18px; }

.sidebar-promo {
  margin: 12px; padding: 16px;
  background: linear-gradient(135deg, rgba(245,197,24,0.08), rgba(59,130,246,0.08));
  border: 1px solid rgba(245,197,24,0.2);
  border-radius: var(--radius); text-align: center;
}
.promo-trophy { font-size: 32px; }
.sidebar-promo h4 { color: var(--accent-gold); font-size: 13px; margin: 6px 0 5px; }
.sidebar-promo p  { color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.sidebar-promo a  { color: var(--accent-blue); font-size: 12px; font-weight: 700; }

.main-content {
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  /* Full width on mobile since sidebar is off-canvas */
  width: 100%;
  max-width: 100vw;
}

/* =============================================
   TOP HEADER — MOBILE OPTIMIZED
   ============================================= */
.top-header {
  height: var(--header-h);
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100; flex-shrink: 0;
}
.hamburger {
  background: none; border: none; color: var(--text-primary);
  font-size: 22px; cursor: pointer; padding: 8px;
  border-radius: 10px; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.header-stats {
  display: flex; gap: 5px; flex: 1;
  overflow-x: auto; scrollbar-width: none;
}
.header-stats::-webkit-scrollbar { display: none; }
.stat-pill {
  display: flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 18px; padding: 5px 9px; flex-shrink: 0;
}
.stat-icon  { font-size: 12px; }
.stat-label { font-size: 8px; color: var(--text-muted); text-transform: uppercase; display: block; line-height: 1; }
.stat-value { font-size: 11px; font-weight: 900; display: block; line-height: 1.3; color: var(--text-primary); }

.header-right { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.lang-pill {
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 14px; padding: 5px 9px;
  color: var(--accent-blue); cursor: pointer;
  font-size: 11px; font-weight: 700;
  white-space: nowrap; font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.user-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; color: #fff; flex-shrink: 0;
}

/* =============================================
   PAGE CONTENT
   ============================================= */
#page-content {
  flex: 1; overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(16px + var(--safe-bottom));
}
.page-container { padding: 14px; max-width: 700px; margin: 0 auto; }
.page-header { margin-bottom: 18px; }
.page-header h2 { font-size: 20px; font-weight: 900; }
.page-header p  { color: var(--text-secondary); font-size: 13px; margin-top: 4px; }

/* =============================================
   LOCKED / DONE STATE
   ============================================= */
.locked-state {
  text-align: center; padding: 48px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.locked-icon  { font-size: 64px; }
.locked-title { font-size: 22px; font-weight: 900; }
.locked-text  { color: var(--text-secondary); font-size: 14px; line-height: 1.7; max-width: 320px; }
.countdown-display {
  font-size: 36px; font-weight: 900; color: var(--accent-gold);
  font-family: var(--font-en); letter-spacing: 4px;
  background: var(--bg-card); border-radius: var(--radius);
  padding: 14px 24px; border: 1px solid rgba(245,197,24,0.2);
}
.done-next-time {
  background: rgba(34,197,94,0.07); border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius); padding: 14px 20px;
  font-size: 13px; color: var(--text-secondary); width: 100%; max-width: 300px;
  text-align: center;
}
.countdown-next {
  font-size: 28px; font-weight: 900; color: var(--accent-gold);
  display: block; margin-top: 6px; font-family: var(--font-en); letter-spacing: 3px;
}

/* =============================================
   START SCREEN
   ============================================= */
.start-screen {
  display: flex; justify-content: center; align-items: flex-start;
  min-height: calc(100vh - var(--header-h));
  padding: 16px;
}
.start-inner {
  text-align: center; max-width: 420px; width: 100%;
  padding-bottom: 20px;
}
.start-logo {
  width: 88px; height: 88px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 14px; display: block;
  box-shadow: 0 0 28px rgba(245,197,24,0.4);
}
.start-title {
  font-size: 22px; font-weight: 900; color: var(--accent-gold); margin-bottom: 6px;
}
.start-desc {
  color: var(--text-secondary); font-size: 13px; line-height: 1.6; margin-bottom: 18px;
}
.start-rules {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  margin-bottom: 18px; text-align: start;
}
.rule-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 0; font-size: 13px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border); line-height: 1.5;
}
.rule-item:last-child { border-bottom: none; }
.rule-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.start-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 20px;
}
.start-stat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 6px;
}
.start-stat-icon  { font-size: 22px; margin-bottom: 4px; }
.start-stat-value { font-size: 20px; font-weight: 900; }
.start-stat-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; margin-top: 2px; }
.btn-start {
  width: 100%; padding: 15px;
  background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
  border: none; border-radius: var(--radius);
  color: #fff; font-size: 16px; font-weight: 900;
  cursor: pointer; font-family: inherit;
  box-shadow: 0 8px 24px rgba(59,130,246,0.35);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .15s;
}
.btn-start:active { transform: scale(0.97); }

/* =============================================
   QUIZ — COMPLETELY MOBILE OPTIMIZED
   ============================================= */
.quiz-wrap {
  max-width: 640px; margin: 0 auto;
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
}

/* ── TIMER — Beautiful & Prominent ── */
.timer-section {
  padding: 12px 14px 10px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.timer-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.timer-label {
  font-size: 10px; color: var(--text-muted);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.timer-num {
  font-size: 28px; font-weight: 900;
  font-family: var(--font-en);
  min-width: 48px; text-align: center;
  transition: color .3s;
  line-height: 1;
}
.timer-track {
  width: 100%; height: 9px;
  background: rgba(255,255,255,0.06);
  border-radius: 5px; overflow: hidden;
  position: relative;
}
.timer-fill {
  height: 100%; border-radius: 5px;
  transition: width 1s linear, background .4s;
  position: relative;
}
.timer-fill::after {
  content: '';
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 6px;
  background: rgba(255,255,255,0.4);
  border-radius: 3px;
}

/* ── Question dots — scrollable ── */
.dots-scroll {
  display: flex; gap: 6px; padding: 10px 14px;
  overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}
.dots-scroll::-webkit-scrollbar { display: none; }
.qdot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; flex-shrink: 0;
  background: var(--bg-card); border: 2px solid var(--border);
  color: var(--text-muted); cursor: default;
  transition: all .25s;
}
.qdot.current {
  background: var(--accent-blue); border-color: var(--accent-blue);
  color: #fff; box-shadow: 0 0 10px rgba(59,130,246,0.5);
  transform: scale(1.15);
}
.qdot.done    { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.1); color: var(--text-muted); }
.qdot.skipped { background: rgba(249,115,22,0.12); border-color: rgba(249,115,22,0.3);  color: var(--accent-orange); }

/* ── Question counter ── */
.q-counter-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; flex-shrink: 0;
}
.q-counter-txt { font-size: 12px; color: var(--text-muted); font-weight: 700; }
.q-counter-txt span { color: var(--accent-blue); font-size: 15px; font-weight: 900; }
.q-pct { font-size: 11px; color: var(--text-muted); }

/* ── Question card — FULL WIDTH MOBILE ── */
.q-card {
  margin: 0 10px 10px;
  background: linear-gradient(150deg, #162035, #0f1a2e);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: 18px;
  padding: 18px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.q-text {
  font-size: 15px; font-weight: 700; line-height: 1.7;
  color: var(--text-primary); margin-bottom: 16px;
  word-break: break-word;
}

/* ── Answer buttons — SINGLE COLUMN ON MOBILE ── */
.answers-grid {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ans-btn {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.09);
  color: var(--text-primary);
  cursor: pointer; font-family: inherit;
  font-size: 14px; font-weight: 600;
  text-align: start; min-height: 52px;
  width: 100%;
  transition: border-color .12s, background .12s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  word-break: break-word;
}
.ans-btn:active:not(:disabled) { transform: scale(0.98); }
.ans-btn:disabled { cursor: default; transform: none !important; }

/* Selected = BLUE only, never green/red */
.ans-btn.selected {
  background: rgba(59,130,246,0.2) !important;
  border-color: var(--accent-blue) !important;
  color: #fff !important;
}
.ans-btn.selected .ans-label {
  background: var(--accent-blue) !important;
  border-color: var(--accent-blue) !important;
  color: #fff !important;
}

.ans-label {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.13);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; flex-shrink: 0;
  color: var(--text-secondary);
  transition: all .12s;
  font-family: var(--font-en);
}
.ans-text { flex: 1; line-height: 1.45; }

/* ── Skip action button ── */
.quiz-actions { padding: 0 10px 12px; flex-shrink: 0; }
.btn-skip-only {
  width: 100%; padding: 13px;
  background: rgba(249,115,22,0.09);
  border: 1.5px solid rgba(249,115,22,0.3);
  border-radius: var(--radius); color: var(--accent-orange);
  font-size: 14px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .1s, background .15s;
}
.btn-skip-only:active { transform: scale(0.97); }

/* =============================================
   RESULT MODAL — MOBILE OPTIMIZED
   ============================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 500;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.result-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px 24px 0 0;
  padding: 24px 18px calc(20px + var(--safe-bottom));
  width: 100%; max-width: 500px;
  text-align: center;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(0.4,0,0.2,1);
  max-height: 85vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-overlay.show .result-modal { transform: translateY(0); }
.result-trophy { font-size: 56px; display: block; margin-bottom: 10px; }

.result-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 8px; margin: 16px 0;
}
.rstat {
  background: var(--bg-secondary);
  border-radius: var(--radius); padding: 14px 6px;
  border: 1px solid var(--border);
}
.rstat-val { font-size: 26px; font-weight: 900; display: block; }
.rstat-lbl { font-size: 9px; color: var(--text-muted); text-transform: uppercase; margin-top: 3px; }

.result-actions { display: flex; gap: 10px; margin-top: 14px; }
.btn-res {
  flex: 1; padding: 13px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text-primary);
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.btn-res.primary {
  background: linear-gradient(135deg, var(--accent-blue), #1d4ed8);
  border-color: transparent;
}
.btn-res:active { transform: scale(0.97); }

/* =============================================
   LEADERBOARD
   ============================================= */
.lb-table { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.lb-row {
  display: grid; grid-template-columns: 44px 1fr 70px;
  align-items: center; padding: 12px 12px;
  border-bottom: 1px solid var(--border); background: var(--bg-card);
}
.lb-row.header {
  background: var(--bg-secondary); font-size: 10px;
  color: var(--text-muted); text-transform: uppercase; font-weight: 700;
}
.lb-row.me { background: rgba(59,130,246,0.07); }
.lb-rank { font-size: 18px; font-weight: 900; text-align: center; }
.lb-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lb-user div { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-score { font-weight: 800; color: var(--accent-gold); font-size: 14px; text-align: end; }

/* =============================================
   STATS
   ============================================= */
.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 16px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; text-align: center;
}
.sc-icon  { font-size: 28px; margin-bottom: 6px; }
.sc-val   { font-size: 24px; font-weight: 900; color: var(--accent-blue); }
.sc-lbl   { font-size: 9px; color: var(--text-muted); text-transform: uppercase; margin-top: 2px; }

.day-hist {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.dh-title { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.dh-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.dh-item:last-child { border-bottom: none; }
.dhi-day   { font-weight: 700; font-size: 13px; }
.dhi-date  { font-size: 11px; color: var(--text-muted); }
.dhi-score { font-weight: 800; color: var(--accent-blue); font-size: 14px; }
.dhi-cor   { font-size: 11px; color: var(--text-secondary); text-align: end; }

/* =============================================
   HOW TO PLAY
   ============================================= */
.how-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  display: flex; gap: 14px; margin-bottom: 10px;
  align-items: flex-start;
}
.how-icon  { font-size: 30px; flex-shrink: 0; }
.how-title { font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.how-text  { color: var(--text-secondary); font-size: 13px; line-height: 1.6; }

/* =============================================
   TOAST
   ============================================= */
.toast-container {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 600; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; width: 90%; max-width: 340px;
}
.toast {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; text-align: center;
  animation: slideUp .3s ease;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary);
}
.toast.success { background: rgba(34,197,94,.18); border-color: rgba(34,197,94,.35); color: #86efac; }
@keyframes slideUp { from{opacity:0;transform:translateY(14px)} to{opacity:1;transform:translateY(0)} }

/* =============================================
   TABLET (≥ 600px) — 2-column answers
   ============================================= */
@media (min-width: 600px) {
  .answers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .q-text { font-size: 16px; }
  .q-card { margin: 0 12px 12px; padding: 20px 18px; }
  .timer-section { padding: 14px 16px 10px; }
  .dots-scroll { padding: 12px 16px; }
  .q-counter-bar { padding: 10px 16px; }
  .quiz-actions { padding: 0 12px 14px; }
  .timer-num { font-size: 30px; }
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
  .result-modal {
    border-radius: var(--radius-xl);
    transform: translateY(24px);
    max-width: 420px;
    padding: 28px 24px;
  }
  .modal-overlay.show .result-modal { transform: translateY(0); }
}

/* =============================================
   DESKTOP (≥ 768px) — sidebar always visible
   ============================================= */
@media (min-width: 768px) {
  .sidebar {
    position: relative;
    transform: none !important;
    width: 240px; flex-shrink: 0;
  }
  .sidebar-overlay { display: none !important; }
  .hamburger { display: none; }
  .main-content { width: calc(100% - 240px); max-width: none; }
  .q-text { font-size: 17px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .top-header { padding: 0 16px; gap: 10px; }
  .stat-pill { padding: 5px 12px; }
  .stat-icon { font-size: 14px; }
  .stat-label { font-size: 9px; }
  .stat-value { font-size: 12px; }
}

@media (min-width: 1024px) {
  .quiz-wrap { padding: 16px; }
  .q-card { padding: 24px 20px; }
  .start-screen { align-items: center; }
}

/* =============================================
   UTILITY: prevent body scroll when modal open
   ============================================= */
body.modal-open { overflow: hidden; }

/* =============================================
   LOCKED DATE BADGE — prominent date display
   ============================================= */
.locked-date-badge {
  display: flex; flex-direction: column; align-items: center;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(245,197,24,0.1));
  border: 1.5px solid rgba(245,197,24,0.35);
  border-radius: var(--radius-lg);
  padding: 16px 32px; gap: 4px;
  margin-bottom: 10px;
  min-width: 260px;
}
.locked-date-label {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
}
.locked-date-value {
  font-size: 22px; font-weight: 900; color: var(--accent-gold);
  font-family: var(--font-en);
}
.locked-date-iso {
  font-size: 13px; font-weight: 600; color: var(--accent-blue);
  font-family: var(--font-en); letter-spacing: 1px;
  background: rgba(59,130,246,0.12); border-radius: 6px;
  padding: 2px 10px; margin-top: 2px;
}
.locked-hint {
  font-size: 11px; color: var(--text-muted);
  margin-top: 8px; text-align: center;
}

/* =============================================
   FOOTER
   ============================================= */
#app-footer {
  text-align: center;
  padding: 14px 16px calc(14px + var(--safe-bottom));
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.8;
  flex-shrink: 0;
}
#app-footer strong {
  color: var(--accent-gold);
  font-weight: 700;
}
