/* ===================================================
   LumoArcadia - Breakout Neon
=================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #04070e;
  --surface: rgba(8, 16, 28, .92);
  --surface-2: rgba(6, 11, 20, .95);
  --accent: #ff4f7f;
  --accent-2: #24efff;
  --good: #39ff14;
  --warn: #ffe600;
  --text: #e8e8f8;
  --muted: #6a7590;
  --border: rgba(36,239,255,.14);
  --border-2: rgba(255,255,255,.06);
  --font-display: 'Orbitron', monospace;
  --font-body: 'Rajdhani', sans-serif;
  --radius: 10px;
}

html { font-size: 16px; }

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 50% at 10% 15%, rgba(36,239,255,.09) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 85%, rgba(255,79,127,.10) 0%, transparent 60%),
    linear-gradient(160deg, #03060c 0%, #060810 55%, #0a050e 100%);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-display); cursor: pointer; }

/* -- Page Layout -- */
.game-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(.75rem, 1.6vw, 1.3rem);
  gap: .75rem;
}

/* -- Header -- */
.game-header {
  width: min(1320px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(36,239,255,.04), inset 0 1px 0 rgba(255,255,255,.03);
}

.game-title {
  font-family: var(--font-display);
  font-size: clamp(.95rem, 3.5vw, 1.5rem);
  font-weight: 900;
  letter-spacing: .18em;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 0 22px rgba(255,255,255,.14);
}
.title-accent {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(255,79,127,.64);
}

/* -- Buttons -- */
.back-link,
.neon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  border: 1px solid rgba(255,79,127,.38);
  color: var(--accent);
  background: transparent;
  border-radius: 7px;
  padding: .5rem .85rem;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  transition: background .15s, box-shadow .15s, color .15s;
  white-space: nowrap;
}
.back-link { color: var(--muted); border-color: rgba(106,106,144,.28); }
.back-link:hover {
  color: var(--accent-2);
  border-color: rgba(36,239,255,.45);
  background: rgba(36,239,255,.06);
}
.neon-btn:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 24px rgba(255,45,120,.55);
}
.neon-btn.primary {
  padding: .75rem 2rem;
  font-size: .78rem;
  letter-spacing: .22em;
  border-color: var(--accent);
  margin-top: .5rem;
}
.neon-btn.primary:hover {
  box-shadow: 0 0 32px rgba(255,45,120,.7), 0 0 60px rgba(255,45,120,.25);
}

/* -- HUD -- */
.hud {
  width: min(1320px, 100%);
  display: flex;
  justify-content: center;
  gap: .65rem;
  flex-wrap: wrap;
  padding: .55rem .75rem;
  background: rgba(8,16,28,.58);
  border: 1px solid rgba(36,239,255,.08);
  border-radius: var(--radius);
}

.hud-item {
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,.03);
  border-radius: 7px;
  padding: .42rem .9rem;
  text-align: center;
  min-width: 88px;
  backdrop-filter: blur(4px);
}
.hud-label {
  display: block;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .52rem;
  letter-spacing: .18em;
  margin-bottom: .15rem;
}
.hud-value {
  display: block;
  color: var(--accent-2);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(36,239,255,.65);
  transition: transform .1s;
}
.hud-lives .hud-value { color: var(--good); text-shadow: 0 0 12px rgba(57,255,20,.65); }
.hud-level  .hud-value { color: var(--accent-2); text-shadow: 0 0 12px rgba(0,245,255,.65); }

/* score bump animation */
@keyframes scoreBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.28); }
  100% { transform: scale(1); }
}
.hud-value.bump { animation: scoreBump .18s ease-out; }

/* -- Stage -- */
.stage-wrap {
  position: relative;
  width: min(1320px, 98vw, calc((100vh - 245px) * 1.92));
  aspect-ratio: 16 / 8.35;
  max-height: calc(100vh - 245px);
  min-height: min(600px, calc(100vh - 245px));
  border: 1px solid rgba(36,239,255,.14);
  border-radius: var(--radius);
  overflow: hidden;
  background: #02050b;
  box-shadow:
    0 0 0 1px rgba(36,239,255,.04),
    0 0 50px rgba(36,239,255,.07),
    0 0 80px rgba(255,79,127,.06),
    inset 0 0 80px rgba(0,0,0,.4);
}

.breakout-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 26%, rgba(36,239,255,.09), transparent 36%),
    radial-gradient(circle at 84% 76%, rgba(255,79,127,.10), transparent 38%);
}

canvas {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* -- Screens (Start / End) -- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  padding: 2rem;
  background: rgba(7,6,15,.93);
  backdrop-filter: blur(6px);
  text-align: center;
  z-index: 5;
}
.screen.hidden { display: none; }

.screen-badge {
  font-family: var(--font-display);
  font-size: .6rem;
  letter-spacing: .32em;
  color: var(--accent);
  border: 1px solid rgba(255,45,120,.4);
  border-radius: 99px;
  padding: .3rem .9rem;
  text-transform: uppercase;
}

.screen-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 900;
  letter-spacing: .14em;
  color: var(--text);
  text-shadow:
    0 0 30px rgba(255,45,120,.55),
    0 0 80px rgba(255,45,120,.2);
  line-height: 1;
}

.screen-sub {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: .85rem;
  letter-spacing: .06em;
  line-height: 1.7;
  max-width: 480px;
}

/* Controls reference grid */
.controls-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: .2rem 0;
}
.ctrl-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  font-size: .7rem;
  color: var(--muted);
  font-family: var(--font-display);
  letter-spacing: .1em;
}
kbd {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 5px;
  padding: .25rem .55rem;
  font-family: var(--font-display);
  font-size: .58rem;
  letter-spacing: .1em;
  color: var(--accent-2);
}

/* -- Controls hint -- */
.controls-hint {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: .54rem;
  letter-spacing: .14em;
  text-align: center;
  opacity: .7;
}

/* -- Responsive -- */
@media (max-width: 680px) {
  .game-page { padding: .6rem .6rem; gap: .5rem; }
  .game-header { gap: .5rem; }
  .game-title { font-size: clamp(.8rem, 4.5vw, 1.1rem); }
  .hud-item { min-width: 76px; padding: .35rem .6rem; }
  .hud-value { font-size: .9rem; }
  .stage-wrap {
    width: 98vw;
    aspect-ratio: 4 / 5;
    max-height: none;
    min-height: 480px;
  }
  .screen-title { font-size: clamp(1.6rem, 10vw, 2.8rem); }
  .controls-grid { gap: .6rem; }
  .ctrl-item { font-size: .62rem; }
  .controls-hint { font-size: .5rem; }
}

