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

:root {
  --primary: #8b5cf6;
  --primary-glow: rgba(139, 92, 246, 0.5);
  --secondary: #7c3aed;
  --accent: #c4b5fd;
  --accent-glow: rgba(196, 181, 253, 0.3);
  --bg-from: #0d0221;
  --bg-via: #1e0a3a;
  --bg-to: #080114;
  --card-bg: rgba(30, 10, 58, 0.7);
  --card-border: rgba(139, 92, 246, 0.25);
  --text: #ffffff;
  --text-dim: #a0a0a0;
  --radius: 8px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 400;
  background: linear-gradient(135deg, var(--bg-from) 0%, var(--bg-via) 50%, var(--bg-to) 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.2; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: inherit; }
img { max-width: 100%; display: block; }

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

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 2, 33, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.nav-links a {
  transition: color 0.2s ease-in-out;
}

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

.age-badge {
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
}

.mobile-menu-btn {
  display: none;
  background: none;
  color: var(--text);
  font-size: 1.5rem;
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  background-image: url('https://images.unsplash.com/photo-1596838132731-3301c3fd4317?w=1920');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 2, 33, 0.95), rgba(30, 10, 58, 0.85));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 50%;
  padding: 3rem 0;
}

.hero-badge {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-size: 2rem;
  font-weight: 700;
  border: 2px solid var(--accent);
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero p {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.btn {
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  border: 2px solid var(--primary);
}

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

.btn-primary:hover {
  transform: scale(1.01);
  box-shadow: 0 0 20px var(--primary-glow);
}

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

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.01);
}

.hero-disclaimer {
  font-size: 0.875rem;
  color: var(--text-dim);
}

/* Sections */
section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-dim);
}

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

.game-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.game-card:hover {
  transform: scale(1.01);
  border-color: var(--primary);
}

.game-image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-via), var(--bg-from));
}

.game-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-image-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--accent);
  text-align: center;
  padding: 1rem;
}

.game-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem 0.5rem;
}

.game-category {
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-title {
  padding: 0 1rem;
  font-size: 1.125rem;
}

.play-demo-btn {
  margin: 1rem;
  padding: 0.75rem;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  font-weight: 600;
  transition: all 0.2s ease-in-out;
  width: calc(100% - 2rem);
}

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

/* Game Modal */
.game-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.game-modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 1400px;
  height: 90vh;
  background: var(--bg-via);
  border-radius: var(--radius);
  border: 2px solid var(--primary);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--card-border);
}

.modal-header h2 {
  font-size: 1.5rem;
}

.close-btn {
  background: none;
  color: var(--text);
  font-size: 2rem;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease-in-out;
}

.close-btn:hover {
  color: var(--primary);
}

#game-iframe {
  flex: 1;
  border: none;
  width: 100%;
}

.demo-unavailable {
  flex: 1;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-dim);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: all 0.2s ease-in-out;
}

.feature-card:hover {
  transform: scale(1.01);
  border-color: var(--primary);
}

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

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-dim);
}

/* Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.step {
  text-align: center;
}

.step-number {
  width: 60px;
  height: 60px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

/* Responsible Gaming */
.responsible-gaming {
  background: var(--card-bg);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
}

.responsible-gaming-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.responsible-gaming p {
  max-width: 800px;
  margin: 1rem auto;
  color: var(--text-dim);
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.5rem;
  background: none;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s ease-in-out;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-in-out, padding 0.2s ease-in-out;
  color: var(--text-dim);
}

.faq-item.active .faq-answer {
  padding: 0 1.5rem 1.5rem;
  max-height: 500px;
}

/* Age Verification Modal */
.age-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(0, 0, 0, 0.98);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.age-modal.active {
  display: flex;
}

.age-modal-content {
  background: var(--bg-via);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 3rem;
  max-width: 500px;
  text-align: center;
}

.age-modal-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.age-modal h2 {
  margin-bottom: 1rem;
}

.age-modal p {
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.age-modal-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Footer */
footer {
  background: var(--bg-from);
  border-top: 1px solid var(--card-border);
  padding: 3rem 0 1rem;
}

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

.footer-section h3 {
  margin-bottom: 1rem;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-dim);
  transition: color 0.2s ease-in-out;
}

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

.footer-disclaimer {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.footer-disclaimer .age-badge {
  font-size: 1.5rem;
  padding: 0.5rem 1.5rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--card-border);
  color: var(--text-dim);
}

/* Category Filters */
.category-filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  transition: all 0.2s ease-in-out;
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Page Content */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 20px;
}

.page-content h1 {
  margin-bottom: 2rem;
}

.page-content h2 {
  margin: 2rem 0 1rem;
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 250px;
    height: calc(100vh - 70px);
    background: var(--bg-via);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    transition: right 0.2s ease-in-out;
    border-left: 1px solid var(--card-border);
  }

  .nav-links.active {
    right: 0;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    min-height: 80vh;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-badge {
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
  }

  .cta-buttons {
    flex-direction: column;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    height: 80vh;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

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

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