/*=============================================================================
  DARK BREAKER — DARK-world reskin
  Loaded as the ONLY stylesheet (replaces upstream breakout.css).
  Palette: bg #06060a, surface #0c0c12, accent/red #E0264A, gold #e8c87a,
  border #1a1a24, mono font. No background image — pure CSS gradient.
=============================================================================*/

:root {
  --bg: #06060a;
  --surface: #0c0c12;
  --accent: #E0264A;
  --gold: #e8c87a;
  --border: #1a1a24;
  --mono: var(--font-space-mono, "Space Mono", ui-monospace, SFMono-Regular,
          Menlo, Consolas, monospace);
}

* { box-sizing: border-box; }

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

body {
  font-family: var(--mono);
  color: var(--gold);
  background:
    radial-gradient(1200px 700px at 50% -10%, #14141f 0%, transparent 60%),
    radial-gradient(900px 600px at 50% 120%, #12060c 0%, transparent 60%),
    var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* title bar */
#brand {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-size: clamp(14px, 3.2vw, 22px);
  color: var(--gold);
  margin: 0 0 0.6em 0;
  text-shadow: 0 0 18px rgba(224, 38, 74, 0.45);
}
#brand .accent { color: var(--accent); }

#breakout {
  position: relative;
  display: block;
  width: min(94vw, 640px);
  height: min(70vh, 480px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(224, 38, 74, 0.10),
    0 24px 70px rgba(0, 0, 0, 0.7),
    inset 0 0 60px rgba(0, 0, 0, 0.55);
  touch-action: none;
}

@media (min-width: 1024px) and (min-height: 760px) {
  #breakout { width: 800px; height: 600px; }
}

#canvas {
  display: block;
  width: 100%;
  height: 100%;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* level selector */
#levels {
  position: absolute;
  left: 12px;
  top: 10px;
  color: var(--gold);
  line-height: 20px;
  font-size: 11px;
  letter-spacing: 0.12em;
  z-index: 5;
}
#levels .arrow {
  position: absolute;
  display: inline-block;
  width: 22px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(224, 38, 74, 0.08);
}
#levels #next { top: 0; }
#levels #prev { top: 22px; }
#levels .arrow.disabled { opacity: 0.25; cursor: default; }
#levels #label { padding-left: 34px; color: #7a7a8a; }
#levels #level {
  font-size: 13px;
  padding-left: 5px;
  font-weight: 700;
  color: var(--gold);
}

/* sound toggle */
#controls {
  position: absolute;
  bottom: 0.6em;
  left: 0.7em;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #7a7a8a;
  z-index: 5;
}
#controls input,
#controls label { vertical-align: middle; cursor: pointer; }
#controls input { accent-color: var(--accent); }

/* instructions overlay */
#instructions {
  background: rgba(10, 10, 16, 0.92);
  border: 1px solid var(--accent);
  color: var(--gold);
  padding: 0.8em 1.2em;
  white-space: nowrap;
  text-align: center;
  border-radius: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.7;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  box-shadow: 0 0 30px rgba(224, 38, 74, 0.35);
}
#instructions b { color: var(--accent); font-weight: 700; }
#instructions .keyboard { display: block; }
#instructions .touch { display: none; }
#instructions.touch .keyboard { display: none; }
#instructions.touch .touch { display: block; }

.unsupported {
  border: 1px solid var(--accent);
  color: var(--gold);
  background-color: var(--surface);
  padding: 2em;
  margin: 3em;
  display: inline-block;
  border-radius: 8px;
}

#hint {
  margin-top: 0.8em;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #5a5a6a;
  text-transform: uppercase;
}

/* mute toggle button */
#mute {
  position: absolute;
  bottom: 0.55em;
  left: 0.6em;
  z-index: 7;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 16px;
  line-height: 32px;
  text-align: center;
  color: var(--gold);
  background: rgba(12, 12, 18, 0.8);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.08s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-user-select: none;
  user-select: none;
}
#mute:hover { border-color: var(--accent); box-shadow: 0 0 14px rgba(224, 38, 74, 0.35); }
#mute:active { transform: scale(0.92); }
#mute.off { color: #6a6a7a; }

/* DARK overlays (start + game over) */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.55em;
  padding: 1.2em;
  background:
    radial-gradient(120% 90% at 50% 35%, rgba(224, 38, 74, 0.10) 0%, transparent 55%),
    rgba(6, 6, 10, 0.86);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  border-radius: 10px;
  animation: ovFade 0.28s ease both;
}
@keyframes ovFade { from { opacity: 0; } to { opacity: 1; } }

.ov-title {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: clamp(22px, 6vw, 40px);
  color: var(--gold);
  text-shadow: 0 0 24px rgba(224, 38, 74, 0.5);
  margin: 0;
}
.ov-title.accent, .ov-title .accent { color: var(--accent); }

.ov-sub {
  font-size: clamp(10px, 2.6vw, 13px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8a8a9a;
}

.ov-scoreline,
.ov-best {
  font-size: clamp(12px, 3vw, 16px);
  letter-spacing: 0.18em;
  color: var(--gold);
}
.ov-scoreline span,
.ov-best span { color: #fff; font-weight: 700; }
.ov-best { color: #7a7a8a; }
.ov-best span { color: var(--accent); }

.ov-new {
  font-size: clamp(11px, 2.8vw, 14px);
  letter-spacing: 0.3em;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  animation: ovPulse 0.9s ease-in-out infinite;
}
@keyframes ovPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

.ov-btn {
  margin-top: 0.4em;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-size: clamp(13px, 3.4vw, 17px);
  color: #06060a;
  background: linear-gradient(180deg, #ff5b4a 0%, var(--accent) 60%, #b51d3e 100%);
  border: none;
  border-radius: 999px;
  padding: 0.7em 2.2em;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(224, 38, 74, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}
.ov-btn:hover { box-shadow: 0 10px 34px rgba(224, 38, 74, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.ov-btn:active { transform: scale(0.95); }

.ov-hint {
  margin-top: 0.5em;
  font-size: clamp(9px, 2.3vw, 11px);
  letter-spacing: 0.12em;
  color: #5a5a6a;
}
