/* AstroGames Early 2000s Background System */

/* Early 2000s Background System - NO CSS CUSTOM PROPERTIES */
/* Using direct color values for early 2000s compatibility */

/* Base Body Background - Clean Early 2000s Style (NO CSS3) */
body {
  background: #F5F5F5;
  background-attachment: fixed;
}

/* Alternative body backgrounds for different pages */
body.page-home {
  background: #F5F5F5;
}

body.page-games {
  background: #FFFFFF;
}

body.page-user {
  background: #E8E8E8;
}

body.page-legal {
  background: #FAFAFA;
}

/* Header Background System - Early 2000s Compatible */
.site-header {
  background: #FFFFFF;
  position: relative;
}

/* Hero Section Background - Early 2000s Compatible */
.hero-section {
  background: #F8F8F8;
  position: relative;
}

/* Content Section Backgrounds */
.main-content {
  background: var(--bg-gradient-content);
  background-attachment: local;
  position: relative;
}

.main-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pattern-diagonal);
  background-size: var(--pattern-size-large);
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
}

/* Section-specific Backgrounds */
.featured-games {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  position: relative;
  margin: var(--space-4) 0;
  padding: var(--space-6) 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-simple) var(--shadow-light);
}

.game-categories {
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  position: relative;
  margin: var(--space-4) 0;
  padding: var(--space-6) 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-simple) var(--shadow-light);
}

.recent-games {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  position: relative;
  margin: var(--space-4) 0;
  padding: var(--space-6) 0;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-simple) var(--shadow-light);
}

/* Footer Background */
.site-footer {
  background: var(--bg-gradient-footer);
  background-size: 100% 100%;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pattern-dots);
  background-size: var(--pattern-size-small);
  opacity: 0.2;
  pointer-events: none;
}

/* Card and Component Backgrounds */
.card,
.game-card,
.category-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
  position: relative;
}

.card::before,
.game-card::before,
.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pattern-dots);
  background-size: 8px 8px;
  opacity: 0.05;
  pointer-events: none;
  border-radius: inherit;
}

/* Navigation Background Enhancement */
.main-navigation {
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(248,248,248,0.95) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Form Backgrounds */
.form-input,
.form-textarea,
.form-select {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F8F8 100%);
}

/* Button Background Enhancements */
.btn-primary {
  background: linear-gradient(180deg, var(--btn-primary) 0%, #0055AA 100%);
  position: relative;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  border-radius: inherit;
  pointer-events: none;
}

.btn-secondary {
  background: linear-gradient(180deg, #F0F0F0 0%, #D0D0D0 100%);
  position: relative;
}

.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
  border-radius: inherit;
  pointer-events: none;
}

/* Ad Container Backgrounds */
.ad-container {
  background: linear-gradient(180deg, #F8F8F8 0%, #EEEEEE 100%);
  position: relative;
}

.ad-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pattern-dots);
  background-size: 6px 6px;
  opacity: 0.1;
  pointer-events: none;
}

/* Responsive Background Adjustments */
@media (max-width: 768px) {
  /* Simplify backgrounds on mobile for performance */
  body {
    background: var(--bg-primary);
    background-attachment: scroll;
  }
  
  .site-header::before,
  .hero-section::before,
  .main-content::before,
  .site-footer::before {
    display: none;
  }
  
  .featured-games,
  .game-categories,
  .recent-games {
    background: rgba(255,255,255,0.9);
  }
  
  .main-navigation {
    background: var(--bg-secondary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (max-width: 480px) {
  /* Further simplification for small screens */
  .card::before,
  .game-card::before,
  .category-card::before,
  .ad-container::before {
    display: none;
  }
  
  .featured-games,
  .game-categories,
  .recent-games {
    background: var(--bg-secondary);
    margin: var(--space-2) 0;
    padding: var(--space-4) 0;
  }
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
  body,
  .site-header,
  .hero-section,
  .main-content,
  .site-footer {
    background: #FFFFFF;
  }
  
  .featured-games,
  .game-categories,
  .recent-games {
    background: #FFFFFF;
    border: 2px solid #000000;
  }
  
  .card,
  .game-card,
  .category-card {
    background: #FFFFFF;
    border: 1px solid #000000;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  body {
    background-attachment: scroll;
  }
  
  .main-navigation {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* Print styles - remove all backgrounds */
@media print {
  body,
  .site-header,
  .hero-section,
  .main-content,
  .site-footer,
  .featured-games,
  .game-categories,
  .recent-games,
  .card,
  .game-card,
  .category-card,
  .ad-container {
    background: white !important;
  }
  
  .site-header::before,
  .hero-section::before,
  .main-content::before,
  .site-footer::before,
  .card::before,
  .game-card::before,
  .category-card::before,
  .ad-container::before {
    display: none !important;
  }
}

/* Utility Classes for Background Control */
.bg-transparent {
  background: transparent !important;
}

.bg-pattern-dots {
  background-image: var(--pattern-dots);
  background-size: var(--pattern-size-small);
}

.bg-pattern-grid {
  background-image: var(--pattern-grid);
  background-size: var(--pattern-size-medium);
}

.bg-pattern-diagonal {
  background-image: var(--pattern-diagonal);
  background-size: var(--pattern-size-large);
}

.bg-gradient-primary {
  background: var(--bg-gradient-primary);
}

.bg-gradient-secondary {
  background: var(--bg-gradient-secondary);
}

.bg-gradient-tertiary {
  background: var(--bg-gradient-tertiary);
}

/* Background attachment utilities */
.bg-fixed {
  background-attachment: fixed;
}

.bg-scroll {
  background-attachment: scroll;
}

.bg-local {
  background-attachment: local;
}

/* Background size utilities */
.bg-cover {
  background-size: cover;
}

.bg-contain {
  background-size: contain;
}

.bg-full {
  background-size: 100% 100%;
}

/* Background position utilities */
.bg-center {
  background-position: center;
}

.bg-top {
  background-position: top;
}

.bg-bottom {
  background-position: bottom;
}

.bg-left {
  background-position: left;
}

.bg-right {
  background-position: right;
}
/* Ad
ditional Integration Styles for Early 2000s Background System */

/* Enhanced section backgrounds with better integration */
.auth-section,
.legal-section,
.profile-section {
  background: linear-gradient(135deg, rgba(248,248,248,0.95) 0%, rgba(240,240,240,0.95) 100%);
  position: relative;
  padding: var(--space-6) 0;
  margin: var(--space-4) 0;
}

.auth-section::before,
.legal-section::before,
.profile-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pattern-dots);
  background-size: 12px 12px;
  opacity: 0.1;
  pointer-events: none;
}

/* Enhanced form backgrounds */
.auth-form,
.legal-content {
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(250,250,250,0.9) 100%);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-6);
  position: relative;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.auth-form::before,
.legal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pattern-grid);
  background-size: 16px 16px;
  opacity: 0.05;
  pointer-events: none;
  border-radius: inherit;
}

