* {
  box-sizing: border-box;
}

:root {
  --bg-dark: #14110d;
  --bg-deep: #0c0907;
  --bg-surface: #29231d;
  --panel: linear-gradient(180deg, rgba(64, 58, 48, 0.96), rgba(28, 24, 20, 0.97));
  --panel-strong: linear-gradient(180deg, rgba(20, 17, 14, 0.96), rgba(11, 9, 7, 0.98));
  --panel-soft: linear-gradient(180deg, rgba(55, 48, 40, 0.94), rgba(21, 18, 15, 0.96));
  --line: rgba(180, 155, 103, 0.22);
  --line-strong: rgba(180, 155, 103, 0.74);
  --text: #ebe0c8;
  --muted: #aea188;
  --accent: #d6b067;
  --accent-strong: #b36552;
  --accent-soft: rgba(182, 146, 82, 0.16);
  --ready: #7ce5a1;
  --danger: #b36552;
  --shadow: rgba(0, 0, 0, 0.58);
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(174, 132, 62, 0.08), transparent 36%),
    radial-gradient(circle at bottom, rgba(88, 69, 45, 0.14), transparent 34%),
    linear-gradient(180deg, #29231d, #0c0907 74%);
  color: var(--text);
  font-family: Verdana, Geneva, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at top left, rgba(214, 176, 103, 0.07), transparent 24%),
    radial-gradient(circle at top right, rgba(122, 128, 90, 0.05), transparent 20%);
  opacity: 0.7;
}

button,
input {
  font: inherit;
}

#app,
#gameShell {
  width: 100%;
  height: 100%;
}

#app {
  position: relative;
}

#gameShell {
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at top, rgba(182, 146, 82, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(19, 16, 13, 0.2), rgba(5, 4, 3, 0.6));
}

.battlefield-layout {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
}

.battlefield-window,
.hud {
  border: 1px solid rgba(180, 155, 103, 0.2);
  border-radius: 24px;
  background:
    var(--panel-strong),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 4px);
  box-shadow:
    0 24px 46px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.battlefield-window {
  min-width: 0;
  min-height: 0;
  display: flex;
  padding: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.battlefield-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at top, rgba(182, 146, 82, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(14, 12, 10, 0.94), rgba(7, 6, 5, 0.98));
}

#gameCanvas {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

.hidden {
  display: none !important;
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.4vw, 18px);
  background:
    linear-gradient(180deg, rgba(20, 17, 14, 0.62), rgba(8, 6, 5, 0.86)),
    radial-gradient(circle at top, rgba(182, 146, 82, 0.12), transparent 45%);
  backdrop-filter: blur(6px);
}

#menuScreen,
.create-game-screen {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.panel {
  width: min(1360px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    var(--panel-strong),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 4px);
  box-shadow:
    0 30px 60px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.menu-panel {
  width: 100%;
  height: 100%;
  margin: auto;
  border-radius: 0;
  padding: clamp(18px, 1.9vw, 28px) clamp(20px, 2.3vw, 32px) clamp(18px, 1.7vw, 24px);
  overflow: auto;
  overscroll-behavior: contain;
}

.result-panel {
  width: min(460px, 100%);
  padding: 34px;
  text-align: center;
}

.branding h1,
.result-panel h2 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 48px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
}

.subtitle,
.result-text,
.menu-note,
.hint-text,
.minor-copy {
  color: var(--muted);
}

.subtitle {
  max-width: 900px;
  margin: 6px 0 0;
  line-height: 1.35;
  font-size: 13px;
}

.menu-note {
  margin: 10px 0 0;
  font-size: 13px;
}

.menu-status {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.menu-status.error {
  color: var(--danger);
}

.menu-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.menu-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 20px rgba(0, 0, 0, 0.18);
}

.menu-section h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 11px;
}

.compact-heading {
  margin-bottom: 8px;
}

.section-heading-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weapon-section {
  padding-bottom: 10px;
}

.lobby-section {
  padding-top: 10px;
}

.menu-footer {
  min-height: 22px;
}

