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

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0e121e;
  --bg-card: rgba(18, 24, 38, 0.85);
  --bg-glass: rgba(14, 18, 30, 0.75);
  
  --neon-cyan: #00f3ff;
  --neon-green: #39ff14;
  --neon-pink: #ff007f;
  --neon-amber: #ffb700;
  --neon-purple: #9d00ff;
  
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-bright: #ffffff;
  
  --border-neon: rgba(0, 243, 255, 0.25);
  --border-pink: rgba(255, 0, 127, 0.3);
  --shadow-neon: 0 0 15px rgba(0, 243, 255, 0.25);
  --shadow-pink: 0 0 15px rgba(255, 0, 127, 0.3);

  --font-pixel: 'Press Start 2P', monospace;
  --font-arcade: 'Silkscreen', monospace;
  --font-retro-num: 'VT323', monospace;
  --font-body: 'Outfit', sans-serif;
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

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

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(157, 0, 255, 0.12) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(0, 243, 255, 0.08) 0%, transparent 50%),
    linear-gradient(to bottom, #07090e, #0a0d16);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}


/* Scrollbar retro */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 4px;
  box-shadow: 0 0 8px var(--neon-cyan);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-pink);
}

a {
  color: var(--neon-cyan);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: var(--neon-pink);
  text-shadow: 0 0 8px var(--neon-pink);
}

/* Global Container */
.site-wrapper {
  max-width: 1350px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 3rem 1.5rem;
  position: relative;
  z-index: 2;
  overflow-x: hidden;
}

/* Typography Helpers */
.pixel-text {
  font-family: var(--font-pixel);
  letter-spacing: -0.5px;
}
.arcade-text {
  font-family: var(--font-arcade);
  letter-spacing: 1px;
}
.glow-cyan {
  text-shadow: 0 0 10px rgba(0, 243, 255, 0.6);
}
.glow-pink {
  text-shadow: 0 0 10px rgba(255, 0, 127, 0.6);
}
.glow-amber {
  text-shadow: 0 0 10px rgba(255, 183, 0, 0.6);
}

/* Retro Buttons */
.btn-retro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-arcade);
  font-size: 0.85rem;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--neon-cyan);
  background: rgba(0, 243, 255, 0.08);
  color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 243, 255, 0.15);
  user-select: none;
}
.btn-retro:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 18px var(--neon-cyan);
  transform: translateY(-2px);
}
.btn-retro:active,
.btn-retro.active {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 16px var(--neon-cyan);
}

.btn-pink {
  border-color: var(--neon-pink);
  background: rgba(255, 0, 127, 0.08);
  color: var(--neon-pink);
  box-shadow: 0 0 10px rgba(255, 0, 127, 0.15);
}
.btn-pink:hover {
  background: var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 18px var(--neon-pink);
}

.btn-amber {
  border-color: var(--neon-amber);
  background: rgba(255, 183, 0, 0.08);
  color: var(--neon-amber);
  box-shadow: 0 0 10px rgba(255, 183, 0, 0.15);
}
.btn-amber:hover {
  background: var(--neon-amber);
  color: #000;
  box-shadow: 0 0 18px var(--neon-amber);
}

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
}

/* Modals Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 6, 12, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--neon-cyan);
  box-shadow: 0 0 35px rgba(0, 243, 255, 0.35);
  border-radius: var(--radius-md);
  width: 92vw;
  max-width: 1450px;
  height: 90vh;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: transparent;
  border: none;
  color: var(--neon-pink);
  font-family: var(--font-arcade);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--neon-pink);
}

/* ==========================================================================
   GAMEBOY SHELL PASTEL COOKIE LIGHT THEME (GameBoy DMG-01 Casing Palette)
   ========================================================================== */
html[data-theme="gameboy"],
body[data-theme="gameboy"],
[data-theme="gameboy"] {
  --bg-primary: #e5e3de;
  --bg-secondary: #f4f2eb;
  --bg-card: #ffffff;
  --bg-glass: rgba(244, 242, 235, 0.92);

  --neon-cyan: #1d4ed8;    /* GameBoy Lens Royal Blue */
  --neon-green: #15803d;   /* GameBoy ON indicator Green */
  --neon-pink: #c22e60;    /* GameBoy A/B Button Magenta Berry */
  --neon-amber: #d97706;   /* GameBoy Battery Amber Gold */
  --neon-purple: #6d28d9;  /* GameBoy Accent Purple */

  --text-main: #1e293b;    /* Dark Navy/Slate - Maximum Legibility */
  --text-muted: #475569;   /* Muted Slate Gray */
  --text-bright: #0f172a;  /* Deep Midnight Navy */

  --border-neon: rgba(29, 78, 216, 0.25);
  --border-pink: rgba(194, 46, 96, 0.3);
  --shadow-neon: 0 4px 15px rgba(0, 0, 0, 0.06);
  --shadow-pink: 0 4px 15px rgba(194, 46, 96, 0.15);
}

