@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #060a14;
  --bg-alt: #0c1226;
  --surface: #101833;
  --surface-2: #141d3d;
  --border: rgba(124, 92, 255, 0.22);
  --primary: #7c5cff;
  --primary-soft: rgba(124, 92, 255, 0.14);
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.14);
  --gradient: linear-gradient(135deg, #7c5cff 0%, #22d3ee 100%);
  --text: #eef1fb;
  --text-muted: #a7b0c9;
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;
  --header-h: 84px;
}

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

html.hide #preloader { opacity: 0; visibility: hidden; }

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

body.fixed { overflow: hidden; }

img { display: block; max-width: 100%; }

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

ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

section { position: relative; }

.section-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 20px;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

#preloader img { width: 64px; height: 64px; }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  z-index: 500;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.3s ease, border-color 0.3s ease, height 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(6, 10, 20, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: 68px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.logo img { height: 36px; width: auto; }

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav .nav-link {
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.main-nav .nav-link:hover { color: var(--text); }

.burger-btn {
  display: none;
  background: transparent;
  border: 0;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 501;
  cursor: pointer;
}

.burger-btn span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.burger-btn span:nth-child(1) { top: 2px; }
.burger-btn span:nth-child(2) { top: 11px; }
.burger-btn span:nth-child(3) { top: 20px; }

.burger-btn.act span:nth-child(1) { top: 11px; transform: rotate(45deg); }
.burger-btn.act span:nth-child(2) { opacity: 0; }
.burger-btn.act span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

#mobile-menu {
  display: none;
  opacity: 0;
  pointer-events: none;
}

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  background:
    radial-gradient(circle at 15% 20%, rgba(124, 92, 255, 0.16), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(34, 211, 238, 0.12), transparent 45%),
    var(--bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../img/hero-bg.webp') center / cover no-repeat;
  opacity: 0.5;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 10, 20, 0.3) 0%, var(--bg) 92%);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
}

.hero-pill {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  padding: 8px 18px;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.08;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #ffffff 40%, var(--accent) 120%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual img {
  width: 100%;
  max-width: 480px;
  filter: drop-shadow(0 30px 60px rgba(124, 92, 255, 0.35));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 16px 34px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient);
  color: #060a14;
  box-shadow: 0 12px 30px rgba(124, 92, 255, 0.35);
  animation: btnFloat 3s ease-in-out infinite;
}

.btn-primary:hover { animation-play-state: paused; }

@keyframes btnFloat {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

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

/* About / How to Play */
.about {
  padding: 120px 0;
  background: var(--bg-alt);
}

.about .container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.about-visual img {
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.about-text p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 18px;
}

.about-text p:last-child { margin-bottom: 0; }

/* Features */
.features {
  padding: 120px 0;
  background: var(--bg);
}

.features-head {
  max-width: 640px;
  margin-bottom: 56px;
}

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

.feature-card:last-child {
  grid-column: 1 / -1;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 34px 28px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 92, 255, 0.5);
}

.feature-icon {
  width: 92px;
  height: 92px;
  margin-bottom: 22px;
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
  color: var(--text);
}

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

.features-note {
  margin-top: 48px;
  padding: 26px 30px;
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  border-radius: 0 12px 12px 0;
  color: var(--text-muted);
  font-size: 15px;
  max-width: 820px;
}

/* Community */
.community {
  padding: 120px 0;
  background: var(--bg-alt);
  position: relative;
  overflow: hidden;
}

.community .container {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.community-visual img {
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.community-text p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 18px;
}

.community-text p:last-child { margin-bottom: 0; }

/* Contact */
.contact {
  padding: 120px 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(124, 92, 255, 0.18), transparent 55%),
    var(--bg);
  text-align: center;
}

.contact .container { max-width: 640px; }

.contact p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 32px;
}

.contact .btn-primary { margin-bottom: 0; }

/* Footer */
.site-footer {
  padding: 44px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

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

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

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Legal pages */
.legal-page {
  padding: calc(var(--header-h) + 80px) 0 100px;
  background: var(--bg);
  min-height: 100vh;
}

.legal-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 30px;
  color: var(--text);
}

.legal-content h2,
.legal-content h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 34px 0 14px;
  color: var(--accent);
}

.legal-content p {
  color: var(--text-muted);
  font-size: 15.5px;
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  color: var(--text-muted);
  font-size: 15.5px;
  margin: 0 0 16px 22px;
}

.legal-content li { margin-bottom: 8px; }

.legal-content a { color: var(--accent); text-decoration: underline; }

/* Responsive */
@media (max-width: 1024px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-lead { margin-left: auto; margin-right: auto; }
  .hero-visual { order: -1; margin-bottom: 20px; }
  .hero-visual img { max-width: 360px; }
  .about .container,
  .community .container { grid-template-columns: 1fr; }
  .about-visual,
  .community-visual { order: -1; }
}

@media (max-width: 768px) {
  .burger-btn { display: block; }
  .main-nav { display: none; }

  #mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: none;
    height: 100vh;
    background: rgba(8, 12, 26, 0.98);
    backdrop-filter: blur(14px);
    border-left: 1px solid var(--border);
    z-index: 499;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.35s ease, opacity 0.35s ease;
  }

  #mobile-menu.opened {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  #mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }

  #mobile-menu .nav-link {
    font-family: var(--font-heading);
    font-size: 20px;
    letter-spacing: 1px;
    color: var(--text);
  }

  .features-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  .hero { min-height: auto; padding-bottom: 60px; }
  .about, .features, .community, .contact { padding: 80px 0; }
  .feature-card { padding: 28px 22px; }
}
