:root {
  --bg: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #1a1a26;
  --border: #2a2a3a;
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.4);
  --cyan: #06b6d4;
  --green: #10b981;
  --gradient: linear-gradient(135deg, #7c3aed 0%, #06b6d4 100%);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

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

.logo-icon {
  color: var(--accent-light);
  font-size: 0.9rem;
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 58, 237, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 50%),
    var(--bg);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4rem 1.5rem;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(124, 58, 237, 0.15);
  border: 1px solid rgba(124, 58, 237, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
}

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

/* Sections */
.section {
  padding: 6rem 0;
}

.section-dark {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 2.5rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: rgba(124, 58, 237, 0.2);
  color: var(--accent-light);
  border-color: var(--accent);
}

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

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(124, 58, 237, 0.5);
}

.game-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s;
}

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

.game-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.game-rating {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

.game-info {
  padding: 1.25rem;
}

.game-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

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

.game-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.game-price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-light);
}

.game-platforms {
  display: flex;
  gap: 0.35rem;
}

.platform-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  background: var(--bg-elevated);
  border-radius: 4px;
  color: var(--text-muted);
}

/* Genres */
.genres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.genre-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s;
  cursor: pointer;
}

.genre-card:hover {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-4px);
}

.genre-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.genre-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

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

/* New releases */
.releases-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.release-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
  cursor: pointer;
}

.release-item:hover {
  border-color: var(--accent);
}

.release-thumb {
  width: 80px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.release-info {
  flex: 1;
  min-width: 0;
}

.release-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.release-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.release-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cyan);
  white-space: nowrap;
}

/* Newsletter CTA */
.section-cta {
  padding: 4rem 0 6rem;
}

.cta-box {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-image: radial-gradient(ellipse at top, rgba(124, 58, 237, 0.12) 0%, transparent 60%);
}

.cta-box h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.cta-box > p {
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2rem;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  min-width: 200px;
  padding: 0.875rem 1.25rem;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input:focus {
  border-color: var(--accent);
}

.newsletter-msg {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--green);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: 3rem;
}

.footer-links h4 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

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

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

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

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: var(--border);
}

.modal-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}

.modal-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.modal-body .modal-genre {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.modal-body p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.modal-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-detail {
  background: var(--bg-elevated);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.modal-detail span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.modal-detail strong {
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    transform: translateY(-120%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .release-item {
    flex-wrap: wrap;
  }

  .release-date {
    width: 100%;
    margin-top: 0.25rem;
  }
}

/* Fade-in animation */
.fade-in {
  animation: fadeIn 0.5s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}
