/*
Theme Name: Lightning Gaming CMS
Theme URI: https://example.com
Description: Ultra-fast gaming CMS theme optimized for instant-play games. Mobile-friendly, SEO-optimized, designed for maximum speed and kid-friendly UX.
Version: 1.0.0
Author: Gaming CMS
Author URI: https://example.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lightning-gaming
*/

:root {
  /* Vibrant Gaming Color Palette */
  --primary: #FF3366;
  --primary-dark: #E62958;
  --secondary: #00D9FF;
  --accent: #FFD700;
  --success: #00FF88;
  --warning: #FF9500;
  
  /* Backgrounds */
  --bg-main: #0A0E27;
  --bg-card: #141B3A;
  --bg-hover: #1A2347;
  --bg-light: #1F2A54;
  
  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: #B8C5D6;
  --text-muted: #6B7A94;
  
  /* Borders & Shadows */
  --border: #2A3555;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(255, 51, 102, 0.3);
  
  /* Spacing */
  --gap-xs: 8px;
  --gap-sm: 12px;
  --gap-md: 20px;
  --gap-lg: 32px;
  --gap-xl: 48px;
  
  /* Typography */
  --font-display: 'Fredoka', 'Comic Sans MS', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Layout */
  --container-max: 1400px;
  --sidebar-width: 300px;
  --game-max-width: 800px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

/* Beautiful Galaxy Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 15% 20%, rgba(138, 43, 226, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(255, 105, 180, 0.20) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(75, 0, 130, 0.18) 0%, transparent 70%);
  z-index: -2;
  animation: bgPulse 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bgPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Moon - TRULY FIXED */
body::after {
  content: '';
  position: fixed;
  top: 8%;
  right: 10%;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #e6e6e6 50%, #ccc 100%);
  border-radius: 50%;
  box-shadow: 
    0 0 60px rgba(255, 255, 255, 0.8),
    0 0 100px rgba(255, 255, 255, 0.4),
    inset -10px -10px 20px rgba(0, 0, 0, 0.1);
  z-index: -1;
  animation: moon-glow 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes moon-glow {
  0%, 100% {
    box-shadow: 
      0 0 60px rgba(255, 255, 255, 0.8),
      0 0 100px rgba(255, 255, 255, 0.4),
      inset -10px -10px 20px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow: 
      0 0 80px rgba(255, 255, 255, 1),
      0 0 120px rgba(255, 255, 255, 0.6),
      inset -10px -10px 20px rgba(0, 0, 0, 0.1);
  }
}

/* 12 Stars - TRULY FIXED, NEVER MOVE */
html::before {
  content: '✦';
  position: fixed;
  top: 5%;
  right: 15%;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9);
  animation: twinkle 3s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

html::after {
  content: '✧';
  position: fixed;
  top: 10%;
  left: 10%;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  animation: twinkle 3.5s ease-in-out infinite 0.5s;
  z-index: -1;
  pointer-events: none;
}

/* Using .site-header but FIXED positioning */
.site-header::before {
  content: '⭐';
  position: fixed !important;
  top: 40%;
  left: 5%;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.9);
  animation: twinkle 4s ease-in-out infinite 1s;
  z-index: -1;
  pointer-events: none;
}

.site-header::after {
  content: '✨';
  position: fixed !important;
  top: 50%;
  right: 8%;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.85);
  animation: twinkle 3.8s ease-in-out infinite 1.5s;
  z-index: -1;
  pointer-events: none;
}

/* Using .site-footer but FIXED positioning */
.site-footer::before {
  content: '✦';
  position: fixed !important;
  bottom: 30%;
  left: 12%;
  font-size: 1.7rem;
  color: rgba(255, 255, 255, 0.9);
  animation: twinkle 4.2s ease-in-out infinite 2s;
  z-index: -1;
  pointer-events: none;
}

.site-footer::after {
  content: '✧';
  position: fixed !important;
  bottom: 15%;
  right: 20%;
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.8);
  animation: twinkle 3.6s ease-in-out infinite 2.5s;
  z-index: -1;
  pointer-events: none;
}

/* Using .main-nav but FIXED positioning */
.main-nav::before {
  content: '⭐';
  position: fixed !important;
  top: 8%;
  left: 45%;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.85);
  animation: twinkle 3.3s ease-in-out infinite 0.8s;
  z-index: -1;
  pointer-events: none;
}

.main-nav::after {
  content: '✨';
  position: fixed !important;
  top: 25%;
  left: 75%;
  font-size: 1.9rem;
  color: rgba(255, 255, 255, 0.9);
  animation: twinkle 4.5s ease-in-out infinite 1.2s;
  z-index: -1;
  pointer-events: none;
}

