/* ============ Тёмная тема с лаймовым акцентом ============ */
:root {
  --bg: #090c0a;
  --bg-2: #0d110e;
  --card: #10150f;
  --card-2: #141a14;
  --line: #1d261e;
  --line-2: #27332a;
  --text: #eef3ea;
  --muted: #8b978d;
  --dim: #5d685f;
  --lime: #c8f53c;
  --lime-2: #a6d72a;
  --lime-soft: rgba(200, 245, 60, .10);
  --lime-glow: rgba(200, 245, 60, .35);
  --red: #ff5f57;
  --amber: #ffc24b;
  --radius: 20px;
  --head: 'Unbounded', 'Manrope', 'DejaVu Sans', sans-serif;
  --body: 'Manrope', -apple-system, 'Segoe UI', Roboto, 'DejaVu Sans', sans-serif;
  --tabbar-h: 0px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  padding: 14px 16px calc(28px + var(--tabbar-h) + env(safe-area-inset-bottom));
  background:
    radial-gradient(60% 40% at 15% 0%, rgba(200, 245, 60, .07), transparent 70%),
    radial-gradient(50% 35% at 100% 30%, rgba(60, 200, 170, .05), transparent 70%),
    radial-gradient(70% 50% at 0% 100%, rgba(255, 150, 60, .04), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
body.has-tabbar { --tabbar-h: 78px; }
/* мелкие звёздочки на фоне */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image:
    radial-gradient(1.2px 1.2px at 12% 18%, #9aa59c 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 9%, #9aa59c 50%, transparent 51%),
    radial-gradient(1.4px 1.4px at 64% 42%, #6f7b72 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 61%, #6f7b72 50%, transparent 51%),
    radial-gradient(1.2px 1.2px at 90% 70%, #9aa59c 50%, transparent 51%),
    radial-gradient(1px 1px at 20% 86%, #6f7b72 50%, transparent 51%),
    radial-gradient(1.3px 1.3px at 52% 93%, #6f7b72 50%, transparent 51%);
}
main { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

h1, h2, h3, .head { font-family: var(--head); }
p { margin: 0; }
a { color: var(--lime); text-decoration: none; }
.hint { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.lime { color: var(--lime); }
.amber { color: var(--amber); }
.red { color: var(--red); }

/* ---------- Шапка ---------- */
.topbar { display: flex; align-items: center; gap: 12px; padding: 4px 0 6px; }
.logo {
  width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background: var(--lime-soft); color: var(--lime); box-shadow: 0 0 24px rgba(200, 245, 60, .15);
}
.logo svg { width: 26px; height: 26px; }
.brand { flex: 1; min-width: 0; }
.brand b { display: block; font: 800 19px/1.1 var(--head); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand span { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-stat-top {
  flex: none; text-align: center; padding: 8px 14px; border-radius: 16px;
  border: 1px solid var(--line-2); background: rgba(16, 21, 15, .7);
}
.chip-stat-top b { display: block; font: 800 20px/1.1 var(--head); color: var(--lime); }
.chip-stat-top span { font-size: 10px; color: var(--muted); letter-spacing: .18em; text-transform: uppercase; }

/* ---------- Заголовок экрана ---------- */
.hero { padding: 10px 0 2px; display: flex; flex-direction: column; gap: 8px; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--lime-2); letter-spacing: .32em; text-transform: uppercase; }
.hero h1 {
  margin: 0; padding-top: .08em; font: 900 40px/1.12 var(--head); text-transform: uppercase; letter-spacing: -.01em;
  background: linear-gradient(180deg, #f2ffd6 0%, #c8f53c 55%, #8fbf1f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(200, 245, 60, .18));
  overflow-wrap: break-word; hyphens: auto;
}
.hero h1.sm { font-size: 30px; }
.hero h1.xs { font-size: 23px; }
.hero .sub { color: var(--muted); font-size: 15px; max-width: 36ch; }
.hero .desc { color: #c9d1c7; white-space: pre-wrap; font-size: 14px; }
.pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px; font-weight: 700; font-size: 14px;
  color: var(--lime); border: 1px solid rgba(200, 245, 60, .35); background: var(--lime-soft);
}

/* ---------- Карточки ---------- */
.card {
  position: relative; border-radius: var(--radius); padding: 18px;
  background: linear-gradient(180deg, rgba(20, 26, 20, .92), rgba(13, 17, 14, .92));
  border: 1px solid var(--line-2);
  display: flex; flex-direction: column; gap: 12px;
}
.section-title {
  margin: 10px 2px -2px; font: 700 12px/1 var(--body); color: var(--muted);
  letter-spacing: .28em; text-transform: uppercase;
}

/* номер в лаймовом квадрате */
.num {
  flex: none; min-width: 42px; height: 42px; padding: 0 8px; border-radius: 12px; display: grid; place-items: center;
  font: 700 15px/1 var(--body); font-variant-numeric: tabular-nums; color: #0b0f08; background: var(--lime);
}
.num.ghost { background: transparent; color: var(--lime); border: 1px solid rgba(200, 245, 60, .4); }
.num.mute { background: var(--card-2); color: var(--muted); border: 1px solid var(--line-2); }

/* строка-элемент (как пункт меню на скриншоте) */
.item {
  display: flex; align-items: center; gap: 14px; padding: 16px 16px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(20, 26, 20, .92), rgba(13, 17, 14, .92));
  border: 1px solid var(--line-2); cursor: pointer; transition: border-color .15s, transform .08s;
}
.item:active { transform: scale(.99); border-color: rgba(200, 245, 60, .35); }
.item .grow { flex: 1; min-width: 0; }
.item .t { font: 700 16px/1.25 var(--head); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { margin-top: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .02em; }
.item .chev { color: var(--muted); flex: none; width: 18px; height: 18px; transition: transform .2s; }
.list { display: flex; flex-direction: column; gap: 10px; }

/* аккордеон */
.acc .item { flex-wrap: wrap; }
.acc .body { display: none; width: 100%; padding: 4px 0 2px 56px; color: #c9d1c7; font-size: 14px; }
.acc .body p + p { margin-top: 8px; }
.acc .item.open { border-color: rgba(200, 245, 60, .3); }
.acc .item.open .chev { transform: rotate(180deg); color: var(--lime); }
.acc .item.open .body { display: block; }

/* статусы */
.status { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid; }
.status.live { color: var(--lime); border-color: rgba(200, 245, 60, .35); background: var(--lime-soft); }
.status.live::before { content: '● '; animation: blink 1.4s infinite; }
.status.done { color: var(--muted); border-color: var(--line-2); }
.status.won { color: #0b0f08; background: var(--lime); border-color: var(--lime); }
.status.wait { color: var(--amber); border-color: rgba(255, 194, 75, .35); background: rgba(255, 194, 75, .08); }
@keyframes blink { 50% { opacity: .3; } }

/* ---------- Таймер ---------- */
.timer { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.timer div { text-align: center; padding: 12px 2px 10px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.timer b { display: block; font: 800 28px/1.05 var(--head); color: var(--lime); font-variant-numeric: tabular-nums; text-shadow: 0 0 18px rgba(200, 245, 60, .25); }
.timer span { font-size: 10px; color: var(--muted); letter-spacing: .2em; text-transform: uppercase; }

/* ---------- Метрики ---------- */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; }
.metric { padding: 14px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line); }
.metric b { display: block; font: 800 24px/1.1 var(--head); }
.metric span { font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }

/* ---------- Кнопки ---------- */
button, .btn {
  appearance: none; border: 0; border-radius: 16px; font: 800 14px/1.2 var(--body);
  padding: 17px 16px; width: 100%; cursor: pointer; text-align: center; letter-spacing: .14em; text-transform: uppercase;
  color: #0b0f08; background: var(--lime); box-shadow: 0 8px 26px rgba(200, 245, 60, .22);
  transition: transform .08s, opacity .15s, box-shadow .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
button:active { transform: scale(.98); box-shadow: 0 4px 14px rgba(200, 245, 60, .2); }
button:disabled { opacity: .5; cursor: default; }
button.secondary { color: var(--text); background: transparent; border: 1px solid var(--line-2); box-shadow: none; }
button.ghost-lime { color: var(--lime); background: var(--lime-soft); border: 1px solid rgba(200, 245, 60, .3); box-shadow: none; }
button.danger { color: var(--red); background: rgba(255, 95, 87, .08); border: 1px solid rgba(255, 95, 87, .35); box-shadow: none; }
button.small { width: auto; padding: 9px 14px; font-size: 11px; border-radius: 12px; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.done-box {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius);
  border: 1px solid rgba(200, 245, 60, .35); background: var(--lime-soft);
}
.done-box .ic { width: 42px; height: 42px; border-radius: 12px; background: var(--lime); color: #0b0f08; display: grid; place-items: center; font-weight: 900; font-size: 20px; flex: none; }
.done-box b { display: block; font: 700 15px/1.3 var(--head); }

.subs { display: flex; flex-direction: column; gap: 8px; }
.sub-link {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 14px 16px; border-radius: 14px; color: var(--text); font-weight: 700;
  background: var(--bg-2); border: 1px solid var(--line-2);
}
.sub-link::after { content: 'Подписаться →'; color: var(--lime); font-size: 13px; font-weight: 600; white-space: nowrap; }
.error-text { color: var(--red); font-size: 13px; }

/* шаги */
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.step .num { min-width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }

/* ---------- Мои скрины ---------- */
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumb { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line-2); cursor: zoom-in; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .st { position: absolute; left: 5px; right: 5px; bottom: 5px; font-size: 9px; font-weight: 800; text-align: center; border-radius: 7px; padding: 4px 0; text-transform: uppercase; letter-spacing: .08em; }
.thumb .st.approved { background: var(--lime); color: #0b0f08; }
.thumb .st.pending { background: rgba(9, 12, 10, .85); color: var(--amber); border: 1px solid rgba(255, 194, 75, .5); }
.thumb .st.rejected { background: rgba(9, 12, 10, .85); color: var(--red); border: 1px solid rgba(255, 95, 87, .5); }
.result-list { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.result-list .ok { color: var(--lime); }
.result-list .bad { color: var(--red); }

/* таблица лидеров / победители */
.rows { display: flex; flex-direction: column; }
.rowx { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.rowx:last-child { border-bottom: 0; }
.rowx .grow { flex: 1; min-width: 0; }
.rowx .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowx .s { font-size: 12px; color: var(--muted); }
.rowx .score { font: 800 20px/1 var(--head); color: var(--lime); }
.rowx.me { background: var(--lime-soft); margin: 0 -10px; padding-inline: 10px; border-radius: 12px; border-bottom-color: transparent; }
.rowx .num { min-width: 36px; height: 36px; border-radius: 11px; font-size: 14px; }

/* ---------- Модерация ---------- */
.progress { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--lime); box-shadow: 0 0 12px var(--lime-glow); border-radius: inherit; transition: width .3s; }
.shot-frame { position: relative; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line-2); }
.mod-shot { width: 100%; display: block; min-height: 240px; max-height: 60vh; object-fit: contain; cursor: zoom-in; }
.verdict {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(1.6); opacity: 0; pointer-events: none;
  font: 900 26px/1 var(--head); letter-spacing: .14em; padding: 14px 22px; border-radius: 16px; text-transform: uppercase;
}
.verdict.ok { color: #0b0f08; background: var(--lime); box-shadow: 0 0 40px var(--lime-glow); }
.verdict.no { color: #fff; background: var(--red); box-shadow: 0 0 40px rgba(255, 95, 87, .4); }
.verdict.show { animation: pop .3s cubic-bezier(.2, .9, .3, 1.3) forwards; }
@keyframes pop { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.warn { padding: 12px 14px; border-radius: 14px; font-size: 13px; color: #ffd0cd; background: rgba(255, 95, 87, .08); border: 1px solid rgba(255, 95, 87, .35); }
.warn b { color: var(--red); }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .94); display: grid; place-items: center; padding: 12px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }

/* ---------- Форма ---------- */
label { display: flex; flex-direction: column; gap: 7px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .18em; text-transform: uppercase; min-width: 0; }
input, textarea {
  min-width: 0; -webkit-appearance: none; appearance: none; min-height: 50px; width: 100%;
  font: 500 16px var(--body); color: var(--text); letter-spacing: 0; text-transform: none;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 13px 14px; color-scheme: dark;
}
textarea { resize: vertical; min-height: 92px; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:focus, textarea:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200, 245, 60, .12); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper input { text-align: center; flex: 1; font: 800 22px var(--head); color: var(--lime); }
.stepper button { width: 52px; flex: none; padding: 13px 0; font-size: 20px; letter-spacing: 0; }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-opt {
  cursor: pointer; padding: 16px 12px; text-align: left; border-radius: 16px; text-transform: none; letter-spacing: 0;
  border: 1px solid var(--line-2); background: var(--bg-2); display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
.type-opt .num { min-width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }
.type-opt b { color: var(--text); font: 700 14px var(--head); }
.type-opt span { font-size: 12px; color: var(--muted); font-weight: 500; }
.type-opt.on { border-color: var(--lime); background: var(--lime-soft); box-shadow: 0 0 0 3px rgba(200, 245, 60, .08); }
.type-opt:not(.on) .num { background: var(--card-2); color: var(--muted); }

/* ---------- Баннер, пусто ---------- */
.win-banner {
  padding: 18px; border-radius: var(--radius); text-align: center; color: #0b0f08;
  background: var(--lime); box-shadow: 0 10px 40px rgba(200, 245, 60, .3);
}
.win-banner b { display: block; font: 900 22px/1.2 var(--head); text-transform: uppercase; letter-spacing: .04em; }
.empty { align-items: center; text-align: center; padding: 30px 18px; color: var(--muted); }
.empty .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--lime-soft); color: var(--lime); }
.empty .ico svg { width: 26px; height: 26px; }

/* ---------- Нижнее меню ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: space-around; gap: 4px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(9, 12, 10, .92); border-top: 1px solid var(--line); backdrop-filter: blur(12px);
}
.tab {
  flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 8px 4px; border-radius: 16px; color: var(--muted); cursor: pointer;
  font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.tab svg { width: 23px; height: 23px; }
.tab.on { color: var(--lime); background: var(--lime-soft); }

/* ---------- Тост, загрузка ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--tabbar-h) + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: #151b16; color: var(--text); border: 1px solid var(--line-2);
  padding: 12px 18px; border-radius: 14px; font-size: 14px; z-index: 70;
  opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 32px); text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loader { display: grid; place-items: center; min-height: 50vh; }
.loader span { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--lime); animation: spin .8s linear infinite; }
.loader.small { min-height: 0; }
.loader.small span { width: 26px; height: 26px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Объявление итогов ---------- */
.reveal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(5, 7, 6, .9); backdrop-filter: blur(6px); animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.reveal-card {
  width: min(380px, 100%); padding: 24px 20px 18px; border-radius: 24px;
  background: linear-gradient(180deg, #141a14, #0d110e); border: 1px solid rgba(200, 245, 60, .3);
  box-shadow: 0 0 60px rgba(200, 245, 60, .12), 0 30px 60px rgba(0, 0, 0, .6);
  animation: up .45s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.reveal-card h3 { margin: 6px 0 4px; font: 900 32px/1 var(--head); text-transform: uppercase; color: var(--lime); text-shadow: 0 0 24px rgba(200, 245, 60, .35); }
.reveal-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.reveal-list .rowx { border: 1px solid var(--line-2); border-radius: 14px; padding: 10px 12px; opacity: 0; transform: translateX(-12px); filter: blur(6px); animation: inr .5s ease forwards; }
@keyframes inr { to { opacity: 1; transform: none; filter: none; } }
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 65; display: grid; place-items: center; }
.burst .badge-ok {
  font: 900 20px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: #0b0f08; background: var(--lime);
  padding: 16px 24px; border-radius: 18px; box-shadow: 0 0 50px var(--lime-glow);
  animation: burstpop 1.6s cubic-bezier(.2, .9, .3, 1.3) forwards;
}
@keyframes burstpop { 0% { opacity: 0; transform: scale(.5); } 15% { opacity: 1; transform: scale(1); } 75% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.95); } }
.burst i { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--lime); animation: fly 1s ease-out forwards; }
@keyframes fly { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .status.live::before, .reveal-list .rowx { animation: none; opacity: 1; transform: none; filter: none; }
}
