/* Main CSS for Kontext LoRa Gaming Hub */

:root {
  /* Primary Colors - Purple Blue Theme */
  --primary: #667eea;
  --primary-dark: #5a67d8;
  --primary-light: #7c3aed;
  
  /* Secondary Colors */
  --secondary: #718096;
  --secondary-light: #a0aec0;
  
  /* Accent Colors */
  --accent: #38b2ac;
  --accent-dark: #319795;
  
  /* Background Colors */
  --bg-primary: #f7fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #edf2f7;
  
  /* Text Colors */
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  
  /* Status Colors */
  --success: #38a169;
  --warning: #d69e2e;
  --error: #e53e3e;
  --info: #3182ce;
  
  /* Border & Shadows */
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-lg: rgba(0, 0, 0, 0.15);
}

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

/* Base Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

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

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

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background-color: var(--bg-secondary);
  box-shadow: 0 2px 4px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

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

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.main-nav a {
  color: var(--text-primary);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  color: white;
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.95;
}

/* Featured Game */
.featured-game {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px var(--shadow);
}

.featured-game-container {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.game-iframe-wrapper {
  flex: 1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px var(--shadow);
  background: #000;
}

.game-iframe-wrapper iframe {
  width: 100%;
  height: 600px;
  border: none;
}

.featured-game-info {
  flex: 0 0 350px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1rem;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
  color: white;
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
  color: white;
}

.btn-accent {
  background-color: var(--accent);
  color: white;
}

.btn-accent:hover {
  background-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
  color: white;
}

/* Game Categories */
.categories {
  padding: 4rem 0;
  background-color: var(--bg-primary);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.category-card {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-lg);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Games Grid */
.games-section {
  padding: 4rem 0;
  background-color: var(--bg-tertiary);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.game-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow);
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-lg);
}

.game-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.game-card-content {
  padding: 1.5rem;
}

.game-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.game-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.game-category {
  display: inline-block;
  background-color: var(--primary-light);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Game Page */
.game-page {
  padding: 2rem 0;
}

.game-container {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px var(--shadow);
}

.game-frame {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.game-frame iframe {
  width: 100%;
  height: 600px;
  border: none;
}

.game-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.game-info {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  margin-top: 2rem;
}

.game-description {
  background-color: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1.5rem;
}

.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-section {
  background-color: var(--bg-tertiary);
  border-radius: 8px;
  padding: 1.5rem;
}

/* Blog Section */
.blog-section {
  padding: 4rem 0;
  background-color: var(--bg-primary);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.blog-card {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--shadow);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--shadow-lg);
}

.blog-card-content {
  padding: 1.5rem;
}

.blog-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background-color: var(--text-primary);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

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

.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
}

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

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  margin-bottom: 1rem;
}

.breadcrumb ol {
  display: flex;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumb li {
  color: var(--text-muted);
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin: 0 0.5rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .featured-game-container {
    flex-direction: column;
  }
  
  .featured-game-info {
    flex: 1;
    max-width: 100%;
  }
  
  .game-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .games-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .game-frame iframe {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .game-frame iframe {
    height: 300px;
  }
  
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

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

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

/* 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;
}