/* Using header-container but FIXED */
.header-container::before {
  content: '✦';
  position: fixed !important;
  top: 45%;
  left: 50%;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.85);
  animation: twinkle 3.9s ease-in-out infinite 1.8s;
  z-index: -1;
  pointer-events: none;
}

.header-container::after {
  content: '✧';
  position: fixed !important;
  bottom: 25%;
  right: 35%;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  animation: twinkle 4.1s ease-in-out infinite 2.3s;
  z-index: -1;
  pointer-events: none;
}

/* Last 2 stars */
.footer-container::before {
  content: '⭐';
  position: fixed !important;
  bottom: 10%;
  left: 40%;
  font-size: 1.7rem;
  color: rgba(255, 255, 255, 0.9);
  animation: twinkle 3.7s ease-in-out infinite 2.8s;
  z-index: -1;
  pointer-events: none;
}

.footer-container::after {
  content: '✨';
  position: fixed !important;
  top: 18%;
  right: 5%;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.9);
  animation: twinkle 4.3s ease-in-out infinite 3s;
  z-index: -1;
  pointer-events: none;
}

/* ARTICLE SECTION STARS (5 stars - ON TOP!) */
/* ARTICLE STARS - ON TOP OF BOX */
.article-section::before {
  content: '⭐';
  position: absolute !important;
  top: -20px;
  left: -20px;
  font-size: 2.5rem;
  color: rgba(255, 215, 0, 1);
  animation: twinkle 3.2s ease-in-out infinite 0.3s;
  z-index: 1000;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.article-section::after {
  content: '✦';
  position: absolute !important;
  top: -15px;
  right: -15px;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9);
  animation: twinkle 4.6s ease-in-out infinite 1.4s;
  z-index: 1000;
  pointer-events: none;
}

.article-content::before {
  content: '✨';
  position: absolute !important;
  bottom: -15px;
  left: -15px;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.85);
  animation: twinkle 3.4s ease-in-out infinite 2.1s;
  z-index: 1000;
  pointer-events: none;
}

.article-content::after {
  content: '✧';
  position: absolute !important;
  top: 50%;
  right: -12px;
  font-size: 1.6rem;
  color: rgba(255, 255, 255, 0.8);
  animation: twinkle 4.8s ease-in-out infinite 2.7s;
  z-index: 1000;
  pointer-events: none;
}

.section-title::before {
  content: '⭐';
  position: absolute !important;
  top: -18px;
  right: -18px;
  font-size: 2.2rem;
  color: rgba(255, 215, 0, 0.9);
  animation: twinkle 3.1s ease-in-out infinite 1.9s;
  z-index: 1000;
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
}

/* GAME CONTAINER YELLOW STAR - ON TOP! */
.game-container::after {
  content: '⭐';
  position: absolute !important;
  top: -20px;
  right: -20px;
  font-size: 3rem;
  color: rgba(255, 215, 0, 1);
  animation: twinkle 2.8s ease-in-out infinite 0.5s;
  z-index: 1000;
  pointer-events: none;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

/* SIMILAR GAMES SECTION STARS (3 new stars) */
.similar-games-list::before {
  content: '✦';
  position: fixed !important;
  top: 35%;
  left: 3%;
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.9);
  animation: twinkle 4.4s ease-in-out infinite 0.9s;
  z-index: -1;
  pointer-events: none;
}

.sidebar-widget::before {
  content: '✨';
  position: fixed !important;
  top: 28%;
  right: 3%;
  font-size: 1.7rem;
  color: rgba(255, 255, 255, 0.85);
  animation: twinkle 3.9s ease-in-out infinite 1.6s;
  z-index: -1;
  pointer-events: none;
}

.widget-title::before {
  content: '✧';
  position: fixed !important;
  bottom: 40%;
  right: 10%;
  font-size: 1.4rem;
  color: rgba(255, 255, 255, 0.8);
  animation: twinkle 4.7s ease-in-out infinite 2.4s;
  z-index: -1;
  pointer-events: none;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--primary);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--gap-sm);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--gap-md);
  text-shadow: 0 0 40px rgba(255, 51, 102, 0.3);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--text-primary);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  color: var(--text-primary);
}

