/* =========================================== */
/*     GAME PORTAL - NEON CYBER THEME          */
/* =========================================== */

/* 1. CSS VARIABLES - Neon Cyber Design Tokens */
:root {
  /* Primary Color Palette */
  --color-primary: #6C5DD3;         /* Purple from image */
  --color-primary-hover: #5a4cb4;   
  --color-secondary: #FF754C;       /* Orange/Coral accent */
  --color-accent: #3F8CFF;          /* Blue accent */
  --color-warning: #ffc107;
  --color-error: #dc3545;
  --color-success: #28a745;

  /* Background Colors */
  --color-bg-primary: #F5F6FA;       /* Light gray/blue background */
  --color-bg-secondary: #ffffff;     /* White secondary */
  --color-bg-tertiary: #e4e4e4;      
  --color-bg-card: #ffffff;          
  
  /* Text Colors */
  --color-text-primary: #11142D;
  --color-text-secondary: #808191;
  --color-text-muted: #B2B3BD;
  --color-border: #E4E4E4;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6C5DD3 0%, #8B7BF7 100%);
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Spacing System */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(228, 228, 228, 0.5);
  --shadow-md: 0 10px 40px rgba(228, 228, 228, 0.5);
  --shadow-lg: 0 16px 60px rgba(228, 228, 228, 0.5);
  --shadow-xl: 0 20px 80px rgba(228, 228, 228, 0.5);
  --shadow-2xl: 0 30px 100px rgba(228, 228, 228, 0.5);
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Layout */
  --container-width: 1600px;
  --container-padding: 40px;
  --header-height: 90px;
  --sidebar-width: 280px;
}

/* 2. BASE STYLES - Reset and Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}
/* 3. LAYOUT COMPONENTS */
.container {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 var(--container-padding);
}

/* 4. HEADER STYLES */
.header {
  background: var(--color-bg-secondary);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  flex-shrink: 0; /* Prevent header from shrinking */
}

/* Main Content Area */
.main-content {
  padding:  0;
  overflow-y: auto; /* Internal scrolling */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE 10+ */
}

.main-content::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Footer Area */
.footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
}

/* Sidebar Override Styles (to be more specific than navigation.css) */
.tags-sidebar {
  /* Revert to fixed sidebar */
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 380px !important;
  height: 100vh !important;
  transform: translateX(-100%) !important; /* hidden by default */
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border-right: 1px solid var(--color-border) !important;
  padding: 0 !important;
  z-index: 3000 !important;
  box-shadow: var(--shadow-xl) !important;
  transition: transform 0.3s ease-in-out !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.tags-sidebar.active {
  transform: translateX(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Restore Sidebar Overlay and Close Button */
.sidebar-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.4) !important;
  z-index: 2500 !important;
  display: block !important;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sidebar-close {
  display: flex !important;
}

.tags-toggle {
  display: flex !important; /* Ensure toggle is visible */
}

.menu-toggle {
  display: none !important; /* Keep mobile menu toggle hidden on desktop if using sidebar toggle */
}

/* Adjust Sidebar Inner Content */
.sidebar-content {
  padding: 24px !important;
  height: 100%;
  overflow-y: auto;
}

.sidebar-header {
  padding: 24px 24px 0 !important;
  background: transparent !important;
  border: none !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
}

/* Mobile specific sidebar sizing and positioning */
@media (max-width: 768px) {
  .tags-sidebar {
    width: 85vw !important;
    /* transform already handles hidden state */
  }
}

.sidebar-close {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-close:hover {
  background: var(--color-error);
  border-color: var(--color-error);
  color: white;
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.sidebar-header h3 {
  font-size: 1.2rem !important;
  color: var(--color-text-primary) !important;
  margin-bottom: 0 !important;
  font-weight: 700;
}

/* 5. HERO SECTION - White Theme */
.hero {
  text-align: center;
  padding: 20px 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--header-height);
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  color: var(--color-text-primary);
  position: relative;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  animation: fadeInUp 0.8s ease-out;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--color-text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* 6. FOOTER STYLES - White Theme */
.footer {
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  padding: var(--spacing-2xl) 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-primary);
  position: relative;
}

.footer-links {
  margin-top: var(--spacing-md);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.footer-link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: all var(--transition-normal);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
}

.footer-link:hover {
  color: var(--color-primary-hover);
  transform: translateY(-1px);
}

.footer-separator {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.footer p {
  color: var(--color-text-secondary);
}

/* 7. BACK TO TOP BUTTON - White Theme */
.back-to-top {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  background: var(--color-bg-primary);
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-full);
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-md);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  font-weight: 600;
}

.back-to-top:hover {
  background: var(--color-primary-hover);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.back-to-top.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

/* 8. RESPONSIVE DESIGN */
@media (max-width: 768px) {
  :root {
    --container-padding: 12px;
    --header-height: 60px;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.25rem;
    --spacing-2xl: 1.5rem;
    --spacing-3xl: 2rem;
  }
  
  .container {
    padding: 0 var(--container-padding);
  }
  
  .hero {
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--header-height);
  }
  
  .hero h1 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
  }
  
  .hero p {
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-lg);
  }
  
  .back-to-top {
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 40px;
    height: 40px;
  }

  .footer {
    padding: var(--spacing-xl) 0;
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 8px;
    --spacing-xs: 0.15rem;
    --spacing-sm: 0.35rem;
  }
  
  .hero h1 {
    font-size: var(--font-size-xl);
  }
  
  .footer {
    padding: var(--spacing-lg) 0;
  }
}
