.football-page {
  margin: 0;
  overflow: hidden;
  background: #102413;
  color: #f4f8ef;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#football-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
  outline: none;
}

.football-menu-toggle {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  z-index: 40;
  width: 54px;
  height: 54px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 16px;
  background: rgb(8 16 14 / 78%);
  color: #f4f8ef;
  cursor: pointer;
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 14px 34px rgb(0 0 0 / 28%);
  backdrop-filter: blur(12px);
}

.football-menu-toggle[aria-expanded="true"] {
  border-color: rgb(143 199 255 / 54%);
  background: rgb(24 48 54 / 86%);
}

.football-menu {
  position: fixed;
  inset: 0;
  z-index: 39;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(5 10 8 / 58%);
  backdrop-filter: blur(7px);
}

.football-menu.is-hidden {
  display: none;
}

.football-menu-panel {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 18px;
  background: rgb(10 20 17 / 94%);
  box-shadow: 0 24px 64px rgb(0 0 0 / 36%);
}

.football-menu-title {
  color: rgb(244 248 239 / 76%);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.football-menu-panel button,
.football-menu-panel a {
  appearance: none;
  min-height: 44px;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 13px;
  background: rgb(255 255 255 / 8%);
  color: #f4f8ef;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 10px 14px;
  text-align: center;
  text-decoration: none;
}

.football-menu-field {
  display: grid;
  gap: 6px;
  color: rgb(244 248 239 / 74%);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.football-menu-field select {
  min-height: 42px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 12px;
  background: rgb(255 255 255 / 10%);
  color: #f4f8ef;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  padding: 8px 10px;
}

.football-menu-field option {
  color: #102413;
}

.football-menu-panel button:hover,
.football-menu-panel a:hover,
.football-menu-panel button:focus-visible,
.football-menu-panel a:focus-visible {
  border-color: rgb(255 255 255 / 42%);
  background: rgb(255 255 255 / 13%);
}

.football-controls-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 14px;
  background: rgb(255 255 255 / 5%);
}

.football-controls-panel.is-hidden {
  display: none;
}

.football-controls-title {
  margin-top: 4px;
  color: rgb(143 199 255 / 86%);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.football-controls-row {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(130px, 1.2fr);
  align-items: center;
  gap: 8px;
  color: rgb(244 248 239 / 76%);
  font-size: 13px;
  font-weight: 800;
}

.football-menu-panel .controls-key-button,
.football-menu-panel .controls-pad-button,
.football-menu-panel .football-menu-secondary,
.football-menu-panel #gamepad-refresh,
.football-menu-panel .gamepad-device-button {
  min-height: 36px;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 13px;
}

.football-menu-panel .controls-key-button.is-listening,
.football-menu-panel .controls-pad-button.is-listening {
  border-color: rgb(255 214 102 / 72%);
  background: rgb(255 214 102 / 18%);
}

.football-bind-status,
.gamepad-device-empty {
  color: rgb(244 248 239 / 58%);
  font-size: 12px;
  line-height: 1.35;
}

.gamepad-device-panel {
  display: grid;
  gap: 8px;
}

.gamepad-device-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: rgb(244 248 239 / 80%);
  font-size: 13px;
}

.gamepad-device-list {
  display: grid;
  gap: 6px;
}

.football-menu-panel .gamepad-device-button {
  text-align: left;
}

.football-menu-panel .gamepad-device-button.is-selected {
  border-color: rgb(143 199 255 / 70%);
  background: rgb(38 125 255 / 18%);
}

.football-hud {
  pointer-events: none;
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 18px;
}

.football-score {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  background: rgb(6 12 10 / 72%);
  box-shadow: 0 14px 32px rgb(0 0 0 / 28%);
  backdrop-filter: blur(12px);
  font-size: 20px;
}

.football-score strong {
  min-width: 22px;
  text-align: center;
  font-size: 28px;
}

.football-team {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.football-team-blue {
  color: #8fc7ff;
}

.football-team-red {
  color: #ff9d9d;
}

.football-score-separator {
  opacity: 0.6;
}

.football-message {
  align-self: start;
  justify-self: center;
  margin-top: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgb(6 12 10 / 58%);
  color: rgb(244 248 239 / 82%);
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.football-boost {
  pointer-events: none;
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(210px, calc(100vw - 36px));
  display: grid;
  gap: 6px;
  padding: 9px 11px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 13px;
  background: rgb(6 12 10 / 58%);
  color: rgb(244 248 239 / 76%);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.football-boost-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 13%);
}

.football-boost-fill {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #67e8f9, #a7f3d0, #fef08a);
  transition: width 80ms linear;
}

.football-boost-track.is-low .football-boost-fill {
  background: linear-gradient(90deg, #fb7185, #f97316);
}

.football-menu-panel button.is-benched {
  border-color: rgb(255 214 102 / 54%);
  background: rgb(70 52 10 / 78%);
}

.football-help {
  position: fixed;
  left: 18px;
  bottom: 18px;
  margin: 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgb(6 12 10 / 58%);
  color: rgb(244 248 239 / 72%);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

@media (max-width: 720px) {
  .football-hud {
    padding: 12px;
  }

  .football-score {
    gap: 8px;
    padding: 8px 12px;
    font-size: 16px;
  }

  .football-score strong {
    font-size: 23px;
  }

  .football-help {
    display: none;
  }

  .football-boost {
    right: 12px;
    bottom: 12px;
    width: min(170px, calc(100vw - 24px));
  }
}