p {
  margin-bottom: var(--gap-sm);
  color: var(--text-secondary);
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: rgba(10, 14, 39, 0.95);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

/* Remove backdrop-filter on mobile to prevent blur/shadow */
@media (min-width: 769px) {
  .site-header {
    backdrop-filter: blur(10px);
  }
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--gap-sm) var(--gap-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
  transition: transform 0.3s ease;
}

.site-logo:hover {
  transform: scale(1.05);
}

.main-nav ul {
  display: flex;
  gap: var(--gap-md);
  list-style: none;
}

.main-nav a {
  color: var(--text-secondary);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.main-nav a:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: var(--primary);
  border: none;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.menu-toggle:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.site-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--gap-lg) var(--gap-md);
}

.three-column-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-width);
  gap: var(--gap-lg);
  align-items: start;
}

/* ============================================
   GAME HERO SECTION
   ============================================ */
.game-hero {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-light) 100%);
  border-radius: 20px;
  padding: var(--gap-lg);
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--border);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease;
}

.game-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 51, 102, 0.1) 0%, transparent 70%);
  animation: rotate 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.game-title-section {
  text-align: center;
  margin-bottom: var(--gap-md);
  position: relative;
  z-index: 1;
}

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  padding: 16px 48px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 51, 102, 0.4);
  transition: all 0.3s ease;
  margin: var(--gap-sm) 0;
}

.play-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 51, 102, 0.6);
}

.play-button:active {
  transform: translateY(-1px);
}

.play-button::before {
  content: '▶';
  font-size: 1.1em;
}

/* Enhanced 3D Play Now Button */
.play-button-3d {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FF3366 0%, #FF6B9D 50%, #00D9FF 100%);
  color: white;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  padding: 20px 60px;
  border: none;
  border-radius: 60px;
  cursor: pointer;
  box-shadow: 
    0 8px 25px rgba(255, 51, 102, 0.5),
    0 15px 40px rgba(0, 217, 255, 0.3),
    inset 0 -3px 10px rgba(0, 0, 0, 0.2),
    inset 0 3px 10px rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  margin: var(--gap-md) 0;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 3px;
  z-index: 1;
  animation: pulse-glow 2s ease-in-out infinite;
}

.play-button-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.play-button-3d:hover::before {
  left: 100%;
}

.play-button-3d:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 
    0 12px 35px rgba(255, 51, 102, 0.7),
    0 20px 50px rgba(0, 217, 255, 0.5),
    inset 0 -3px 10px rgba(0, 0, 0, 0.2),
    inset 0 3px 10px rgba(255, 255, 255, 0.4);
}

.play-button-3d:active {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 6px 20px rgba(255, 51, 102, 0.6),
    0 10px 30px rgba(0, 217, 255, 0.4),
    inset 0 -2px 8px rgba(0, 0, 0, 0.3),
    inset 0 2px 8px rgba(255, 255, 255, 0.2);
}

.button-text {
  position: relative;
  z-index: 2;
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 255, 255, 0.5);
}

.button-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 60px;
}

.play-button-3d:hover .button-glow {
  opacity: 1;
  animation: glow-pulse 1.5s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.15);
  }
}

@keyframes glow-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.8;
  }
}

/* Fullscreen Fix - ChatGPT Solution */
:fullscreen #game-container,
:-webkit-full-screen #game-container,
:-moz-full-screen #game-container,
:-ms-fullscreen #game-container {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #000;
    border-radius: 0 !important;
}

/* Force wrapper to fill screen */
:fullscreen .game-wrapper,
:-webkit-full-screen .game-wrapper,
:-moz-full-screen .game-wrapper,
:-ms-fullscreen .game-wrapper {
    padding-bottom: 0 !important;
    height: 100vh !important;
    width: 100vw !important;
    position: relative !important;
}

/* Force iframe to fill completely */
:fullscreen .game-iframe,
:-webkit-full-screen .game-iframe,
:-moz-full-screen .game-iframe,
:-ms-fullscreen .game-iframe {
    width: 100vw !important;
    height: 100vh !important;
    border: none;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* Prevent body scroll in fullscreen */
body.fullscreen-active {
    overflow: hidden !important;
}

/* Game Container */
.game-container {
  position: relative;
  background: #000;
  border-radius: 12px;
  overflow: visible;
  box-shadow: var(--shadow-lg);
  margin: var(--gap-md) auto;
}

.game-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* Default 4:3 aspect ratio */
  overflow: hidden;
  border-radius: 12px;
}

.game-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.game-controls {
  display: flex;
  gap: var(--gap-sm);
  justify-content: center;
  margin-top: var(--gap-md);
  flex-wrap: wrap;
}