/* Base Body Override */
[data-theme="gameboy"] body {
  background-color: #e5e3de;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(29, 78, 216, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(194, 46, 96, 0.06) 0%, transparent 50%),
    linear-gradient(to bottom, #eae8e3, #dedcd5);
  color: #1e293b;
}

/* Headers, Modals, Cards & Sliders */
[data-theme="gameboy"] .site-header,
[data-theme="gameboy"] .admin-header,
[data-theme="gameboy"] .modal-card,
[data-theme="gameboy"] .game-card,
[data-theme="gameboy"] .catalog-card,
[data-theme="gameboy"] .master-card,
[data-theme="gameboy"] .hero-slider-wrapper,
[data-theme="gameboy"] .hero-slide-card,
[data-theme="gameboy"] .platform-filter-section,
[data-theme="gameboy"] .developer-hero-section,
[data-theme="gameboy"] .dev-hero-card,
[data-theme="gameboy"] .collaboration-card,
[data-theme="gameboy"] .catalog-filter-bar,
[data-theme="gameboy"] .catalog-count-bar {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  color: #1e293b !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="gameboy"] .collaboration-card::before {
  display: none !important;
}

[data-theme="gameboy"] .collab-img-frame {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

[data-theme="gameboy"] .collab-badge {
  background: #f1f5f9 !important;
  color: #d97706 !important;
  border-color: #d97706 !important;
}

[data-theme="gameboy"] .collab-title {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="gameboy"] .collab-author {
  color: #1d4ed8 !important;
}

[data-theme="gameboy"] .collab-description {
  color: #334155 !important;
}

[data-theme="gameboy"] .collab-disclaimer {
  color: #64748b !important;
}

[data-theme="gameboy"] .modal-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.2) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
}

[data-theme="gameboy"] .modal-close {
  color: #dc2626 !important;
}

/* Light Theme Overrides for Genres Checkbox Box & Proposal Rules Modal */
[data-theme="gameboy"] .genres-checkbox-grid {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.18) !important;
}

[data-theme="gameboy"] .genre-checkbox-label {
  color: #0f172a !important;
}

[data-theme="gameboy"] .rule-box {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #1e293b !important;
}

[data-theme="gameboy"] .rule-box p {
  color: #334155 !important;
}

[data-theme="gameboy"] .rule-box-amber .rule-box-header strong {
  color: #d97706 !important;
}

[data-theme="gameboy"] .rule-box-pink .rule-box-header strong {
  color: #dc2626 !important;
}

[data-theme="gameboy"] .rule-box-cyan .rule-box-header strong {
  color: #0284c7 !important;
}

[data-theme="gameboy"] .itch-guide-box {
  background: #ffffff !important;
  border-color: #0284c7 !important;
}

[data-theme="gameboy"] .itch-guide-title {
  color: #d97706 !important;
}

[data-theme="gameboy"] .itch-guide-steps {
  color: #475569 !important;
}



[data-theme="gameboy"] .dev-hero-logo-frame {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}

[data-theme="gameboy"] .dev-hero-title,
[data-theme="gameboy"] .dev-hero-desc {
  color: #0f172a !important;
}

[data-theme="gameboy"] .dev-share-box {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
}

