﻿*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --chrome: #0b0c12;
    --gold-light: #F0C040;
    --gold: #D4A017;
    --gold-dark: #A67C00;
    --accent: linear-gradient(135deg, #F0C040 0%, #D4A017 48%, #A67C00 100%);
    --panel-dark: #0b0c12;
    --panel-border: rgba(255, 255, 255, 0.08);
    --auth-form-width: clamp(380px, 38vw, 480px);
    --text-on-dark: #f8fafc;
    --text-muted-dark: #94a3b8;
    --text: #0f172a;
    --text2: #475569;
    --text3: #64748b;
    --muted: #94a3b8;
    --r-sm: 12px;
    --r-md: 16px;
    --r-lg: 24px;
    --ease-fast: 0.15s cubic-bezier(0.22, 1, 0.36, 1);
    --ease: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
    height: 100%;
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--panel-dark);
    color: var(--text-on-dark);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ── Layout ───────────────────────────────────── */
.auth-layout {
    min-height: 100dvh;
    overflow: hidden;
}

/* ── Form panel (left, fixed) ─────────────────── */
.auth-form-panel {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: var(--auth-form-width);
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vh, 48px) clamp(24px, 4vw, 48px);
    background: var(--panel-dark);
    border-right: 1px solid var(--panel-border);
    overflow-y: auto;
    overscroll-behavior: contain;
    animation: authSlideIn 0.5s var(--ease) both;
}

@keyframes authSlideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}

.auth-form-inner {
    width: 100%;
    max-width: 380px;
}

/* ── Brand ────────────────────────────────────── */
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: clamp(22px, 3.5vh, 32px);
    transition: opacity var(--ease-fast), transform var(--ease-fast);
}

.auth-brand:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.auth-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.auth-brand-name {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Headings ─────────────────────────────────── */
.auth-heading {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.045em;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 6px;
}

.auth-sub {
    font-size: 0.9rem;
    color: var(--text-muted-dark);
    line-height: 1.5;
    margin-bottom: clamp(18px, 3vh, 24px);
}

/* ── Trust badge (register) ───────────────────── */
.auth-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(240, 192, 64, 0.1);
    border: 1px solid rgba(240, 192, 64, 0.22);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold-light);
}

.auth-trust-badge svg {
    flex-shrink: 0;
    opacity: 0.9;
}

/* ── Alert ────────────────────────────────────── */
.auth-alert {
    margin-bottom: 16px;
    padding: 11px 14px;
    border-radius: var(--r-sm);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.45;
    animation: authShake 0.35s ease;
}

.auth-alert--error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.28);
    color: #fca5a5;
}

.auth-alert--success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.28);
    color: #86efac;
}

@keyframes authShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* ── Form fields ──────────────────────────────── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
}

.auth-field__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.auth-forgot-link {
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--gold-light);
    transition: color var(--ease-fast), opacity var(--ease-fast);
}

.auth-forgot-link:hover { color: #fff; }

.auth-field__wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-field__icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    pointer-events: none;
    display: grid;
    place-items: center;
}

.auth-field__input {
    width: 100%;
    height: 48px;
    padding: 0 44px 0 44px;
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.05);
    font-family: inherit;
    font-size: 0.88rem;
    color: #fff;
    outline: none;
    transition: border-color var(--ease-fast), box-shadow var(--ease-fast), background var(--ease-fast), transform var(--ease-fast);
}

.auth-field__input:focus {
    border-color: rgba(240, 192, 64, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(240, 192, 64, 0.12);
}

.auth-field__input::placeholder { color: #64748b; }

.auth-field__toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    display: grid;
    place-items: center;
    transition: color var(--ease-fast), transform var(--ease-fast);
}

.auth-field__toggle:hover {
    color: #fff;
    transform: scale(1.08);
}

/* ── Checkbox ─────────────────────────────────── */
.auth-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.auth-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--gold);
    cursor: pointer;
    flex-shrink: 0;
}

.auth-check label {
    font-size: 0.78rem;
    color: var(--text-muted-dark);
    line-height: 1.5;
    cursor: pointer;
}

.auth-check label a {
    color: var(--gold-light);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(240, 192, 64, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color var(--ease-fast);
}

.auth-check label a:hover { text-decoration-color: var(--gold-light); }

/* ── Buttons ──────────────────────────────────── */
.auth-submit {
    width: 100%;
    height: 50px;
    margin-top: 4px;
    border: none;
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--chrome);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform var(--ease-fast), box-shadow var(--ease-fast), background var(--ease-fast);
}

.auth-submit:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 10px 32px rgba(255, 255, 255, 0.18);
    background: #f8fafc;
}

.auth-submit:active {
    transform: translateY(0) scale(0.99);
    transition-duration: 0.08s;
}

.auth-submit svg {
    transition: transform var(--ease-fast);
}

.auth-submit:hover svg {
    transform: translateX(3px);
}

/* ── Divider + Google ─────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-google {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--ease-fast), border-color var(--ease-fast), background var(--ease-fast), box-shadow var(--ease-fast);
}

.auth-google:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.auth-google:active {
    transform: translateY(0);
    transition-duration: 0.08s;
}

.auth-google svg { flex-shrink: 0; }

.auth-google:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.auth-google:disabled:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
}

/* ── Platform strip (form) ────────────────────── */
.auth-platforms {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-platforms__title {
    margin-bottom: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.4;
}

.auth-platforms__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.auth-platforms__tag {
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted-dark);
    transition: border-color var(--ease-fast), color var(--ease-fast), background var(--ease-fast);
}

