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

:root {
  --bg: #0a0c14;
  --panel: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.12);
  --accent: #38e07b;      /* pitch green */
  --accent-2: #4da3ff;    /* electric blue */
  --text-dim: rgba(255, 255, 255, 0.65);
}

body {
  background: var(--bg);
  color: #fff;
  font-family: "Inter", "Avenir Next", system-ui, sans-serif;
  min-height: 100vh;
}

h1, h2, .btn, .card-name { font-family: "Space Grotesk", "Inter", sans-serif; }

/* ---------- landing ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8) saturate(1.1);
}

.hero-text {
  position: relative;
  text-align: center;
  padding: 3rem 1.5rem 4.5rem;
  width: 100%;
  background: linear-gradient(transparent, rgba(6, 8, 14, 0.92) 65%);
}

.hero-name {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.tagline {
  color: var(--text-dim);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  margin-top: 0.6rem;
}

.hero-buttons {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.9rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0.85rem 1.8rem;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}

.btn:active { transform: scale(0.95); }

.btn-primary {
  color: #04140a;
  background: var(--accent);
  box-shadow: 0 8px 30px rgba(56, 224, 123, 0.35);
}

.btn-primary:hover { box-shadow: 0 10px 40px rgba(56, 224, 123, 0.55); transform: translateY(-2px); }

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- about ---------- */

.dark-page {
  background:
    radial-gradient(ellipse at 15% 0%, rgba(77, 163, 255, 0.12), transparent 45%),
    radial-gradient(ellipse at 90% 25%, rgba(56, 224, 123, 0.10), transparent 45%),
    var(--bg);
  padding: 2rem 1.2rem 4rem;
  min-height: 100vh;
}

.home-link {
  color: var(--text-dim);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
}