.game-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-light);
  color: var(--text-primary);
  padding: 12px 24px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.game-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.game-btn.fullscreen-btn {
  background: var(--secondary);
  color: var(--bg-main);
  border-color: var(--secondary);
}

.game-btn.fullscreen-btn:hover {
  background: #00B8D4;
  border-color: #00B8D4;
}

.mobile-warning {
  display: none;
  text-align: center;
  padding: var(--gap-lg);
  background: linear-gradient(135deg, rgba(255, 149, 0, 0.2), rgba(255, 51, 102, 0.2));
  border: 2px solid var(--warning);
  border-radius: 12px;
  color: var(--text-primary);
}

.mobile-warning-icon {
  font-size: 3rem;
  margin-bottom: var(--gap-sm);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: var(--gap-md);
  margin-bottom: var(--gap-md);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.6s ease;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: var(--gap-md);
  padding-bottom: var(--gap-sm);
  border-bottom: 2px solid var(--border);
}

.similar-games-list {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

.game-item {
  display: flex;
  gap: var(--gap-sm);
  padding: var(--gap-sm);
  background: var(--bg-light);
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.game-item:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateX(5px);
}

.game-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.game-info h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

/* Ad Container */
.ad-container {
  background: var(--bg-light);
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: var(--gap-md);
  text-align: center;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 120px;
}

.sidebar-widget + .sidebar-widget {
  margin-top: var(--gap-lg);
}

/* ============================================
   RELATED GAMES GRID
   ============================================ */
.related-games-section {
  margin: var(--gap-xl) 0;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.section-header {
  text-align: center;
  margin-bottom: var(--gap-lg);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: var(--gap-sm);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--gap-md);
}

.game-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 51, 102, 0.1), rgba(0, 217, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

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

.game-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.game-card-content {
  padding: var(--gap-sm);
}

.game-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.game-card-meta {
  display: flex;
  gap: var(--gap-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.play-count::before {
  content: '▶ ';
  color: var(--success);
}

/* ============================================
   ARTICLE SECTION
   ============================================ */
.article-section {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: var(--gap-lg);
  margin: var(--gap-xl) 0;
  box-shadow: var(--shadow-md);
  animation: fadeInUp 1s ease 0.4s backwards;
  position: relative;
  overflow: visible;
  z-index: 1;
}

.article-content h2 {
  color: var(--primary);
  margin-top: var(--gap-lg);
  margin-bottom: var(--gap-md);
  padding-bottom: var(--gap-sm);
  border-bottom: 2px solid var(--border);
}

.article-content h3 {
  color: var(--secondary);
  margin-top: var(--gap-md);
  margin-bottom: var(--gap-sm);
}

.article-content p {
  margin-bottom: var(--gap-md);
  line-height: 1.8;
}

.article-content ul, .article-content ol {
  margin-left: var(--gap-md);
  margin-bottom: var(--gap-md);
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: var(--gap-xs);
  line-height: 1.7;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--bg-card);
  border-top: 2px solid var(--border);
  margin-top: var(--gap-xl);
  padding: var(--gap-xl) 0 var(--gap-md);
}

.footer-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gap-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap-lg);
  margin-bottom: var(--gap-lg);
}

.footer-widget h3 {
  font-family: var(--font-display);
  color: var(--primary);
  margin-bottom: var(--gap-md);
}

.footer-menu {
  list-style: none;
}

.footer-menu li {
  margin-bottom: var(--gap-xs);
}

.footer-menu a {
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.footer-menu a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: var(--gap-md);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
  .three-column-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: relative;
    top: 0;
  }
  
  .left-sidebar {
    order: 2;
  }
  
  .main-content {
    order: 1;
  }
  
  .right-sidebar {
    order: 3;
  }
}

@media (max-width: 768px) {
  :root {
    --gap-lg: 24px;
    --gap-xl: 32px;
  }
  
  .header-container {
    padding: var(--gap-sm);
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 2px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  
  .main-nav.active {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }
  
  .main-nav a {
    display: block;
    padding: var(--gap-sm) var(--gap-md);
    border-bottom: 1px solid var(--border);
  }
  
  .site-container {
    padding: var(--gap-md) var(--gap-sm);
  }
  
  .game-hero {
    padding: var(--gap-md);
  }
  
  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--gap-sm);
  }
  
  .article-section {
    padding: var(--gap-md);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .play-button {
    font-size: 1rem;
    padding: 14px 32px;
  }
  
  .game-controls {
    flex-direction: column;
  }
  
  .game-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.mt-lg { margin-top: var(--gap-lg); }
.mb-lg { margin-bottom: var(--gap-lg); }
.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
