/* Road to Wembley - retro arcade chrome. */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #0d1b33;
  --navy2: #16294d;
  --gold: #ffd166;
  --grass: #2c7a42;
}

html, body { height: 100%; }
body {
  background: var(--navy);
  font-family: 'Courier New', ui-monospace, monospace;
  color: #fff;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

#app {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stage {
  position: relative;
  width: min(100vw, 100vh * 16 / 9, 1100px);
  aspect-ratio: 16 / 9;
  background: #1e5c30;
  overflow: hidden;
  touch-action: none;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.rtw-embed #stage { border-radius: 0; width: 100vw; height: 100vh; aspect-ratio: auto; }

#pitch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  object-fit: contain;
  background: var(--navy);
}

/* portrait / small screens: fill the viewport, letterbox the pitch */
@media (max-width: 700px), (orientation: portrait) {
  #stage {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    aspect-ratio: auto;
    border-radius: 0;
  }
}

/* ── screens ── */
.rtw-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: linear-gradient(160deg, rgba(13, 27, 51, 0.94), rgba(22, 41, 77, 0.96));
  text-align: center;
  padding: 20px;
  z-index: 5;
  overflow-y: auto;
}

.rtw-eyebrow {
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
}
.rtw-title {
  font-size: clamp(38px, 8vw, 74px);
  line-height: 0.95;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 4px 4px 0 #000, 8px 8px 0 rgba(255, 209, 102, 0.35);
}
.rtw-sub { max-width: 52ch; font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, 0.85); }
.rtw-h2 { font-size: clamp(20px, 4vw, 30px); color: var(--gold); }

.rtw-bigbtn {
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  background: var(--gold);
  color: #1a1a1a;
  border: none;
  border-radius: 6px;
  padding: 13px 34px;
  cursor: pointer;
  box-shadow: 0 4px 0 #b8912f;
  min-width: 260px;
}
.rtw-bigbtn:active { transform: translateY(3px); box-shadow: 0 1px 0 #b8912f; }
.rtw-bigbtn-ghost { background: transparent; color: var(--gold); border: 2px solid var(--gold); box-shadow: none; }
.rtw-bigbtn:disabled { opacity: 0.45; cursor: default; }

.rtw-controls-hint { font-size: 11px; color: rgba(255, 255, 255, 0.55); line-height: 1.7; max-width: 62ch; }
.rtw-disclaimer { font-size: 9.5px; color: rgba(255, 255, 255, 0.4); max-width: 68ch; line-height: 1.6; }
.rtw-disclaimer a { color: rgba(255, 209, 102, 0.7); }

/* ── team select ── */
.rtw-search {
  font-family: inherit;
  font-size: 15px;
  padding: 9px 14px;
  border-radius: 6px;
  border: 2px solid var(--gold);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  width: min(420px, 86%);
}
.rtw-clublist {
  width: min(560px, 94%);
  max-height: 58%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.rtw-league {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 10px;
  text-align: left;
}
.rtw-club {
  font-family: inherit;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  color: #fff;
  font-size: 14px;
  padding: 9px 14px;
  cursor: pointer;
}
.rtw-club:hover { background: rgba(255, 209, 102, 0.18); border-color: var(--gold); }
.rtw-club-random { border-color: var(--gold); color: var(--gold); }
.rtw-club-meta { font-size: 11px; color: var(--gold); letter-spacing: 0.1em; }

/* ── HUD ── */
.rtw-hud { position: absolute; top: 0; left: 0; right: 0; z-index: 4; pointer-events: none; }
.rtw-hud-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 7px 10px;
  background: linear-gradient(rgba(10, 18, 36, 0.88), rgba(10, 18, 36, 0.55) 80%, transparent);
}
.rtw-hud-team { font-size: 15px; font-weight: 700; letter-spacing: 0.1em; }
.rtw-hud-score {
  font-size: 19px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 209, 102, 0.5);
  border-radius: 5px;
  padding: 2px 12px;
}
.rtw-hud-clock { font-size: 14px; color: rgba(255, 255, 255, 0.8); min-width: 34px; }
.rtw-hud-btn {
  pointer-events: auto;
  font-size: 15px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  padding: 3px 9px;
  cursor: pointer;
}

/* ── touch controls ── */
.rtw-joy {
  position: absolute;
  width: 88px;
  height: 88px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.18);
  z-index: 6;
  pointer-events: none;
}
.rtw-joy-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  background: rgba(255, 209, 102, 0.75);
}
.rtw-btn {
  position: absolute;
  bottom: 26px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.5);
  z-index: 6;
}
.rtw-btn-a { right: 118px; }
.rtw-btn-b { right: 26px; border-color: var(--gold); color: var(--gold); }
