:root {
  --bg: #0b0e14;
  --bg-alt: #10141f;
  --surface: #151a26;
  --surface-hover: #1b2130;
  --border: #242b3d;
  --text: #eef1f8;
  --text-muted: #9aa3b8;
  --accent: #f5b942;
  --accent-2: #7c5cff;
  --accent-3: #38c6c6;
  --success: #34d399;
  --error: #f87171;
  --radius: 14px;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Sora", "Inter", sans-serif;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Background glow */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(124, 92, 255, 0.18), transparent 60%),
    radial-gradient(700px circle at 85% 20%, rgba(245, 185, 66, 0.12), transparent 60%),
    radial-gradient(900px circle at 50% 100%, rgba(56, 198, 198, 0.10), transparent 60%);
  pointer-events: none;
}

/* Navbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 14, 20, 0.75);
  border-bottom: 1px solid var(--border);
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  font-family: "Sora", sans-serif;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0e14;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.nav-links a {
  transition: color 0.2s ease;
}

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

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

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #e8a53a);
  color: #1a1204;
  box-shadow: 0 6px 20px rgba(245, 185, 66, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 26px rgba(245, 185, 66, 0.35);
}

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

.btn-outline:hover {
  border-color: var(--accent-2);
  background: rgba(124, 92, 255, 0.08);
}

.btn-ghost {
  color: var(--text);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--accent);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 60%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 32px 0 16px;
}

.hero-note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  animation: heroFadeUp 0.8s ease-out forwards;
}

/* Globe scroll hero — scroll-driven narrative with a floating globe */
.globe-scroll {
  position: relative;
  background: #000;
  color: var(--text);
  overflow: hidden;
  margin: -1px 0 0;
}

.globe-progress {
  position: fixed;
  top: 72px;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  z-index: 40;
  transition: opacity 0.4s ease;
}

.globe-progress-bar {
  height: 100%;
  width: 0%;
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transition: width 0.15s ease-out;
}

.globe-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: none;
  transition: opacity 0.4s ease;
}

.globe-nav-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(124, 92, 255, 0.35), transparent);
  transform: translateX(-50%);
  z-index: -1;
}

.globe-nav-dots {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.globe-nav-dot {
  position: relative;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(154, 163, 184, 0.4);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.globe-nav-dot:hover {
  border-color: rgba(124, 92, 255, 0.6);
  background: rgba(124, 92, 255, 0.12);
}

.globe-nav-dot.active {
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.18);
}

.globe-nav-label {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(21, 26, 38, 0.95);
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
}

.globe-nav-dot.active .globe-nav-label {
  animation: fadeOutLabel 2.2s ease forwards;
}

@keyframes fadeOutLabel {
  0% {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
  }
  70% {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) translateX(6px) scale(0.95);
  }
}

.globe-fixed {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  pointer-events: none;
  will-change: transform;
  transition: transform 1.1s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease;
  transform: translate3d(78vw, 50vh, 0) translate3d(-50%, -50%, 0) scale(1);
}

/* Once scrolled past the hero, the fixed globe/progress/nav must get out of the way
   so they don't sit on top of (and hide) the sections that follow. */
.globe-scroll.is-past .globe-fixed,
.globe-scroll.is-past .globe-progress,
.globe-scroll.is-past .globe-nav {
  opacity: 0;
  visibility: hidden;
}

.globe-sphere {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background-image:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.5), transparent 45%),
    url("https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=800&auto=format&fit=crop");
  background-size: 140%, cover;
  background-position: 0 0, center;
  box-shadow:
    0 0 60px rgba(124, 92, 255, 0.35),
    -6px 0 10px rgba(56, 198, 198, 0.35) inset,
    18px 4px 30px rgba(0, 0, 0, 0.85) inset,
    -26px -4px 36px rgba(195, 244, 255, 0.25) inset;
  animation: globeRotate 40s linear infinite;
}

