/* Custom Cyberpunk / Arcade Glassmorphic CSS (v5.1 - Full Theme & Audio Fix) */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --neon-cyan: #06b6d4;
  --neon-purple: #a855f7;
  --neon-pink: #ec4899;
  --neon-gold: #eab308;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: #f8fafc;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.font-arcade {
  font-family: 'Orbitron', sans-serif;
}

/* Custom Cyberpunk Neon Text Glow */
.glow-text-cyan {
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.6), 0 0 20px rgba(6, 182, 212, 0.4);
}
.glow-text-purple {
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.6), 0 0 20px rgba(168, 85, 247, 0.4);
}
.glow-text-gold {
  text-shadow: 0 0 10px rgba(234, 179, 8, 0.6), 0 0 20px rgba(234, 179, 8, 0.4);
}

/* Synthwave Pink Theme Overrides */
body.theme-pink {
  --bg-dark: #180828;
  --neon-cyan: #ec4899;
  --neon-purple: #c084fc;
}
body.theme-pink .glow-text-cyan {
  color: #ec4899 !important;
  text-shadow: 0 0 10px rgba(236, 72, 153, 0.8), 0 0 20px rgba(236, 72, 153, 0.5) !important;
}
body.theme-pink .glass-card:hover {
  border-color: rgba(236, 72, 153, 0.8) !important;
  box-shadow: 0 15px 35px -5px rgba(236, 72, 153, 0.4) !important;
}
body.theme-pink .pill-tab.active, body.theme-pink .pill-tab:hover {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.8), rgba(168, 85, 247, 0.8)) !important;
  border-color: rgba(236, 72, 153, 0.8) !important;
}

/* Cyber Gold Theme Overrides */
body.theme-gold {
  --bg-dark: #1a1600;
  --neon-cyan: #eab308;
  --neon-purple: #f59e0b;
}
body.theme-gold .glow-text-cyan {
  color: #eab308 !important;
  text-shadow: 0 0 10px rgba(234, 179, 8, 0.8), 0 0 20px rgba(234, 179, 8, 0.5) !important;
}
body.theme-gold .glass-card:hover {
  border-color: rgba(234, 179, 8, 0.8) !important;
  box-shadow: 0 15px 35px -5px rgba(234, 179, 8, 0.4) !important;
}
body.theme-gold .pill-tab.active, body.theme-gold .pill-tab:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.8), rgba(245, 158, 11, 0.8)) !important;
  border-color: rgba(234, 179, 8, 0.8) !important;
}

/* Cyberpunk Glassmorphic Card */
.glass-card {
  background: rgba(30, 41, 59, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 15px 35px -5px rgba(6, 182, 212, 0.25), 0 0 15px rgba(168, 85, 247, 0.2);
}

.glass-card-purple:hover {
  border-color: rgba(168, 85, 247, 0.6);
  box-shadow: 0 15px 35px -5px rgba(168, 85, 247, 0.3);
}

/* Neon Pill Buttons */
.pill-tab {
  transition: all 0.25s ease;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.pill-tab.active, .pill-tab:hover {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.8), rgba(6, 182, 212, 0.8));
  border-color: rgba(6, 182, 212, 0.8);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
  color: #ffffff;
}

/* Hero Cyber Background Glow Orbs */
.hero-glow-1 {
  position: absolute;
  top: -10%;
  left: 20%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(168,85,247,0.25) 0%, rgba(0,0,0,0) 70%);
  z-index: 0;
  pointer-events: none;
  animation: pulse-glow 6s infinite alternate ease-in-out;
}

.hero-glow-2 {
  position: absolute;
  top: 10%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6,182,212,0.2) 0%, rgba(0,0,0,0) 70%);
  z-index: 0;
  pointer-events: none;
  animation: pulse-glow 8s infinite alternate ease-in-out reverse;
}

@keyframes pulse-glow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  100% { transform: scale(1.15) translate(20px, -20px); opacity: 1; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #090d16;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #06b6d4;
}

/* Emulator Frame Container */
.emulator-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 650px;
  background: #000000;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(6, 182, 212, 0.25), inset 0 0 15px rgba(0,0,0,0.8);
  border: 1px solid rgba(6, 182, 212, 0.4);
}

.emulator-wrapper iframe, .emulator-wrapper div#game {
  width: 100% !important;
  height: 100% !important;
  border: none;
}

/* CRT Retro TV Scanline Shader Effect */
.crt-overlay::after {
  content: " ";
  display: block;
  position: absolute;
  top: 0; left: 0; bottom: 0; right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  z-index: 20;
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  opacity: 0.85;
}

/* Favorite Heart Toggle */
.fav-btn.active {
  color: #ec4899 !important;
  background-color: rgba(236, 72, 153, 0.2) !important;
  border-color: rgba(236, 72, 153, 0.6) !important;
}