.home-link:hover { color: #fff; }

.page-title {
  text-align: center;
  font-size: clamp(2.2rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-top: 1.2rem;
}

.page-sub {
  text-align: center;
  color: var(--text-dim);
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

.cards {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2.2rem;
}

.card {
  width: 190px;
  padding: 1.5rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  backdrop-filter: blur(10px);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, 0.09); }

.card.active { border-color: var(--accent); background: rgba(56, 224, 123, 0.10); }

.card-emoji { font-size: 2.6rem; }

.card-name { font-size: 1.05rem; font-weight: 700; letter-spacing: 0.05em; }

.panel {
  display: none;
  max-width: 620px;
  margin: 2rem auto 0;
  padding: 1.8rem 2rem;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  animation: rise 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.panel.open { display: block; }

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

.panel h2 {
  font-size: 1.5rem;
  margin: 0.5rem 0 0.4rem;
  color: var(--accent);
}

.panel p { font-size: 1.1rem; line-height: 1.75; margin-bottom: 0.4rem; color: rgba(255,255,255,0.92); }

.loud { font-weight: 700; color: var(--accent-2); }

/* ---------- game ---------- */

.game-page {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(56, 224, 123, 0.14), transparent 55%),
    var(--bg);
  padding: 1.6rem 1rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.game-page .home-link { align-self: flex-start; }

.game-header { text-align: center; margin-top: 0.6rem; }

.game-title {
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.scoreboard {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 1rem;
}

.score-item {
  min-width: 92px;
  padding: 0.6rem 1rem;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-item span { font-size: 1.6rem; font-weight: 700; font-family: "Space Grotesk", sans-serif; }

.score-item label { font-size: 0.68rem; letter-spacing: 0.12em; color: var(--text-dim); }

.game-hint {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--text-dim);
  min-height: 1.6em;
  text-align: center;
}

.pitch {
  margin-top: 0;
  width: min(70vw, 440px);
}

.goal {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 6px solid #eef2f7;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(rgba(10, 14, 22, 0.35), rgba(10, 14, 22, 0.55));
  cursor: crosshair;
  overflow: hidden;
  touch-action: manipulation;
}

.net {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.13) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.13) 0 1px, transparent 1px 26px);
  pointer-events: none;
}

.keeper {
  position: absolute;
  left: 50%;
  top: 22%;
  transform: translate(-50%, 0);
  font-size: clamp(2.6rem, 8vw, 4rem);
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.goal .ball {
  position: absolute;
  left: 50%;
  bottom: -8%;
  transform: translate(-50%, 0);
  font-size: clamp(2rem, 6vw, 3rem);
  pointer-events: none;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.flash.show-goal { opacity: 1; background: radial-gradient(circle, rgba(56, 224, 123, 0.3), transparent 70%); }

.flash.show-save { opacity: 1; background: radial-gradient(circle, rgba(255, 94, 120, 0.28), transparent 70%); }

.shake { animation: shake 0.4s; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.game-over {
  display: none;
  margin-top: 1.6rem;
  text-align: center;
  padding: 1.6rem 2.4rem;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  animation: rise 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.game-over.open { display: block; }

.game-over h2 { font-size: 1.8rem; }

.game-over p { color: var(--text-dim); margin: 0.5rem 0 1rem; }

/* ---------- penalty duel additions ---------- */

.versus {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  justify-content: center;
  margin-top: 1.1rem;
}

.player-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.7rem 1.3rem;
  border-radius: 16px;
  background: var(--panel);
  border: 2px solid var(--border);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.player-badge.active {
  border-color: var(--accent);
  box-shadow: 0 0 22px rgba(56, 224, 123, 0.35);
}

.avatar { width: 44px; height: 70px; }

.badge-name { font-size: 0.72rem; letter-spacing: 0.14em; color: var(--text-dim); font-weight: 600; }

.badge-score { font-size: 1.7rem; font-weight: 700; font-family: "Space Grotesk", sans-serif; }

.versus-mark { font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--text-dim); }

.round-label {
  text-align: center;
  margin-top: 0.8rem;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}

.keeper-svg {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translate(-50%, 0);
  width: clamp(100px, 24%, 170px);
  pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(0,0,0,0.55));
}

.k-arm { transform-box: fill-box; transform-origin: center left; }

#arm-r { transform-origin: center right; }

.zone-hint {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(47, 107, 255, 0.85);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.zone-hint.show { opacity: 1; }

/* ---------- guitar ---------- */

.guitar {
  margin-top: 1.6rem;
  width: min(92vw, 680px);
  padding: 1.6rem 1.8rem;
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 140, 26, 0.10), rgba(123, 94, 255, 0.08)),
    var(--panel);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.string-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  padding: 0.35rem 0;
}

.string-label {
  width: 1.4rem;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--text-dim);
}

.string {
  flex: 1;
  border-radius: 2px;
  background: linear-gradient(90deg, #cfd6e4, #8f97a8, #cfd6e4);
}

.s-thick { height: 5px; }
.s-mid   { height: 3.5px; }
.s-thin  { height: 2px; }

.string.vibrating { animation: vibrate 0.6s ease-out; }

@keyframes vibrate {
  0%   { transform: scaleY(3.2) translateY(-1px); filter: brightness(1.8); }
  30%  { transform: scaleY(2.2) translateY(1px); }
  60%  { transform: scaleY(1.5) translateY(-0.5px); }
  100% { transform: scaleY(1); filter: brightness(1); }
}

.btn-guitar {
  color: #1a0a04;
  background: #ff8c1a;
  box-shadow: 0 8px 30px rgba(255, 140, 26, 0.35);
}

.btn-guitar:hover { box-shadow: 0 10px 40px rgba(255, 140, 26, 0.55); transform: translateY(-2px); }


/* ---------- duel v2: actors, grass, dive buttons ---------- */

.pitch { position: relative; }

.grass {
  height: 26px;
  border-radius: 0 0 10px 10px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 40px, transparent 40px 80px),
    linear-gradient(#1c7a3d, #145a2d);
}

.actor {
  position: absolute;
  bottom: -6px;
  left: 12%;
  width: clamp(44px, 9%, 64px);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.5));
  z-index: 3;
}

#kick-leg-you, #kick-leg-bot { transform-box: fill-box; transform-origin: top center; }

.dive-controls {
  display: none;
  margin-top: 1rem;
  text-align: center;
}

