﻿/* ==========================================================================
   DeepMatch — Midnight Romance : Landing / Auth
   ========================================================================== */

.auth-layout {
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    flex: 1;
}

/* ------------------------- Hero side ------------------------- */
.auth-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: 44px 56px;
    overflow: hidden;
    color: var(--text);
}

.auth-hero-image {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 55% at 78% 22%, var(--hero-glow-a) 0%, transparent 62%),
        radial-gradient(55% 50% at 18% 82%, var(--hero-glow-b) 0%, transparent 60%),
        radial-gradient(120% 90% at 50% 110%, var(--hero-glow-a) 0%, transparent 55%),
        var(--hero-bg);
    z-index: 0;
}

    .auth-hero-image::before {
        content: "";
        position: absolute;
        top: -20%;
        right: -15%;
        width: 520px;
        height: 520px;
        border-radius: 50%;
        border: 1px solid var(--hero-ring);
        background: repeating-radial-gradient(circle, var(--hero-ring) 0 2px, transparent 2px 34px);
        opacity: 0.7;
    }

    .auth-hero-image::after {
        content: "";
        position: absolute;
        bottom: -26%;
        left: -12%;
        width: 460px;
        height: 460px;
        border-radius: 50%;
        border: 1px solid var(--hero-ring);
        box-shadow: inset 0 0 90px var(--hero-glow-b);
    }

.auth-hero > * {
    position: relative;
    z-index: 1;
}

.auth-hero-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .auth-hero-branding svg {
        color: var(--accent);
        filter: drop-shadow(0 4px 14px rgba(236, 72, 153, 0.45));
    }

.auth-hero-title {
    font-size: clamp(34px, 4.2vw, 52px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.auth-hero-desc {
    max-width: 460px;
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-muted);
}

.auth-hero-stats {
    display: flex;
    gap: 26px;
    margin-top: 36px;
}

    .auth-hero-stats .stat-value {
        font-size: 22px;
        font-weight: 700;
        color: var(--text);
    }

    .auth-hero-stats .stat-label {
        font-size: 12px;
        color: var(--text-muted);
    }

    .auth-hero-stats .stat-divider {
        width: 1px;
        background: var(--border);
    }

.auth-hero-footer {
    font-size: 12px;
    color: var(--text-inactive);
}

/* ------------------------- Form panel ------------------------- */
.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px 32px;
    background: var(--bg);
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.auth-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
}

    .auth-logo svg {
        color: var(--accent);
    }

.auth-title {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 8px;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.55;
}

.auth-form-container form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.auth-switch {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    padding-top: 6px;
}

    .auth-switch a {
        font-weight: 600;
    }

.forgot-password-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
}

.forgot-password-link {
    background: none;
    border: none;
    padding: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.2s ease;
}

    .forgot-password-link:hover {
        color: var(--primary-hover, var(--primary));
        text-decoration: underline;
    }

/* ----------------------------- OTP verification --------------------------- */
.auth-otp-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    animation: otpFadeIn 0.35s ease;
}

.otp-sent-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft, rgba(154, 52, 18, 0.12));
    color: var(--primary);
    margin: 4px auto 0;
}

.otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 4px;
}

.otp-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .otp-digit:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(154, 52, 18, 0.15);
    }

.otp-resend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-muted);
}

.otp-resend-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 13.5px;
}

    .otp-resend-link:disabled,
    .otp-resend-link.disabled {
        opacity: 0.55;
        cursor: default;
        pointer-events: none;
    }

.otp-back-link {
    background: none;
    border: none;
    margin: 0 auto;
    padding: 0;
    color: var(--text-muted);
    font-size: 13.5px;
    text-decoration: underline;
    cursor: pointer;
}

    .otp-back-link:hover {
        color: var(--text);
    }

@keyframes otpFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ------------------------- Auth form enhancements ------------------------- */
.auth-error {
    display: none;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    background: var(--danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: var(--danger);
    font-size: 13.5px;
    line-height: 1.5;
    animation: authShake 0.4s ease;
}

    .auth-error svg {
        flex-shrink: 0;
        margin-top: 1px;
    }

    .auth-error.show {
        display: flex;
    }

.password-field {
    position: relative;
}

    .password-field input {
        padding-right: 46px;
    }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-inactive);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

    .password-toggle:hover {
        color: var(--text);
        background: var(--surface-hover);
    }

    .password-toggle.active {
        color: var(--primary);
    }

    .password-toggle .pw-eye-off {
        display: none;
    }

    .password-toggle.active .pw-eye {
        display: none;
    }

    .password-toggle.active .pw-eye-off {
        display: block;
    }

.auth-btn-spinner {
    display: none;
}

@keyframes authShake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

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

/* ------------------------- Responsive ------------------------- */
@media (max-width: 980px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        padding: 28px 32px 20px;
        gap: 22px;
        border-bottom: 1px solid var(--border);
    }

    .auth-hero-image {
        background:
            radial-gradient(70% 90% at 85% 0%, var(--hero-glow-a) 0%, transparent 60%),
            radial-gradient(70% 90% at 10% 100%, var(--hero-glow-b) 0%, transparent 60%),
            var(--hero-bg);
    }

        .auth-hero-image::before,
        .auth-hero-image::after {
            display: none;
        }

    .auth-hero-title {
        font-size: clamp(28px, 6vw, 38px);
        margin-bottom: 10px;
    }

    .auth-hero-desc {
        font-size: 14px;
    }

    .auth-hero-stats {
        margin-top: 18px;
    }

    .auth-hero-footer {
        display: none;
    }

    .auth-panel {
        align-items: flex-start;
        padding: 32px 20px 56px;
    }
}

@media (max-width: 480px) {
    .auth-hero {
        padding: 20px 16px 18px;
    }

    .auth-hero-stats {
        gap: 16px;
    }

    .auth-hero-stats .stat-value {
        font-size: 18px;
    }

    .auth-panel {
        padding: 24px 16px 48px;
    }

    .auth-title {
        font-size: 26px;
    }
}
