/* ══════════════════════════════════
   BASE
══════════════════════════════════ */
body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-primary);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-xl) 0;
}
.section--dark {
  background-color: var(--panel);
}


/* ══════════════════════════════════
   NAVBAR
══════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  background: transparent;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}
.navbar.scrolled {
  background: rgba(8,12,26,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--border);
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  font-size: 1.5rem;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(124,77,255,0.6));
  line-height: 1;
}
.logo-text {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-primary);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}
.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }

/* NODEHACK cross-game link — subtle green tint to distinguish it */
.nav-link--nodehack {
  color: rgba(0,230,118,0.65) !important;
  position: relative;
}
.nav-link--nodehack::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 0;
  height: 1px;
  background: rgba(0,230,118,0.35);
  border-radius: 1px;
}
.nav-link--nodehack:hover { color: #00FF41 !important; }

.drawer-link--nodehack {
  color: rgba(0,230,118,0.7) !important;
  border-bottom-color: rgba(0,230,118,0.15) !important;
}
.drawer-link--nodehack:hover { color: #00FF41 !important; }

/* NODE RACERS cross-game link — electric blue tint */
.nav-link--racers {
  color: rgba(91,242,255,0.7) !important;
  position: relative;
}
.nav-link--racers::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0; right: 0;
  height: 1px;
  background: rgba(91,242,255,0.35);
  border-radius: 1px;
}
.nav-link--racers:hover { color: #5BF2FF !important; }

.drawer-link--racers {
  color: rgba(91,242,255,0.75) !important;
  border-bottom-color: rgba(91,242,255,0.15) !important;
}
.drawer-link--racers:hover { color: #5BF2FF !important; }

.nav-cta { display: flex; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav drawer */
.nav-drawer {
  position: fixed;
  top: 0; right: -100%;
  width: 280px;
  height: 100%;
  background: var(--panel);
  border-left: 1px solid var(--border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  gap: var(--space-lg);
  transition: right 0.32s ease;
}
.nav-drawer.open { right: 0; }

.drawer-close {
  align-self: flex-end;
  font-size: 1.2rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}
.drawer-close:hover { color: var(--text-primary); }

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}
.drawer-nav a {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.drawer-nav a:hover { color: var(--text-primary); }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.32s ease;
}
.nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}


/* ══════════════════════════════════
   HERO
══════════════════════════════════ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse 90% 70% at 50% 45%, #0D1535 0%, var(--bg) 68%);
}

/* Subtle grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,77,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,77,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 var(--space-md);
  max-width: 840px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  animation: fadeInUp 1s ease 0.3s both;
}

.hero-eyebrow {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  font-weight: 900;
  letter-spacing: 0.22em;
  color: var(--accent-blue);
  text-transform: uppercase;
  text-shadow:
    0 0 20px rgba(0,207,255,0.45),
    0 0 50px rgba(0,207,255,0.18);
  line-height: 1.05;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.12rem);
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.scroll-line {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollDrop 2s ease-in-out infinite;
}
.scroll-label {
  font-family: var(--font-heading);
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  text-transform: uppercase;
  animation: blink 2.4s ease-in-out infinite;
}


/* ══════════════════════════════════
   FEATURES GRID
══════════════════════════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}


/* ══════════════════════════════════
   FACTIONS GRID
══════════════════════════════════ */
.factions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}


/* ══════════════════════════════════
   SCREENSHOT CAROUSEL
══════════════════════════════════ */
.carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.carousel-track {
  display: flex;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 1rem 0.5rem 2rem;
}

.carousel-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.carousel-arrow:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  box-shadow: 0 0 14px rgba(0,207,255,0.2);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 0.5rem;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  padding: 0;
}
.carousel-dot.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: scale(1.2);
}


/* ══════════════════════════════════
   ABOUT SECTION
══════════════════════════════════ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.about-heading {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.about-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
  border-radius: 2px;
  margin-bottom: 1.25rem;
}
.about-body {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.about-quote {
  position: relative;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: rgba(124,77,255,0.05);
  border-radius: 0 var(--radius-chip) var(--radius-chip) 0;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}


/* ══════════════════════════════════
   CTA SECTION
══════════════════════════════════ */
.cta-section {
  background: linear-gradient(135deg, var(--panel) 0%, rgba(124,77,255,0.06) 100%);
  text-align: center;
}
.cta-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(1.15rem, 3vw, 1.65rem);
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.cta-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}


/* ══════════════════════════════════
   FOOTER
══════════════════════════════════ */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0;
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent-blue); }

.footer-email a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-email a:hover { color: var(--accent-blue); }