[data-theme="gameboy"] .hero-slider-section {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

[data-theme="gameboy"] .hero-slider-wrapper {
  border-radius: var(--radius-md) !important;
  overflow: hidden !important;
}

[data-theme="gameboy"] .dev-hero-bio-card {
  background: #f8fafc !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
  color: #1e293b !important;
}

/* Typography & Titles */
[data-theme="gameboy"] h1,
[data-theme="gameboy"] h2,
[data-theme="gameboy"] h3,
[data-theme="gameboy"] h4,
[data-theme="gameboy"] .brand-titles h1,
[data-theme="gameboy"] .card-title,
[data-theme="gameboy"] .hero-slide-info h2,
[data-theme="gameboy"] .hero-slide-info p {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="gameboy"] .glow-cyan,
[data-theme="gameboy"] .glow-pink,
[data-theme="gameboy"] .glow-amber,
[data-theme="gameboy"] .glow-green {
  text-shadow: none !important;
}

[data-theme="gameboy"] .brand-titles p {
  color: #c22e60 !important;
  text-shadow: none !important;
}

/* Retro Buttons in GameBoy Shell Mode */
[data-theme="gameboy"] .btn-retro {
  background: #f1f0ea;
  color: #1e293b;
  border-color: #cbd5e1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}

[data-theme="gameboy"] .btn-retro:hover {
  background: #e2e0d8;
  color: #0f172a;
  border-color: #94a3b8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

[data-theme="gameboy"] .btn-pink {
  background: #c22e60 !important;
  color: #ffffff !important;
  border-color: #9f1e4a !important;
  box-shadow: 0 2px 8px rgba(194, 46, 96, 0.3) !important;
}

[data-theme="gameboy"] .btn-pink:hover {
  background: #9f1e4a !important;
  box-shadow: 0 4px 12px rgba(194, 46, 96, 0.45) !important;
}

[data-theme="gameboy"] .btn-cyan {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #1e40af !important;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.3) !important;
}

[data-theme="gameboy"] .btn-amber {
  background: #d97706 !important;
  color: #ffffff !important;
  border-color: #b45309 !important;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3) !important;
}

/* Form Controls & Selects */
[data-theme="gameboy"] input,
[data-theme="gameboy"] select,
[data-theme="gameboy"] textarea,
[data-theme="gameboy"] .form-control,
[data-theme="gameboy"] .filter-input {
  background: #f8fafc !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

[data-theme="gameboy"] input:focus,
[data-theme="gameboy"] select:focus,
[data-theme="gameboy"] textarea:focus,
[data-theme="gameboy"] .form-control:focus,
[data-theme="gameboy"] .filter-input:focus {
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 10px rgba(29, 78, 216, 0.2) !important;
}

[data-theme="gameboy"] select option {
  background: #ffffff !important;
  color: #0f172a !important;
}

/* Platform Chips & Badges */
[data-theme="gameboy"] .platform-chip {
  background: #f1f0ea !important;
  border-color: #cbd5e1 !important;
}

[data-theme="gameboy"] .platform-chip span {
  color: #1e293b !important;
}

[data-theme="gameboy"] .platform-chip.active {
  background: rgba(194, 46, 96, 0.12) !important;
  border-color: #c22e60 !important;
}

[data-theme="gameboy"] .card-platform-badge {
  background: rgba(29, 78, 216, 0.1) !important;
  color: #1d4ed8 !important;
}

[data-theme="gameboy"] .card-meta {
  color: #64748b !important;
}

[data-theme="gameboy"] .thumb-card {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
}

[data-theme="gameboy"] .thumb-card img {
  background: #e2e8f0 !important;
}

[data-theme="gameboy"] .view-toggle {
  background: #f1f0ea !important;
  border-color: #cbd5e1 !important;
}

/* Hero Slider Light Theme Overrides */
[data-theme="gameboy"] .hero-slider-wrapper {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="gameboy"] .hero-slide-media {
  background: #f1f5f9 !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="gameboy"] .hero-nav-btn {
  background: #f1f0ea !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

[data-theme="gameboy"] .hero-nav-btn:hover {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #1e40af !important;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3) !important;
}

[data-theme="gameboy"] .hero-meta-tag {
  background: rgba(29, 78, 216, 0.1) !important;
  color: #1d4ed8 !important;
  border-color: rgba(29, 78, 216, 0.25) !important;
}

/* Genre Collections & CTA Banner Light Theme Overrides */
[data-theme="gameboy"] .genre-card-btn {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="gameboy"] .genre-card-btn:hover {
  border-color: #d97706 !important;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.25) !important;
}

[data-theme="gameboy"] .genre-card-name {
  color: #d97706 !important;
  text-shadow: none !important;
}

[data-theme="gameboy"] .genre-card-count {
  color: #64748b !important;
}

[data-theme="gameboy"] .catalog-cta-banner {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.08), rgba(194, 46, 96, 0.08)) !important;
  border-color: rgba(29, 78, 216, 0.2) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06) !important;
}

/* Legal Notice Callout Boxes (Antipiratería, Descargo de responsabilidad) */
.legal-callout-box {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  transition: all 0.25s ease;
}

.legal-box-amber {
  background: rgba(255, 183, 0, 0.1);
  border-left: 3px solid var(--neon-amber);
}

.legal-box-cyan {
  background: rgba(0, 243, 255, 0.08);
  border-left: 3px solid var(--neon-cyan);
}

.legal-box-pink {
  background: rgba(255, 0, 127, 0.1);
  border-left: 3px solid var(--neon-pink);
}

[data-theme="gameboy"] .legal-box-amber {
  background: #fffbeb !important;
  border: 1px solid #fef3c7 !important;
  border-left: 4px solid #d97706 !important;
}

[data-theme="gameboy"] .legal-box-cyan {
  background: #eff6ff !important;
  border: 1px solid #dbeafe !important;
  border-left: 4px solid #1d4ed8 !important;
}

[data-theme="gameboy"] .legal-box-pink {
  background: #fdf2f8 !important;
  border: 1px solid #fce7f3 !important;
  border-left: 4px solid #c22e60 !important;
}

[data-theme="gameboy"] .legal-callout-box p {
  color: #334155 !important;
}

/* Active Button Highlighting */
.btn-retro.active {
  background: rgba(0, 243, 255, 0.15);
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px var(--neon-cyan);
}

#crt-toggle-btn.active {
  background: rgba(0, 243, 255, 0.12) !important;
  color: var(--neon-cyan) !important;
  border: 2px solid var(--neon-cyan) !important;
  box-shadow: 0 0 12px var(--neon-cyan) !important;
}

[data-theme="gameboy"] .btn-retro.active,
[data-theme="gameboy"] #tab-btn-catalog.active {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #1e40af !important;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35) !important;
}

