/* ============================================================
   Neon Breakout — site styles
   ============================================================ */

:root {
  --bg: #0a0a14;
  --bg-soft: #11111f;
  --panel: #161628;
  --accent: #00f0ff;
  --accent-2: #ff2d95;
  --accent-3: #ffd60a;
  --text: #e8e8f2;
  --text-dim: #9a9ab0;
  --border: rgba(0, 240, 255, 0.25);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- animated background grid --- */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  animation: gridDrift 24s linear infinite;
}

@keyframes gridDrift {
  from { background-position: 0 0; }
  to   { background-position: 48px 96px; }
}

/* --- header --- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 6vw;
  position: sticky;
  top: 0;
  background: rgba(10, 10, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 1.05rem;
}

.logo-mark {
  color: var(--accent-2);
  font-size: 1.2rem;
  text-shadow: 0 0 12px var(--accent-2);
}

.accent { color: var(--accent); }

.nav a {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 2rem;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: color 0.2s, text-shadow 0.2s;
}

.nav a:hover {
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent);
}

/* --- hero --- */
.hero {
  text-align: center;
  padding: 6rem 6vw 4rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.glow {
  text-shadow: 0 0 18px rgba(0, 240, 255, 0.7), 0 0 60px rgba(0, 240, 255, 0.35);
}

.tagline {
  margin: 1.5rem auto 2.5rem;
  max-width: 560px;
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1.7;
}

.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #0077ff);
  color: #001018;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  padding: 0.9rem 2.4rem;
  border: none;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.7);
}

/* --- game section --- */
.game-section {
  display: flex;
  justify-content: center;
  padding: 2rem 4vw 5rem;
}

.game-shell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: 0 0 60px rgba(0, 240, 255, 0.12), inset 0 0 30px rgba(0, 0, 0, 0.4);
  max-width: 860px;
  width: 100%;
}

.hud {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.hud-item {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  flex: 1;
  text-align: center;
  white-space: nowrap;
}

.hud-item span {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--accent);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

#lives { color: var(--accent-2); text-shadow: 0 0 10px rgba(255, 45, 149, 0.6); }
#best  { color: var(--accent-3); text-shadow: 0 0 10px rgba(255, 214, 10, 0.6); }

.canvas-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

#game {
  display: block;
  width: 100%;
  height: auto;
  background: #07070f;
  cursor: none;
}

/* --- overlay (start / pause / game over) --- */
.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  background: rgba(7, 7, 15, 0.82);
  backdrop-filter: blur(4px);
  text-align: center;
  padding: 1rem;
  transition: opacity 0.25s;
}

.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.overlay h2 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: 0.2em;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.8);
}

.overlay p {
  color: var(--text-dim);
  font-size: 1.05rem;
}

.controls-hint {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}

kbd {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.1rem 0.45rem;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--text);
}

/* --- info sections --- */
.info-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 6vw;
  text-align: center;
}

.info-section h2 {
  font-size: 2rem;
  letter-spacing: 0.1em;
  margin-bottom: 2.5rem;
  color: var(--accent);
  text-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 2rem 1.5rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--border);
  box-shadow: 0 12px 40px rgba(0, 240, 255, 0.12);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.7rem;
  letter-spacing: 0.04em;
}

.card p {
  color: var(--text-dim);
  line-height: 1.65;
  font-size: 0.95rem;
}

.about-text {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-dim);
  line-height: 1.8;
}

.about-text code {
  background: var(--bg-soft);
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  color: var(--accent-3);
  font-size: 0.9em;
}

/* --- footer --- */
.site-footer {
  text-align: center;
  padding: 2.5rem 6vw;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- responsive tweaks --- */
@media (max-width: 600px) {
  .nav a { margin-left: 1rem; font-size: 0.85rem; }
  .hero { padding-top: 4rem; }
  .hud-item { font-size: 0.65rem; padding: 0.4rem 0.5rem; }
  .hud-item span { font-size: 1rem; }
  #game { cursor: default; }
}
