/* ============================================================
   Fish Audio — дизайн-система «Lagoon Studio»
   Светлая студийная тема: тёплый фон, морской ink, бирюзово-
   лазурный градиент, коралловый акцент, мотив волны.
   НЕ совместима по палитре со старой тёмной темой — все
   страницы продукта используют только её.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    /* Палитра */
    --bg: #f2f6f7;
    --bg-warm: #eef4f4;
    --surface: #ffffff;
    --surface-2: #f7fafb;
    --border: #dfeaec;
    --border-strong: #c4dadb;
    --ink: #0c1f2b;
    --ink-soft: #33465a;
    --muted: rgba(12, 31, 43, 0.58);
    --faint: rgba(12, 31, 43, 0.38);

    --teal: #0d9488;
    --aqua: #06b6d4;
    --blue: #2563eb;
    --coral: #ff6b57;
    --gold: #f59e0b;

    --grad: linear-gradient(120deg, #0d9488 0%, #06b6d4 55%, #2563eb 115%);
    --grad-soft: linear-gradient(120deg, rgba(13, 148, 136, 0.10), rgba(6, 182, 212, 0.10));
    --grad-deep: linear-gradient(135deg, #07262e 0%, #0a3a40 55%, #0b3550 100%);

    --danger: #dc4446;
    --success: #0f9d6c;
    --info: #2563eb;

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

    --radius-s: 10px;
    --radius: 16px;
    --radius-l: 22px;
    --shadow-s: 0 2px 10px rgba(12, 31, 43, 0.06);
    --shadow: 0 10px 34px rgba(12, 31, 43, 0.09);
    --shadow-l: 0 24px 60px rgba(7, 38, 46, 0.16);
}

* { 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: #0aa8a0; }

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

::selection { background: rgba(6, 182, 212, 0.25); }

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

/* ── Утилиты (совместимость разметки) ─────────────────────── */
.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: #fff;
    box-shadow: 0 8px 22px rgba(13, 148, 136, 0.30);
}
.btn-primary:hover,
.btn-gradient:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.38);
}
.btn-primary:active,
.btn-gradient:active { transform: translateY(0); }

.btn-secondary {
    background: var(--ink);
    color: #fff;
}
.btn-secondary:hover { background: #17334a; color: #fff; 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: #f2fbfa; }

.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(13, 148, 136, 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: #eaf2fe; border: 1px solid #bfd9fb; color: #1d4fa0; }
.alert-success { background: #e7f8f0; border: 1px solid #b7e8d2; color: #0b7a52; }
.alert-error, .alert-danger { background: #fdeceb; border: 1px solid #f6c7c4; color: #b23330; }

/* ── Формы ────────────────────────────────────────────────── */
.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(6, 182, 212, 0.15);
    background: #fff;
}
.form-card .btn-primary { margin-top: 18px; }

/* ── Монетка ──────────────────────────────────────────────── */
.coin-icon {
    display: inline-block;
    width: 18px; height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='coinGrad' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' style='stop-color:%238b5cf6;stop-opacity:1' /%3E%3Cstop offset='100%25' style='stop-color:%23ec4899;stop-opacity:1' /%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M12 2L15.09 8.26L22 9.27L17 14.14L18.18 21.02L12 17.77L5.82 21.02L7 14.14L2 9.27L8.91 8.26L12 2Z' fill='url(%23coinGrad)' stroke='url(%23coinGrad)' stroke-width='0.5'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    flex-shrink: 0;
    transform: translateY(-1px);
}
.coin-icon-lg { width: 24px; height: 24px; }
.coin-icon-xl { width: 32px; height: 32px; }
.coin-icon-white { background: rgba(255, 255, 255, 0.22); }
.coin-icon-gold { background: linear-gradient(135deg, #fbbf24, #f59e0b); }

/* ── Спиннер / инфо ───────────────────────────────────────── */
.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(6, 182, 212, 0.16), transparent 60%),
        radial-gradient(700px 420px at 105% 110%, rgba(13, 148, 136, 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(255, 255, 255, 0.75);
    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(7, 38, 46, 0.35), rgba(7, 38, 46, 0.75));
}
.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(6, 182, 212, 0.15);
    background: #fff;
}
.auth-input::placeholder { color: var(--faint); }

.auth-submit {
    width: 100%;
    padding: 13px;
    margin-top: 8px;
    border: none;
    border-radius: 999px;
    background: var(--grad);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    font-family: var(--font-body);
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(13, 148, 136, 0.30);
    transition: transform 0.16s, box-shadow 0.2s;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(6, 182, 212, 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: #fff;
    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: #67e8f9; top: -120px; left: -100px; }
.gradient-circle:nth-child(2) { width: 380px; height: 380px; background: #5eead4; bottom: -140px; right: -80px; }
.gradient-circle:nth-child(3) { width: 300px; height: 300px; background: #93c5fd; 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; }
}