[data-theme="gameboy"] #crt-toggle-btn.active {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 2px solid #1d4ed8 !important;
  box-shadow: 0 0 10px rgba(29, 78, 216, 0.35) !important;
}

/* Hero Dots in GameBoy Light Theme */
[data-theme="gameboy"] .hero-dot {
  background: #cbd5e1 !important;
  border: 1px solid #94a3b8 !important;
}

[data-theme="gameboy"] .hero-dot.active {
  background: #c22e60 !important;
  border-color: #9f1e4a !important;
  box-shadow: 0 0 8px rgba(194, 46, 96, 0.45) !important;
  transform: scale(1.3) !important;
}

/* Game Detail Modal Light Theme Overrides */
[data-theme="gameboy"] .detail-main-img {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="gameboy"] .thumb-card {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

[data-theme="gameboy"] .thumb-card img {
  background: #f1f5f9 !important;
}

[data-theme="gameboy"] .thumb-card-label {
  background: #f1f0ea !important;
  color: #1e293b !important;
  border-top: 1px solid #cbd5e1 !important;
}

[data-theme="gameboy"] .thumb-card:hover .thumb-card-label,
[data-theme="gameboy"] .thumb-card.active-thumb .thumb-card-label {
  background: #1d4ed8 !important;
  color: #ffffff !important;
}

[data-theme="gameboy"] .detail-meta-box,
[data-theme="gameboy"] .detail-share-box,
[data-theme="gameboy"] .detail-synopsis,
[data-theme="gameboy"] .detail-ports-switcher {
  background: #f8fafc !important;
  border: 1px solid #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="gameboy"] .detail-meta-box p,
[data-theme="gameboy"] .detail-synopsis p,
[data-theme="gameboy"] .detail-synopsis {
  color: #334155 !important;
}

[data-theme="gameboy"] .detail-share-box {
  border: 1px dashed #1d4ed8 !important;
}

[data-theme="gameboy"] .detail-share-box p {
  color: #1d4ed8 !important;
}

/* Port Chip Tags & Port Switcher Buttons in Light Theme */
[data-theme="gameboy"] .port-chip-tag {
  background: rgba(194, 46, 96, 0.12) !important;
  border: 1px solid rgba(194, 46, 96, 0.35) !important;
  color: #9f1e4a !important;
  font-weight: 600 !important;
}

[data-theme="gameboy"] .port-chip-tag:hover {
  background: #c22e60 !important;
  color: #ffffff !important;
}

[data-theme="gameboy"] .ports-badge-row {
  color: #9f1e4a !important;
}

[data-theme="gameboy"] .detail-port-btn {
  background: #f1f0ea !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

[data-theme="gameboy"] .detail-port-btn.active {
  background: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #1e40af !important;
}
