/* --- Reset & base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* --- Page & background --- */
.page {
  min-height: 100vh;
  position: relative;
  background: #08090c;
}

/* Видео на весь фон, растянуто с сохранением пропорций */
.video-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.video-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
}

/* Затемнение + градиент + виньетка по краям */
.video-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 9, 12, 0.7) 0%, rgba(8, 9, 12, 0.35) 35%, rgba(8, 9, 12, 0.8) 100%),
    radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}

/* Опционально: лёгкий намёк свечения поверх */
.bg-glow {
  position: fixed;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  max-width: 800px;
  height: 50vh;
  background: radial-gradient(
    ellipse 70% 50% at 50% 0%,
    rgba(40, 55, 80, 0.15) 0%,
    rgba(30, 40, 60, 0.05) 50%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 1;
}

/* --- Header --- */
.header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.2em;
  color: #fff;
  text-transform: uppercase;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(30, 30, 45, 0.9);
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-pill a {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.nav-pill a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-pill-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: none;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.nav-pill-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  transition: background 0.2s, transform 0.15s;
}

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

.header-icons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(30, 30, 45, 0.9);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.header-icon:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(40, 40, 60, 0.95);
}
.header-icon-text {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: default;
}
.header-icon-text:hover {
  cursor: default;
}

.btn-wallet {
  padding: 0.6rem 1.25rem;
  background: rgba(30, 30, 45, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-size: 0.9rem;
}

.btn-wallet.connected {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.btn-open-app {
  padding: 0.6rem 1.25rem;
  background: rgba(30, 30, 45, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-open-app svg {
  flex-shrink: 0;
}

/* --- Hero --- */
.hero {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem 6rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Анимация заголовка: пульсирующее свечение + тень */
@keyframes title-glow {
  0%, 100% {
    text-shadow:
      0 0 20px rgba(100, 150, 255, 0.35),
      0 0 45px rgba(80, 130, 210, 0.2),
      0 2px 4px rgba(0, 0, 0, 0.25);
  }
  50% {
    text-shadow:
      0 0 32px rgba(120, 170, 255, 0.5),
      0 0 60px rgba(90, 140, 220, 0.3),
      0 2px 4px rgba(0, 0, 0, 0.25);
  }
}

@keyframes title-shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.hero-title {
  font-size: clamp(2.75rem, 8vw, 5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  position: relative;
}

.hero-title-inner {
  display: inline-block;
  color: #fff;
  /* Лёгкий shimmer: градиент пробегает по тексту */
  background: linear-gradient(
    105deg,
    #fff 0%,
    #fff 35%,
    rgba(200, 225, 255, 0.98) 50%,
    #fff 65%,
    #fff 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: title-glow 3.5s ease-in-out infinite, title-shimmer 6s ease-in-out infinite;
}

.btn-launch {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  background: #0d0d0d;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.btn-launch-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-launch-icon svg,
.btn-launch-icon .btn-launch-img {
  flex-shrink: 0;
  object-fit: contain;
}

/* --- Content blocks --- */
.block {
  position: relative;
  z-index: 5;
  padding: 4rem 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.block--alt {
  background: rgba(12, 12, 18, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.block-inner {
  margin: 0 auto;
}

.block-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1.25rem;
}

.block-text {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1rem;
}

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

.block-text em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.95);
}

.block-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.block-list li {
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.block-list li::before {
  content: '-';
  position: absolute;
  left: 0;
  color: rgba(255, 255, 255, 0.4);
}

.block-list strong {
  color: rgba(255, 255, 255, 0.95);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.faq-item {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.faq-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.faq-q {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.5rem;
}

.faq-a {
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-pill {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .btn-open-app {
    margin-left: auto;
  }

  .hero {
    padding: 3rem 1rem 4rem;
  }

  .block {
    padding: 3rem 1rem;
  }

  .block-title {
    font-size: 1.35rem;
  }
}

/* --- Goon Consciousness Meter (art illusion) --- */
.goon-meter {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 20;
  width: 140px;
  padding: 0.6rem 0.75rem;
  background: rgba(12, 12, 18, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.04em;
}

.goon-meter-label {
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.goon-meter-value {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.goon-meter-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.4rem;
}

.goon-meter-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(100, 150, 255, 0.6), rgba(150, 180, 255, 0.8));
  border-radius: 2px;
  transition: width 0.4s ease;
}

.goon-meter-status {
  font-size: 0.6rem;
  opacity: 0.75;
  line-height: 1.3;
  min-height: 2.6em;
}

/* --- Leaderboard modal --- */
.leaderboard-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.leaderboard-modal.hidden {
  display: none;
}
.leaderboard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}
.leaderboard-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  background: rgba(14, 14, 22, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.leaderboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.leaderboard-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.leaderboard-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}
.leaderboard-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.leaderboard-table-wrap {
  overflow: auto;
  padding: 0 1rem 1rem;
}
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.leaderboard-table th {
  text-align: left;
  padding: 0.65rem 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.leaderboard-table td {
  padding: 0.6rem 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.leaderboard-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}
.leaderboard-table .lb-rank {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
}
.leaderboard-table .lb-nick {
  font-weight: 500;
  color: #fff;
}