/* Profile-specific backgrounds */
.profile-header {
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(245,245,245,0.9) 100%);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  position: relative;
}

.stats-section,
.favorites-section,
.activity-section,
.settings-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(248,248,248,0.8) 100%);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  position: relative;
}

/* Stat cards with subtle backgrounds */
.stat-card,
.value-card,
.role-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(250,250,250,0.9) 100%);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-3);
  position: relative;
}

.stat-card::before,
.value-card::before,
.role-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pattern-dots);
  background-size: 6px 6px;
  opacity: 0.05;
  pointer-events: none;
  border-radius: inherit;
}

/* Enhanced navigation backgrounds */
.nav-link,
.mobile-nav-link {
  background: linear-gradient(180deg, rgba(240,240,240,0.9) 0%, rgba(220,220,220,0.9) 100%);
  position: relative;
}

.nav-link::before,
.mobile-nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-fast) ease;
}

.nav-link:hover::before,
.mobile-nav-link:hover::before {
  opacity: 1;
}

/* Loading indicators with background integration */
.loading-indicator {
  background: linear-gradient(135deg, rgba(248,248,248,0.95) 0%, rgba(240,240,240,0.95) 100%);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-4);
  text-align: center;
  position: relative;
}

.loading-indicator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pattern-diagonal);
  background-size: 8px 8px;
  opacity: 0.1;
  pointer-events: none;
  border-radius: inherit;
}

/* Enhanced table backgrounds for legal content */
table {
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(250,250,250,0.9) 100%);
  border: var(--border-width) solid var(--border-color);
}

th {
  background: linear-gradient(180deg, rgba(240,240,240,0.9) 0%, rgba(230,230,230,0.9) 100%);
}

tr:nth-child(even) {
  background: linear-gradient(180deg, rgba(248,248,248,0.5) 0%, rgba(245,245,245,0.5) 100%);
}

/* Enhanced blockquote styling */
blockquote {
  background: linear-gradient(180deg, rgba(245,245,245,0.8) 0%, rgba(240,240,240,0.8) 100%);
  border-left: 4px solid var(--color-secondary);
  padding: var(--space-3);
  margin: var(--space-4) 0;
  position: relative;
}

blockquote::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pattern-dots);
  background-size: 8px 8px;
  opacity: 0.05;
  pointer-events: none;
}

/* Enhanced code blocks */
pre {
  background: linear-gradient(180deg, rgba(240,240,240,0.9) 0%, rgba(235,235,235,0.9) 100%);
  position: relative;
}

pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pattern-grid);
  background-size: 10px 10px;
  opacity: 0.05;
  pointer-events: none;
  border-radius: inherit;
}

/* Responsive background optimizations for smaller screens */
@media (max-width: 480px) {
  .auth-section::before,
  .legal-section::before,
  .profile-section::before,
  .auth-form::before,
  .legal-content::before,
  .stat-card::before,
  .value-card::before,
  .role-card::before,
  .loading-indicator::before,
  blockquote::before,
  pre::before {
    display: none;
  }
  
  .auth-section,
  .legal-section,
  .profile-section {
    background: rgba(255,255,255,0.95);
  }
  
  .auth-form,
  .legal-content,
  .profile-header,
  .stats-section,
  .favorites-section,
  .activity-section,
  .settings-section {
    background: rgba(255,255,255,0.9);
  }
}

/* Dark mode compatibility (if needed in future) */
@media (prefers-color-scheme: dark) {
  /* Keep light backgrounds for early 2000s authenticity */
  /* These styles maintain the early 2000s aesthetic regardless of system preference */
}

/* Focus states with background integration */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F8F8 100%);
  box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2), 0 1px 3px var(--shadow-light);
}

/* Enhanced hover states for interactive elements */
.game-card:hover,
.category-card:hover,
.stat-card:hover {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F8F8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px var(--shadow-medium);
}

/* Subtle animation for background patterns */
@keyframes subtlePattern {
  0% { opacity: 0.05; }
  50% { opacity: 0.1; }
  100% { opacity: 0.05; }
}

.hero-section::before {
  animation: subtlePattern 8s ease-in-out infinite;
}

/* Enhanced focus indicators that work with backgrounds */
*:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
  background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(248,248,248,0.9) 100%);
}