.auth-platforms__tag--primary {
    color: var(--gold-light);
    border-color: rgba(240, 192, 64, 0.28);
    background: rgba(240, 192, 64, 0.1);
}

.auth-platforms__tag:hover {
    border-color: rgba(240, 192, 64, 0.3);
    color: #e2e8f0;
    background: rgba(240, 192, 64, 0.08);
}

/* ── Switch + terms ───────────────────────────── */
.auth-switch {
    margin-top: 20px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted-dark);
}

.auth-switch a {
    color: var(--gold-light);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(240, 192, 64, 0.3);
    text-underline-offset: 2px;
    transition: text-decoration-color var(--ease-fast), color var(--ease-fast);
}

.auth-switch a:hover {
    color: #fff;
    text-decoration-color: var(--gold-light);
}

.auth-terms {
    margin-top: 14px;
    text-align: center;
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.5;
}

.auth-terms a {
    color: var(--text-muted-dark);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(148, 163, 184, 0.4);
    text-underline-offset: 2px;
    transition: color var(--ease-fast);
}

.auth-terms a:hover { color: #e2e8f0; }

/* ── Showcase panel (right, auto-scroll only) ─── */
.auth-showcase {
    position: relative;
    margin-left: var(--auth-form-width);
    display: flex;
    flex-direction: column;
    background: var(--panel-dark);
    overflow: hidden;
    height: 100dvh;
    min-height: 100dvh;
    touch-action: none;
    user-select: none;
}

.auth-gallery-wrap {
    position: relative;
    flex: 1;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.auth-gallery-columns {
    display: flex;
    gap: 12px;
    height: 100%;
    padding: 0 16px;
    overflow: hidden;
}

.auth-gallery-col {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.auth-gallery-track {
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: authColScroll 75s linear infinite;
    will-change: transform;
}

.auth-gallery-col:nth-child(2) .auth-gallery-track {
    animation-duration: 92s;
    animation-direction: reverse;
}

.auth-gallery-col:nth-child(3) .auth-gallery-track {
    animation-duration: 68s;
}

.auth-showcase.is-loading .auth-gallery-track {
    animation-play-state: paused;
}

@keyframes authColScroll {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
}

.auth-gallery-item {
    flex-shrink: 0;
}

.auth-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.03);
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

.auth-gallery-fade {
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
    z-index: 2;
}

.auth-gallery-fade--top {
    top: 0;
    background: linear-gradient(to bottom, var(--panel-dark), transparent);
}

.auth-gallery-fade--bottom {
    bottom: 0;
    height: 100px;
    background: linear-gradient(to top, var(--panel-dark) 30%, transparent);
}

/* ── Loading screen ───────────────────────────── */
.auth-loader {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background: var(--panel-dark);
    transition: opacity 0.45s var(--ease), visibility 0s;
}

.auth-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s var(--ease), visibility 0s 0.45s;
}

.auth-loader__logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    animation: authLoaderPulse 1.6s ease-in-out infinite;
}

.auth-loader__spinner {
    width: 32px;
    height: 32px;
    border: 2.5px solid rgba(255, 255, 255, 0.12);
    border-top-color: var(--gold-light);
    border-radius: 50%;
    animation: authLoaderSpin 0.8s linear infinite;
}

.auth-loader__text {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted-dark);
    letter-spacing: 0.02em;
}

@keyframes authLoaderSpin {
    to { transform: rotate(360deg); }
}

@keyframes authLoaderPulse {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}

/* ── Centered layout (forgot password) ────────── */
.auth-layout--center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    background: var(--panel-dark);
}

.auth-form-panel--center {
    position: relative;
    width: 100%;
    max-width: 440px;
    height: auto;
    min-height: auto;
    margin: 20px;
    border-right: none;
    border-radius: var(--r-lg);
    border: 1px solid var(--panel-border);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
    html, body {
        height: auto;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .auth-layout {
        min-height: 100dvh;
    }

    .auth-form-panel {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 100dvh;
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: clamp(28px, 6vw, 40px);
        padding-bottom: max(32px, env(safe-area-inset-bottom));
        border-right: none;
        overflow-y: visible;
        overscroll-behavior: auto;
    }

    .auth-form-inner {
        padding-bottom: 8px;
    }

    .auth-showcase {
        display: none;
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding-left: 20px;
        padding-right: 20px;
    }

    .auth-form-inner {
        max-width: 100%;
    }

    .auth-heading {
        font-size: 1.4rem;
    }

    .auth-field__input {
        height: 46px;
        font-size: 16px;
    }

    .auth-submit,
    .auth-google {
        height: 48px;
    }

    .auth-platforms__tags {
        gap: 5px;
    }

    .auth-platforms__tag {
        font-size: 0.68rem;
        padding: 4px 9px;
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    :root {
        --auth-form-width: clamp(360px, 42vw, 440px);
    }

    .auth-gallery-columns {
        gap: 10px;
        padding: 0 12px;
    }
}

@media (min-width: 1100px) {
    .auth-gallery-columns {
        gap: 14px;
        padding: 0 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-gallery-track {
        animation: none;
    }

    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}
