/* ============================================================
   Seedance Video — дизайн-система «Сцена»
   Тёмная съёмочная площадка, тёплый луч прожектора (янтарь → коралл),
   кремовый текст. Карточки шаблонов — вертикальные «рилсы», шаги
   воронки — кадры плёнки. Токены совместимы по именам со старым
   каркасом (--teal = главный акцент), поэтому кабинетные страницы
   перекрашиваются без правки разметки.
   ============================================================ */

@import url('/assets/fonts/fonts.css');

:root {
    --bg: #0b0a0f;
    --bg-warm: #110f16;
    --surface: #16141c;
    --surface-2: #1d1a25;
    --surface-3: #25212f;
    --border: rgba(245, 239, 230, 0.09);
    --border-strong: rgba(245, 239, 230, 0.18);
    --ink: #f5efe6;
    --ink-soft: rgba(245, 239, 230, 0.82);
    --muted: rgba(245, 239, 230, 0.62);
    --faint: rgba(245, 239, 230, 0.42);

    --amber: #ffb547;
    --coral: #ff5e5b;
    --teal: #ffb547;
    --aqua: #ff8a50;
    --blue: #ff5e5b;
    --gold: #ffb547;
    --on-accent: #1a0f05;

    --grad: linear-gradient(115deg, #ffc65c 0%, #ff8a50 52%, #ff5e5b 100%);
    --grad-soft: linear-gradient(115deg, rgba(255, 181, 71, 0.14), rgba(255, 94, 91, 0.12));
    --grad-deep: radial-gradient(120% 140% at 85% -10%, rgba(255, 138, 80, 0.28), transparent 55%), #15121b;
    --spot: radial-gradient(60% 55% at 50% 0%, rgba(255, 181, 71, 0.16), transparent 70%);

    --danger: #ff6b6b;
    --success: #4ade80;
    --info: #8ab4ff;

    --font-display: 'Unbounded', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --radius-s: 10px;
    --radius: 16px;
    --radius-l: 22px;
    --shadow-s: 0 2px 10px rgba(0, 0, 0, 0.35);
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    --shadow-l: 0 30px 80px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
}


* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { max-width: 100%; overflow-x: hidden; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); }
a:hover { color: #ffd08a; }

h1, h2, h3, h4 { font-family: var(--font-body); color: var(--ink); }

::selection { background: rgba(255, 138, 80, 0.25); }

/* Скроллбар */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a3444; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #4d4559; }

/* ── Утилиты (совместимость разметки) ─────────────────────── */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.ms-2 { margin-left: 0.5rem; }
.w-100 { width: 100%; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.text-center { text-align: center; }

/* ── Кнопки ───────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: 0.95rem; font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.btn .icon-svg { width: 17px; height: 17px; }

.btn-primary,
.btn-gradient {
    background: var(--grad);
    color: var(--on-accent);
    box-shadow: 0 8px 26px rgba(255, 138, 80, 0.32);
}
.btn-primary:hover,
.btn-gradient:hover {
    color: var(--on-accent);
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(255, 138, 80, 0.45);
}
.btn-primary:active,
.btn-gradient:active { transform: translateY(0); }

.btn-secondary {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--ink);
}
.btn-secondary:hover { background: var(--surface-3); color: var(--ink); transform: translateY(-1px); }

.btn-ghost {
    background: var(--surface);
    border-color: var(--border-strong);
    color: var(--ink);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); background: rgba(255,181,71,.08); }

.btn-outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--ink-soft);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }

/* Кнопка на тёмном фоне (hero-полосы, футер) */
.btn-outline-light {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.20); color: #fff; border-color: rgba(255,255,255,0.6); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ── Карточки / блоки ─────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: 24px;
    box-shadow: var(--shadow-s);
}
.card h3 { font-size: 1.05rem; margin: 12px 0 6px; font-weight: 800; }
.card p { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.card .card-icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--grad-soft);
    border: 1px solid rgba(255, 181, 71, 0.25);
    color: var(--teal);
    display: flex; align-items: center; justify-content: center;
}
.card .card-icon svg { width: 17px; height: 17px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.hero { text-align: center; padding: 48px 0 40px; }
.hero h1 { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; line-height: 1.2; margin-bottom: 16px; letter-spacing: -0.01em; }
.hero h1 .grad,
.grad {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p { color: var(--muted); font-size: 1.08rem; max-width: 620px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.page-title { font-family: var(--font-display); font-size: 1.55rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.page-subtitle { color: var(--muted); margin-bottom: 26px; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-s);
}
.stat-label { color: var(--muted); font-size: 0.84rem; font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 1.55rem; font-weight: 800; color: var(--ink); }
.stat-value .unit { font-size: 0.88rem; color: var(--faint); font-weight: 600; }

.stub-notice {
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-l);
    padding: 40px 24px;
    text-align: center;
    color: var(--muted);
    background: var(--surface-2);
}

/* ── Алерты ───────────────────────────────────────────────── */
.alert, .alert-info, .alert-error, .alert-success, .alert-danger {
    border-radius: var(--radius-s);
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    font-weight: 500;
}
.alert-info  { background: rgba(138,180,255,.10); border: 1px solid rgba(138,180,255,.28); color: #c9dbff; }
.alert-success { background: rgba(74,222,128,.10); border: 1px solid rgba(74,222,128,.3); color: #a7f3c4; }
.alert-error, .alert-danger { background: rgba(255,107,107,.10); border: 1px solid rgba(255,107,107,.32); color: #ffc0bd; }

/* ── Формы ────────────────────────────────────────────────── */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: 26px;
    max-width: 520px;
    box-shadow: var(--shadow-s);
}
.form-card h3 { font-weight: 800; }
.form-card label { display: block; color: var(--ink-soft); font-size: 0.88rem; font-weight: 600; margin: 14px 0 6px; }
.form-card input {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    color: var(--ink);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-card input:focus {
    outline: none;
    border-color: var(--aqua);
    box-shadow: 0 0 0 3px rgba(255, 138, 80, 0.15);
    background: var(--surface);
}
.form-card .btn-primary { margin-top: 18px; }

/* ── Знак рубля (класс .coin-icon оставлен для совместимости разметки) ── */
.coin-icon { display: inline; font-weight: 700; color: inherit; }
.coin-icon::after { content: '₽'; }
.coin-icon-lg, .coin-icon-xl { font-size: 1em; }

/* ── Спиннер / инфо ───────────────────────────────────────── */
.spinner {
    width: 34px; height: 34px;
    border: 3px solid var(--border);
    border-top-color: var(--teal);
    border-radius: 50%;
    margin: 18px auto;
    animation: faSpin 0.9s linear infinite;
}
@keyframes faSpin { to { transform: rotate(360deg); } }

.info-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    padding: 14px 16px;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.back-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 600;
    margin-bottom: 18px;
}
.back-link:hover { color: var(--teal); }

/* ============================================================
   Авторизация (login / register / forgot / reset / verify)
   ============================================================ */
.auth-page {
    min-height: 100vh;
    background:
        radial-gradient(700px 380px at 12% -10%, rgba(255, 138, 80, 0.16), transparent 60%),
        radial-gradient(700px 420px at 105% 110%, rgba(255, 181, 71, 0.14), transparent 60%),
        var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

.auth-back {
    position: fixed;
    top: 18px; left: 20px;
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem; font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(22, 20, 28, 0.8);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
    transition: color 0.2s, border-color 0.2s;
    z-index: 10;
}
.auth-back:hover { color: var(--teal); border-color: var(--teal); }

.auth-container { width: 100%; max-width: 880px; }

.auth-box {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 26px;
    overflow: hidden;
    box-shadow: var(--shadow-l);
}

.auth-video-section {
    position: relative;
    min-height: 100%;
    background: var(--grad-deep);
    overflow: hidden;
}
.auth-video-section video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.55;
}
.auth-video-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(11, 10, 15, 0.2), rgba(11, 10, 15, 0.85));
}
.auth-brand-overlay {
    position: absolute; inset: 0;
    display: flex; align-items: flex-end;
    padding: 30px;
}
.auth-brand-overlay h1 {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}

.auth-form-section { padding: 38px 36px; }
.auth-heading { font-size: 1.45rem; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.01em; }
.auth-subheading { color: var(--muted); font-size: 0.92rem; margin-bottom: 22px; }

.auth-form-group { margin-bottom: 14px; }
.auth-label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.auth-input-wrapper { position: relative; }
.auth-input-icon {
    position: absolute; left: 13px; top: 50%;
    transform: translateY(-50%);
    width: 17px; height: 17px;
    color: var(--faint);
    pointer-events: none;
}
.auth-input {
    width: 100%;
    padding: 12px 14px 12px 40px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-s);
    color: var(--ink);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-input:focus {
    outline: none;
    border-color: var(--aqua);
    box-shadow: 0 0 0 3px rgba(255, 138, 80, 0.15);
    background: var(--surface);
}
.auth-input::placeholder { color: var(--faint); }

.auth-submit {
    width: 100%;
    padding: 13px;
    margin-top: 8px;
    border: none;
    border-radius: 999px;
    background: var(--grad);
    color: var(--on-accent);
    font-size: 0.98rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(255, 181, 71, 0.30);
    transition: transform 0.16s, box-shadow 0.2s;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 138, 80, 0.38); }

.google-auth-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.93rem; font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.google-auth-btn:hover { border-color: var(--ink); box-shadow: var(--shadow-s); color: var(--ink); }

.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 18px 0;
    color: var(--faint);
    font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-forgot { text-align: right; margin-top: -6px; margin-bottom: 12px; }
.auth-forgot a, .auth-link, .auth-footer-link a { color: var(--teal); font-size: 0.87rem; font-weight: 600; text-decoration: none; }
.auth-forgot a:hover, .auth-link:hover, .auth-footer-link a:hover { text-decoration: underline; }

.auth-footer-link { text-align: center; margin-top: 20px; color: var(--muted); font-size: 0.88rem; }
.auth-terms { text-align: center; margin-top: 14px; color: var(--faint); font-size: 0.76rem; line-height: 1.5; }
.auth-terms a { color: var(--muted); }
.auth-message { text-align: center; padding: 10px 0; }

/* Старые классы auth-brand (verify/reset) */
.auth-brand, .auth-logo-section { text-align: center; margin-bottom: 18px; }
.auth-logo-icon { display: inline-flex; color: var(--teal); }
.auth-logo-icon svg { width: 40px; height: 40px; }

.help-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--border);
    color: var(--ink-soft);
    font-size: 0.68rem;
    cursor: help;
}

