/* ============================================================
   BRICK BLASTERS — Shared Styles
   Aesthetic: Retro arcade cabinet. Dark, neon, pixel energy.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Outfit:wght@300;400;600&display=swap');

/* -- Variables ------------------------------------------------ */
:root {
  --bg:          #0a0a0f;
  --bg-card:     #12121a;
  --bg-card-hover: #1a1a28;
  --border:      #2a2a3e;
  --neon-cyan:   #00f5ff;
  --neon-pink:   #ff2d78;
  --neon-yellow: #ffe600;
  --neon-green:  #39ff14;
  --text:        #e8e8f0;
  --text-muted:  #7070a0;
  --font-pixel:  'Press Start 2P', monospace;
  --font-body:   'Outfit', sans-serif;
  --radius:      8px;
  --glow-cyan:   0 0 12px #00f5ff88, 0 0 30px #00f5ff33;
  --glow-pink:   0 0 12px #ff2d7888, 0 0 30px #ff2d7833;
}

/* -- Reset ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* -- Scanlines texture (decorative) --------------------------- */
.scanlines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.15) 3px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* -- Site Header ---------------------------------------------- */
.site-header {
  position: relative;
  text-align: center;
  padding: 3rem 1rem 2.5rem;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: linear-gradient(180deg, #0d0d1a 0%, var(--bg) 100%);
}

.header-inner { position: relative; z-index: 2; }

.logo {
  font-family: var(--font-pixel);
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  line-height: 1.4;
}
.logo-brick {
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  color: var(--neon-yellow);
  text-shadow: 0 0 10px #ffe60099, 0 0 30px #ffe60055;
}
.logo-blasters {
  font-size: clamp(1.4rem, 5vw, 2.4rem);
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
}

.tagline {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* -- Game Grid ------------------------------------------------ */
.game-grid-section {
  flex: 1;
  padding: 3rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* -- Game Card ------------------------------------------------ */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon-cyan);
  box-shadow: var(--glow-cyan);
  background: var(--bg-card-hover);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .card-thumb img {
  transform: scale(1.04);
}

.card-thumb-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #1a0030 0%, #001a30 50%, #001a0a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb-icon {
  font-size: 3rem;
  filter: saturate(0.7);
}

.card-overlay {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
}

.game-card:hover .card-overlay { opacity: 1; }

.play-btn {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--neon-yellow);
  text-shadow: 0 0 10px #ffe600cc;
  letter-spacing: 0.1em;
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--neon-yellow);
  border-radius: 4px;
  box-shadow: 0 0 16px #ffe60066;
}

.card-info {
  padding: 1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-title {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--neon-pink);
  text-shadow: var(--glow-pink);
  letter-spacing: 0.05em;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-family: var(--font-pixel);
  color: var(--neon-green);
  border: 1px solid var(--neon-green);
  border-radius: 3px;
  padding: 0.2rem 0.5rem;
  margin-top: 0.4rem;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px #39ff1466;
  align-self: flex-start;
}

/* -- Site Footer ---------------------------------------------- */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* -- Game Page Layout ----------------------------------------- */
.game-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.game-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  position: relative;
  z-index: 10;
}

.back-link {
  font-family: var(--font-pixel);
  font-size: 0.6rem;
  color: var(--neon-cyan);
  text-shadow: var(--glow-cyan);
  letter-spacing: 0.08em;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--neon-cyan);
  border-radius: 3px;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.back-link:hover {
  background: #00f5ff18;
  box-shadow: var(--glow-cyan);
}

.game-nav-title {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: var(--neon-pink);
  text-shadow: var(--glow-pink);
  letter-spacing: 0.08em;
}

.game-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(ellipse at 50% 30%, #0d0d25 0%, var(--bg) 70%);
}

.game-canvas-wrap {
  position: relative;
  max-width: 100%;
}

.game-canvas-wrap canvas {
  display: block;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0 40px #00000088;
  max-width: 100%;
  height: auto;
}

/* -- Responsive ----------------------------------------------- */
@media (max-width: 500px) {
  .logo { flex-direction: column; gap: 0.2rem; }
  .game-grid { grid-template-columns: 1fr; }
  .game-stage { padding: 0.5rem; }
}
