/* ===== 登录/注册页 ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    background: var(--bg);
}

/* ===== 左侧品牌面板 — 渐变 + 点阵 ===== */
.auth-brand {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    color: #fff;
    padding: var(--space-3xl);
    position: relative;
    overflow: hidden;
}

/* 动态光晕 */
.auth-brand::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 60%;
    height: 160%;
    background: radial-gradient(ellipse, rgba(255,255,255,.1), transparent 60%);
    pointer-events: none;
    animation: authGlow 12s ease-in-out infinite alternate;
}

/* 点阵叠加 */
.auth-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

@keyframes authGlow {
    from { transform: translate(0, 0) rotate(0deg); }
    to { transform: translate(10%, 10%) rotate(8deg); }
}

.auth-brand-content {
    max-width: 420px;
    position: relative;
    z-index: 1;
}
.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-xl);
    font-weight: 800;
    margin-bottom: var(--space-3xl);
    opacity: .9;
    letter-spacing: -.02em;
}
.auth-brand-logo .icon {
    width: 24px;
    height: 24px;
}
.auth-brand h2 {
    font-size: var(--text-4xl);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: var(--space-md);
    letter-spacing: -.03em;
}
.auth-brand > p,
.auth-brand-content > p {
    font-size: var(--text-lg);
    opacity: .8;
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}
.auth-brand-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.auth-brand-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: var(--text-base);
    font-weight: 500;
    opacity: .9;
}
.auth-brand-features li .icon {
    color: rgba(255,255,255,.7);
}

/* ===== 右侧表单面板 ===== */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    min-height: 100vh;
    position: relative;
}

/* 表单区域装饰渐变 */
.auth-form-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(0,102,255,.03) 0%, transparent 100%);
    pointer-events: none;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}
.auth-logo .icon {
    width: 28px;
    height: 28px;
    color: var(--primary);
}
.auth-logo span {
    font-size: var(--text-2xl);
    font-weight: 800;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -.02em;
}
.auth-desc {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-xl);
}

/* ===== Tab 切换 — 胶囊式 ===== */
.auth-tabs {
    display: flex;
    position: relative;
    background: var(--bg-alt);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: var(--space-xl);
}
.auth-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--duration-base) ease;
    position: relative;
    z-index: 1;
    border-radius: var(--radius-sm);
}
.auth-tab:hover {
    color: var(--text-secondary);
}
.auth-tab.active {
    color: var(--primary);
}
.auth-tab-indicator {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease-out-expo);
}
.auth-tabs .auth-tab:last-of-type.active ~ .auth-tab-indicator,
.auth-tab-indicator.right {
    transform: translateX(100%);
}

/* ===== 表单 ===== */
.auth-form {
    display: none;
}
.auth-form.active {
    display: block;
    animation: authFadeIn .35s var(--ease-out-expo);
}
@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 输入框带图标 */
.input-with-icon {
    position: relative;
}
.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--duration-fast) ease;
}
.input-with-icon .form-input {
    padding-left: 42px;
}
.input-with-icon .form-input:focus ~ .input-icon,
.input-with-icon .form-input:focus + .input-icon {
    color: var(--primary);
}

/* 错误提示 */
.auth-error {
    font-size: var(--text-sm);
    color: var(--danger);
    text-align: center;
    margin-bottom: var(--space-md);
    display: none;
    padding: 10px 16px;
    background: rgba(239,68,68,.06);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(239,68,68,.1);
}
.auth-error.show {
    display: block;
}

/* 底部链接 */
.auth-footer {
    text-align: center;
    margin-top: var(--space-xl);
}
.auth-footer a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--duration-fast) ease;
}
.auth-footer a:hover {
    color: var(--primary);
}

/* ===== 忘记密码链接 ===== */
.auth-extra-link {
    text-align: right;
    margin-top: var(--space-sm);
}
.auth-extra-link a {
    font-size: var(--text-sm);
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--duration-fast) ease;
}
.auth-extra-link a:hover {
    color: var(--primary);
}

/* ===== 协议勾选框 ===== */
.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.5;
}
.auth-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}
.auth-checkbox a {
    color: var(--primary);
    font-weight: 500;
}
.auth-checkbox a:hover {
    text-decoration: underline;
}

/* ===== 邮箱验证页专属 ===== */
.verify-email-hint {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    padding: 10px 16px;
    background: rgba(0,102,255,.04);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0,102,255,.08);
}
.verify-resend {
    text-align: center;
    margin-top: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.verify-resend .btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: var(--text-sm);
    padding: 0;
    transition: opacity .15s;
}
.verify-resend .btn-link:hover {
    opacity: .8;
}
.verify-resend .btn-link:disabled {
    opacity: .4;
    cursor: not-allowed;
}
.resend-countdown {
    display: none;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.verify-success-icon {
    text-align: center;
    margin-top: var(--space-lg);
}

/* ===== 移动端 ===== */
@media (max-width: 768px) {
    .auth-page {
        align-items: flex-start;
        padding-top: 8vh;
        background:
            radial-gradient(ellipse 80% 40% at 50% 0%, rgba(0,102,255,.04) 0%, transparent 100%),
            var(--bg);
    }
    .auth-form-panel {
        min-height: auto;
        padding: var(--space-md);
        width: 100%;
    }
    .auth-form-panel::before {
        display: none;
    }
}