.overview-select {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.overview-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 196px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(59, 51, 42, 0.98), rgba(21, 17, 14, 0.98));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.overview-card:hover,
.overview-card.selected {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 24px rgba(0, 0, 0, 0.3);
}

.overview-card strong {
  font-size: 16px;
  letter-spacing: 0.04em;
}

.tank-role {
  color: var(--accent);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tank-desc {
  color: var(--muted);
  line-height: 1.25;
  font-size: 11px;
}

.tank-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.tank-stat {
  padding: 6px 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(180, 155, 103, 0.14);
}

.tank-stat-label {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tank-stat-value {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
}

.attack-list {
  display: grid;
  gap: 5px;
  margin-top: auto;
}

.attack-pill {
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(180, 155, 103, 0.12);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.attack-pill strong {
  display: block;
  margin-bottom: 2px;
  font-size: 11px;
}

.primary-button,
.secondary-button,
.fire-button,
.control-button {
  min-width: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid rgba(168, 145, 97, 0.35);
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 7px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 10px 12px;
}

.primary-button {
  background:
    linear-gradient(180deg, rgba(120, 101, 72, 0.96), rgba(57, 46, 35, 0.99)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 2px, transparent 2px, transparent 5px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secondary-button {
  background: linear-gradient(180deg, rgba(90, 79, 67, 0.96), rgba(43, 37, 31, 0.99));
}

.fire-button {
  padding: 10px 16px;
  min-height: 46px;
  background: linear-gradient(180deg, rgba(143, 84, 62, 0.98), rgba(81, 42, 31, 0.99));
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.control-button {
  width: 38px;
  height: 38px;
  background: linear-gradient(180deg, rgba(90, 79, 67, 0.96), rgba(43, 37, 31, 0.99));
  font-size: 18px;
}

.primary-button:hover,
.secondary-button:hover,
.fire-button:hover,
.control-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  filter: brightness(1.03);
}

.lobby-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: start;
}

.lobby-side-block {
  display: grid;
  gap: 12px;
}

.lobby-meta-card {
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(42, 35, 29, 0.92), rgba(24, 20, 17, 0.96));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.group-grid,
.online-players {
  display: grid;
  gap: 8px;
}

.group-grid {
  grid-template-columns: 1fr;
}

.online-players {
  grid-template-columns: 1fr;
}

.group-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(59, 51, 42, 0.98), rgba(21, 17, 14, 0.98));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.group-card:hover,
.group-card.selected {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 24px rgba(0, 0, 0, 0.3);
}

.group-card:disabled,
.group-card.locked {
  cursor: not-allowed;
  opacity: 0.7;
  transform: none;
  box-shadow: none;
}

.group-card.current-group {
  border-color: rgba(122, 128, 90, 0.52);
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.group-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.group-tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(182, 146, 82, 0.12);
  color: var(--muted);
}

.game-card .group-tag {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.group-slots {
  display: grid;
  gap: 8px;
}

.lobby-slot-list {
  margin-top: 2px;
}

.group-slot {
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(180, 155, 103, 0.14);
}

.group-slot.filled {
  border-color: rgba(180, 155, 103, 0.16);
}

.group-slot.ready {
  border-color: rgba(122, 128, 90, 0.34);
  background: rgba(122, 128, 90, 0.12);
}

.group-slot.empty {
  color: var(--muted);
  font-style: italic;
}

.group-player-name {
  display: block;
  font-weight: 700;
  font-size: 13px;
}

.group-player-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.lobby-games-list {
  min-height: 188px;
}

.game-card {
  padding: 10px 11px 11px;
}

.game-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-card-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.arena-thumbnail {
  width: 82px;
  height: 50px;
  flex: 0 0 82px;
  border-radius: 12px;
  border: 1px solid rgba(180, 155, 103, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5ead1;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.arena-ember-ridge {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 199, 120, 0.3), transparent 36%),
    linear-gradient(135deg, #5f3527, #8f4a2d 52%, #241519);
}

.arena-glacier-pass {
  background:
    radial-gradient(circle at 35% 28%, rgba(225, 248, 255, 0.3), transparent 32%),
    linear-gradient(135deg, #43637b, #5a8aa8 48%, #172536);
}

.arena-dune-sea {
  background:
    radial-gradient(circle at 50% 65%, rgba(255, 220, 142, 0.28), transparent 40%),
    linear-gradient(135deg, #785636, #ad7c43 55%, #3a2618);
}

.arena-random {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, #283447, #162230 65%, #0b131d);
  font-size: 24px;
}

.current-game-summary {
  display: grid;
  gap: 4px;
  color: var(--text);
  line-height: 1.3;
  font-size: 13px;
}

.joined-game-card {
  gap: 12px;
  border: 1px solid rgba(180, 155, 103, 0.28);
  background:
    linear-gradient(180deg, rgba(48, 40, 33, 0.98), rgba(22, 18, 15, 0.98));
  box-shadow:
    0 22px 38px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.joined-game-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.room-players {
  min-height: 118px;
}

.online-player-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(180, 155, 103, 0.14);
}

.online-player-card.ready {
  border-color: rgba(122, 128, 90, 0.42);
  background: rgba(122, 128, 90, 0.12);
}

.online-player-card.not-ready {
  border-color: rgba(179, 101, 82, 0.34);
  background: rgba(179, 101, 82, 0.12);
}

.online-player-name {
  font-weight: 700;
  font-size: 13px;
}

.online-player-meta {
  color: var(--muted);
  font-size: 11px;
}

.joined-game-card .section-copy,
.joined-game-card .current-game-summary,
.joined-game-card .online-player-meta {
  color: rgba(245, 234, 209, 0.92);
}

.empty-state {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
}

.lobby-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.room-actions {
  margin-top: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.room-actions > button {
  width: 100%;
  min-height: 48px;
}

.room-actions #startGameButton {
  grid-column: 1 / -1;
}

.create-game-screen {
  z-index: 6;
}

.create-game-panel {
  width: 100%;
  height: 100%;
  border-radius: 0;
  padding: clamp(18px, 1.9vw, 28px) clamp(20px, 2.3vw, 32px) clamp(20px, 2vw, 28px);
  overflow: auto;
  overscroll-behavior: contain;
}

.create-game-title {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 40px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.create-game-copy {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.create-game-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.create-form-section {
  padding: 12px;
}

.create-choice-grid {
  display: grid;
  gap: 8px;
}

.create-choice-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.create-choice-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.create-choice-grid.map-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.create-choice-button,
.map-choice-button {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(59, 51, 42, 0.98), rgba(21, 17, 14, 0.98));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.create-choice-button span,
.map-choice-button span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.create-choice-button strong,
.map-choice-button strong {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.create-choice-button:hover,
.create-choice-button.selected,
.map-choice-button:hover,
.map-choice-button.selected {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 24px rgba(0, 0, 0, 0.26);
}

.map-choice-button {
  justify-items: start;
}

.map-choice-button .arena-thumbnail {
  width: 100%;
  height: 62px;
}

.create-actions,
.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.create-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.hud {
  position: static;
  z-index: 4;
  display: grid;
  gap: 8px;
  padding: 10px 14px 12px;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  border-top-color: rgba(180, 155, 103, 0.14);
}

.top-hud,
.bottom-hud {
  display: grid;
  gap: 8px;
  align-items: stretch;
}

.top-hud {
  grid-template-columns: minmax(220px, 0.62fr) minmax(0, 1.38fr);
}

.bottom-hud {
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.75fr);
  align-items: stretch;
}

.hud-card {
  padding: 9px 10px;
  border: 1px solid rgba(180, 155, 103, 0.18);
  border-radius: 16px;
  backdrop-filter: blur(9px);
  background: linear-gradient(180deg, rgba(36, 30, 25, 0.9), rgba(18, 15, 12, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.3);
}

.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(182, 146, 82, 0.12);
  border: 1px solid rgba(180, 155, 103, 0.18);
  font-size: 12px;
}

.wind-pill {
  color: #bde7ff;
}

.phase-text {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 700;
}

.roster-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px;
}

.roster-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(180, 155, 103, 0.12);
}

.roster-entry.active {
  border: 1px solid rgba(180, 155, 103, 0.44);
}

.roster-entry.out {
  opacity: 0.45;
}

.roster-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
}

.roster-name {
  font-size: 12px;
}

.roster-meta {
  color: var(--muted);
  font-size: 10px;
}

.roster-hp {
  min-width: 82px;
  text-align: right;
  font-size: 11px;
}

.controls-card {
  display: grid;
  gap: 8px;
}

.control-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.movement-row {
  grid-template-columns: 1fr;
}

.movement-controls {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  gap: 8px;
  align-items: center;
}

.movement-button {
  min-height: 40px;
  border: 1px solid rgba(168, 145, 97, 0.35);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(90, 79, 67, 0.96), rgba(43, 37, 31, 0.99));
  color: var(--text);
  cursor: pointer;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 7px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.12s ease, border-color 0.12s ease, filter 0.12s ease;
}

.movement-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  filter: brightness(1.03);
}

.movement-button.active {
  border-color: rgba(180, 155, 103, 0.52);
  background: linear-gradient(180deg, rgba(120, 101, 72, 0.96), rgba(57, 46, 35, 0.99));
}

.fuel-panel {
  display: grid;
  gap: 5px;
}

.fuel-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(180, 155, 103, 0.14);
  overflow: hidden;
}

.fuel-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7ce5a1, #ffd166 70%, #ff8d8d);
  transition: width 0.12s linear;
}

.fuel-meta {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.control-label-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.control-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.stepper {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
}

.control-button {
  width: 34px;
  height: 34px;
}

.slider {
  width: 100%;
}

.slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(180, 155, 103, 0.16);
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: -5px;
  background: linear-gradient(180deg, #d6b067, #7b6c46);
  border: 0;
}

.slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(180, 155, 103, 0.16);
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #d6b067, #7b6c46);
  border: 0;
}

.weapon-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.weapon-button {
  padding: 9px 10px;
  border-radius: 14px;
  border: 1px solid rgba(180, 155, 103, 0.14);
  background: linear-gradient(180deg, rgba(59, 51, 42, 0.98), rgba(21, 17, 14, 0.98));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.weapon-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.weapon-button.selected {
  border-color: rgba(180, 155, 103, 0.52);
  background: linear-gradient(180deg, rgba(72, 62, 50, 0.98), rgba(29, 24, 20, 0.98));
}

.weapon-name {
  font-size: 12px;
  font-weight: 700;
}

.weapon-copy {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.action-card {
  display: grid;
  grid-template-columns: max-content max-content minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.action-secondary {
  min-height: 42px;
}

.hint-text {
  margin: 0;
  line-height: 1.35;
  font-size: 11px;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 7;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(180, 155, 103, 0.18);
  background: linear-gradient(180deg, rgba(42, 35, 29, 0.94), rgba(24, 20, 17, 0.98));
  color: var(--text);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.34);
}

.toast.error {
  border-color: rgba(179, 101, 82, 0.34);
  color: #f8ddd7;
}

button:disabled,
input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

@media (max-width: 1180px) {
  .overview-select,
  .create-choice-grid.map-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lobby-overview-grid {
    grid-template-columns: 1fr;
  }

  .top-hud,
  .bottom-hud {
    grid-template-columns: 1fr;
  }

  .weapon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-row,
  .action-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .overview-select,
  .create-choice-grid.two-col,
  .create-choice-grid.three-col,
  .create-choice-grid.map-grid,
  .weapon-grid,
  .lobby-buttons {
    grid-template-columns: 1fr;
  }

  .movement-controls {
    grid-template-columns: 1fr;
  }

  .tank-stats {
    grid-template-columns: 1fr;
  }

  .section-heading-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .joined-game-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-actions #startGameButton {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .panel {
    width: min(100vw - 18px, 1360px);
    border-radius: 18px;
  }

  .battlefield-window,
  .hud {
    border-radius: 0;
  }

  .menu-panel,
  .result-panel,
  .create-game-panel {
    padding: 18px;
  }

  .stepper {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
  }
}
