:root {
  --bg-1: #fff7e8;
  --bg-2: #ffe6c8;
  --ink: #1c2435;
  --muted: #5f6780;
  --brand: #ff5a2f;
  --brand-2: #1ca7a6;
  --panel: rgba(255, 255, 255, 0.78);
  --line: rgba(28, 36, 53, 0.12);
  --shadow: 0 12px 34px rgba(28, 36, 53, 0.15);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 0%, #fff 0%, var(--bg-1) 38%, var(--bg-2) 100%);
  padding: 16px;
  display: grid;
  gap: 14px;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  pointer-events: none;
  filter: blur(42px);
  z-index: -1;
  opacity: 0.55;
  animation: drift 8s ease-in-out infinite alternate;
}

.bg-orb--one {
  width: 180px;
  height: 180px;
  background: #ffb088;
  right: -32px;
  top: 22%;
}

.bg-orb--two {
  width: 160px;
  height: 160px;
  background: #9de7df;
  left: -48px;
  top: 58%;
  animation-delay: 1s;
}

.hero {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 16px;
  backdrop-filter: blur(12px);
}

.hero__kicker {
  margin: 0;
  color: var(--brand-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  font-size: 12px;
}

.hero__title {
  margin: 8px 0 0;
  font-family: "Rubik Mono One", monospace;
  font-size: clamp(24px, 8vw, 44px);
  line-height: 1;
  text-transform: uppercase;
}

.hero__subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 60ch;
  font-size: 14px;
}

.ad-slot {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: rgba(255, 255, 255, 0.65);
}

.ad-slot__label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--brand);
  letter-spacing: 0.08em;
}

.ad-slot__container {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  min-height: 88px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 10px;
  font-size: 13px;
}

.ad-slot__container--wide {
  min-height: 100px;
}

.game-layout {
  display: grid;
  gap: 12px;
}

.hud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hud__item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  padding: 10px;
}

.hud__label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}

.hud strong {
  font-size: 22px;
  color: var(--ink);
}

.arena {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #fdf8ef 0%, #ffedd2 100%);
  box-shadow: var(--shadow);
}

#gameCanvas {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 900 / 380;
}

.status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: center;
  color: var(--ink);
  width: min(90%, 300px);
}

.status p {
  margin: 0;
  font-size: 14px;
}

.status--hidden {
  display: none;
}

.controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  font-weight: 700;
  background: #fff;
  color: var(--ink);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(120deg, var(--brand), #ff8c37);
  color: #fff;
  border: 0;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 12px;
}

@media (min-width: 720px) {
  body {
    padding: 22px;
    max-width: 1024px;
    margin: 0 auto;
    gap: 16px;
  }

  .hero {
    padding: 20px;
  }

  .hero__subtitle {
    font-size: 15px;
  }

  .controls {
    grid-template-columns: 160px 160px;
    justify-content: start;
  }

  .ad-slot__container {
    min-height: 110px;
  }
}

@keyframes drift {
  from {
    transform: translateY(-10px) scale(1);
  }
  to {
    transform: translateY(10px) scale(1.08);
  }
}
