/* Crypto Tower — лендинг. Тёмный космос, золото, стекло. */
:root {
  --bg: #0a0a1a;
  --bg-deep: #06060f;
  --panel: #12122a;
  --panel2: #161b2e;
  --gold: #f6c445;
  --gold-bright: #ffe9a0;
  --gold-deep: #8a5c00;
  --text: #e6edf3;
  --muted: #8b94a7;
  --border: #232a45;
  --glass: rgba(255, 255, 255, .04);
  --radius: 18px;
  --section-pad: 88px;
  --font-head: 'Exo 2', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Manrope', 'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 420px at 50% -140px, rgba(246, 196, 69, .09), transparent 65%),
    radial-gradient(700px 500px at 100% 30%, rgba(91, 63, 158, .12), transparent 70%),
    radial-gradient(700px 500px at 0% 80%, rgba(30, 60, 140, .12), transparent 70%);
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
html.i18n-pending [data-i18n], html.i18n-pending [data-i18n-html] { visibility: hidden; }

/* ---------- Шапка ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 10, 26, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.top-inner { display: flex; align-items: center; gap: 14px; height: 62px; }
.brand {
  font-family: var(--font-head); font-weight: 800; font-size: 16px;
  letter-spacing: .18em; color: var(--gold); text-decoration: none; white-space: nowrap;
  margin-right: auto;
}
.main-nav { display: flex; gap: 2px; }
.main-nav a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 9px 12px; border-radius: 10px; transition: color .18s, background .18s;
}
.main-nav a:hover { color: var(--gold); background: rgba(246, 196, 69, .08); }

/* Переключатель языка */
.lang { position: relative; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--border);
  color: var(--text); font: 700 12.5px var(--font-body); letter-spacing: .06em;
  transition: border-color .18s, color .18s;
}
.lang-btn:hover { border-color: var(--gold); color: var(--gold); }
.lang-globe { color: var(--gold); }
.lang-caret { color: var(--muted); transition: transform .2s; }
.lang-btn[aria-expanded="true"] .lang-caret { transform: rotate(180deg); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 156px;
  list-style: none; padding: 6px; z-index: 50;
  background: rgba(18, 18, 42, .98); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.lang-menu.open { opacity: 1; visibility: visible; transform: none; }
.lang-menu li {
  padding: 9px 12px; border-radius: 9px; font-size: 14px;
  cursor: pointer; transition: background .15s, color .15s;
}
.lang-menu li:hover { background: rgba(246, 196, 69, .12); color: var(--gold); }
.lang-menu li.selected { color: var(--gold); font-weight: 700; }

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 56px; text-align: center;
  background: radial-gradient(1000px 460px at 50% -10%, rgba(246, 196, 69, .1), transparent 62%);
}
.hero-title {
  font-family: var(--font-head); font-weight: 800;
  font-size: clamp(30px, 5.6vw, 62px); line-height: 1.14;
  letter-spacing: .005em; margin: 0 auto; max-width: 980px;
}
.hero-phases {
  display: grid; place-items: center; min-height: 2.3em;
  --stagger: 65ms;
}
.hero-phase {
  grid-area: 1 / 1; width: 100%; text-align: center;
  align-self: center; opacity: 0; transition: opacity .45s ease;
}
.hero-phase.active { opacity: 1; }
.hero-phase .w { display: inline-block; white-space: nowrap; }
.hero-phase .ch { display: inline-block; position: relative; }
.hero-phase .ch-g { display: inline-block; }
.hero-phase .gold { color: var(--gold); }
.hero-phase .cube {
  position: absolute; left: 50%; bottom: 96%;
  width: .3em; height: .3em; margin-left: -.15em;
  border-radius: .05em; opacity: 0; pointer-events: none;
  background: linear-gradient(135deg, #fff3b8, var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 0 .32em rgba(246, 196, 69, .75);
}
.hero-phase.anim .ch-g {
  animation: letter-pop .52s cubic-bezier(.2, .85, .3, 1.35) both;
  animation-delay: calc(var(--i) * var(--stagger) + 70ms);
}
.hero-phase.anim .cube {
  animation: cube-hit .46s ease-in both;
  animation-delay: calc(var(--i) * var(--stagger));
}
@keyframes letter-pop {
  0% { opacity: 0; transform: translateY(.28em) scale(.7); }
  55% { opacity: 1; transform: translateY(-.06em) scale(1.07); }
  78% { transform: translateY(.02em) scale(.99); }
  100% { opacity: 1; transform: none; }
}
@keyframes cube-hit {
  0% { opacity: 0; transform: translateY(-1.05em) rotate(-32deg) scale(.85); }
  48% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
  62% { opacity: 1; transform: translateY(-.2em) rotate(7deg) scale(.9); }
  100% { opacity: 0; transform: translateY(-.06em) rotate(0) scale(.88); }
}
.hero-sub {
  margin: 20px auto 0; max-width: 640px;
  color: #c9d1e3; font-size: clamp(15px, 1.8vw, 19px); font-weight: 600;
}
.cta { margin: 30px 0 14px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.live { color: var(--gold); min-height: 1.4em; }
.live::before { content: "●"; margin-right: 7px; font-size: 9px; vertical-align: middle; animation: live-blink 2.4s ease-in-out infinite; }
@keyframes live-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: 12px; border: 1px solid transparent;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 55%, #d9a92c);
  color: #16120a; font: 700 15px var(--font-body); text-decoration: none;
  cursor: pointer; transition: transform .18s, box-shadow .18s, filter .18s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(246, 196, 69, .32); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; border-color: rgba(246, 196, 69, .55); color: var(--gold); }
.btn.ghost:hover { background: rgba(246, 196, 69, .1); box-shadow: 0 8px 26px rgba(246, 196, 69, .18); }
.btn.pulse { animation: btn-pulse 3.2s ease-in-out infinite; }
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246, 196, 69, .35); }
  50% { box-shadow: 0 0 0 12px rgba(246, 196, 69, 0); }
}

