:root {
  --arena-bg: radial-gradient(circle at center, #1a1a1a 0%, #05070a 100%);
  --panel-bg: rgba(14, 21, 33, 0.85);
  --accent: #ffba08;
  --accent-strong: #d00000;
  --text: #f1f5f9;
  --track-line: rgba(255, 255, 255, 0.08);
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(120deg, #240046 0%, #480ca8 50%, #2a9d8f 100%);
  font-family: 'Roboto', sans-serif;
  color: var(--text);
  padding: 2rem;
}

.shell {
  width: min(1100px, 100%);
  background: rgba(0, 0, 0, 0.55);
  border: 4px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.45);
  padding: 2rem;
  backdrop-filter: blur(12px);
}

.hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Bungee', cursive;
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.5rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero p {
  margin: 0.5rem auto 0;
  max-width: 640px;
}

.stage {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.75rem;
}

#gameCanvas {
  width: 100%;
  height: auto;
  background: var(--arena-bg);
  border-radius: 22px;
  border: 6px solid rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.35);
}

.touch-controls {
  display: none;
  padding: 1rem 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 0 0 22px 22px;
  border: 3px solid rgba(0, 0, 0, 0.35);
  border-top: none;
  grid-column: 1 / -1;
}

.pad-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.pad-row {
  display: flex;
  gap: 0.6rem;
}

.control-btn {
  min-width: 64px;
  min-height: 64px;
  border-radius: 14px;
  border: none;
  font-size: 1.6rem;
  font-family: 'Bungee', cursive;
  color: #1b1b1b;
  background: linear-gradient(135deg, var(--accent), #ffd166);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  letter-spacing: 0.05em;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  touch-action: none;
}

.control-btn:active {
  transform: translateY(2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.control-btn.action {
  font-size: 1rem;
  min-width: 120px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar section {
  background: var(--panel-bg);
  border-radius: 18px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  padding: 1.1rem 1.25rem;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.3);
}

.sidebar h2 {
  margin: 0 0 0.8rem;
  font-family: 'Bungee', cursive;
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

.stats .label {
  color: var(--accent);
  font-weight: 500;
}

.objectives ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.objectives li {
  background: rgba(0, 0, 0, 0.35);
  border-left: 4px solid var(--accent-strong);
  border-radius: 12px;
  padding: 0.5rem 0.75rem;
}

.status {
  text-align: center;
  display: none;
}

.status.active {
  display: block;
}

.status button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75rem 1.4rem;
  border: none;
  border-radius: 999px;
  font-family: 'Bungee', cursive;
  font-size: 1rem;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--accent), #ffd166);
  color: #1b1b1b;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.status button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.35);
}

.footer {
  margin-top: 2rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}

@media (max-width: 1024px) {
  body {
    padding: 1.25rem;
  }

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

  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .sidebar section {
    flex: 1 1 240px;
  }

  .touch-controls {
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 1.2rem;
  }

  .sidebar {
    flex-direction: column;
  }
}
