/* ── Dash Ultimate — Stylesheet ──── */

:root {
  --bg: #0a0816;
  --panel: #120e24;
  --accent: #a855f7;
  --accent-hover: #c084fc;
  --accent-secondary: #06b6d4;
  --muted: #8b8fa8;
  --font-display: "Bangers", cursive;
  --font-body: "Outfit", sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: #e8e9f0;
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ── Backdrop gradients ──────────────────────── */
.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.backdrop--one {
  background: radial-gradient(ellipse at 20% 30%, rgba(168, 85, 247, 0.12) 0%, transparent 60%);
}

.backdrop--two {
  background: radial-gradient(ellipse at 80% 70%, rgba(6, 182, 212, 0.08) 0%, transparent 55%);
}

/* ── Shell ───────────────────────────────────── */
.shell {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Hero ────────────────────────────────────── */
.hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--accent-secondary);
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--accent);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.subtitle {
  max-width: 600px;
  margin: 0.5rem auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ── Game Frame ──────────────────────────────── */
.game-frame {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* ── Arena ────────────────────────────────────── */
.arena-wrap {
  position: relative;
  background: rgba(18, 14, 36, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.08);
  backdrop-filter: blur(6px);
}

.arena-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 10px;
  font-size: 0.85rem;
}

#message-banner {
  color: var(--muted);
  font-weight: 600;
}

.streak {
  color: var(--accent-secondary);
  font-weight: 700;
}

.streak strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-left: 4px;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 960 / 600;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.15);
  background: #050510;
}

.arena-bottom {
  padding: 10px 4px 0;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 767px) {
  .shell {
    width: 100%;
    padding: 0;
  }

  .hero {
    display: none;
  }

  .game-frame {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .arena-wrap {
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .arena-topbar,
  .arena-bottom {
    display: none;
  }

  canvas {
    width: 100vw !important;
    height: calc(100vh - 140px) !important;
    height: calc(100dvh - 140px) !important;
    border-radius: 0;
    border: 0;
    aspect-ratio: auto;
  }
}

/* Landscape phones */
@media (orientation: landscape) and (max-height: 700px) {
  .shell { width: 100%; padding: 0; }
  .hero { display: none; }
  .game-frame { grid-template-columns: 1fr; gap: 0; }
  .arena-wrap {
    padding: 0; border-radius: 0; border: 0;
    background: transparent; box-shadow: none; backdrop-filter: none;
  }
  .arena-topbar, .arena-bottom { display: none; }
  canvas {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    border-radius: 0;
    border: 0;
    aspect-ratio: auto;
  }
}

/* ── Iframe embed — MUST be last to override all media queries ── */
.in-iframe .hero,
.in-iframe .arena-topbar,
.in-iframe .arena-bottom { display: none !important; }
.in-iframe .shell { width: 100% !important; padding: 0 !important; }
.in-iframe .game-frame { gap: 0 !important; }
.in-iframe .arena-wrap {
  padding: 0 !important; border-radius: 0 !important; border: 0 !important;
  background: transparent !important; box-shadow: none !important; backdrop-filter: none !important;
}
.in-iframe canvas {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  border: 0 !important;
  aspect-ratio: auto !important;
}