.dive-controls.show { display: block; animation: rise 0.25s ease-out; }

.dive-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.dive-grid {
  display: grid;
  grid-template-columns: repeat(3, 74px);
  gap: 0.5rem;
  justify-content: center;
}

.dive-btn {
  height: 54px;
  font-size: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(47, 107, 255, 0.18);
  color: #fff;
  cursor: pointer;
  transition: transform 0.1s, background 0.1s;
}

.dive-btn:hover { background: rgba(47, 107, 255, 0.35); }
.dive-btn:active { transform: scale(0.9); }

/* ---------- guitar v2: 20 frets ---------- */

.fret-display {
  margin-top: 1rem;
  min-height: 1.6em;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
}

.fretboard-scroll {
  margin-top: 1rem;
  width: min(94vw, 1100px);
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(#4a3020, #33210f);
  padding: 0.6rem 0;
}

.fretboard {
  display: grid;
  grid-template-columns: 64px repeat(20, 52px);
  align-items: stretch;
}

.fret-head {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.6);
  font-weight: 700;
  padding: 0.3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.fret-cell {
  position: relative;
  height: 44px;
  border: none;
  border-right: 2px solid rgba(220, 225, 235, 0.5);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.fret-cell::before {
  /* the string running through the cell */
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: var(--gauge, 3px);
  transform: translateY(-50%);
  background: linear-gradient(90deg, #d9dee8, #98a1b3, #d9dee8);
  border-radius: 2px;
}

.fret-cell:hover::before { filter: brightness(1.6); }

.fret-cell.played::before { animation: vibrate 0.5s ease-out; }

.fret-open {
  border-right: 6px solid #e8e2d3; /* the nut */
  display: flex;
  align-items: center;
  justify-content: center;
}

.fret-open .string-label { color: #ffd9a0; }

.marker-row .fret-head { border-bottom: none; padding: 0.25rem 0; color: rgba(255,255,255,0.4); }


/* ---------- the stands: blue fans vs red fans ---------- */

.stands {
  width: min(92vw, 640px);
  padding: 8px 10px 6px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(#151a28, #0f1420);
  border: 1px solid var(--border);
  border-bottom: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.fan-row { display: flex; gap: 4px; justify-content: center; }

.fan {
  width: 11px;
  height: 11px;
  border-radius: 50% 50% 40% 40%;
}

.fan.blue { background: #2f6bff; }
.fan.red  { background: #e04545; }

.fan.jump { animation: fan-jump 0.5s ease-out; }

@keyframes fan-jump {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(-7px); }
}

/* the robot's tell + the PRESS NOW moment */
.dive-btn.hot { animation: btn-pulse 0.5s ease-in-out infinite; border-color: var(--accent); }

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(56,224,123,0); }
  50% { box-shadow: 0 0 18px rgba(56,224,123,0.6); }
}


/* ---------- the arena ---------- */

.arena {
  position: relative;
  margin-top: 2.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 26px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(120, 160, 255, 0.10), transparent 60%),
    linear-gradient(#141a2a, #0d1220 70%);
  border-radius: 26px 26px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  box-shadow: 0 -20px 60px rgba(80, 120, 255, 0.08) inset;
}

.arena-banner {
  margin-top: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  letter-spacing: 0.35em;
  font-size: clamp(0.8rem, 2.4vw, 1.15rem);
  color: #ffd447;
  text-shadow: 0 0 12px rgba(255, 212, 71, 0.8);
}

.arena .stands {
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-top: 8px;
  width: min(86vw, 580px);
}

.floodlight {
  position: absolute;
  top: -44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.fl-l { left: 6px; }
.fl-r { right: 6px; }

.fl-head {
  width: 34px;
  height: 14px;
  border-radius: 4px;
  background: #dfe7f5;
  box-shadow: 0 0 22px 8px rgba(220, 235, 255, 0.55);
}

.fl-pole {
  width: 5px;
  height: 46px;
  background: #39415a;
}

.arena .pitch { margin-top: 10px; }

.arena .grass { width: min(86vw, 580px); }
