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

:root {
  --bg: #0E0E14;
  --panel: #16161F;
  --panel-alt: #1B1B26;
  --border: rgba(255, 255, 255, 0.08);
  --cyan: #00E5FF;
  --magenta: #FF3D9A;
  --lime: #B4FF39;
  --text: #F5F6FA;
  --text-muted: #9C9CAE;
  --font-head: 'Fredoka', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

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 {
  max-width: 100%;
  display: block;
}

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

ul {
  list-style: none;
}

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

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

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

section {
  padding: 96px 0;
}

.section-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  color: var(--text);
  max-width: 680px;
}

.section-head {
  margin-bottom: 48px;
}

.section-intro {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 17px;
  max-width: 620px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  padding: 15px 30px;
  border-radius: 100px;
  cursor: pointer;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  color: #0A0A10;
  box-shadow: 0 0 0 rgba(0, 229, 255, 0);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0, 229, 255, 0.35);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(0, 229, 255, 0.5);
  color: var(--cyan);
}

.btn-outline:hover {
  border-color: var(--cyan);
  background: rgba(0, 229, 255, 0.08);
}

.btn-small {
  padding: 10px 20px;
  font-size: 14px;
}

/* Hero primary CTA levitation */
@keyframes floatCta {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-cta.btn-primary {
  animation: floatCta 3s ease-in-out infinite;
}

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

/* Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 20px 0;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(14, 14, 20, 0.9);
  backdrop-filter: blur(12px);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-link {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  opacity: 1;
  color: var(--cyan);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.burger-btn span {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

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

.mobile-nav {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(320px, 80vw);
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 26px;
  padding: 40px;
  z-index: 550;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: translateX(100%);
}

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

/* Hero */

.hero {
  padding: 168px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 61, 154, 0.12), transparent 70%);
  pointer-events: none;
}

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

.hero-headline {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.12;
  color: var(--text);
}

.hero-headline .accent {
  color: var(--cyan);
}

.hero-sub {
  margin-top: 22px;
  font-size: 18px;
  color: var(--text-muted);
  max-width: 520px;
}

.hero-actions {
  margin-top: 34px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.badge strong {
  color: var(--text);
  font-weight: 600;
}

.hero-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.8;
}

/* Phone mockup */

.hero-visual {
  display: flex;
  justify-content: center;
}

.phone-frame {
  width: 280px;
  padding: 16px 14px;
  border-radius: 44px;
  background: linear-gradient(160deg, #1C1C28, #101018);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.08), 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 229, 255, 0.08);
  position: relative;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.phone-screen {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #05050A;
  border-radius: 26px;
  padding: 14px;
}

.tile {
  aspect-ratio: 1;
  perspective: 800px;
}

.tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

@media (hover: hover) {
  .tile:hover .tile-inner {
    transform: rotateY(180deg);
  }
}

.tile-inner.pulse {
  animation: tilePulse 0.3s ease;
}

@keyframes tilePulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.94); }
  100% { transform: scale(1); }
}

.tile-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 16px;
  backface-visibility: hidden;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  padding: 6px;
}

.tile-front {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  color: var(--text);
}

.tile-back {
  background: rgba(0, 229, 255, 0.12);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  transform: rotateY(180deg);
  font-size: 15px;
  letter-spacing: 0.5px;
}

.tile:nth-child(2) .tile-back { background: rgba(255, 61, 154, 0.12); border-color: var(--magenta); color: var(--magenta); }
.tile:nth-child(3) .tile-back { background: rgba(180, 255, 57, 0.12); border-color: var(--lime); color: var(--lime); }
.tile:nth-child(4) .tile-back { background: rgba(0, 229, 255, 0.12); border-color: var(--cyan); color: var(--cyan); }

/* Games section */

.games-section {
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.game-card {
  perspective: 1200px;
  height: 300px;
}

.game-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
  transform-style: preserve-3d;
}

.game-card.flipped .game-card-inner {
  transform: rotateY(180deg);
}

@media (hover: hover) {
  .game-card:hover .game-card-inner {
    transform: rotateY(180deg);
  }
}

.game-card-face {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  backface-visibility: hidden;
  overflow: hidden;
}

.game-card-front {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
}

.game-card-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 21px;
  color: var(--text);
}

.game-card-desc {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--text-muted);
  flex-grow: 1;
}

.game-card-back {
  transform: rotateY(180deg);
  background: #05050A;
  border: 1px solid var(--cyan);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.game-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.games-closing {
  margin-top: 36px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

/* Why section */

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.why-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.why-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
}

.why-card:nth-child(2):hover {
  border-color: rgba(255, 61, 154, 0.5);
  box-shadow: 0 0 30px rgba(255, 61, 154, 0.15);
}

.why-card:nth-child(3):hover {
  border-color: rgba(180, 255, 57, 0.5);
  box-shadow: 0 0 30px rgba(180, 255, 57, 0.15);
}

.why-card-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 19px;
  color: var(--text);
}

.why-card-text {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--text-muted);
}

/* How it works */

.how-section {
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
}

.how-step {
  background: var(--panel-alt);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px 26px;
  position: relative;
}

.how-step-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 32px;
  color: var(--cyan);
  opacity: 0.5;
}

.how-step-title {
  margin-top: 10px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 19px;
  color: var(--text);
}

.how-step-text {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.how-cta {
  margin-top: 48px;
  text-align: center;
}

/* FAQ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 780px;
}

.faq-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px 28px;
  display: flex;
  gap: 20px;
}

.faq-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--magenta);
  opacity: 0.6;
  flex-shrink: 0;
}

.faq-q {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
}

.faq-a {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--text-muted);
}

/* Footer */

.site-footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-brand p {
  max-width: 380px;
  color: var(--text-muted);
  font-size: 14.5px;
}

.footer-logo img {
  height: 26px;
  margin-bottom: 14px;
}

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

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

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

.footer-store {
  margin-top: 18px;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Sticky install bar (mobile) */

.install-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 400;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-radius: 100px;
  padding: 15px 20px;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  color: #0A0A10;
  display: none;
  transform: translateY(120%);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.install-bar.visible {
  transform: translateY(0);
}

/* Legal pages */

.legal-page {
  padding: 160px 0 96px;
}

.legal-content {
  max-width: 820px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 15px;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 14px;
  line-height: 1.3;
}

.legal-content h1 {
  font-size: 32px;
  margin-top: 0;
}

.legal-content h2 {
  font-size: 22px;
}

.legal-content h3 {
  font-size: 18px;
}

.legal-content p {
  margin-bottom: 14px;
}

.legal-content ul,
.legal-content ol {
  margin: 0 0 14px 22px;
}

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

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

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
}

.legal-content th,
.legal-content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

/* Responsive */

@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .phone-frame {
    width: 240px;
  }

  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .how-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

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

  .burger-btn {
    display: block;
  }

  .header-btn-desktop {
    display: none;
  }

  section {
    padding: 72px 0;
  }

  .hero {
    padding: 140px 0 64px;
  }

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

  .game-card {
    height: 260px;
  }

  .footer-top {
    flex-direction: column;
  }

  .faq-item {
    flex-direction: column;
    gap: 6px;
  }

  .install-bar {
    display: block;
  }
}

@media (max-width: 640px) {
  .hero-headline {
    font-size: 32px;
  }

  .phone-frame {
    width: 220px;
  }

  .badge {
    font-size: 12px;
    padding: 8px 12px;
  }
}