/* ---------- Секции ---------- */
.section { padding: var(--section-pad) 0; scroll-margin-top: 76px; }
.section.dark { background: linear-gradient(180deg, rgba(18, 18, 42, .55), rgba(18, 18, 42, .9)); border-block: 1px solid var(--border); }
h2 {
  font-family: var(--font-head); font-weight: 700; color: var(--gold);
  font-size: clamp(25px, 3.4vw, 34px); letter-spacing: .03em; margin-bottom: 10px;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* 3D-сцена */
#scene-box {
  position: relative; margin-top: 26px; overflow: hidden; background: #05050f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .03) inset;
}
#scene { width: 100%; height: 440px; display: block; touch-action: none; }
#scene-hint { position: absolute; left: 12px; bottom: 8px; font-size: 11px; color: var(--muted); pointer-events: none; }
.hidden { display: none !important; }

#scene-loader {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; padding: 20px; text-align: center;
  background: rgba(5, 5, 15, .94); transition: opacity .35s ease;
}
#scene-loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-title { font-family: var(--font-head); font-weight: 700; color: var(--gold); letter-spacing: .5px; }
.loader-text { color: #c9d1e3; font-size: 14px; max-width: 420px; }
.loader-track { width: min(320px, 80%); height: 6px; border-radius: 4px; background: #1b2140; overflow: hidden; }
.loader-bar { width: 0%; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #a98400, var(--gold)); transition: width .25s ease; }
.loader-pct { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
#scene-loader.failed .loader-track, #scene-loader.failed .loader-pct { display: none; }
#scene-loader.failed .loader-text { color: #ff9d9d; }
.btn.loader-retry { margin-top: 4px; }

/* ---------- Об игре (тексты для LLM/поиска) ---------- */
.about { max-width: 780px; }
.about h3 {
  font-family: var(--font-head); font-size: 19px; color: #fff;
  margin: 22px 0 6px; letter-spacing: .02em;
}
.about p { color: #c9d1e3; font-size: 15.5px; }
.about-list { list-style: none; margin: 10px 0 0; }
.about-list li {
  margin: 8px 0; padding: 10px 14px 10px 36px; position: relative;
  color: #c9d1e3; font-size: 15px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--glass);
}
.about-list li::before { content: "▸"; position: absolute; left: 15px; color: var(--gold); }

/* ---------- Правила ---------- */
.rules { max-width: 780px; margin: 18px auto 0; list-style: none; }
.rules li {
  margin: 10px 0; padding: 12px 16px 12px 40px; position: relative;
  color: #c9d1e3; border-radius: 12px; border: 1px solid transparent;
  transition: background .2s, border-color .2s;
}
.rules li:hover { background: var(--glass); border-color: var(--border); }
.rules li::before { content: "▸"; position: absolute; left: 18px; color: var(--gold); }
.rules b { color: #fff; }

/* ---------- Статистика ---------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 20px; }
.chip {
  padding: 9px 18px; border-radius: 999px; font-size: 14px;
  border: 1px solid var(--border); background: var(--glass);
  backdrop-filter: blur(6px);
}
.chip b { color: var(--gold); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card {
  padding: 20px; border-radius: var(--radius); overflow-x: auto;
  background: linear-gradient(160deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015));
  border: 1px solid var(--border);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .3);
}
.card h3 { color: #fff; font-family: var(--font-head); font-size: 17px; margin-bottom: 12px; letter-spacing: .02em; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: 7px 8px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
tbody tr:last-child td { border-bottom: 0; }
#keys .key-item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
#keys .key-item:last-child { border-bottom: 0; }
.key-medal {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--gold-bright), var(--gold-deep));
  color: #1a1300; display: flex; align-items: center; justify-content: center; font-weight: 800;
}
#stats-note { margin-top: 14px; }

/* ---------- Вселенная ---------- */
.universe { text-align: center; max-width: 780px; }
.tag {
  display: inline-block; margin-bottom: 14px; padding: 5px 14px; border-radius: 999px;
  border: 1px solid rgba(246, 196, 69, .4); color: var(--gold);
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
}
.universe-title {
  font-size: clamp(28px, 4.6vw, 46px);
  background: linear-gradient(135deg, var(--gold-bright), var(--gold) 50%, #c99b1e);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 18px;
}
.universe-text { color: #c9d1e3; font-size: 17px; margin: 12px 0; }
.universe-cta { margin-top: 18px; }

/* ---------- Скачать ---------- */
.download { text-align: center; }
.download-sub { color: #c9d1e3; margin-top: 4px; }
.stores { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 26px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--glass);
  color: var(--text); font: 700 15px var(--font-body); text-decoration: none;
  cursor: not-allowed; opacity: .78;
  transition: border-color .2s, opacity .2s, transform .2s, box-shadow .2s;
}
.store-btn svg { color: var(--gold); }
.store-btn .soon {
  font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--gold);
  border: 1px solid rgba(246, 196, 69, .4); border-radius: 999px; padding: 2px 8px;
}
.apk-row { display: flex; justify-content: center; margin-top: 14px; }
.store-btn.apk {
  cursor: pointer; opacity: 1;
  border-color: rgba(246, 196, 69, .55);
  background: linear-gradient(160deg, rgba(246, 196, 69, .12), rgba(246, 196, 69, .03));
}
.store-btn.apk:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(246, 196, 69, .22); }
.apk-note { margin-top: 12px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Футер ---------- */
footer { border-top: 1px solid var(--border); padding: 26px 0; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Фон «Живой мир»: карта в блюре ---------- */
#world { position: relative; isolation: isolate; overflow: hidden; }
#world::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("world-bg.jpg") center/cover no-repeat;
  filter: blur(26px) brightness(.38) saturate(1.15);
  transform: scale(1.06);
}
#world::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(10, 10, 26, .25) 18%, rgba(10, 10, 26, .25) 82%, var(--bg) 100%);
}

/* ---------- Роудмап ---------- */
.roadmap { list-style: none; margin: 24px 0 0; max-width: 760px; }
.rm-item { position: relative; padding: 0 0 28px 34px; border-left: 1px solid var(--border); }
.rm-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.rm-item::before {
  content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px rgba(139, 148, 167, .12);
}
.rm-item.done::before { background: #3ddc84; box-shadow: 0 0 0 4px rgba(61, 220, 132, .15); }
.rm-item.progress::before { background: var(--gold); box-shadow: 0 0 0 4px rgba(246, 196, 69, .18); }
.rm-head { display: flex; align-items: center; gap: 10px; }
.rm-q { font-family: var(--font-head); font-weight: 700; color: var(--gold); font-size: 14px; letter-spacing: .06em; }
.rm-status { font-size: 12px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px; background: var(--glass); white-space: nowrap; }
.rm-item.done .rm-status { color: #8fe6b3; border-color: rgba(61, 220, 132, .35); }
.rm-item.progress .rm-status { color: var(--gold); border-color: rgba(246, 196, 69, .4); }
.rm-item h3 { font-family: var(--font-head); font-size: 18px; color: #fff; margin: 7px 0 4px; }
.rm-item p { color: var(--muted); font-size: 14.5px; }
.rm-bar { margin-top: 12px; height: 7px; border-radius: 5px; background: #1b2140; overflow: hidden; max-width: 340px; }
.rm-bar-fill { width: 55%; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #a98400, var(--gold)); }
.rm-pct { display: inline-block; margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.rm-pct b { color: var(--gold); }

/* ---------- Формы (подписка и обратная связь) ---------- */
.hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0; }
.form-status { min-height: 1.4em; margin-top: 12px; font-size: 14px; }
.form-status.pending { color: var(--muted); }
.form-status.ok { color: #8fe6b3; }
.form-status.err { color: #ff9d9d; }
input, textarea { font: inherit; color: var(--text); }
input::placeholder, textarea::placeholder { color: #6b7488; }
input:focus-visible, textarea:focus-visible { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(246, 196, 69, .16); }
.subscribe { margin: 26px auto 0; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; max-width: 560px; }
.subscribe input[type=email] { flex: 1 1 260px; min-width: 0; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .04); }
.subscribe .btn { flex: 0 0 auto; }
.feedback-form { margin: 24px auto 0; max-width: 620px; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.feedback-form input, .feedback-form textarea { width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255, 255, 255, .04); resize: vertical; }
.feedback-form textarea { min-height: 120px; }
.feedback-form .btn { margin-top: 14px; }
.contacts { text-align: center; }

/* ---------- Адаптив ---------- */
@media (max-width: 760px) {
  :root { --section-pad: 58px; }
  body { font-size: 15px; }
  .wrap { padding: 0 14px; }
  .top-inner { height: auto; min-height: 56px; flex-wrap: wrap; padding: 8px 0 0; gap: 8px 10px; }
  .brand { font-size: 14px; }
  .main-nav {
    order: 3; width: 100%; overflow-x: auto; justify-content: flex-start;
    padding-bottom: 8px; scrollbar-width: none;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav a { padding: 8px 10px; white-space: nowrap; }
  .hero { padding: 28px 0 32px; }
  .hero-phases { min-height: 3.45em; --stagger: 35ms; }
  .hero-phase .cube { display: none; }
  .cta { margin: 16px 0 8px; gap: 10px; }
  .btn { min-height: 48px; padding: 14px 24px; width: 100%; }
  .cta { flex-direction: column; align-items: stretch; }
  #scene { height: 330px; }
  #scene-hint { font-size: 10px; right: 12px; }
  .cols { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 16px; }
  .rules li { margin: 8px 0; padding: 10px 12px 10px 34px; }
  .rules li::before { left: 14px; }
  .about-list li { padding: 10px 12px 10px 32px; }
  .about-list li::before { left: 13px; }
  .chips { gap: 8px; }
  .chip { padding: 7px 13px; font-size: 13px; }
  table { font-size: 13px; }
  td, th { padding: 7px 6px; }
  .universe-text { font-size: 15.5px; }
  .stores { gap: 10px; }
  .store-btn { width: 100%; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .subscribe { flex-direction: column; align-items: stretch; }
  .subscribe .btn { width: 100%; }
  .rm-item { padding-left: 28px; }
  #world::before { filter: blur(20px) brightness(.35) saturate(1.1); }
  footer { padding: 20px 0; }
}

@media (max-width: 480px) {
  .chip { width: 100%; text-align: center; }
  .hero-phases { min-height: 3.5em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-phase { transition: opacity .3s ease; }
  .hero-phase.anim .ch-g, .hero-phase.anim .cube, .btn.pulse, .live::before { animation: none; }
  .hero-phase .cube { display: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover { transform: none; }
}
