/* ========== 用户登录/注册页 - 小红书风格 ========== */

/* ---------- 背景遮罩 ---------- */
.auth-overlay {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(var(--c-primary-rgb),0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255,180,0,0.04) 0%, transparent 50%),
        linear-gradient(135deg, #faf8f5 0%, #f5f0eb 100%);
}

html[data-theme="dark"] .auth-overlay {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255,36,66,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255,180,0,0.05) 0%, transparent 50%),
        linear-gradient(135deg, #1a1a1a 0%, #141414 100%);
}

/* ---------- 登录卡片 ---------- */
.auth-modal {
    display: flex;
    width: 100%;
    max-width: 860px;
    min-height: 520px;
    background: var(--c-bg-card, #fff);
    border-radius: 24px;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.08),
        0 2px 8px rgba(0,0,0,0.04);
    overflow: hidden;
    animation: authFadeIn 0.4s ease-out;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 左侧品牌区 ---------- */
.auth-modal-left {
    flex: 0 0 42%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 48px 36px;
    background:
        linear-gradient(160deg, #fef8f5 0%, #fef2e8 40%, #fdf6f0 100%);
    position: relative;
    overflow: hidden;
}

.auth-modal-left::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(var(--c-primary-rgb),0.04);
}

.auth-modal-left::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,180,0,0.04);
}

html[data-theme="dark"] .auth-modal-left {
    background:
        linear-gradient(160deg, #2a1f18 0%, #261a15 40%, #1f1810 100%);
}

html[data-theme="dark"] .auth-modal-left::before {
    background: rgba(255,36,66,0.06);
}

.auth-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.auth-tag {
    display: inline-block;
    padding: 4px 14px;
    font-size: 12px;
    color: var(--c-primary);
    background: rgba(255,36,66,0.08);
    border-radius: 20px;
    margin-bottom: 16px;
    font-weight: 500;
}

.auth-brand h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--c-text, #1f1f1f);
    margin-bottom: 8px;
    line-height: 1.3;
}

.auth-brand p {
    font-size: 13px;
    color: var(--c-text-3, #8c8c8c);
    margin-bottom: 28px;
}

.auth-deco {
    width: 160px;
    height: 130px;
    margin: 0 auto 28px;
}

.auth-deco svg {
    width: 100%;
    height: 100%;
    color: var(--c-primary);
}

.auth-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
}

.auth-stat-item {
    text-align: center;
}

.auth-stat-item strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--c-primary);
    margin-bottom: 2px;
}

.auth-stat-item span {
    font-size: 12px;
    color: var(--c-text-3, #8c8c8c);
}

/* ---------- 右侧表单区 ---------- */
.auth-modal-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
    min-width: 0;
}

.auth-form-header {
    margin-bottom: 28px;
}

.auth-form-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-text, #1f1f1f);
}

/* ---------- 提示消息 ---------- */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 16px;
}

.auth-alert-error {
    background: #fff2f0;
    color: #cf1322;
    border: 1px solid #ffccc7;
}

.auth-alert-success {
    background: #f6ffed;
    color: #389e0d;
    border: 1px solid #b7eb8f;
}

html[data-theme="dark"] .auth-alert-error {
    background: rgba(207,19,34,0.12);
    border-color: rgba(255,77,79,0.2);
}

html[data-theme="dark"] .auth-alert-success {
    background: rgba(56,158,13,0.12);
    border-color: rgba(183,235,143,0.2);
}

/* ---------- 表单 ---------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--c-text-3, #8c8c8c);
    pointer-events: none;
    z-index: 1;
}

.auth-input-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 44px;
    font-size: 14px;
    color: var(--c-text, #1f1f1f);
    background: #f7f7f7;
    border: 1.5px solid transparent;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.auth-input-wrap input::placeholder {
    color: #bfbfbf;
}

.auth-input-wrap input:focus {
    background: #fff;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(255,36,66,0.08);
}

html[data-theme="dark"] .auth-input-wrap input {
    background: #2a2a2a;
    color: var(--c-text, #e8e8e8);
}

html[data-theme="dark"] .auth-input-wrap input:focus {
    background: #333;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(255,36,66,0.12);
}

/* ---------- 选项行 ---------- */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--c-text-2, #595959);
}

.auth-remember input[type="checkbox"] {
    display: none;
}

.auth-checkmark {
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--c-border, #d9d9d9);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.auth-remember input[type="checkbox"]:checked + .auth-checkmark {
    background: var(--c-primary);
    border-color: var(--c-primary);
}

.auth-remember input[type="checkbox"]:checked + .auth-checkmark::after {
    content: '';
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.auth-forgot {
    color: var(--c-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

.auth-forgot:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ---------- 提交按钮 ---------- */
.auth-submit {
    width: 100%;
    height: 48px;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-light) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 2px;
}

.auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,36,66,0.3);
}

.auth-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(255,36,66,0.2);
}

/* ---------- 协议文字 ---------- */
.auth-agreement {
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: var(--c-text-3, #8c8c8c);
    line-height: 1.6;
}

.auth-agreement a {
    color: var(--c-primary);
    text-decoration: none;
}

.auth-agreement a:hover {
    text-decoration: underline;
}

/* ---------- 分隔线 ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 20px 0 16px;
    color: var(--c-text-3, #8c8c8c);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--c-border-light, #f0f0f0);
}

.auth-divider span {
    padding: 0 12px;
}

/* ---------- 底部 ---------- */
.auth-footer {
    text-align: center;
    font-size: 14px;
    color: var(--c-text-2, #595959);
}

.auth-footer a {
    color: var(--c-primary);
    font-weight: 600;
    text-decoration: none;
    margin-left: 4px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .auth-modal {
        flex-direction: column;
        max-width: 420px;
        min-height: auto;
    }

    .auth-modal-left {
        flex: none;
        padding: 32px 24px 24px;
    }

    .auth-modal-left::before,
    .auth-modal-left::after {
        display: none;
    }

    .auth-brand h2 {
        font-size: 18px;
    }

    .auth-deco {
        width: 120px;
        height: 100px;
        margin-bottom: 16px;
    }

    .auth-stats {
        display: none;
    }

    .auth-modal-right {
        padding: 24px 28px 36px;
    }

    .auth-form-header {
        margin-bottom: 20px;
    }

    .auth-form-header h3 {
        font-size: 18px;
    }
}
