/*
 * Сайт LikeTap — дизайн-система Aura (как в приложении: res/values/colors.xml
 * aura_*, ui/theme/Aura.kt): глубокий фиолетовый фон, розово-маджентовые
 * акценты, стекло карточек, мягкое свечение, большие скругления, Montserrat.
 * Цвета приложения в формате #AARRGGBB переведены в rgba().
 */

:root {
    color-scheme: dark;

    --bg: #0F0A1A;
    --bg-deep: #05030A;
    --card-top: #1E1431;
    --card-bottom: #170F25;
    --dialog-top: #2A1B42;
    --dialog-bottom: #1D1230;

    --text: #F5F0FF;
    --text-body: #EDE6FA;
    --text-soft: #CFC4E2;
    --text-muted: #B9ADCF;
    --text-faint: rgba(255, 255, 255, 0.32);

    --glass: rgba(255, 255, 255, 0.06);
    --glass-soft: rgba(255, 255, 255, 0.05);
    --hairline: rgba(255, 255, 255, 0.06);
    --stroke: rgba(255, 255, 255, 0.08);
    --stroke-strong: rgba(255, 255, 255, 0.14);

    --pink: #FF4FA3;
    --magenta: #C43BD9;
    --violet: #8B3DFF;
    --pink-soft: #FF8ACD;
    --glow: rgba(214, 51, 143, 0.40);
    --glow-violet: rgba(139, 61, 255, 0.18);
    --logo-glow: rgba(255, 60, 90, 0.45);

    --gold-light: #FFE08A;
    --gold: #F5B541;
    --gold-dark: #D98A1F;
    --gold-text: #FFD66B;
    --on-gold: #2A1600;

    --green: #3DDC97;
    --danger: #FF8A9B;
    --danger-bg: rgba(255, 106, 136, 0.10);
    --danger-stroke: rgba(255, 106, 136, 0.40);

    /* Пометки на фото галереи — как GalleryGrid приложения. */
    --badge-pending: rgba(255, 181, 71, 0.92);
    --on-badge-pending: #2A1A00;
    --badge-rejected: #E0365E;

    --accent: linear-gradient(135deg, var(--pink) 0%, var(--magenta) 55%, var(--violet) 100%);

    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;

    --page: 1120px;
    --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-body);
    background:
        radial-gradient(900px 600px at 85% -10%, rgba(214, 51, 143, 0.22), transparent 60%),
        radial-gradient(800px 600px at -10% 30%, rgba(139, 61, 255, 0.16), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--pink-soft);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 3px;
    border-radius: 8px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ─── Шапка и подвал ─────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(15, 10, 26, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--hairline);
}

.site-header__inner,
.site-footer__inner,
.page {
    width: 100%;
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 24px;
}

.site-header__inner {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.01em;
}

.brand:hover {
    text-decoration: none;
}

/* Знак LikeTap — тот же, что на экране входа приложения (app_logo_circle), с его
   красно-розовым свечением (aura_logo_glow). */
.brand__logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 6px 22px var(--logo-glow);
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav__me {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-soft);
    font-weight: 600;
    font-size: 14px;
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--hairline);
}

