:root {
  --bg-top: #201318;
  --bg-bottom: #120d14;
  --panel: rgba(255, 244, 225, 0.92);
  --panel-edge: rgba(255, 255, 255, 0.22);
  --ink: #1d1820;
  --muted: #685e67;
  --hot: #ff7a3d;
  --hot-deep: #b4371e;
  --cool: #79d4ff;
  --arena: #ffe6a9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: #fff8ee;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 61, 0.28), transparent 26%),
    radial-gradient(circle at top right, rgba(121, 212, 255, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

.app-shell {
  width: min(1440px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.topbar,
.hero-copy,
.game-frame,
.fallback-message {
  border: 1px solid var(--panel-edge);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding: 1.2rem 1.4rem;
}

.eyebrow,
.subtitle {
  margin: 0;
  color: #ffd9a8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
}

h1 {
  margin: 0.1rem 0;
  font-family: "Bangers", cursive;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
}

.subtitle {
  font-size: 0.86rem;
  font-weight: 700;
}

.back-link {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 1.15rem;
  border-radius: 999px;
  color: #fff9ef;
  text-decoration: none;
  font-weight: 800;
  background: linear-gradient(180deg, var(--hot), var(--hot-deep));
}

.hero-copy {
  margin-top: 1rem;
  padding: 1rem 1.25rem;
  color: #fff4e2;
  line-height: 1.55;
}

.hero-copy p {
  margin: 0;
  max-width: 72rem;
}

.game-frame {
  position: relative;
  margin-top: 1rem;
  padding: 0.85rem;
}

#game-root {
  width: 100%;
  min-height: min(94vh, 1100px);
  border-radius: 22px;
  overflow: hidden;
  touch-action: pan-y;
  background:
    linear-gradient(180deg, rgba(24, 20, 24, 0.95), rgba(14, 11, 16, 0.95));
}

#game-root canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: pan-y;
}

.fallback-message {
  position: absolute;
  inset: 1.2rem;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
  background: rgba(22, 16, 22, 0.92);
}

.fallback-message.is-hidden {
  display: none;
}

.fallback-message h2 {
  margin: 0;
  font-family: "Bangers", cursive;
  font-size: 2.5rem;
  letter-spacing: 0.04em;
}

.fallback-message p {
  margin: 0.7rem 0 0;
  max-width: 32rem;
  line-height: 1.55;
  color: #f7e3cf;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100%, calc(100% - 0.8rem));
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  #game-root {
    min-height: 72vh;
  }
}
