/* HooperTrivia - HooperLabs branded styles */

:root {
  --primary: #f37b00;
  --primary-dark: #d96b00;
  --accent: #f37b00;
  --court-wood: #f37b00;
  --court-line: #333;
  --bg-dark: #000;
  --bg-card: rgba(18, 18, 18, 0.98);
  --text: #fff;
  --text-muted: #999;
  --correct: #22c55e;
  --wrong: #ef4444;
}

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

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(243, 123, 0, 0.3);
}

.nav-brand {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--text);
}

.nav-brand .hooper { color: var(--primary); }
.nav-brand .trivia { color: var(--text); }

.nav-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-tagline:hover {
  color: var(--primary);
}

.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 140px);
}

.footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer a { color: var(--primary); }

/* Hero */
.hero {
  text-align: center;
  padding: 3rem 0 2rem;
}

.hero-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: 324px;
  width: auto;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.hero-pitch {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Difficulty grid - horizontal cards stacked vertically */
.difficulty-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 0;
}

.difficulty-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 2px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
}

.difficulty-card:hover {
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: 0 8px 24px rgba(243, 123, 0, 0.3);
}

.difficulty-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  flex-shrink: 0;
}

.difficulty-card .difficulty-name {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.2rem 0;
}

.difficulty-meta {
  font-size: 0.9rem;
  color: var(--accent);
  margin: 0 0 0.25rem 0;
}

.difficulty-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  flex-grow: 1;
}

.difficulty-cta {
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 600;
  flex-shrink: 0;
}

.difficulty-card-text {
  flex: 1;
  min-width: 0;
}

/* HooperLabs Metric Glossary (collapsible) */
.glossary-section {
  padding: 2.5rem 0 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.glossary-details {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
}

.glossary-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  background: var(--bg-card);
  transition: background 0.2s;
}

.glossary-summary::-webkit-details-marker,
.glossary-summary::marker {
  display: none;
}

.glossary-summary:hover {
  background: rgba(255, 255, 255, 0.04);
}

.glossary-summary .glossary-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.glossary-toggle {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(-45deg);
  transition: transform 0.25s ease;
}

.glossary-details[open] .glossary-toggle {
  transform: rotate(135deg);
}

.glossary-details[open] .glossary-summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.glossary-content {
  padding: 1rem 1.25rem 1.5rem;
  background: var(--bg-card);
}

.glossary-intro {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.glossary-item {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.glossary-metric-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.glossary-metric-source {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  letter-spacing: 0.03em;
}

.glossary-metric-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

.glossary-metric-desc strong,
.glossary-metric-desc em {
  color: var(--text);
}

/* Question */
.question-container {
  padding: 2rem 0;
}

.question-count {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.question-difficulty {
  color: var(--primary);
}

.progress-bar {
  position: relative;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s ease;
}

.progress-text {
  position: absolute;
  right: 0;
  top: -24px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.question-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.question-prompt {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

.comparison-caps {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.choices-vs .choice-btn { min-height: 60px; }

.choice-btn-vs {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.choice-headshot {
  width: 80px;
  height: 120px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(243, 123, 0, 0.5);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.choice-btn {
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s ease;
}

.choice-btn:hover:not(:disabled) {
  background: rgba(243, 123, 0, 0.2);
  border-color: var(--primary);
}

.choice-btn:disabled { cursor: default; opacity: 0.9; }

.choice-btn.correct {
  background: rgba(63, 185, 80, 0.2);
  border-color: var(--correct);
}

.choice-btn.wrong {
  background: rgba(248, 81, 73, 0.2);
  border-color: var(--wrong);
}

.answer-reveal {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.answer-reveal.hidden { display: none; }

.hidden { display: none; }

/* Results */
.results-section {
  text-align: center;
  padding: 3rem 0;
}

.results-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.score-display {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 4rem;
  margin-bottom: 0.5rem;
}

.score-value { color: var(--correct); }
.score-sep { color: var(--text-muted); }

.score-pct {
  font-size: 1.5rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.ranking-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.ranking-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 3.5rem;
}

@media (min-width: 601px) {
  .ranking-buttons {
    flex-direction: row;
  }

  .ranking-label {
    font-size: 1.4rem;
  }

  .ranking-badge {
    font-size: 2.2rem;
    padding: 0.9rem 2.75rem;
  }

  .percentile-text {
    font-size: 1.1rem;
  }
}

.ranking-buttons .btn-play-again,
.ranking-buttons .btn-back-home {
  min-width: 180px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  text-align: center;
}

.ranking-label {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin: 0;
}

.ranking-badge {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: var(--bg-dark);
  border: 2px solid var(--primary);
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--primary);
  animation: rankingPulse 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(243, 123, 0, 0.3);
}

.percentile-text {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 1.25rem 0 0;
  max-width: 420px;
}

.percentile-text strong {
  color: var(--primary);
}

@keyframes rankingPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(243, 123, 0, 0.3);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 35px rgba(243, 123, 0, 0.5);
    transform: scale(1.02);
  }
}

.btn-play-again, .btn-study {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-play-again:hover, .btn-study:hover {
  background: var(--primary-dark);
}

.btn-back-home {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background: transparent;
  color: var(--text-muted);
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-back-home:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.4);
}

/* All questions results */
.all-questions-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 600px) {
  .ranking-block {
    margin-bottom: 1rem;
  }

  .all-questions-section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
  }
}

.all-questions-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.results-question-list {
  list-style: none;
}

.results-question-item {
  padding: 1.25rem;
  background: var(--bg-card);
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 4px solid var(--text-muted);
}

.results-question-item.correct {
  border-left-color: var(--correct);
}

.results-question-item.incorrect {
  border-left-color: var(--wrong);
}

.results-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.results-q-num {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 600;
}

.results-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.results-badge.correct {
  background: rgba(63, 185, 80, 0.25);
  color: var(--correct);
}

.results-badge.incorrect {
  background: rgba(248, 81, 73, 0.25);
  color: var(--wrong);
}

.results-prompt {
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.results-answers {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.results-your-answer,
.results-correct-answer {
  margin-bottom: 0.35rem;
}

.results-your-answer strong,
.results-correct-answer strong {
  color: var(--text);
  margin-right: 0.35rem;
}

.results-question-item .btn-study {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
}

/* Loading */
.loading-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  text-align: center;
  padding: 3rem 2rem;
}

.loading-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(243, 123, 0, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  margin-bottom: 1.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.loading-subtext {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

/* Error */
.error-section {
  text-align: center;
  padding: 4rem 2rem;
}

.error-section h1 { font-size: 2rem; margin-bottom: 1rem; }
.error-section p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-fade-in.delay-1 { animation-delay: 0.15s; opacity: 0; }
.animate-fade-in.delay-2 { animation-delay: 0.3s; opacity: 0; }
.animate-fade-in.delay-3 { animation-delay: 0.45s; opacity: 0; }

.animate-slide-up {
  animation: slideUp 0.5s ease forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 600px) {
  .nav { flex-direction: column; gap: 0.5rem; }

  .hero-title { font-size: 2.5rem; }

  .difficulty-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
    gap: 1rem;
  }

  .difficulty-card:hover {
    transform: translateY(-2px);
  }

  .difficulty-img {
    width: 120px;
    height: 120px;
  }

  .difficulty-card-text {
    order: 2;
  }

  .difficulty-card .difficulty-name {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
  }

  .difficulty-meta {
    margin-bottom: 0.35rem;
  }

  .difficulty-desc {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 auto;
    max-width: 280px;
  }

  .difficulty-cta {
    order: 3;
    margin-top: 0.25rem;
  }
}
