/* ============================================================================
   THE NATION WANTS TO GUESS — STYLESHEET
   ============================================================================
   HEY AKSHAT — you usually won't need to edit this file. Colors, fonts,
   and spacing that are meant to be tweaked are pulled from CSS
   "variables" defined at the very top, in the ":root" block below.

   If you want to change a color, look for it in the ":root" block
   first — changing it there updates it EVERYWHERE on the site
   automatically, instead of you having to hunt through the whole file.

   Note: the actual TEXT content (questions, names, etc.) is NOT in
   this file — that all lives in js/config.js. This file only controls
   how things LOOK, not what they SAY.
============================================================================ */

/* ----------------------------------------------------------------------
   COLOR & SPACING VARIABLES
   Change a value here to change it across the whole site.
---------------------------------------------------------------------- */
:root {
  /* Contestant colors — pulled to match config.js, kept here too so
     CSS can use them directly. If you change CONTESTANT_COLORS in
     config.js, update these to match. */
  --guesser1-color: #E63950; /* Red */
  --guesser2-color: #F0B429; /* Yellow */
  --guesser3-color: #3FA34D; /* Green */

  /* Core theme colors */
  --bg-black:        #0A0A0A;
  --card-bg:         #0D0D10;
  --card-glow:       #3B82F6;
  --accent-orange:   #FF7A29;
  --text-primary:    #FFFFFF;
  --text-secondary:  #B9B9C0;
  --text-dim:        #5A5A63;
  --question-label:  #5B8DEF;
  --bullet-dot:      #E63950;

  /* Spacing scale — used for consistent padding/margins throughout */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;

  /* Font stacks */
  --font-display: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* ----------------------------------------------------------------------
   RESET & BASE STYLES
---------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg-black);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
}

/* Visible keyboard focus for accessibility — never remove this without
   replacing it, keyboard users need to be able to see what's selected. */
:focus-visible {
  outline: 3px solid var(--accent-orange);
  outline-offset: 3px;
}

/* Respect people who've asked their OS to reduce motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

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

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

/* Decorative orange neon tube lines, echoing the real set design.
   Purely visual, sits behind content. */
.neon-tube-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(var(--accent-orange), var(--accent-orange));
  background-repeat: no-repeat;
  background-size: 4px 22vh;
  background-position:
    6vw 4vh,
    94vw 4vh,
    6vw 74vh,
    94vw 74vh;
  filter: blur(1px);
}

.screen {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: 100%;
  display: none; /* app.js toggles screens by adding/removing "screen--active" */
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) var(--space-sm) var(--space-xl);
}

.screen--active {
  display: flex;
}

