:root {
  --bg: #0d0b14;
  --panel: #16131f;
  --line: #ffffff14;
  --text: #f2eefc;
  --muted: #9a91b5;
  --accent: #7c5cff;
  --pink: #ff7ab6;
  --ok: #3ddc84;
  --err: #ff6b6b;
  --r: 18px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(900px 500px at 15% -10%, #7c5cff26, transparent 60%),
    radial-gradient(700px 400px at 100% 0%, #ff7ab61a, transparent 60%);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.5 Manrope, system-ui, sans-serif;
}
a { color: inherit; }
h1, h2, h3 { font-family: Unbounded, Manrope, sans-serif; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 6vw, 56px); }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
code { white-space: nowrap; background: #ffffff12; padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
main { max-width: 1100px; margin: 0 auto; padding: 0 16px 48px; }

/* Плашка демо-режима */
.demo-bar { background: linear-gradient(90deg, #7c5cff33, #ff7ab633); border-bottom: 1px solid var(--line); font-size: 14px; }
.demo-bar > div { max-width: 1100px; margin: 0 auto; padding: 10px 16px; }

/* Шапка */
.top {
  display: flex; align-items: center; gap: 20px;
  max-width: 1100px; margin: 0 auto; padding: 16px;
}
.logo { font-family: Unbounded, sans-serif; font-weight: 800; font-size: 20px; text-decoration: none; }
.top nav { display: flex; gap: 4px; }
.top nav a { text-decoration: none; padding: 8px 12px; border-radius: 10px; color: var(--muted); font-weight: 700; }
.top nav a:hover, .top nav a.on { color: var(--text); background: #ffffff0d; }
.me { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.wallet { font-weight: 800; white-space: nowrap; }
.me-link { display: flex; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 800;
  padding: 12px 22px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  box-shadow: 0 8px 24px -8px var(--accent);
  transition: transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 11px; box-shadow: none; }
.btn-ghost { background: #ffffff10; box-shadow: none; }
.btn-ghost:hover { background: #ffffff1c; }

.flash { max-width: 1068px; margin: 0 auto 16px; padding: 12px 16px; border-radius: 12px; font-weight: 700; }
.flash-ok { background: #3ddc8422; color: var(--ok); }
.flash-err { background: #ff6b6b22; color: var(--err); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.link { display: inline-block; margin-top: 12px; color: var(--muted); font-weight: 700; text-decoration: none; }
.link:hover { color: var(--text); }
.page h1 { font-size: clamp(26px, 5vw, 40px); margin-top: 16px; }
.center { text-align: center; padding: 60px 0; }
.sect { margin-top: 32px; }

/* Главная */
.hero { text-align: center; padding: 48px 0 32px; }
.hero h1 {
  background: linear-gradient(135deg, #fff 30%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(17px, 2.4vw, 21px); max-width: 640px; margin: 0 auto 24px; color: #d6cff0; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }

.live { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 20px; }
.live-head { display: flex; align-items: center; gap: 12px; }
.live-head h2 { margin: 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: #555; flex: none; display: inline-block; }
.dot.on { background: #ff3b5c; box-shadow: 0 0 0 0 #ff3b5c; animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px #ff3b5c00; } 100% { box-shadow: 0 0 0 0 #ff3b5c00; } }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 16px; }
.vc { display: block; text-decoration: none; background: #ffffff08; border: 1px solid var(--line); border-radius: 14px; padding: 14px; transition: border-color .15s; }
.vc:hover { border-color: var(--accent); }
.vc-name { font-weight: 800; margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-people { display: flex; flex-wrap: wrap; gap: 4px; min-height: 40px; align-items: center; }
.vc-join { margin-top: 10px; color: var(--accent); font-weight: 800; font-size: 14px; }
.more { color: var(--muted); font-weight: 700; padding-left: 4px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.step b { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--pink)); margin-bottom: 12px; }
.step p { margin: 0; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.exclusive { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.exclusive li { display: flex; align-items: center; gap: 14px; }
.exclusive li div { display: flex; flex-direction: column; }

/* Рейтинг */
.rank { list-style: none; margin: 12px 0 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rank li:last-child { border: 0; }
.pos { width: 32px; text-align: center; font-weight: 800; color: var(--muted); flex: none; }
.who { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; min-width: 0; flex: 1; }
.who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.val { font-weight: 800; white-space: nowrap; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { text-decoration: none; padding: 8px 14px; border-radius: 10px; background: #ffffff0a; font-weight: 700; color: var(--muted); }
.tabs a.on { background: var(--accent); color: #fff; }

/* Аватары и рамки */
.ava { --s: 48px; position: relative; display: inline-grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; flex: none; }
.ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: #2a2440; }
.frame-solid { box-shadow: 0 0 0 3px var(--accent); }
.frame-gradient, .frame-double, .frame-pulse, .frame-diamond, .frame-crown { padding: 4px; }
.frame-gradient { background: linear-gradient(135deg, var(--accent), var(--pink)); }
.frame-double { background: var(--accent); box-shadow: 0 0 0 3px var(--bg), 0 0 0 6px var(--pink); }
.frame-pulse { background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--accent); } 70% { box-shadow: 0 0 0 14px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.frame-diamond { background: conic-gradient(from var(--a, 0deg), #7df9ff, #fff, #b388ff, #7df9ff); animation: spin 4s linear infinite; }
.frame-crown { background: conic-gradient(from var(--a, 0deg), #ffd76a, #ff9d2b, #fff3c4, #ffd76a); animation: spin 3s linear infinite; box-shadow: 0 0 24px #ffb30066; }
.frame-crown::before { content: '👑'; position: absolute; top: calc(var(--s) * -0.32); font-size: calc(var(--s) * .32); z-index: 1; }
@property --a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }
.is-live::after { content: ''; position: absolute; right: 4%; bottom: 4%; width: 22%; height: 22%; border-radius: 50%; background: #ff3b5c; border: 3px solid var(--bg); }

/* Профиль */
.profile { padding-top: 16px; }
.banner {
  border-radius: 24px; padding: 28px; margin-bottom: 20px; border: 1px solid var(--line);
  background: radial-gradient(500px 260px at 10% 20%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
}
.banner-main { display: flex; gap: 24px; align-items: center; }
.id { flex: 1; min-width: 0; }
.id h1 { font-size: clamp(24px, 4.5vw, 40px); margin: 0 0 6px; overflow-wrap: anywhere; }
.title-tag { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin-bottom: 4px; }
.live-tag { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 14px; background: #ff3b5c22; padding: 4px 10px; border-radius: 999px; }
.live-tag .dot { width: 8px; height: 8px; }
.bio { margin: 10px 0 0; max-width: 560px; overflow-wrap: anywhere; }
.lvl { text-align: center; display: flex; flex-direction: column; flex: none; }
.lvl b { font-family: Unbounded, sans-serif; font-size: 56px; line-height: 1; color: var(--accent); }
.bar { position: relative; height: 30px; border-radius: 999px; background: #ffffff14; margin: 24px 0 16px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--pink)); min-width: 30px; }
.bar span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-weight: 800; font-size: 13px; }
.bar.thin { height: 8px; margin: 8px 0; }
.bar.thin i { min-width: 0; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.stats div { background: #ffffff0c; border-radius: 14px; padding: 12px 14px; }
.stats span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.stats b { font-size: 18px; white-space: nowrap; }
.own-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.goals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 8px; }
.goal { background: #ffffff08; border-radius: 14px; padding: 14px; }
.goal-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.goal-top .muted { margin-left: auto; }
.ico { font-size: 22px; }
.unlock { font-size: 13px; color: var(--accent); font-weight: 700; }

.heat { display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; gap: 3px; margin-top: 12px; grid-auto-columns: 1fr; max-width: calc(var(--weeks) * 22px); }
.heat i, .heat-legend i { display: block; aspect-ratio: 1; border-radius: 3px; }
.heat-legend { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 8px; }
.heat-legend i { width: 12px; }
.h0 { background: #ffffff0d; }
.h1 { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.h2 { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.h3 { background: color-mix(in srgb, var(--accent) 80%, transparent); }
.h4 { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.h-future { background: transparent; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 8px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; background: #ffffff0a; border-radius: 14px; padding: 14px 8px; }
.badge .ico { font-size: 30px; }
.badge .small { color: var(--muted); }
.badge.locked { opacity: .35; filter: grayscale(1); }

/* Гардероб */
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.item { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.item.earned { border-color: #ffc83d33; }
.item.is-on { border-color: var(--accent); }
.item-name { display: flex; flex-direction: column; gap: 4px; }
.tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #ffc83d; }
.state { font-weight: 800; font-size: 14px; }
.state.on { color: var(--ok); }
.state.lock { color: var(--muted); font-weight: 700; }
.pv { display: inline-grid; place-items: center; min-height: 52px; }
.pv-theme { width: 100%; height: 60px; border-radius: 12px; background: radial-gradient(120px 60px at 20% 30%, color-mix(in srgb, var(--accent) 45%, transparent), transparent), linear-gradient(135deg, var(--bg1), var(--bg2)); border: 1px solid var(--line); }
.exclusive .pv-theme { width: 52px; height: 52px; flex: none; }
.pv-title { color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.bio-form { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.bio-form textarea { flex: 1; min-width: 220px; background: #ffffff0a; border: 1px solid var(--line); border-radius: 12px; color: var(--text); font: inherit; padding: 10px 12px; resize: vertical; }

.foot { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; display: flex; gap: 20px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }

@media (max-width: 800px) {
  .steps, .two { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .banner-main { flex-wrap: wrap; }
  .banner { padding: 20px; }
}
@media (max-width: 480px) {
  .top { gap: 10px; flex-wrap: wrap; }
  .top nav a { padding: 6px 8px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .lvl b { font-size: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
