/* ═══════════════════════════════════════════════════════════════════════════════
   DESKTOP / WEB OVERRIDES
   Applied on top of main.css for the website version.
   Adds responsive layout, centered container, and desktop UX enhancements.
════════════════════════════════════════════════════════════════════════════════ */

/* ─── Allow natural scrolling on web ────────────────────────────────────────── */
html, body {
  overflow: auto;
  overflow-x: hidden;
}

/* ─── Centered container for desktop ──────────────────────────────────────────
   main.css locks #app, #screen-container and .screen (plus .quiz-screen) to
   100% height with overflow:hidden so the mobile shell fills the viewport.
   On the website the SPA is embedded inside a scrollable landing page, so we
   must let these elements size to their content instead of stretching to the
   viewport — otherwise the absolute .screen collapses the parent to zero OR
   fills 100vh, hiding every landing section and the footer below the app. */
html, body {
  height: auto;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  height: auto;
  min-height: 0;
  overflow: visible;
  position: relative;
}

#screen-container {
  height: auto;
  min-height: 0;
  overflow: visible;
}

.screen {
  position: relative;
  inset: auto;
  height: auto;
  min-height: 0;
  overflow: visible;
}

/* Quiz screen hard-sets height:100%; force content sizing on web */
.quiz-screen {
  height: auto;
  min-height: 0;
  overflow: visible;
}

/* ─── Remove mobile status bar padding ──────────────────────────────────────── */
.home-header {
  padding-top: 20px;
}
.quiz-topbar {
  padding-top: 16px;
}
.results-topbar {
  padding-top: 16px;
}

/* ─── Desktop background ────────────────────────────────────────────────────── */
body {
  background: #040609;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}
#app {
  position: relative;
  z-index: 1;
}

/* ─── Web header / footer ───────────────────────────────────────────────────── */
.web-header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}
.web-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #e8edf8;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.web-header-bolt {
  width: 30px;
  height: 30px;
  background: #3b82f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.web-header-links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.web-header-links a {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: #7c90ae;
  text-decoration: none;
  transition: color 0.15s;
}
.web-header-links a:hover {
  color: #e8edf8;
}
.web-header-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}
.web-header-badge:hover {
  background: rgba(59, 130, 246, 0.2);
}

.web-footer {
  max-width: 520px;
  margin: 0 auto;
  padding: 32px 20px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.web-footer-inner {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.web-footer-text {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: #3d4f6a;
}
.web-footer-links {
  display: flex;
  gap: 16px;
}
.web-footer-links a {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  color: #7c90ae;
  text-decoration: none;
  transition: color 0.15s;
}
.web-footer-links a:hover {
  color: #e8edf8;
}

/* ─── Modal centering on desktop ────────────────────────────────────────────── */
@media (min-width: 600px) {
  .modal-sheet {
    max-width: 480px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    border-radius: 24px 24px 0 0;
  }
  .modal-sheet.visible {
    transform: translateX(-50%) translateY(0);
  }
}

/* ─── Wider screens: add side padding ───────────────────────────────────────── */
@media (min-width: 768px) {
  #app {
    max-width: 560px;
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    background: #06080f;
  }

  .web-header {
    padding: 20px 40px;
  }

  /* Hover effects more visible on desktop */
  .pack-card.available:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  }

  .answer-option:hover:not(.disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .mode-card:hover {
    transform: translateY(-1px);
  }

  .btn-start:hover {
    transform: translateY(-1px);
  }
}

/* ─── Large screens: show decorative elements ───────────────────────────────── */
@media (min-width: 1024px) {
  .web-header {
    padding: 24px 60px;
  }
}

/* ─── Tablet ────────────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .web-header {
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 14px 20px;
  }
  .web-header-links {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ─── Phone: ensure mobile still works ──────────────────────────────────────── */
@media (max-width: 520px) {
  #app {
    max-width: 100%;
    border: none;
  }

  .web-header {
    padding: 10px 14px 12px;
    gap: 8px 10px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .web-header-logo {
    font-size: 16px;
    flex: 1 0 100%;
    justify-content: center;
  }
  .web-header-links {
    gap: 8px 14px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
  }
  .web-header-links a {
    font-size: 12px;
  }

  .web-footer {
    max-width: 100%;
    padding: 28px 16px 20px;
  }
  .web-footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 16px;
  }
}

/* ─── Extra small: ≤360px (old phones) ──────────────────────────────────────── */
@media (max-width: 360px) {
  .web-header-logo { font-size: 15px; }
  .web-header-bolt { width: 26px; height: 26px; font-size: 12px; }
}

/* ─── Print styles ──────────────────────────────────────────────────────────── */
@media print {
  .web-header,
  .web-footer,
  .quiz-topbar,
  .timer-track,
  .feedback-panel,
  .combo-badge,
  .hearts-row,
  .notif-banner { display: none; }

  body, #app, .screen {
    background: #fff;
    color: #000;
  }
}
