/* 登录 / 注册 / 找回密码共用：全屏背景 + 简洁卡片 + 左下角署名 */

.auth-page {
    min-height: 100vh;
    margin: 0;
    position: relative;
}

/* 背景柔光：静态，不遮挡 */
.auth-page::before,
.auth-page::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.25;
    mix-blend-mode: screen;
}

.auth-page::before {
    width: min(72vw, 520px);
    height: min(72vw, 520px);
    left: max(-8%, calc(50% - 380px));
    top: max(-14%, env(safe-area-inset-top, 0));
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, transparent 68%);
}

.auth-page::after {
    width: min(60vw, 420px);
    height: min(60vw, 420px);
    right: max(-6%, calc(40% - 200px));
    bottom: max(-18%, calc(35% - 180px));
    background: radial-gradient(circle, rgba(251, 191, 36, 0.28) 0%, transparent 70%);
}

.auth-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-color: #0b1220;
    background-image: url("../assets/auth-hero-apache-bg.png");
    background-size: cover;
    background-position: center 35%;
    background-repeat: no-repeat;
    overflow: hidden;
}

.auth-bg::before {
    content: "";
    position: absolute;
    inset: -25%;
    background:
        radial-gradient(ellipse 100% 60% at 20% 10%, rgba(251, 191, 36, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 70% 50% at 85% 75%, rgba(96, 165, 250, 0.14) 0%, transparent 55%);
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.auth-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(15, 23, 42, 0.76) 0%,
        rgba(15, 23, 42, 0.22) 42%,
        rgba(15, 23, 42, 0.82) 100%
    );
    pointer-events: none;
}

.auth-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 4vw, 48px);
    box-sizing: border-box;
}

.auth-glass {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border: 1px solid rgba(255, 255, 255, 0.42);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.auth-glass > * {
    position: relative;
    z-index: 2;
}

@media (hover: hover) {
    .auth-glass:hover {
        transform: translateY(-1px);
        border-color: rgba(255, 255, 255, 0.55);
        box-shadow:
            0 24px 56px rgba(0, 0, 0, 0.30),
            inset 0 1px 0 rgba(255, 255, 255, 0.65);
    }
}

.auth-photo-credits {
    position: fixed;
    left: max(14px, env(safe-area-inset-left));
    bottom: max(14px, env(safe-area-inset-bottom));
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    pointer-events: none;
}

.auth-photo-badge {
    display: inline-block;
    max-width: min(260px, 88vw);
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.auth-photo-badge.auth-photo-title-dark {
    display: none;
}

/* ---------- 深色模式（登录 / 注册 / 找回密码） ---------- */
html.theme-dark .auth-glass,
body.theme-dark .auth-glass {
    background: rgba(30, 41, 59, 0.85) !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.40),
        inset 0 1px 0 rgba(148, 163, 184, 0.12) !important;
    color: var(--text-primary);
}

html.theme-dark .auth-glass h1,
html.theme-dark .auth-glass h2,
html.theme-dark .auth-glass label,
html.theme-dark .auth-glass p,
body.theme-dark .auth-glass h1,
body.theme-dark .auth-glass h2,
body.theme-dark .auth-glass label,
body.theme-dark .auth-glass p {
    color: var(--text-primary);
}

html.theme-dark .auth-glass .form-hint,
html.theme-dark .auth-glass .auth-footer,
body.theme-dark .auth-glass .form-hint,
body.theme-dark .auth-glass .auth-footer {
    color: var(--text-secondary) !important;
}

html.theme-dark .auth-glass input,
html.theme-dark .auth-glass select,
html.theme-dark .auth-glass textarea,
body.theme-dark .auth-glass input,
body.theme-dark .auth-glass select,
body.theme-dark .auth-glass textarea {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
    color: var(--text-primary) !important;
}

html.theme-dark .auth-glass input::placeholder,
body.theme-dark .auth-glass input::placeholder {
    color: var(--text-light) !important;
}

html.theme-dark .auth-glass a,
body.theme-dark .auth-glass a {
    color: #93c5fd;
}

html.theme-dark .auth-bg,
body.theme-dark .auth-bg {
    background-image: url("../assets/auth-hero-night-aircraft.jpg");
    background-position: center 42%;
}

html.theme-dark .auth-bg::after,
body.theme-dark .auth-bg::after {
    background: linear-gradient(
        145deg,
        rgba(2, 6, 23, 0.88) 0%,
        rgba(15, 23, 42, 0.55) 42%,
        rgba(2, 6, 23, 0.92) 100%
    ) !important;
}

html.theme-dark .auth-photo-badge.auth-photo-title-light,
body.theme-dark .auth-photo-badge.auth-photo-title-light {
    display: none;
}

html.theme-dark .auth-photo-badge.auth-photo-title-dark,
body.theme-dark .auth-photo-badge.auth-photo-title-dark {
    display: inline-block;
}

@media (prefers-reduced-motion: reduce) {
    .auth-bg {
        background-attachment: scroll;
    }

    .auth-glass {
        transform: none;
        filter: none;
    }

    .auth-glass:hover {
        transform: none;
    }
}