/* ══════════════════════════════════
   INNER PAGES (privacy / support)
══════════════════════════════════ */
.page-hero {
  padding: calc(var(--navbar-h) + 3.5rem) 0 3rem;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.page-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.page-hero-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.page-content {
  padding: 4rem 0 6rem;
}
.policy-body {
  max-width: 780px;
  margin: 0 auto;
}
.policy-lang-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3.5rem 0;
}
.policy-section-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin: 2rem 0 0.75rem;
}
.policy-body p,
.policy-body ul {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}
.policy-body ul {
  padding-left: 1.5rem;
  list-style: disc;
}
.policy-body ul li { margin-bottom: 0.3rem; }
.policy-body a { color: var(--accent-blue); }
.policy-body a:hover { text-decoration: underline; }
.policy-lang-heading {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.policy-updated {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.support-body {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.support-email-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.25rem 2rem;
  margin: 2rem 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.support-email-block:hover {
  border-color: var(--accent-blue);
  box-shadow: 0 0 18px rgba(0,207,255,0.12);
}
.support-email-icon { font-size: 1.4rem; }
.support-email-link {
  font-size: 1rem;
  color: var(--accent-blue);
  font-weight: 500;
}
.support-response {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}
.support-lang-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}
.support-lang-title {
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.support-intro {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}


/* ══════════════════════════════════
   RESPONSIVE — TABLET (≤ 1024px)
══════════════════════════════════ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .factions-grid { grid-template-columns: 1fr; gap: 1rem; }
  .games-grid    { grid-template-columns: repeat(2, 1fr); }
}


/* ══════════════════════════════════
   RESPONSIVE — MOBILE (≤ 640px)
══════════════════════════════════ */
@media (max-width: 640px) {
  .container { padding: 0 var(--space-md); }
  .section   { padding: var(--space-lg) 0; }

  /* Navbar */
  .nav-links  { display: none; }
  .nav-cta    { display: none; }
  .hamburger  { display: flex; }

  /* Hero */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }

  /* Grids */
  .features-grid { grid-template-columns: 1fr; }
  .games-grid    { grid-template-columns: 1fr; }

  /* Footer */
  .footer-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Screenshot */
  .screenshot-placeholder { width: 180px; }

  /* Music btn */
  .music-player { bottom: 1.25rem; right: 1.25rem; }
  .music-btn    { width: 52px; height: 52px; font-size: 1.35rem; }
}


/* ══════════════════════════════════
   SCREENSHOT REAL IMAGE
══════════════════════════════════ */
.screenshot-img {
  max-height: 500px;
  width: auto;
  max-width: 100%;
  border-radius: 20px;
  box-shadow:
    0 0 32px rgba(124,77,255,0.22),
    0 0 64px rgba(124,77,255,0.08),
    0 12px 40px rgba(0,0,0,0.55);
  object-fit: contain;
  display: block;
  transition: box-shadow 0.3s, transform 0.3s;
}
.screenshot-img:hover {
  box-shadow:
    0 0 40px rgba(0,207,255,0.28),
    0 0 80px rgba(0,207,255,0.10),
    0 16px 48px rgba(0,0,0,0.6);
  transform: translateY(-4px);
}

@media (max-width: 640px) {
  .screenshot-img { max-height: 380px; }
}


/* ══════════════════════════════════
   LOGO IMAGE (navbar)
══════════════════════════════════ */
.logo-img {
  height: 34px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}


/* ══════════════════════════════════
   GAME CARD ICON IMAGE
══════════════════════════════════ */
.game-card__icon-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
}


/* ══════════════════════════════════
   MUSIC PLAYER (floating)
══════════════════════════════════ */
.music-player {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.music-badge {
  font-family: var(--font-heading);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: rgba(8,12,26,0.88);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 4px 12px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  box-shadow: 0 0 10px rgba(124,77,255,0.25);
}
.music-badge.hidden {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.music-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent) 0%, #5B35C4 100%);
  border: 2px solid rgba(180,140,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s ease, background 0.3s ease, border-color 0.3s;
  animation: musicRipple 2.5s ease-out infinite;
}
.music-btn:hover  { transform: scale(1.1); }
.music-btn:active { transform: scale(0.95); }

.music-btn.playing {
  background: linear-gradient(145deg, #00B8D4 0%, var(--accent-blue) 100%);
  border-color: rgba(0,207,255,0.45);
  animation: none;
  box-shadow: 0 0 22px rgba(0,207,255,0.55), 0 0 48px rgba(0,207,255,0.18);
}

@keyframes musicRipple {
  0%   { box-shadow: 0 0 0  0px rgba(124,77,255,0.9),  0 0 18px rgba(124,77,255,0.4); }
  65%  { box-shadow: 0 0 0 22px rgba(124,77,255,0.0),  0 0 22px rgba(124,77,255,0.4); }
  100% { box-shadow: 0 0 0 22px rgba(124,77,255,0.0),  0 0 18px rgba(124,77,255,0.4); }
}
