/* === ARCADE FUN — Shared Platform Styles === */

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

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

:root {
  --neon-pink: #ff2d95;
  --neon-cyan: #00f0ff;
  --neon-yellow: #ffe156;
  --neon-green: #39ff14;
  --neon-purple: #bf5af2;
  --bg-dark: #0a0a1a;
  --bg-card: #12122a;
  --bg-nav: #0d0d20;
  --text-primary: #e0e0ff;
  --text-muted: #7a7a9a;
  --border-glow: rgba(0, 240, 255, 0.3);
}

html {
  scroll-behavior: smooth;
  background: var(--bg-dark);
}

body {
  background: transparent;
  color: var(--text-primary);
  font-family: 'Press Start 2P', monospace;
  min-height: 100vh;
  line-height: 1.6;
}

/* === NAV BAR === */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-nav);
  border-bottom: 2px solid var(--border-glow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-size: 14px;
  color: var(--neon-cyan);
  text-decoration: none;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6), 0 0 20px rgba(0, 240, 255, 0.3);
  letter-spacing: 2px;
  transition: text-shadow 0.3s;
}

.nav-logo:hover {
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.8), 0 0 30px rgba(0, 240, 255, 0.5);
}

.nav-back {
  font-size: 9px;
  color: var(--neon-pink);
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}

.nav-back:hover {
  text-shadow: 0 0 10px rgba(255, 45, 149, 0.6);
}

/* === AD SLOTS === */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 7px;
  letter-spacing: 1px;
  min-height: 40px;
  overflow: hidden;
}

.ad-slot-leaderboard {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin: 12px auto;
}

.ad-slot-rectangle {
  width: 300px;
  height: 250px;
}

/* === HERO SECTION === */
.hero {
  text-align: center;
  padding: 48px 24px 24px;
  position: relative;
}

.hero-title {
  font-size: 32px;
  color: var(--neon-cyan);
  text-shadow:
    0 0 6px rgba(0, 240, 255, 0.4),
    0 0 14px rgba(0, 240, 255, 0.2);
  letter-spacing: 4px;
  margin-bottom: 12px;
  animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% { text-shadow: 0 0 6px rgba(0, 240, 255, 0.4), 0 0 14px rgba(0, 240, 255, 0.2); }
  50% { text-shadow: 0 0 8px rgba(0, 240, 255, 0.55), 0 0 20px rgba(0, 240, 255, 0.3); }
}

.hero-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 3px;
}

/* === GAME CARDS GRID === */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  padding: 32px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.game-card {
  background: var(--bg-card);
  border: 2px solid rgba(0, 240, 255, 0.15);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.game-card-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: var(--bg-dark);
}

.game-card-body {
  padding: 16px;
}

.game-card-title {
  font-size: 12px;
  color: var(--neon-yellow);
  margin-bottom: 8px;
  text-shadow: 0 0 8px rgba(255, 225, 86, 0.4);
}

.game-card-desc {
  font-size: 8px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
}

.game-card-btn {
  display: inline-block;
  padding: 8px 20px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--bg-dark);
  background: var(--neon-cyan);
  border: none;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.3s, box-shadow 0.3s;
  cursor: pointer;
}

.game-card:hover .game-card-btn {
  background: var(--neon-green);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
}

/* === FOOTER === */
.footer {
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-size: 7px;
  letter-spacing: 1px;
}

.footer a {
  color: var(--neon-cyan);
  text-decoration: none;
}

/* === GAME PAGE LAYOUT === */
.game-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.game-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.game-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.game-sidebar {
  flex-shrink: 0;
}

.back-to-arcade {
  display: inline-block;
  margin: 16px auto;
  padding: 10px 24px;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--neon-pink);
  background: transparent;
  border: 2px solid var(--neon-pink);
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

.back-to-arcade:hover {
  background: var(--neon-pink);
  color: var(--bg-dark);
  box-shadow: 0 0 15px rgba(255, 45, 149, 0.4);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero-title {
    font-size: 20px;
  }

  .hero-subtitle {
    font-size: 8px;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 12px;
  }

  .game-card-thumb {
    height: 120px;
  }

  .game-card-body {
    padding: 10px;
  }

  .game-card-title {
    font-size: 9px;
  }

  .game-card-desc {
    font-size: 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .game-card-btn {
    font-size: 7px;
    padding: 6px 14px;
  }

  .nav-bar {
    padding: 10px 12px;
  }

  .nav-logo {
    font-size: 10px;
  }

  .ad-slot-leaderboard {
    height: 60px;
  }

  .game-content {
    flex-direction: column;
    align-items: center;
  }

  .game-sidebar {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .ad-slot-rectangle {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 16px;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 12px 8px;
  }

  .game-card-thumb {
    height: 100px;
  }
}

/* === INTERACTIVE BACKGROUND CANVAS === */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* === SCANLINE OVERLAY (subtle retro effect on body) === */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* Star field now handled by interactive #bg-canvas */