@keyframes globeRotate {
  from { background-position: 0 0, center; }
  to { background-position: 220px 0, center; }
}

.globe-star {
  position: absolute;
  top: var(--top);
  left: var(--left);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  animation: globeTwinkle var(--dur, 3s) ease-in-out infinite;
}

@keyframes globeTwinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 1; }
}

.globe-section {
  position: relative;
  z-index: 20;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 24px;
}

.globe-section-inner {
  position: relative;
  max-width: 640px;
  width: 100%;
}

.globe-section[data-align="center"] {
  align-items: center;
  text-align: center;
}

.globe-section[data-align="center"] .globe-section-inner {
  max-width: 680px;
}

.globe-section[data-align="left"] {
  align-items: flex-start;
  text-align: left;
}

.globe-section:first-child {
  padding-top: 140px;
}

.globe-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.globe-title-sub {
  font-size: 0.42em;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0;
}

.globe-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 8px;
}

.globe-section[data-align="center"] .globe-desc {
  margin-left: auto;
  margin-right: auto;
}

.globe-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.globe-hint span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.globe-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  animation: globeTwinkle 2s ease-in-out infinite;
}

.globe-features {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  max-width: 560px;
}

.globe-feature {
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(21, 26, 38, 0.55);
  backdrop-filter: blur(6px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.globe-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.35);
  background: rgba(27, 33, 48, 0.75);
}

.globe-feature h3 {
  font-size: 1.02rem;
  margin-bottom: 4px;
}

.globe-feature p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

@media (min-width: 640px) {
  .globe-nav {
    display: block;
  }
}

@media (max-width: 640px) {
  .globe-fixed {
    opacity: 0.55;
  }

  .globe-sphere {
    width: 150px;
    height: 150px;
  }

  .globe-section {
    padding: 72px 20px;
  }

  .globe-section:first-child {
    padding-top: 120px;
  }
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 48px;
}

/* Feature grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

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

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-2);
  background: var(--surface-hover);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* How it works */
.how-it-works {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-top: 32px;
}

.step {
  text-align: center;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0e14;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* CTA */
.cta-box {
  text-align: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.12), rgba(245, 185, 66, 0.10));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 64px 32px;
}

.cta-highlight {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 24px;
}

/* Auth forms */
.auth-section {
  display: flex;
  justify-content: center;
  padding: 80px 24px;
  min-height: 60vh;
  align-items: center;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
}

.auth-title {
  font-size: 1.6rem;
  font-weight: 700;
}

.auth-subtitle {
  color: var(--text-muted);
  margin-bottom: 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.optional {
  color: #6b7488;
  font-weight: 400;
}

.field-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.auth-form input,
.auth-form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
  resize: vertical;
}

.auth-form input:focus,
.auth-form textarea:focus {
  border-color: var(--accent-2);
}

.auth-form button {
  margin-top: 24px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}

.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.alert-success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

.telegram-cta {
  margin-top: 16px;
}

/* Dashboard */
.dashboard {
  padding: 80px 24px;
  max-width: 760px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

/* Admin tables */
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table th {
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 600;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success {
  background: rgba(52, 211, 153, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.badge-pending {
  background: rgba(245, 185, 66, 0.12);
  color: var(--accent);
  border: 1px solid rgba(245, 185, 66, 0.35);
}

/* Waitlist pricing / QR card */
.pricing-card {
  text-align: center;
  margin-top: 8px;
}

.pricing-amount {
  font-family: "Sora", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.pricing-amount span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.qr-image {
  display: block;
  margin: 0 auto 24px;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
}

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

.footer-inner {
  text-align: center;
  color: var(--text-muted);
}

.footer-tagline {
  margin-top: 12px;
}

.footer-copy {
  font-size: 0.85rem;
  color: #5f6879;
}

/* Responsive */
@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    transform: translateY(-150%);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

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

  .nav-toggle {
    display: flex;
  }
}
