/* 
 * Kontext LoRA Art - Gaming Website CSS
 * Theme: Dark Theme with Sky Blue Accents
 * Optimized for AdSense compliance and performance
 */

/* CSS Variables - Dark Theme with Sky Blue */
:root {
  /* Primary Colors */
  --primary: #0ea5e9;        /* Sky Blue */
  --primary-dark: #0284c7;   /* Darker Sky Blue */
  --primary-light: #38bdf8;  /* Light Sky Blue */
  
  /* Dark Theme Base */
  --background: #111827;     /* Dark Background */
  --surface: #1f2937;       /* Card Background */
  --surface-light: #374151; /* Light Surface */
  --text: #f9fafb;          /* Light Text */
  --text-secondary: #d1d5db; /* Secondary Text */
  --text-muted: #9ca3af;    /* Muted Text */
  
  /* Accent Colors */
  --accent: #0369a1;        /* Dark Sky Blue */
  --success: #10b981;       /* Green */
  --warning: #f59e0b;       /* Amber */
  --error: #ef4444;         /* Red */
  
  /* Borders and Shadows */
  --border: #374151;
  --shadow: rgba(0, 0, 0, 0.3);
  --glow: rgba(14, 165, 233, 0.3);
  
  /* Typography */
  --font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
  --font-mono: 'Fira Code', 'Monaco', monospace;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
  background-image: 
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.05) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography Scale */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--primary);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text);
}

h4 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--text-secondary);
}

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

a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Container and Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Flexbox Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.space-between {
  justify-content: space-between;
}

/* Header Styles */
.site-header {
  background: rgba(31, 41, 55, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: var(--spacing-md) 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
}

.nav-menu a {
  color: var(--text);
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.nav-menu a:hover {
  background: var(--surface);
  color: var(--primary);
  text-decoration: none;
}

/* Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-sm) var(--spacing-lg);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  min-height: 44px; /* Touch target */
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
  color: white;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Card Styles */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--shadow);
  border-color: var(--primary);
}

.card-header {
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

.card-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Game Card Specific Styles */
.game-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--shadow);
  border-color: var(--primary);
}

.game-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--surface-light);
}

.game-card-content {
  padding: var(--spacing-md);
}

.game-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text);
}

.game-card-category {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

.game-card-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: var(--spacing-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Game Page Styles */
.game-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 1px solid var(--border);
  margin-bottom: var(--spacing-xl);
}

.game-iframe {
  width: 100%;
  border: none;
  border-radius: var(--radius-md);
  background: #000;
}

.game-controls {
  display: flex;
  gap: var(--spacing-md);
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
}

/* Breadcrumb Styles */
.breadcrumb {
  margin-bottom: var(--spacing-lg);
}

.breadcrumb ol {
  display: flex;
  list-style: none;
  gap: var(--spacing-sm);
  align-items: center;
}

.breadcrumb li {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.breadcrumb li:not(:last-child)::after {
  content: '>';
  margin-left: var(--spacing-sm);
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

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

/* Section Styles */
.section {
  padding: var(--spacing-2xl) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto var(--spacing-2xl);
}

/* Hero Section */
.hero {
  padding: var(--spacing-2xl) 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(3, 105, 161, 0.05));
  border-radius: var(--radius-xl);
  margin-bottom: var(--spacing-2xl);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-2xl);
  align-items: center;
  min-height: 600px;
}

.hero-text {
  text-align: left;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: var(--spacing-lg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xl);
  line-height: 1.7;
}

.hero-game {
  display: flex;
  justify-content: center;
  align-items: center;
}

.featured-game-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: 0 10px 25px var(--shadow);
  border: 1px solid var(--border);
  text-align: center;
  max-width: 450px;
  width: 100%;
}

.featured-game-title {
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  font-weight: 600;
}

.game-iframe-container {
  background: #000;
  border-radius: var(--radius-md);
  margin: var(--spacing-md) 0;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.game-iframe-container iframe {
  width: 100%;
  height: 500px;
  border: none;
  display: block;
}

.game-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: var(--spacing-md) 0;
  line-height: 1.5;
}

.game-actions {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* Footer Styles */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--spacing-2xl) 0 var(--spacing-lg);
  margin-top: var(--spacing-2xl);
}

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

.footer-section h4 {
  color: var(--primary);
  margin-bottom: var(--spacing-md);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: var(--spacing-sm);
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    min-height: auto;
  }
  
  .hero-text {
    text-align: center;
    order: 1;
  }
  
  .hero-game {
    order: 2;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .featured-game-container {
    max-width: 100%;
  }
  
  .game-iframe-container iframe {
    height: 400px;
  }
  
  .nav-menu {
    display: none; /* Mobile menu would go here */
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .header-content {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .game-controls {
    flex-direction: column;
  }
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* AdSense Optimization */
.ad-container {
  margin: var(--spacing-xl) 0;
  text-align: center;
}

.ad-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles for Keyboard Navigation */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --border: #ffffff;
    --text: #ffffff;
    --background: #000000;
    --surface: #1a1a1a;
  }
}