﻿/* Base Reset & Variables */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a1f2e;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-gold: #f59e0b;
  --accent-green: #22c55e;
  --border-color: #2d3748;
  --radius: 12px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav {
  display: none;
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    gap: 32px;
  }
}

.nav a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover,
.nav a.active {
  color: var(--accent-gold);
}

.mobile-menu-btn {
  display: flex;
  padding: 8px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
}

@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-nav {
  display: none;
  padding: 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

.mobile-nav.active {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 48px 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.hero-text h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .hero-text h1 {
    font-size: 3.5rem;
  }
}

.hero-text h1 span {
  color: var(--accent-gold);
}

.hero-text p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 24px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-gold);
}

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

.featured-game {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.featured-badge {
  display: inline-block;
  background: var(--accent-gold);
  color: var(--bg-primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.featured-game-icon {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  margin: 0 auto 16px;
  object-fit: cover;
}

.featured-game h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.featured-game p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.featured-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.featured-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rating {
  color: var(--accent-gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #d97706;
}

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

.btn-outline:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

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

.btn-pill {
  border-radius: 20px;
}

/* Categories Section */
.section {
  padding: 48px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
}

.section-subtitle {
  color: var(--text-muted);
  margin-top: 4px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
}

.category-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-4px);
}

.category-icon {
  width: 56px;
  height: 56px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.5rem;
}

.category-card h3 {
  font-size: 1rem;
  font-weight: 600;
}

/* Games Grid */
.games-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-pill {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--bg-primary);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 640px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

@media (min-width: 1280px) {
  .games-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
}

.game-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-4px);
}

.game-card-image {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.game-card:hover .game-card-image img {
  transform: scale(1.05);
}

.game-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-hot {
  background: #ef4444;
  color: white;
}

.badge-new {
  background: var(--accent-green);
  color: white;
}

.game-card-content {
  padding: 16px;
}

.game-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.game-card-meta .rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-gold);
}

/* Features Section */
.features-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.75rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

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

/* Game Detail Page */
.game-detail-hero {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  padding: 48px 0;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

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

.game-detail-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .game-detail-header {
    flex-direction: row;
    align-items: flex-start;
  }
}

.game-detail-icon {
  width: 160px;
  height: 160px;
  border-radius: 24px;
  object-fit: cover;
  flex-shrink: 0;
}

.game-detail-info {
  flex: 1;
}

.game-detail-info h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.game-detail-info > p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.game-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.game-detail-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.game-detail-actions {
  display: flex;
  gap: 12px;
}

.game-content {
  padding: 48px 0;
}

.game-content-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 1024px) {
  .game-content-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.content-card h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.content-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.features-list li::before {
  content: '✓';
  color: var(--accent-green);
  font-weight: bold;
}

.how-to-play ol {
  list-style: none;
  counter-reset: step;
}

.how-to-play li {
  counter-increment: step;
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.how-to-play li::before {
  content: counter(step);
  width: 28px;
  height: 28px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  color: var(--text-secondary);
  padding-left: 0;
}

.download-card {
  position: sticky;
  top: 100px;
}

.download-card .btn {
  width: 100%;
  margin-bottom: 16px;
}

.download-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.download-info-item span {
  display: block;
}

.download-info-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.download-info-item .value {
  font-weight: 600;
}

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

.footer-grid {
  display: grid;
  gap: 32px;
  margin-bottom: 32px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand h3 {
  font-size: 1.25rem;
  color: var(--accent-gold);
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-section h4 {
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.2s;
}

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

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

/* 404 Page */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 16px;
}

.error-page h1 {
  font-size: 6rem;
  color: var(--accent-gold);
  line-height: 1;
}

.error-page h2 {
  font-size: 1.5rem;
  margin: 16px 0;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Utility Classes */
.text-gold {
  color: var(--accent-gold);
}

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

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

.hidden {
  display: none !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.3s ease-out;
}
