/* ============================================================
   Cut Predictor — styles
   GSC palette · system sans only · no webfonts
   ============================================================ */

:root {
  --gsc-primary-purple: #5A3A8A;
  --gsc-deep-ink:       #2E2347;
  --gsc-accent-purple:  #7B5BB6;
  --gsc-soft-lavender:  #F1ECF8;
  --gsc-mist-grey:      #D7D9DE;
  --gsc-slate-grey:     #6B7078;
  --gsc-charcoal:       #2F3136;
  --gsc-white:          #FFFFFF;
  --gsc-sunset:         #E08555;
  --gsc-warm-gold:      #FFB270;
  --gsc-correct:        #6CCB7F;
  --gsc-wrong:          #C25050;
  --bg-page:            #0c081a;

  --font-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --shadow-1: 0 1px 2px rgba(0,0,0,0.18), 0 1px 1px rgba(0,0,0,0.12);
  --shadow-2: 0 6px 18px rgba(0,0,0,0.28), 0 2px 4px rgba(0,0,0,0.16);
  --shadow-3: 0 18px 48px rgba(0,0,0,0.45), 0 4px 8px rgba(0,0,0,0.20);

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background:
    radial-gradient(circle at 20% -10%, rgba(123,91,182,0.32), transparent 50%),
    radial-gradient(circle at 90% 110%, rgba(224,133,85,0.18), transparent 50%),
    var(--bg-page);
  color: var(--gsc-soft-lavender);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.hidden { display: none !important; }

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gsc-warm-gold);
  font-weight: 700;
  margin: 0 0 12px;
}

h1 {
  font-size: 44px;
  font-weight: 800;
  margin: 0 0 12px;
  color: var(--gsc-white);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h3 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--gsc-warm-gold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

kbd {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--gsc-soft-lavender);
}

.lede {
  font-size: 17px;
  line-height: 1.5;
  color: var(--gsc-soft-lavender);
  margin: 0 0 18px;
}

.hint-text {
  margin: 12px 0 0;
  font-size: 12px;
  color: rgba(241,236,248,0.55);
}

/* ============== INTRO ============== */
.intro {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 560px;
}

.intro-content {
  background: linear-gradient(180deg, rgba(46,35,71,0.78), rgba(12,8,26,0.92));
  border: 1px solid rgba(123,91,182,0.4);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-3);
  width: 100%;
}

.rules {
  list-style: none;
  margin: 8px 0 22px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rules li {
  font-size: 14px;
  color: var(--gsc-soft-lavender);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.rules .icn {
  font-size: 18px;
  line-height: 1;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
}
.rules strong { color: var(--gsc-warm-gold); font-weight: 700; }

.name-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

#name-input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  color: var(--gsc-white);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
#name-input::placeholder { color: rgba(241,236,248,0.4); }
#name-input:focus {
  border-color: var(--gsc-accent-purple);
  background: rgba(255,255,255,0.12);
}

.big-btn {
  background: linear-gradient(180deg, var(--gsc-warm-gold), var(--gsc-sunset));
  color: var(--gsc-deep-ink);
  border: 0;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 24px;
  cursor: pointer;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-2);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.big-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-3); }
.big-btn:active { transform: translateY(0); }
.big-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============== GAME ============== */
.game {
  width: 100%;
  max-width: 980px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hud {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1px;
  background: rgba(123,91,182,0.35);
  border: 1px solid rgba(123,91,182,0.35);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.hud-cell {
  background: rgba(46,35,71,0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  gap: 2px;
}
.hud-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gsc-warm-gold);
  font-weight: 700;
}
.hud-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--gsc-white);
  line-height: 1.1;
  text-align: center;
}
.hud-value.lg {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-3);
  border: 1px solid rgba(123,91,182,0.3);
  aspect-ratio: 16 / 9;
}

#video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* The prediction prompt — sits over the video when paused */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.overlay-card {
  background: linear-gradient(180deg, rgba(46,35,71,0.85), rgba(12,8,26,0.94));
  border-top: 1px solid rgba(255,178,112,0.55);
  width: 100%;
  padding: 18px 22px 22px;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
}
.overlay-eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gsc-warm-gold);
  font-weight: 700;
  margin-bottom: 4px;
}
.overlay-prompt {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--gsc-white);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 14px;
}