.site-footer__inner {
    padding-top: 20px;
    padding-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.site-footer a {
    color: var(--text-muted);
}

/* ─── Кнопки ─────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    border: 0;
    font: 600 16px/1 var(--font);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    background: var(--accent);
    box-shadow: 0 10px 30px var(--glow);
}

.btn--ghost {
    background: var(--glass);
    border: 1px solid var(--stroke-strong);
    color: var(--text);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.10);
}

.btn--small {
    height: 38px;
    padding: 0 16px;
    font-size: 14px;
}

.btn--block {
    width: 100%;
}

/* ─── Карточки и сообщения ───────────────────────────────────────────── */

.card {
    background: linear-gradient(180deg, var(--card-top), var(--card-bottom));
    border: 1px solid var(--stroke);
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.notice {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--glass);
    border: 1px solid var(--stroke);
    color: var(--text-soft);
    font-size: 14px;
    text-align: left;
}

.notice__icon {
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 800;
    background: rgba(255, 79, 163, 0.16);
    color: var(--pink-soft);
}

.notice__title {
    margin: 0 0 2px;
    color: var(--text);
    font-weight: 600;
    font-size: 14.5px;
}

.notice__text {
    margin: 0;
}

.notice--danger {
    background: var(--danger-bg);
    border-color: var(--danger-stroke);
}

.notice--danger .notice__icon {
    background: rgba(255, 106, 136, 0.18);
    color: var(--danger);
}

.notice--warning .notice__icon {
    background: rgba(245, 181, 65, 0.16);
    color: var(--gold-text);
}

.notice--success .notice__icon {
    background: rgba(61, 220, 151, 0.16);
    color: var(--green);
}

/* ─── Вход ───────────────────────────────────────────────────────────── */

.login {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
    padding-top: 56px;
    padding-bottom: 56px;
}

.showcase {
    position: relative;
    min-height: 520px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background:
        radial-gradient(420px 320px at 75% 22%, rgba(255, 79, 163, 0.55), transparent 65%),
        radial-gradient(380px 300px at 22% 70%, rgba(139, 61, 255, 0.50), transparent 65%),
        radial-gradient(300px 220px at 60% 85%, rgba(196, 59, 217, 0.35), transparent 70%),
        linear-gradient(160deg, #24173A, #120B1F);
    border: 1px solid var(--stroke);
}

.showcase::before {
    /* Абстрактные «ауры»: кольца свечения — без фото и чужих знаков. */
    content: '';
    position: absolute;
    inset: -20% -10% auto auto;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    border: 1px solid rgba(255, 138, 205, 0.22);
    box-shadow: 0 0 0 40px rgba(255, 79, 163, 0.05), 0 0 0 90px rgba(139, 61, 255, 0.04), 0 0 120px rgba(255, 79, 163, 0.25);
}

.showcase__title {
    position: relative;
    margin: 0 0 14px;
    color: var(--text);
    font-size: 44px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.showcase__text {
    position: relative;
    margin: 0;
    max-width: 440px;
    color: var(--text-soft);
    font-size: 17px;
}

.login-card {
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    text-align: center;
}

.login-card__title {
    margin: 0;
    color: var(--text);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.login-card__text {
    margin: -10px 0 0;
    color: var(--text-muted);
}

.google-slot {
    min-height: 44px;
    display: flex;
    justify-content: center;
}

.consent {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* Ссылку в тексте отличает не только цвет: по яркости он почти как текст. */
.consent a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.restore-actions,
.in-app-actions {
    display: grid;
    gap: 10px;
}

/* ─── PIN-код на входе ───────────────────────────────────────────────── */

.pin-form {
    display: grid;
    gap: 12px;
}

/* Поле PIN: цифры набираются в настоящее поле, а на экране вместо них —
   точки (data-pin-dots, login.js). Само поле прозрачное поверх точек: так
   цифр не видно ни в одном браузере, а менеджер паролей не принимает его
   за пароль сайта. */
.pin-field {
    position: relative;
    display: block;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--glass);
    border: 1px solid var(--stroke);
}

.pin-field:focus-within {
    border-color: var(--pink-soft);
}

.pin-field__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    color: transparent;
    caret-color: transparent;
    font-size: 16px;
    text-align: center;
    outline: none;
}

.pin-field__dots {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    pointer-events: none;
}

.pin-field__dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text);
}

.pin-field__dots:empty::before {
    content: '• • • •';
    color: var(--text-muted);
    letter-spacing: 6px;
    font-size: 18px;
}

.pin-forgot {
    color: var(--text-muted);
    font-size: 14px;
}

.pin-forgot summary {
    cursor: pointer;
    color: var(--pink-soft);
    font-weight: 600;
}

.pin-forgot p {
    margin: 8px 0 0;
}

.signing-in {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    place-items: center;
    background: rgba(6, 3, 12, 0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--text);
    font-weight: 600;
}

.signing-in.is-visible {
    display: grid;
}

.signing-in__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.spinner {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.14);
    border-top-color: var(--pink);
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Отдельные состояния (блокировка, анкета не заполнена, ошибка) ──── */

.state {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 56px 24px;
}

.state-card {
    width: 100%;
    max-width: 460px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.state-card__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 32px;
    background: radial-gradient(circle, rgba(255, 79, 163, 0.30), rgba(255, 79, 163, 0.06));
    box-shadow: 0 0 40px var(--glow);
}

/* Код ошибки (404, 500…) — вместо значка. */
.state-card__code {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    background: var(--accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.state-card__icon--danger {
    background: radial-gradient(circle, rgba(255, 106, 136, 0.32), rgba(255, 106, 136, 0.06));
    box-shadow: 0 0 40px rgba(255, 106, 136, 0.30);
}

.state-card__title {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    font-weight: 700;
}

.state-card__text {
    margin: 0;
    color: var(--text-soft);
}

.state-card__facts {
    width: 100%;
    margin: 6px 0;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: var(--glass);
    border: 1px solid var(--stroke);
    color: var(--text-body);
    text-align: left;
    display: grid;
    gap: 6px;
    overflow-wrap: anywhere;
}

/* ─── Телефон ────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    .login {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
        gap: 20px;
        padding-top: 24px;
        padding-bottom: 32px;
    }

    .showcase {
        min-height: 260px;
        padding: 28px;
    }

    .showcase__title {
        font-size: 32px;
    }

    .showcase__text {
        font-size: 15.5px;
    }
}

@media (max-width: 560px) {
    /* Только боковые отступы: верх и низ у страницы входа и подвала свои. */
    .site-header__inner,
    .site-footer__inner,
    .page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-header__inner {
        height: 60px;
    }

    .login-card {
        padding: 28px 20px;
    }

    .login-card__title {
        font-size: 24px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation: none;
    }

    .btn {
        transition: none;
    }
}
