/* 登录 / 注册 — 统一认证页样式 */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --color-primary: #3b82f6;
    --color-bg: #050816;
    --color-surface: rgba(255, 255, 255, 0.08);
    --color-text-muted: rgba(226, 232, 240, 0.72);
    --space-2: 16px;
    --space-3: 24px;
    --radius-card: 16px;
    --shadow-card: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.auth-page {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-3);
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    color: #fff;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 15% 10%, rgba(125, 92, 255, 0.42), transparent 28%),
        radial-gradient(circle at 85% 18%, rgba(0, 229, 255, 0.28), transparent 26%),
        radial-gradient(circle at 50% 90%, rgba(255, 0, 122, 0.28), transparent 30%),
        linear-gradient(135deg, #050816 0%, #111827 45%, #220617 100%);
}

.auth-page::before,
.auth-page::after {
    content: '';
    position: fixed;
    inset: -20%;
    pointer-events: none;
}

.auth-page::before {
    background:
        linear-gradient(120deg, transparent 15%, rgba(255, 255, 255, 0.16) 16%, transparent 17%),
        linear-gradient(35deg, transparent 40%, rgba(255, 255, 255, 0.10) 41%, transparent 43%);
    opacity: 0.75;
}

.auth-page::after {
    background-image:
        linear-gradient(115deg, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px),
        linear-gradient(25deg, rgba(255, 255, 255, 0.10) 0 1px, transparent 1px);
    background-size: 180px 160px, 220px 190px;
    mask-image: radial-gradient(circle, #000 0%, transparent 72%);
    opacity: 0.45;
}

.auth-shell {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 920px;
    min-height: 0;
    max-height: calc(100dvh - 48px);
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(12px);
}

.auth-hero {
    flex: 1.05;
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(160deg, rgba(37, 99, 235, 0.35), rgba(124, 58, 237, 0.22) 45%, rgba(219, 39, 119, 0.18));
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-hero-art {
    width: 100%;
    max-width: 280px;
    margin-bottom: 28px;
    opacity: 0.95;
}

.auth-hero-art svg { width: 100%; height: auto; display: block; }

.auth-hero h1 {
    margin: 0 0 12px;
    font-size: 28px;
    letter-spacing: 2px;
    line-height: 1.3;
}

.auth-hero p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 320px;
}

.auth-brand-tag {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(219, 234, 254, 0.65);
    margin-bottom: 8px;
}

.auth-card {
    flex: 0.95;
    padding: 42px 34px 32px;
    text-align: center;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-card img.auth-avatar {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 16px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 0 32px rgba(59, 130, 246, 0.42);
}

.auth-card h2 {
    margin: 0 0 24px;
    font-size: 24px;
    letter-spacing: 1px;
    background: linear-gradient(90deg, #fff, #93c5fd, #f0abfc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-field {
    position: relative;
    margin: 10px 0;
}

.auth-input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(4, 12, 28, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    border-radius: 14px;
    outline: none;
    font-size: 15px;
    box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.16);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input::placeholder { color: rgba(226, 232, 240, 0.64); }

.auth-input:focus {
    border-color: rgba(147, 197, 253, 0.85);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18), inset 0 1px 10px rgba(0, 0, 0, 0.16);
}

.auth-input-wrap .auth-input { padding-right: 44px; }

.auth-pwd-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: rgba(226, 232, 240, 0.75);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
}

.auth-pwd-toggle:hover { color: #fff; }

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 4px;
    font-size: 14px;
    color: var(--color-text-muted);
    text-align: left;
    cursor: pointer;
    user-select: none;
}

.auth-remember input { width: 16px; height: 16px; accent-color: var(--color-primary); }

.auth-btn {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #db2777);
    border: none;
    color: #fff;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    letter-spacing: 2px;
    box-shadow: 0 14px 32px rgba(124, 58, 237, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.auth-btn:active { transform: scale(0.97); }

.auth-btn.is-loading { opacity: 0.85; pointer-events: none; }

.auth-alert {
    border-radius: 12px;
    padding: 10px 12px;
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

.auth-alert-error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.32);
}

.auth-alert-success {
    color: #bbf7d0;
    background: rgba(16, 185, 129, 0.18);
    border: 1px solid rgba(52, 211, 153, 0.32);
}
.auth-alert-success a { color: #6ee7b7; font-weight: 600; }

.auth-link {
    display: block;
    margin-top: 22px;
    color: rgba(219, 234, 254, 0.86);
    text-decoration: none;
    transition: color 0.15s;
}

.auth-link:hover { color: #fff; }

@media (max-width: 768px) {
    .auth-page {
        padding: 10px 12px;
        align-items: center;
    }
    .auth-shell {
        flex-direction: column;
        max-width: 400px;
        max-height: calc(100dvh - 20px);
    }
    .auth-hero {
        padding: 14px 18px 10px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        flex-shrink: 0;
    }
    .auth-hero-art,
    .auth-hero h1,
    .auth-hero p { display: none; }
    .auth-brand-tag {
        margin: 0;
        font-size: 13px;
        letter-spacing: 1px;
        line-height: 1.5;
        text-transform: none;
    }
    .auth-card {
        padding: 22px 20px 18px;
        flex-shrink: 0;
    }
    .auth-card img.auth-avatar {
        width: 64px;
        height: 64px;
        margin-bottom: 10px;
    }
    .auth-card h2 {
        margin-bottom: 16px;
        font-size: 20px;
    }
    .auth-field { margin: 8px 0; }
    .auth-input { padding: 12px 14px; font-size: 14px; }
    .auth-btn { padding: 12px; margin-top: 8px; }
    .auth-link { margin-top: 14px; font-size: 14px; }
}
