:root {
  --bg: #050508;
  --bg-elevated: #121218;
  --ink: #f2f4f8;
  --muted: #9aa3b5;
  --cyan: #00e8ff;
  --magenta: #c84dff;
  --line: rgba(255, 255, 255, 0.08);
  --gun: #2c2c2c;
  --font-display: "Orbitron", sans-serif;
  --font-body: "Syne", sans-serif;
  --radius: 4px;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 20%, #000 30%, transparent 75%);
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}

.bg-glow--cyan {
  width: 42vw;
  height: 42vw;
  top: -8%;
  left: -10%;
  background: rgba(0, 232, 255, 0.22);
  animation: drift 14s ease-in-out infinite alternate;
}

.bg-glow--magenta {
  width: 38vw;
  height: 38vw;
  top: 10%;
  right: -12%;
  background: rgba(200, 77, 255, 0.18);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(4%, 6%); }
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(16px);
  background: rgba(5, 5, 8, 0.72);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.brand__mark {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 232, 255, 0.45));
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--cyan);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(120deg, var(--cyan), #3d7dff 45%, var(--magenta));
  color: #050508;
  box-shadow: 0 0 28px rgba(0, 232, 255, 0.28);
}

.btn--primary:hover {
  box-shadow: 0 0 36px rgba(200, 77, 255, 0.35);
}

.btn--ghost {
  border: 1px solid rgba(0, 232, 255, 0.35);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.02);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(2rem, 6vh, 4rem) clamp(1.25rem, 4vw, 3rem);
  max-width: calc(var(--max) + 6rem);
  margin: 0 auto;
}

.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(62vh, 560px);
}

.coin-orbit {
  position: absolute;
  width: min(88%, 480px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(0, 232, 255, 0.18);
  box-shadow:
    0 0 60px rgba(0, 232, 255, 0.12),
    inset 0 0 60px rgba(200, 77, 255, 0.08);
  animation: pulse-ring 4.5s ease-in-out infinite;
}

.coin-orbit::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 1px dashed rgba(200, 77, 255, 0.22);
  animation: spin 28s linear infinite;
}

@keyframes pulse-ring {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.035); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.hero__coin {
  width: min(78%, 420px);
  position: relative;
  z-index: 1;
  animation: float-coin 5.5s ease-in-out infinite;
  filter: drop-shadow(0 20px 50px rgba(0, 232, 255, 0.25));
}

@keyframes float-coin {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero__eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.02em;
  background: linear-gradient(110deg, #fff 20%, var(--cyan) 55%, var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  margin: 1.1rem 0 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.15rem);
}

.countdown {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 2rem;
}

.countdown__unit {
  min-width: 5.5rem;
  padding: 1rem 0.85rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 1px rgba(0, 232, 255, 0.04);
}

.countdown__value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-shadow: 0 0 24px rgba(0, 232, 255, 0.35);
  transition: transform 0.15s ease;
}

.countdown__value.is-tick {
  transform: scale(1.06);
  color: var(--cyan);
}

.countdown__label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.countdown__sep {
  align-self: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--magenta);
  opacity: 0.8;
  padding-bottom: 1.1rem;
}

.countdown__caption {
  margin: 0.85rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.wallet-status {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--cyan);
}

.section {
  padding: clamp(4rem, 10vh, 6.5rem) clamp(1.25rem, 4vw, 3rem);
  max-width: calc(var(--max) + 6rem);
  margin: 0 auto;
}

.section--tight {
  padding-top: 1rem;
}

.section__head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section__head h2,
.token-panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  letter-spacing: 0.03em;
}

.section__head p,
.token-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}

.split__block h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
}

.split__block p {
  margin: 0;
  color: var(--muted);
  max-width: 32rem;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.steps__item {
  padding: 1.5rem 0 0;
  border-top: 1px solid rgba(0, 232, 255, 0.25);
}

.steps__num {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--magenta);
}

.steps__item h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}

.steps__item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.token-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  background:
    radial-gradient(circle at 85% 40%, rgba(200, 77, 255, 0.12), transparent 40%),
    radial-gradient(circle at 20% 80%, rgba(0, 232, 255, 0.1), transparent 35%),
    linear-gradient(160deg, #101016, #0a0a0e);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.token-list {
  margin: 1.4rem 0 1.75rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.token-list li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--ink);
}

.token-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: linear-gradient(120deg, var(--cyan), var(--magenta));
}

.token-panel__visual {
  display: grid;
  place-items: center;
}

.token-panel__coin {
  width: min(100%, 280px);
  animation: float-coin 6s ease-in-out infinite;
  filter: drop-shadow(0 16px 40px rgba(200, 77, 255, 0.28));
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1.25rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer__brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* ===== МОДАЛКА ===== */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.modal__panel {
  position: relative;
  width: min(100%, 420px);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 1.5rem 1.35rem 1.25rem;
  background: #121218;
  border: 1px solid rgba(0, 232, 255, 0.25);
  border-radius: 8px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 40px rgba(0, 232, 255, 0.08);
  animation: modal-in 0.28s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.modal__title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.modal__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  color: var(--cyan);
  background: rgba(0, 232, 255, 0.08);
  border: 1px solid rgba(0, 232, 255, 0.28);
  flex-shrink: 0;
}

.modal__panel h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.modal__subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.modal__close {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  font-size: 1.45rem;
  line-height: 1;
  color: var(--muted);
  flex-shrink: 0;
}

.modal__close:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.wallet-list {
  display: grid;
  gap: 0.55rem;
}

.wallet-option {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem;
  padding: 0.8rem 0.95rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.wallet-option:hover {
  border-color: rgba(0, 232, 255, 0.5);
  background: rgba(0, 232, 255, 0.06);
}

/* ===== ПОДСВЕТКА ВЫБРАННОГО КОШЕЛЬКА ===== */
.wallet-option.selected {
  border-color: #00e8ff !important;
  background: rgba(0, 232, 255, 0.15) !important;
  box-shadow: 0 0 25px rgba(0, 232, 255, 0.25);
}

.wallet-option.selected .wallet-option__name {
  color: #00e8ff;
}

.wallet-option__icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.wallet-option__icon svg {
  display: block;
  border-radius: 6px;
}

.wallet-option__text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.wallet-option__name {
  font-weight: 700;
  font-size: 0.98rem;
}

.wallet-option__hint {
  color: var(--muted);
  font-size: 0.8rem;
}

/* ===== КНОПКА ПОДКЛЮЧИТЬ В МОДАЛКЕ ===== */
#connectBtn {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(120deg, #00e8ff, #3d7dff 45%, #c84dff);
  color: #050508;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#connectBtn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(0, 232, 255, 0.4);
}

/* ===== АДАПТИВ ===== */
@media (max-width: 960px) {
  .nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    text-align: center;
    padding-top: 1.5rem;
  }

  .hero__visual {
    order: -1;
    min-height: auto;
  }

  .hero__coin {
    width: min(70%, 320px);
  }

  .hero__lead {
    margin-left: auto;
    margin-right: auto;
  }

  .countdown {
    justify-content: center;
  }

  .hero__actions {
    justify-content: center;
  }

  .split,
  .steps,
  .token-panel {
    grid-template-columns: 1fr;
  }

  .token-panel {
    text-align: center;
  }

  .token-list li {
    text-align: left;
  }

  .token-panel__coin {
    width: min(70%, 240px);
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .header .btn--ghost {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
  }

  .countdown__unit {
    min-width: 4.4rem;
    padding: 0.85rem 0.5rem;
  }

  .countdown__sep {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}