/* ==========================================================================
   CyberArcade Modern Design System & Global Styles (English)
   ========================================================================== */

:root {
  /* Color Palette - Cyber Arcade Theme */
  --bg-primary: #0a0d14;
  --bg-secondary: #121824;
  --bg-card: rgba(22, 30, 46, 0.75);
  --bg-card-hover: rgba(30, 41, 62, 0.9);
  --border-glass: rgba(0, 240, 255, 0.15);
  --border-glass-hover: rgba(0, 240, 255, 0.4);
  
  --neon-cyan: #00f0ff;
  --neon-pink: #ff007f;
  --neon-purple: #9d4edd;
  --neon-amber: #ffaa00;
  --neon-green: #00ff88;
  --neon-blue: #0088ff;

  --text-main: #f0f4f8;
  --text-muted: #8c9ba8;
  --text-dim: #5a6878;

  --font-display: 'Orbitron', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-neon-cyan: 0 0 15px rgba(0, 240, 255, 0.35);
  --shadow-neon-pink: 0 0 15px rgba(255, 0, 127, 0.35);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

.glow-top-left {
  width: 500px;
  height: 500px;
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, var(--neon-cyan) 0%, rgba(0, 240, 255, 0) 70%);
}

.glow-bottom-right {
  width: 600px;
  height: 600px;
  bottom: -150px;
  right: -150px;
  background: radial-gradient(circle, var(--neon-purple) 0%, rgba(157, 78, 221, 0) 70%);
}

.scanlines {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
  background-size: 100% 4px;
  opacity: 0.3;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 13, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.15);
  padding: 0.85rem 1.5rem;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-icon {
  font-size: 1.8rem;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6));
  animation: pulse-glow 2.5s infinite alternate;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.neon-text {
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.logo-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-muted);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box input {
  background: rgba(18, 24, 36, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 0.5rem 2rem 0.5rem 2.2rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 210px;
  transition: var(--transition-smooth);
}

.search-box input:focus {
  outline: none;
  width: 260px;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.35);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  pointer-events: none;
}

.clear-search-btn {
  position: absolute;
  right: 0.6rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  display: none;
}

.clear-search-btn:hover {
  color: var(--neon-pink);
}

/* Action Buttons */
.action-btn {
  background: rgba(22, 30, 46, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.action-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.icon-btn {
  padding: 0.5rem 0.75rem;
  font-size: 1.05rem;
}

.badge {
  background: var(--neon-pink);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
}

/* Main Container & Sections */
#appContainer {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem 1.25rem;
  min-height: calc(100vh - 180px);
}

.view-section {
  transition: opacity var(--transition-smooth), transform var(--transition-smooth);
}

.view-section.hidden {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.view-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Featured Hero Game Section (Home Playable Arena) */
.featured-hero-section {
  background: linear-gradient(135deg, rgba(14, 19, 32, 0.92) 0%, rgba(22, 14, 38, 0.92) 100%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.75rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.featured-hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-cyan), var(--neon-pink), transparent);
}

.hero-game-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.hero-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--neon-cyan);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-green);
  animation: pulse-dot-anim 1.5s infinite;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.hero-game-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, #ffffff, var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-game-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto;
}

.featured-stage-box {
  max-width: 800px;
  margin: 0 auto;
}

.stage-actions-mini {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Filter Bar Tabs */
.filter-bar-container {
  margin-bottom: 1.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.category-tabs {
  display: flex;
  gap: 0.6rem;
  min-width: max-content;
}

.cat-tab {
  background: rgba(18, 24, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.cat-tab:hover {
  background: rgba(30, 41, 62, 0.9);
  color: var(--text-main);
  border-color: rgba(0, 240, 255, 0.3);
}

.cat-tab.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(157, 78, 221, 0.25));
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

/* Games Grid */
.grid-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
}

.grid-header h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.game-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

/* Game Card */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  position: relative;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glass-hover);
  box-shadow: 0 12px 30px rgba(0, 240, 255, 0.2), 0 0 20px rgba(0, 240, 255, 0.1);
  background: var(--bg-card-hover);
}

.game-card-banner {
  height: 140px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #101624, #1a2236);
  overflow: hidden;
}

.banner-pattern {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image: radial-gradient(var(--neon-cyan) 1px, transparent 1px);
  background-size: 12px 12px;
}

.game-card-icon {
  font-size: 3.8rem;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
  transition: transform var(--transition-smooth);
}

.game-card:hover .game-card-icon {
  transform: scale(1.15) rotate(4deg);
}

.card-fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(10, 13, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.card-fav-btn:hover, .card-fav-btn.active {
  color: var(--neon-amber);
  border-color: var(--neon-amber);
  background: rgba(10, 13, 20, 0.95);
  box-shadow: 0 0 8px rgba(255, 170, 0, 0.4);
}

.game-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-badges {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.cat-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 240, 255, 0.12);
  color: var(--neon-cyan);
}

.high-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 170, 0, 0.15);
  color: var(--neon-amber);
  margin-left: auto;
}

.game-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.game-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.game-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
}

.play-action-text {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--neon-cyan);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.game-card:hover .play-action-text {
  color: var(--neon-pink);
}

/* No Results State */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  background: var(--bg-card);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  margin-top: 1rem;
}

.no-results-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.no-results h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.no-results p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  border: none;
  color: #040810;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-main);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Footer */
.arcade-footer {
  background: #06090e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3rem 1.5rem 1.5rem 1.5rem;
  position: relative;
  z-index: 2;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto 2.5rem auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.footer-logo span {
  color: var(--neon-cyan);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 450px;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.footer-col a, .footer-col span {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-col a:hover {
  color: var(--neon-cyan);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* Keyframe Animations */
@keyframes pulse-glow {
  0% { filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.4)); }
  100% { filter: drop-shadow(0 0 14px rgba(255, 0, 127, 0.8)); }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .hero-game-title {
    font-size: 1.8rem;
  }
  .featured-hero-section {
    padding: 1.5rem 1rem;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .navbar {
    padding: 0.75rem 1rem;
  }
  .logo-title {
    font-size: 1.15rem;
  }
  .logo-subtitle {
    display: none;
  }
  .search-box input {
    width: 130px;
  }
  .search-box input:focus {
    width: 160px;
  }
  .action-btn span:not(#audioIcon) {
    display: none;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
}