/* ----------------------------------------------------------------------
   LANDING PAGE
---------------------------------------------------------------------- */
.landing-header {
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.landing-header__box {
  border: 1px solid #2A2A31;
  border-radius: 10px;
  padding: var(--space-sm);
  flex: 1 1 220px;
  min-width: 200px;
  background: rgba(255,255,255,0.02);
}

.landing-header__box--logo {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-header__box a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.landing-header__box a:hover {
  color: var(--text-primary);
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.sponsor-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.hero-card {
  width: 100%;
  max-width: 900px;
  border: 1.5px solid var(--card-glow);
  border-radius: 24px;
  box-shadow: 0 0 25px rgba(59,130,246,0.35), inset 0 0 25px rgba(59,130,246,0.08);
  background: var(--card-bg);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.hero-card__presents {
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.hero-card__presents strong {
  color: var(--text-primary);
  font-size: 1.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.play-button {
  margin-top: var(--space-sm);
  background: linear-gradient(180deg, #FF4D4D, #E01E2C);
  color: #FFE45C;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  padding: 1rem 3.5rem;
  border-radius: 14px;
  box-shadow: 0 6px 0 #A2141F, 0 10px 20px rgba(224,30,44,0.4);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.play-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 0 #A2141F, 0 14px 24px rgba(224,30,44,0.5);
}

.play-button:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #A2141F, 0 6px 14px rgba(224,30,44,0.4);
}

.credits-section {
  width: 100%;
  max-width: 900px;
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.credits-block h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
}

.credits-names {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.credits-names a {
  color: var(--text-primary);
  border-bottom: 1px solid var(--text-dim);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.credits-names a:hover {
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

.credits-block p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ----------------------------------------------------------------------
   NAME ENTRY SCREEN
---------------------------------------------------------------------- */
.name-entry-card {
  width: 100%;
  max-width: 560px;
  margin-top: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.name-entry-card h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: var(--space-sm);
}

.name-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.name-field label {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.name-field--guesser1 label { color: var(--guesser1-color); }
.name-field--guesser2 label { color: var(--guesser2-color); }
.name-field--guesser3 label { color: var(--guesser3-color); }

.name-field input {
  background: var(--card-bg);
  border: 1.5px solid #2A2A31;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.name-field--guesser1 input:focus { border-color: var(--guesser1-color); }
.name-field--guesser2 input:focus { border-color: var(--guesser2-color); }
.name-field--guesser3 input:focus { border-color: var(--guesser3-color); }
.name-field--host input:focus { border-color: var(--card-glow); }

.name-field input::placeholder {
  color: var(--text-dim);
}

.primary-button {
  margin-top: var(--space-sm);
  align-self: center;
  background: var(--card-glow);
  color: #05070F;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.9rem 2.5rem;
  border-radius: 12px;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.form-error {
  color: var(--guesser1-color);
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.2em;
}

/* ----------------------------------------------------------------------
   SCOREBOARD (shown across gameplay screens)
---------------------------------------------------------------------- */
.scoreboard {
  width: 100%;
  max-width: 900px;
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  justify-content: center;
}

.score-chip {
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid transparent;
}

.score-chip--guesser1 { border-color: var(--guesser1-color); color: var(--guesser1-color); }
.score-chip--guesser2 { border-color: var(--guesser2-color); color: var(--guesser2-color); }
.score-chip--guesser3 { border-color: var(--guesser3-color); color: var(--guesser3-color); }

.score-chip__points {
  color: var(--text-primary);
  font-weight: 800;
}

/* ----------------------------------------------------------------------
   ROUND TITLE CARD (the "ROUND 2 — Pick Me Behaviour" style interstitial)
---------------------------------------------------------------------- */
.round-title-card {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.round-title-card__round {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  border-bottom: 3px solid var(--text-primary);
  display: inline-block;
  padding-bottom: 0.3rem;
  margin-bottom: var(--space-sm);
}

.round-title-card__subtitle {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text-primary);
}

/* ----------------------------------------------------------------------
   QUESTION CARD (shared by Round 1, Round 2, and Round 3 hint reveal)
---------------------------------------------------------------------- */
.question-card {
  width: 100%;
  max-width: 900px;
  border: 1.5px solid var(--card-glow);
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(59,130,246,0.3), inset 0 0 20px rgba(59,130,246,0.06);
  background: var(--card-bg);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-lg);
}

.question-card__label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  font-size: 1.5rem;
  color: var(--question-label);
  margin-bottom: var(--space-sm);
}

.question-card__label::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bullet-dot);
  box-shadow: 0 0 8px var(--bullet-dot);
  flex-shrink: 0;
}

.question-card__body {
  font-size: 1.15rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.question-card__body strong {
  font-weight: 800;
}

/* ----------------------------------------------------------------------
   OPTION PILLS (Round 1 & Round 2 answers, revealed one at a time)
---------------------------------------------------------------------- */
.options-list {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

@media (max-width: 640px) {
  .options-list {
    grid-template-columns: 1fr;
  }
}

.option-pill {
  border: 1.5px solid var(--card-glow);
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(59,130,246,0.25);
  padding: 1rem 1.4rem;
  font-size: 1.05rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  background: rgba(59,130,246,0.03);

  /* Options fade/slide in one at a time — controlled in app.js by
     toggling this class. Purely a visual entrance, not required for
     the option to be usable. */
  opacity: 0;
  transform: translateY(8px);
  animation: option-reveal 0.35s ease forwards;
}

@keyframes option-reveal {
  to { opacity: 1; transform: translateY(0); }
}

.option-pill--correct {
  border-color: #3FA34D;
  box-shadow: 0 0 16px rgba(63,163,77,0.45);
  background: rgba(63,163,77,0.08);
}

.option-pill__letter {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--question-label);
  flex-shrink: 0;
}

.reveal-next-button {
  margin-top: var(--space-md);
  border: 1.5px solid var(--accent-orange);
  color: var(--accent-orange);
  border-radius: 10px;
  padding: 0.7rem 1.6rem;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.reveal-next-button:hover {
  background: var(--accent-orange);
  color: #1A0900;
}

.reveal-next-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ----------------------------------------------------------------------
   ROUND 2 GRID ("Pick Me Behaviour")
---------------------------------------------------------------------- */
.grid-card {
  width: 100%;
  max-width: 900px;
  border: 1.5px solid var(--card-glow);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(59,130,246,0.3);
}

.grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.grid-cell {
  border: 0.75px solid rgba(59,130,246,0.5);
  padding: var(--space-md) var(--space-sm);
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-secondary);
  background: var(--card-bg);
  transition: background 0.2s ease, color 0.2s ease;
}

.grid-cell--available {
  color: var(--text-primary);
}

.grid-cell--available:hover {
  background: rgba(59,130,246,0.12);
  cursor: pointer;
}

.grid-cell--used {
  color: var(--text-dim);
  cursor: not-allowed;
}

.grid-cell--selected {
  background: var(--card-glow);
  color: #05070F;
}

@media (max-width: 640px) {
  .grid-cell {
    font-size: 0.85rem;
    min-height: 80px;
    padding: var(--space-sm) 0.5rem;
  }
}

/* ----------------------------------------------------------------------
   ROUND 3 — "GUESS WHO AM I?" HINT REVEAL
---------------------------------------------------------------------- */
.who-am-i-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.who-am-i-sign {
  border: 3px solid var(--guesser1-color);
  background: #E7E7E7;
  color: #111;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
}

.who-am-i-rules {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.5;
}

.hint-hud {
  width: 100%;
  max-width: 900px;
  border: 1.5px solid var(--card-glow);
  border-radius: 16px;
  background: var(--card-bg);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-lg);
}

.hint-hud__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.dot-row {
  display: inline-flex;
  gap: 0.35rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #2A2A31;
}

.dot--hint-used { background: #3FA34D; }
.dot--attempt-used { background: var(--guesser1-color); }

.hint-hud__text {
  font-size: 1.15rem;
  color: var(--text-primary);
}

.wager-panel {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

@media (max-width: 640px) {
  .wager-panel { grid-template-columns: 1fr; }
}

.wager-box {
  border-radius: 14px;
  border: 1.5px solid transparent;
  background: rgba(255,255,255,0.03);
  padding: var(--space-sm);
  text-align: center;
}

.wager-box--guesser1 { border-color: var(--guesser1-color); }
.wager-box--guesser2 { border-color: var(--guesser2-color); }
.wager-box--guesser3 { border-color: var(--guesser3-color); }

.wager-box__name { font-family: var(--font-display); font-weight: 700; margin-bottom: 0.3rem; }
.wager-box__score { font-size: 0.85rem; color: var(--text-secondary); }

/* ----------------------------------------------------------------------
   MISC UTILITY
---------------------------------------------------------------------- */
.button-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-md);
}

.text-center { text-align: center; }

.small-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: var(--space-sm);
}