/* Options grid */
.options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.option {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  font-family: var(--font-sans);
  color: var(--gsc-soft-lavender);
  cursor: pointer;
  text-align: center;
  transition: background 0.12s ease, transform 0.06s ease, border-color 0.12s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.option:hover {
  background: rgba(123,91,182,0.25);
  border-color: var(--gsc-accent-purple);
}
.option:active {
  transform: scale(0.97);
}
.option .opt-emoji {
  font-size: 26px;
  line-height: 1;
}
.option .opt-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gsc-warm-gold);
}
.option .opt-blurb {
  font-size: 12px;
  color: rgba(241,236,248,0.78);
  line-height: 1.3;
}

@media (max-width: 640px) {
  .option .opt-blurb { display: none; }
  .options { gap: 6px; }
  .option { padding: 10px 8px; }
  .overlay-prompt { font-size: 16px; }
}

/* Reveal card — replaces options after a choice */
.reveal {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reveal-headline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
}
.reveal-headline .tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-weight: 800;
}
.reveal-headline .tag.correct {
  background: rgba(108,203,127,0.18);
  color: var(--gsc-correct);
  border: 1px solid rgba(108,203,127,0.45);
}
.reveal-headline .tag.wrong {
  background: rgba(194,80,80,0.18);
  color: #ffb5b5;
  border: 1px solid rgba(194,80,80,0.45);
}
.reveal-summary {
  font-size: 14px;
  color: var(--gsc-soft-lavender);
}
.reveal-summary .picked {
  color: rgba(241,236,248,0.7);
}
.reveal-summary .actual {
  color: var(--gsc-warm-gold);
  font-weight: 700;
}
.reveal-because {
  font-size: 14px;
  color: var(--gsc-soft-lavender);
  background: rgba(255,255,255,0.04);
  border-left: 3px solid var(--gsc-warm-gold);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  line-height: 1.45;
}

.reveal-actions {
  display: flex;
  justify-content: flex-end;
}

/* Flash overlays */
.flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.flash.correct {
  background: radial-gradient(ellipse at center, rgba(108,203,127,0.45), transparent 65%);
  opacity: 1;
}
.flash.wrong {
  background: radial-gradient(ellipse at center, rgba(194,80,80,0.5), transparent 65%);
  opacity: 1;
}

/* Clip transition card */
.clip-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  padding: 18px 22px 22px;
  background: linear-gradient(180deg, rgba(46,35,71,0.85), rgba(12,8,26,0.94));
}
.clip-card .clip-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--gsc-white);
  letter-spacing: -0.01em;
}
.clip-card .clip-sub {
  font-size: 13px;
  color: rgba(241,236,248,0.7);
}
.clip-card .clip-actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

/* ============== END ============== */
.end {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 620px;
}

.end-content {
  background: linear-gradient(180deg, rgba(46,35,71,0.78), rgba(12,8,26,0.92));
  border: 1px solid rgba(123,91,182,0.4);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow-3);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.big-score {
  font-size: 72px;
  font-weight: 800;
  line-height: 1;
  color: var(--gsc-warm-gold);
  letter-spacing: -0.04em;
  margin: 4px 0 4px;
  font-variant-numeric: tabular-nums;
}

.accuracy {
  font-size: 16px;
  font-weight: 600;
  color: var(--gsc-soft-lavender);
  margin: 0 0 18px;
}

.review {
  margin: 18px 0 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(123,91,182,0.3);
}

.review-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 13px;
}
.review-item.perfect {
  background: rgba(108,203,127,0.1);
  border-color: rgba(108,203,127,0.4);
  color: var(--gsc-correct);
  text-align: center;
  padding: 14px;
  font-size: 15px;
}
.review-q {
  font-weight: 700;
  color: var(--gsc-white);
  margin-bottom: 4px;
}
.review-picked, .review-correct { color: rgba(241,236,248,0.85); margin: 2px 0; }
.review-picked .x      { color: #ff7a7a; font-weight: 800; margin-right: 4px; }
.review-correct .tick  { color: var(--gsc-correct); font-weight: 800; margin-right: 4px; }

@media (max-width: 720px) {
  body { padding: 12px; }
  h1 { font-size: 32px; }
  .intro-content, .end-content { padding: 22px 20px; }
  .big-score { font-size: 56px; }
  .hud { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .hud-value { font-size: 13px; }
  .hud-value.lg { font-size: 18px; }
}