/* verify / reset — узкая карточка */
.auth-page .auth-box.single { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
.verification-icon { font-size: 3rem; text-align: center; margin-bottom: 12px; }

/* ============================================================
   Страницы ошибок / maintenance
   ============================================================ */
.animated-bg { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.gradient-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
}
.gradient-circle:nth-child(1) { width: 420px; height: 420px; background: #ff8a50; top: -120px; left: -100px; }
.gradient-circle:nth-child(2) { width: 380px; height: 380px; background: #ffb547; bottom: -140px; right: -80px; }
.gradient-circle:nth-child(3) { width: 300px; height: 300px; background: #ff5e5b; top: 40%; left: 55%; }

.error-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    background: var(--bg);
}
.error-container { text-align: center; max-width: 520px; position: relative; z-index: 1; }
.error-code {
    font-family: var(--font-display);
    font-size: 4.4rem;
    font-weight: 800;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.error-icon { font-size: 3rem; margin-bottom: 8px; }
.error-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 10px; }
.error-text { color: var(--muted); margin-bottom: 24px; }
.error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.maintenance-container {
    min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}
.maintenance-icon { font-size: 3rem; margin-bottom: 10px; }
.maintenance-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-l);
    padding: 34px;
    max-width: 560px;
    text-align: center;
    box-shadow: var(--shadow-l);
}
.maintenance-card h1 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 10px; }
.maintenance-card .subtitle { color: var(--muted); margin-bottom: 8px; }

/* ============================================================
   Мобильная адаптация общих блоков
   ============================================================ */
@media (max-width: 860px) {
    .auth-box { grid-template-columns: 1fr; }
    .auth-video-section { min-height: 140px; }
    .auth-form-section { padding: 26px 22px; }
}

@media (max-width: 640px) {
    .hero { padding: 34px 0 28px; }
    .hero h1 { font-size: 1.55rem; }
    .hero p { font-size: 0.97rem; }
    .page-title { font-size: 1.25rem; }
    .stat-value { font-size: 1.3rem; }
    .card { padding: 18px; }
}

/* Панель бренда на страницах входа */
.auth-brand-name { font-family: var(--font-display); color: #fff; font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.auth-brand-name span { color: var(--amber, #ffb547); }
.auth-brand-text { color: rgba(255,255,255,.82); margin: 8px 0 0; font-size: .95rem; line-height: 1.5; max-width: 32ch; }
