:root {
  --bg-dark: #0f172a;
  --bg-darker: #020617;
  --bg-card: rgba(30, 41, 59, 0.7);
  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --accent: #ec4899;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-darker);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  background-image: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 400px),
                    radial-gradient(circle at bottom left, rgba(236, 72, 153, 0.15), transparent 400px);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover, nav a.active {
  color: var(--text-main);
}

.btn {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

/* Hero Section */
.hero {
  padding: 6rem 5%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero h1 {
  font-size: 4rem;
  line-height: 1.1;
  max-width: 800px;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
}

.hero-badges {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Games Grid */
.games-section {
  padding: 4rem 5%;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.game-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  position: relative;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  border-color: rgba(99, 102, 241, 0.5);
}

.game-thumbnail {
  width: 100%;
  height: 200px;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.game-thumbnail::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--bg-card));
  opacity: 0.8;
}

.game-card:hover .game-thumbnail i {
  transform: scale(1.2);
}

.game-thumbnail i {
  transition: transform 0.4s ease;
  z-index: 1;
}

.game-info {
  padding: 1.5rem;
}

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

.game-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.play-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.play-link i {
  transition: transform 0.3s ease;
}

.game-card:hover .play-link i {
  transform: translateX(5px);
}

/* Game Player Modal */
.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.game-modal.active {
  opacity: 1;
  pointer-events: auto;
}

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

.modal-title {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.close-modal {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--accent);
}

.modal-body {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.game-container {
  width: 100%;
  max-width: 1000px;
  height: 80vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  background: #000;
  position: relative;
}

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

/* Footer */
footer {
  padding: 3rem 5%;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  margin-top: 4rem;
  color: var(--text-muted);
}

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

.animate-up {
  animation: fadeIn 0.8s ease forwards;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  color: var(--text-main);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-wrap: wrap;
    padding: 1rem 5%;
  }
  .mobile-toggle {
    display: block;
  }
  .header-actions {
    display: none;
  }
  nav {
    display: none;
    width: 100%;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--glass-border);
  }
  nav.active {
    display: block;
    animation: fadeIn 0.3s ease;
  }
  nav ul {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .hero {
    padding: 4rem 5%;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .hero-badges {
    flex-direction: column;
    align-items: center;
  }
  .games-grid {
    grid-template-columns: 1fr;
  }
  .game-container {
    height: 60vh;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  .footer-links {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }
  .category-header h1 {
    font-size: 2.5rem;
  }
  .about-header h1 {
    font-size: 2.5rem;
  }
}
