/* === CSS Custom Properties (Light theme default) === */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --accent-color: #ff6b35;
  --border-color: #e0e0e0;
  --card-bg: #ffffff;
}

/* Dark theme via data-theme attribute */
[data-theme="dark"] {
  --bg-primary: #121212;
  --bg-secondary: #1e1e1e;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --accent-color: #ff8c54;
  --border-color: #333333;
  --card-bg: #1e1e1e;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* === Header & Navigation === */
.site-header {
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-color);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

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

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-color);
}

/* === Dark Mode Toggle === */
#theme-toggle {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-primary);
}

.icon-sun, .icon-moon { display: inline-block; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

/* === Main Content === */
#content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* === Hero Section === */
.hero {
  text-align: center;
  padding: 3rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* === Game Cards Grid === */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.game-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.game-card h3 {
  padding: 1rem 1rem 0.25rem;
}

.game-card p {
  color: var(--text-secondary);
  padding: 0 1rem 1rem;
}

/* === Store Buy Buttons === */
.buy-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.buy-button {
  display: block;
  width: fit-content;
  min-width: 200px;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  transition: opacity 0.2s ease;
}

.buy-button:hover {
  opacity: 0.85;
}


/* === Footer === */
.site-footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin-top: 3rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  margin-bottom: 1rem;
}

.social-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.social-links a:hover {
  color: var(--accent-color);
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* === Featured Game Section === */
.featured-game {
  padding: 2rem 0;
}

.featured-game h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-links { gap: 1rem; }
  .hero h1 { font-size: 2rem; }
  .games-grid { grid-template-columns: 1fr; }
}
