:root {
  --c-bg: #0e0e0e;
  --c-surface: #1b1b1b;
  --c-line: #2a2a2a;
  --c-text: #ffffff;
  --c-muted: #bababa;
  --c-accent: #ebff00;
  --c-on-accent: #0e0e0e;
  --c-danger: #ff5a4e;
  --font: 'Montserrat', 'TildaSans', Arial, sans-serif;
  --r-pill: 30px;
  --r-card: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--c-bg); color: var(--c-text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: 15px; letter-spacing: 0.08em; text-transform: uppercase;
}
.logo::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 18px var(--c-accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 32px; border: 0; border-radius: var(--r-pill);
  background: var(--c-accent); color: var(--c-on-accent);
  font-weight: 600; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s;
}
.btn:hover { box-shadow: 0 0 0 4px rgba(235, 255, 0, 0.18), 0 10px 40px rgba(235, 255, 0, 0.25); }
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--c-text); outline-offset: 3px; }
.btn:disabled { opacity: 0.4; cursor: default; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--c-text); border: 1px solid var(--c-line); }
.btn-ghost:hover { border-color: var(--c-accent); color: var(--c-accent); box-shadow: none; }

/* ---------- Телефон ---------- */
.phone { min-height: 100svh; position: relative; overflow-x: hidden; }
.phone canvas.bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.phone-wrap {
  position: relative; z-index: 1; max-width: 520px; margin: 0 auto;
  padding: 20px 20px calc(28px + env(safe-area-inset-bottom, 0px));
  min-height: 100svh; display: flex; flex-direction: column;
}
.phone-head { display: flex; justify-content: space-between; align-items: center; padding-block: 4px 0; }
.chip-live { font-size: 12px; font-weight: 500; color: var(--c-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.chip-live::before { content: '● '; color: var(--c-accent); }

.view { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 32px; animation: rise 0.6s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.kicker { color: var(--c-accent); font-weight: 600; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 14px; }
.title { font-weight: 700; font-size: clamp(32px, 9vw, 44px); line-height: 1.05; margin: 0 0 16px; text-transform: uppercase; letter-spacing: -0.01em; }
.title em { font-style: normal; color: var(--c-accent); }
.lead { color: var(--c-muted); font-size: 16px; line-height: 1.5; margin: 0 0 28px; }

.variants { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.variant {
  min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--c-line);
  background: rgba(27, 27, 27, 0.7); color: var(--c-text); font-size: 14px; font-weight: 500; cursor: pointer;
  backdrop-filter: blur(6px); transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.variant:hover, .variant[aria-pressed='true'] { border-color: var(--c-accent); color: var(--c-accent); }

.field { position: relative; margin: 0 0 16px; }
.field textarea {
  width: 100%; min-height: 112px; resize: none; padding: 18px 18px 30px;
  border-radius: 20px; border: 1px solid var(--c-line); background: rgba(17, 17, 17, 0.85);
  font-size: 18px; font-weight: 500; line-height: 1.35; backdrop-filter: blur(6px);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea::placeholder { color: #6d6d6d; }
.field textarea:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 4px rgba(235, 255, 0, 0.12); }
.counter { position: absolute; right: 16px; bottom: 10px; font-size: 12px; color: #6d6d6d; font-variant-numeric: tabular-nums; }
.label { display: block; }
.error { color: var(--c-danger); font-size: 14px; min-height: 20px; margin: 0 0 12px; }
.phone .btn { width: 100%; }

.pulse { width: 72px; height: 72px; margin: 0 0 28px; border-radius: 50%; border: 1px solid var(--c-accent); position: relative; }
.pulse::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 30px var(--c-accent); animation: beat 1.6s ease-in-out infinite; }
@keyframes beat { 50% { transform: scale(0.6); opacity: 0.6; } }

.echo {
  margin: 0 0 28px; padding: 20px; border-radius: 20px; border: 1px solid var(--c-accent);
  font-size: 22px; font-weight: 600; line-height: 1.3; color: var(--c-accent); word-break: break-word;
}

/* ---------- Экран ---------- */
.screen { width: 100vw; height: 100vh; overflow: hidden; cursor: none; }
.screen.show-cursor { cursor: default; }
.screen canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.stage { position: fixed; inset: 0; pointer-events: none; }
.stage .logo { position: absolute; top: 4vh; left: 4vw; font-size: clamp(14px, 1.1vw, 22px); }
.speech {
  position: absolute; left: 6vw; right: 6vw; top: 50%; transform: translateY(-50%);
  font-weight: 600; font-size: clamp(28px, 3.6vw, 76px); line-height: 1.18; text-transform: uppercase; max-width: 22ch;
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
}
.speech .line { display: block; opacity: 0; transform: translateY(0.4em); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.speech .line.on { opacity: 1; transform: none; }
.speech .line + .line { margin-top: 0.5em; }
.speech .accent { color: var(--c-accent); }
.speech.fade-out { opacity: 0; transition: opacity 1.4s ease; }

.ask { position: absolute; top: 12vh; left: 6vw; max-width: 46vw; }
.ask .kicker { font-size: clamp(14px, 1vw, 22px); }
.ask h1 { margin: 0; font-weight: 700; font-size: clamp(40px, 5vw, 110px); line-height: 1; text-transform: uppercase; }
.ask h1 em { font-style: normal; color: var(--c-accent); }
.ask .invite {
  margin: 1.2em 0 0; max-width: 24ch; font-weight: 500; font-size: clamp(20px, 1.9vw, 42px); line-height: 1.25; color: var(--c-text);
  padding-left: 0.7em; border-left: 4px solid var(--c-accent);
}
.ask .invite span { color: var(--c-accent); }

.join {
  position: absolute; right: 4vw; bottom: 6vh; display: flex; align-items: flex-end; gap: 1.6vw;
  padding: 1.4vw; border-radius: 24px; background: rgba(14, 14, 14, 0.78); border: 1px solid var(--c-line); backdrop-filter: blur(8px);
}
.join img { width: clamp(140px, 13vw, 300px); height: auto; border-radius: 12px; display: block; }
.join .txt { font-size: clamp(14px, 1.1vw, 24px); color: var(--c-muted); line-height: 1.4; }
.join .url { color: var(--c-text); font-weight: 600; display: block; margin-top: 6px; }
.join .num { display: block; font-size: clamp(40px, 4vw, 90px); font-weight: 700; color: var(--c-accent); line-height: 1; margin-top: 18px; font-variant-numeric: tabular-nums; }

.final {
  position: absolute; left: 6vw; right: 6vw; bottom: 8vh; text-align: center;
  font-weight: 600; font-size: clamp(24px, 2.8vw, 60px); line-height: 1.22; text-transform: uppercase;
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.95);
}
.final .accent { color: var(--c-accent); }
.final .words { display: block; margin-top: 1em; font-size: 0.42em; font-weight: 500; color: var(--c-muted); letter-spacing: 0.08em; text-transform: none; }

.hint {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%);
  font-size: 13px; color: #6d6d6d; background: rgba(14, 14, 14, 0.8); padding: 8px 14px; border-radius: var(--r-pill);
}
.hint b { color: var(--c-accent); font-weight: 600; }

/* ---------- Пульт ---------- */
.admin { min-height: 100vh; }
.admin-wrap { max-width: 920px; margin: 0 auto; padding-block: 24px 60px; padding-inline: 16px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.admin h2 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-muted); font-weight: 600; margin: 32px 0 12px; }
.phases { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.phase-btn {
  text-align: left; padding: 16px; border-radius: 16px; border: 1px solid var(--c-line); background: var(--c-surface);
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.phase-btn b { display: block; font-size: 16px; margin-bottom: 4px; }
.phase-btn span { font-size: 13px; color: var(--c-muted); }
.phase-btn:hover { border-color: var(--c-muted); }
.phase-btn[aria-pressed='true'] { border-color: var(--c-accent); background: rgba(235, 255, 0, 0.08); }
.phase-btn[aria-pressed='true'] b { color: var(--c-accent); }
.stats { display: flex; gap: 28px; flex-wrap: wrap; font-size: 14px; color: var(--c-muted); }
.stats b { display: block; font-size: 34px; color: var(--c-text); font-weight: 700; }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-line); }
.list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-line); }
.list li.off .t { color: #6d6d6d; text-decoration: line-through; }
.list .t { font-size: 16px; word-break: break-word; }
.list .tm { font-size: 12px; color: #6d6d6d; margin-right: 10px; font-variant-numeric: tabular-nums; }
.list button { flex: none; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: transparent; cursor: pointer; font-size: 13px; }
.list button:hover { border-color: var(--c-danger); color: var(--c-danger); }
.links { display: flex; gap: 10px; flex-wrap: wrap; }
.links a { color: var(--c-accent); }
.danger-zone { margin-top: 40px; }
.btn-danger { background: transparent; color: var(--c-danger); border: 1px solid var(--c-danger); }
.login { max-width: 420px; margin: 18vh auto 0; padding-inline: 16px; }
.login input { width: 100%; min-height: 52px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: var(--c-surface); padding: 0 20px; margin: 16px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
