* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #06140a;
  --grass: #1f7a36;
  --paper: #f3f7ee;
  --gold: #e8c547;
  --line: rgba(243, 247, 238, 0.2);
}
html, body { min-height: 100%; }
body {
  color: var(--paper);
  font-family: Manrope, "Segoe UI", sans-serif;
  background: var(--ink);
  overflow: hidden;
}
.hidden { display: none !important; }
.screen { min-height: 100dvh; width: 100%; }
.back {
  position: absolute; top: 1rem; left: 1rem;
  color: inherit; text-decoration: none; font-size: 0.85rem; opacity: 0.7;
}
.menu {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem 1rem 3rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(46, 160, 72, 0.35), transparent 50%),
    linear-gradient(180deg, #0a2212, #06140a);
}
.eyebrow {
  letter-spacing: 0.28em; text-transform: uppercase; font-size: 0.72rem;
  opacity: 0.55; margin-bottom: 0.5rem;
}
.menu h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(4.2rem, 16vw, 8rem); line-height: 0.85; letter-spacing: 0.04em;
  text-shadow: 0 0 40px rgba(232, 197, 71, 0.25);
}
.lead { margin: 0.6rem 0 1.4rem; letter-spacing: 0.08em; color: var(--gold); }
.btn-main {
  width: min(22rem, 92%); margin: 0.35rem 0; padding: 0.85rem 1.2rem;
  font-family: "Bebas Neue", Impact, sans-serif; font-size: 1.7rem; letter-spacing: 0.12em;
  border: 2px solid #fff; background: #1a7a32; color: #fff; cursor: pointer;
  box-shadow: 0 5px 0 #0b3d18;
}
.btn-main:hover { background: #22a044; }
.btn-main:active { transform: translateY(2px); box-shadow: 0 2px 0 #0b3d18; }
.kits { display: flex; gap: 1.2rem; margin: 1.2rem 0 0.4rem; flex-wrap: wrap; justify-content: center; }
.kit-col { min-width: 9rem; }
.kit-col p { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; margin-bottom: 0.35rem; }
.kit-row { display: flex; gap: 0.35rem; justify-content: center; }
.kit-btn {
  width: 2rem; height: 2rem; border-radius: 99px; border: 2px solid transparent;
  cursor: pointer;
}
.kit-btn.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.controls {
  display: flex; gap: 1.4rem; margin-top: 1.4rem; max-width: 40rem;
  font-size: 0.82rem; line-height: 1.45; text-align: left; opacity: 0.8;
}
.controls strong { display: block; color: var(--gold); margin-bottom: 0.2rem; }
.net-box { width: min(22rem, 92%); margin: 0.6rem 0 0.2rem; }
.net-join { display: flex; gap: 0.4rem; margin-top: 0.4rem; }
.net-join input {
  flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.16em;
  font: 1.2rem "Bebas Neue", Impact, sans-serif; text-align: center;
  border: 2px solid #fff; background: #0a2212; color: #fff; padding: 0.5rem;
}
.net-join .btn-main { width: auto; margin: 0; padding: 0.55rem 0.9rem; font-size: 1.25rem; }
.net-status { margin-top: 0.45rem; font-size: 0.88rem; color: var(--gold); min-height: 1.2em; word-break: break-all; }
#net-tag { font-size: 0.85rem; letter-spacing: 0.12em; opacity: 0.75; }
@media (max-width: 700px) { .controls { flex-direction: column; } }

.play {
  position: relative;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background: #041108;
}
.hud {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 0.8rem; font-family: "Bebas Neue", Impact, sans-serif;
  background: #03100a; border-bottom: 1px solid var(--line);
}
.hud-team { display: flex; align-items: center; gap: 0.45rem; font-size: 1.35rem; }
.hud-team b { font-size: 2rem; min-width: 1.4rem; }
.hud-kit { width: 0.85rem; height: 0.85rem; border-radius: 99px; border: 1px solid #fff; }
.hud-clock { text-align: center; letter-spacing: 0.08em; }
.hud-clock span { display: block; }
#clock { font-size: 1.8rem; color: var(--gold); }
#pitch {
  width: 100%; height: 100%; display: block; background: #145c28;
  touch-action: none;
}
.banner {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  font-family: "Bebas Neue", Impact, sans-serif; font-size: clamp(2.4rem, 8vw, 4.5rem);
  letter-spacing: 0.08em; color: #fff;
  text-shadow: 0 4px 0 #000, 0 0 24px rgba(232, 197, 71, 0.5);
  pointer-events: none;
}
.power-wrap { height: 6px; background: #0a1a10; }
.power { height: 100%; width: 0; background: linear-gradient(90deg, #e8c547, #ff5a2a); }
.game-actions {
  display: flex; gap: 0.5rem; justify-content: center; padding: 0.45rem;
  background: #03100a;
}
.ghost {
  appearance: none; font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--line); padding: 0.35rem 0.8rem; text-decoration: none; cursor: pointer;
}
.touch {
  position: absolute; inset: auto 0 4.6rem 0; display: flex;
  justify-content: space-between; align-items: flex-end; padding: 0 1rem;
  pointer-events: none;
}
.stick {
  width: 7.2rem; height: 7.2rem; border-radius: 50%;
  background: rgba(0,0,0,0.28); border: 2px solid rgba(255,255,255,0.25);
  pointer-events: auto; position: relative;
}
#knob {
  position: absolute; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: #fff; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.touch-btns { display: flex; gap: 0.45rem; pointer-events: auto; }
.touch-btns button {
  width: 4.2rem; height: 4.2rem; border-radius: 50%; border: 2px solid #fff;
  background: rgba(26, 122, 50, 0.85); color: #fff;
  font-family: "Bebas Neue", Impact, sans-serif; font-size: 1.1rem; cursor: pointer;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --ink: #06140a;
  --grass: #1f7a36;
  --paper: #f3f7ee;
  --gold: #e8c547;
  --line: rgba(243, 247, 238, 0.2);
}
html, body { min-height: 100%; }
body {
  color: var(--paper);
  font-family: Manrope, "Segoe UI", sans-serif;
  background: var(--ink);
  overflow: hidden;
}
.hidden { display: none !important; }
.screen { min-height: 100dvh; width: 100%; }
.back {
  position: absolute; top: 1rem; left: 1rem;
  color: inherit; text-decoration: none; font-size: 0.85rem; opacity: 0.7;
}
.menu {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 2rem 1rem 3rem;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(46, 160, 72, 0.35), transparent 50%),
    linear-gradient(180deg, #0a2212, #06140a);
}
.eyebrow {
  letter-spacing: 0.28em; text-transform: uppercase; font-size: 0.72rem;
  opacity: 0.55; margin-bottom: 0.5rem;
}
.menu h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(4.2rem, 16vw, 8rem); line-height: 0.85; letter-spacing: 0.04em;
  text-shadow: 0 0 40px rgba(232, 197, 71, 0.25);
}
.lead { margin: 0.6rem 0 1.4rem; letter-spacing: 0.08em; color: var(--gold); }
.btn-main {
  width: min(22rem, 92%); margin: 0.35rem 0; padding: 0.85rem 1.2rem;
  font-family: "Bebas Neue", Impact, sans-serif; font-size: 1.7rem; letter-spacing: 0.12em;
  border: 2px solid #fff; background: #1a7a32; color: #fff; cursor: pointer;
  box-shadow: 0 5px 0 #0b3d18;
}
.btn-main:hover { background: #22a044; }
.btn-main:active { transform: translateY(2px); box-shadow: 0 2px 0 #0b3d18; }
.kits { display: flex; gap: 1.2rem; margin: 1.2rem 0 0.4rem; flex-wrap: wrap; justify-content: center; }
.kit-col { min-width: 9rem; }
.kit-col p { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; margin-bottom: 0.35rem; }
.kit-row { display: flex; gap: 0.35rem; justify-content: center; }
.kit-btn {
  width: 2rem; height: 2rem; border-radius: 99px; border: 2px solid transparent;
  cursor: pointer;
}
.kit-btn.on { border-color: #fff; box-shadow: 0 0 0 2px var(--gold); }
.controls {
  display: flex; gap: 1.4rem; margin-top: 1.4rem; max-width: 40rem;
  font-size: 0.82rem; line-height: 1.45; text-align: left; opacity: 0.8;
}
.controls strong { display: block; color: var(--gold); margin-bottom: 0.2rem; }
.net-box { width: min(22rem, 92%); margin: 0.6rem 0 0.2rem; }
.net-join { display: flex; gap: 0.4rem; margin-top: 0.4rem; }
.net-join input {
  flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.16em;
  font: 1.2rem "Bebas Neue", Impact, sans-serif; text-align: center;
  border: 2px solid #fff; background: #0a2212; color: #fff; padding: 0.5rem;
}
.net-join .btn-main { width: auto; margin: 0; padding: 0.55rem 0.9rem; font-size: 1.25rem; }
.net-status { margin-top: 0.45rem; font-size: 0.88rem; color: var(--gold); min-height: 1.2em; word-break: break-all; }
#net-tag { font-size: 0.85rem; letter-spacing: 0.12em; opacity: 0.75; }
@media (max-width: 700px) { .controls { flex-direction: column; } }

.play {
  position: relative;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background: #041108;
}
.hud {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.45rem 0.8rem; font-family: "Bebas Neue", Impact, sans-serif;
  background: #03100a; border-bottom: 1px solid var(--line);
}
.hud-team { display: flex; align-items: center; gap: 0.45rem; font-size: 1.35rem; }
.hud-team b { font-size: 2rem; min-width: 1.4rem; }
.hud-kit { width: 0.85rem; height: 0.85rem; border-radius: 99px; border: 1px solid #fff; }
.hud-clock { text-align: center; letter-spacing: 0.08em; }
.hud-clock span { display: block; }
#clock { font-size: 1.8rem; color: var(--gold); }
#pitch {
  width: 100%; height: 100%; display: block; background: #145c28;
  touch-action: none;
}
.banner {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  font-family: "Bebas Neue", Impact, sans-serif; font-size: clamp(2.4rem, 8vw, 4.5rem);
  letter-spacing: 0.08em; color: #fff;
  text-shadow: 0 4px 0 #000, 0 0 24px rgba(232, 197, 71, 0.5);
  pointer-events: none;
}
.power-wrap { height: 6px; background: #0a1a10; }
.power { height: 100%; width: 0; background: linear-gradient(90deg, #e8c547, #ff5a2a); }
.game-actions {
  display: flex; gap: 0.5rem; justify-content: center; padding: 0.45rem;
  background: #03100a;
}
.ghost {
  appearance: none; font: inherit; color: inherit; background: transparent;
  border: 1px solid var(--line); padding: 0.35rem 0.8rem; text-decoration: none; cursor: pointer;
}
.touch {
  position: absolute; inset: auto 0 4.6rem 0; display: flex;
  justify-content: space-between; align-items: flex-end; padding: 0 1rem;
  pointer-events: none;
}
.stick {
  width: 7.2rem; height: 7.2rem; border-radius: 50%;
  background: rgba(0,0,0,0.28); border: 2px solid rgba(255,255,255,0.25);
  pointer-events: auto; position: relative;
}
#knob {
  position: absolute; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: #fff; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
.touch-btns { display: flex; gap: 0.45rem; pointer-events: auto; }
.touch-btns button {
  width: 4.2rem; height: 4.2rem; border-radius: 50%; border: 2px solid #fff;
  background: rgba(26, 122, 50, 0.85); color: #fff;
  font-family: "Bebas Neue", Impact, sans-serif; font-size: 1.1rem; cursor: pointer;
}
