/*
 * Custom Auth Pages — auth-pages.css
 * WordPress 自定义登录 & 注册页面样式
 * ============================================ */

/* ── 1. 变量 ── */
:root {
    --auth-accent:        #1a1a2e;
    --auth-accent-mid:    #16213e;
    --auth-accent-soft:   #0f3460;
    --auth-highlight:     #e94560;
    --auth-highlight-rgb: 233, 69, 96;

    --auth-bg:            #f7f6f3;
    --auth-surface:       #ffffff;
    --auth-border:        rgba(0,0,0,.10);
    --auth-border-focus:  #1a1a2e;

    --auth-text-primary:  #1a1a2e;
    --auth-text-secondary:#5a5a72;
    --auth-text-muted:    #9898aa;
    --auth-text-red:      #c8102e;

    --auth-error-bg:      #fff1f2;
    --auth-error-border:  rgba(233,69,96,.25);
    --auth-error-text:    #b5182f;
    --auth-success-bg:    #f0fdf4;
    --auth-success-border:rgba(34,197,94,.25);
    --auth-success-text:  #166534;

    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --radius-xl:  24px;
}

/* ── 2. 全局重置（仅作用于 auth 页面） ── */
.auth-page-wrapper *,
.auth-page-wrapper *::before,
.auth-page-wrapper *::after {
    box-sizing: border-box;
}

/* 若主题 header/footer 有固定 padding 影响布局，可按需调整 */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: var(--auth-bg);
    font-family: var(--font-body);
}

/* ── 3. 主容器 ── */
.auth-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── 4. 左侧品牌区 ── */
.auth-brand {
    flex: 0 0 42%;
    background: var(--auth-accent);
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(233,69,96,.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(15,52,96,.6) 0%, transparent 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 3rem;
    position: relative;
    overflow: hidden;
}

/* 装饰性几何纹 */
.auth-brand::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 280px; height: 280px;
    border: 1.5px solid rgba(255,255,255,.07);
    border-radius: 50%;
}
.auth-brand::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 220px; height: 220px;
    border: 1.5px solid rgba(255,255,255,.06);
    border-radius: 50%;
}

.auth-brand--alt {
    background-image:
        radial-gradient(ellipse at 80% 20%, rgba(233,69,96,.15) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 80%, rgba(15,52,96,.6) 0%, transparent 50%);
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
    color: #fff;
    max-width: 340px;
}

/* logo */
.brand-logo {
    margin-bottom: 2rem;
}
.brand-logo img {
    max-height: 56px;
    width: auto;
    filter: brightness(0) invert(1);
}
.brand-icon {
    font-size: 3rem;
    line-height: 1;
    color: var(--auth-highlight);
    display: block;
}

/* 站名 */
.brand-title {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 .75rem;
    letter-spacing: .02em;
}

/* 描述 */
.brand-desc {
    font-size: 1rem;
    color: rgba(255,255,255,.55);
    margin: 0 0 2.5rem;
    line-height: 1.6;
}

/* 特性列表 */
.brand-features {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.brand-feature {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .9rem;
    color: rgba(255,255,255,.75);
}
.feature-icon {
    color: var(--auth-highlight);
    font-size: .65rem;
    flex-shrink: 0;
}

/* ── 5. 右侧表单区 ── */
.auth-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2rem;
    background: var(--auth-surface);
}

.auth-form-inner {
    width: 100%;
    max-width: 400px;
}

/* ── 6. 表单头部 ── */
.auth-header {
    margin-bottom: 2rem;
}
.auth-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin: 0 0 .4rem;
}
.auth-subtitle {
    font-size: .9rem;
    color: var(--auth-text-secondary);
    margin: 0;
}

/* ── 7. 通知条 ── */
.auth-notice {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .85rem 1rem;
    border-radius: var(--radius-md);
    font-size: .875rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}
.auth-notice--error {
    background: var(--auth-error-bg);
    border: 1px solid var(--auth-error-border);
    color: var(--auth-error-text);
}
.auth-notice--success {
    background: var(--auth-success-bg);
    border: 1px solid var(--auth-success-border);
    color: var(--auth-success-text);
}
.notice-icon {
    flex-shrink: 0;
    font-weight: 700;
}

/* ── 8. 表单通用组件 ── */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group--inline {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    margin-bottom: .4rem;
    letter-spacing: .03em;
}
.form-label-link {
    font-weight: 400;
    font-size: .8rem;
    color: var(--auth-text-muted);
    text-decoration: none;
    transition: color .2s;
}
.form-label-link:hover {
    color: var(--auth-highlight);
}

/* 输入框容器 */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: .875rem;
    color: var(--auth-text-muted);
    display: flex;
    pointer-events: none;
    z-index: 1;
}

/* 输入框 */
.form-input {
    width: 100%;
    height: 48px;
    padding: 0 2.75rem 0 2.875rem;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--radius-md);
    font-size: .9375rem;
    font-family: var(--font-body);
    color: var(--auth-text-primary);
    background: #fafaf9;
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
    -webkit-appearance: none;
}
.form-input::placeholder { color: var(--auth-text-muted); }
.form-input:hover {
    border-color: rgba(0,0,0,.2);
    background: #fff;
}
.form-input:focus {
    border-color: var(--auth-border-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,26,46,.08);
}

/* 密码显示切换 */
.toggle-password {
    position: absolute;
    right: .875rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--auth-text-muted);
    display: flex;
    align-items: center;
    transition: color .2s;
}
.toggle-password:hover { color: var(--auth-text-primary); }

/* 提示文本 */
.form-hint {
    display: block;
    font-size: .775rem;
    color: var(--auth-text-red);
    margin-top: .35rem;
    line-height: 1.5;
}

/* ── 9. 复选框 ── */
.form-checkbox {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    user-select: none;
}
.form-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}
.checkbox-mark {
    width: 18px; height: 18px;
    flex-shrink: 0;
    border: 1.5px solid var(--auth-border);
    border-radius: 4px;
    background: #fafaf9;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s;
}
.form-checkbox input:checked ~ .checkbox-mark {
    background: var(--auth-accent);
    border-color: var(--auth-accent);
}
.form-checkbox input:checked ~ .checkbox-mark::after {
    content: '';
    display: block;
    width: 5px; height: 9px;
    border: 2px solid #fff;
    border-top: none; border-left: none;
    transform: rotate(45deg) translate(-1px,-1px);
}
.checkbox-label {
    font-size: .875rem;
    color: var(--auth-text-secondary);
}

/* ── 10. 主按钮 ── */
.btn-primary {
    width: 100%;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: var(--auth-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: .9375rem;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    margin-top: 1rem;
}
.btn-primary:hover {
    background: var(--auth-highlight);
    box-shadow: 0 6px 20px rgba(var(--auth-highlight-rgb), .35);
}
.btn-primary:active {
    transform: scale(.98);
}

/* ── 11. 底部注册/登录提示 ── */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--auth-border);
}
.auth-footer p {
    font-size: .875rem;
    color: var(--auth-text-secondary);
    margin: 0;
}
.auth-link {
    color: var(--auth-accent);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s;
}
.auth-link:hover { color: var(--auth-highlight); }

/* ── 12. 注册提示框 ── */
.register-tips {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .8125rem;
    color: var(--auth-text-muted);
    background: #f7f6f3;
    border-radius: var(--radius-sm);
    padding: .75rem .875rem;
    margin-bottom: .25rem;
    line-height: 1.55;
}
.register-tips svg { flex-shrink: 0; margin-top: .05em; }

/* ── 13. WordPress 默认注册表单重置 ── */
/* 确保 #registerform 内部字段继承我们的样式 */
#registerform p { margin: 0 0 1.25rem; }
#registerform label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--auth-text-primary);
    letter-spacing: .03em;
    margin-bottom: .4rem;
}
#registerform input[type="text"],
#registerform input[type="email"] {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.875rem;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--radius-md);
    font-size: .9375rem;
    font-family: var(--font-body);
    color: var(--auth-text-primary);
    background: #fafaf9;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
#registerform input[type="text"]:focus,
#registerform input[type="email"]:focus {
    border-color: var(--auth-border-focus);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,26,46,.08);
}
/* 隐藏 WP 默认提交按钮（用我们的 btn-primary 替代） */
#registerform #wp-submit {
    all: unset;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: var(--auth-accent);
    color: #fff;
    border-radius: var(--radius-md);
    font-size: .9375rem;
    font-weight: 600;
    font-family: var(--font-body);
    letter-spacing: .04em;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    margin-top: 1rem;
    box-sizing: border-box;
    text-align: center;
}
#registerform #wp-submit:hover {
    background: var(--auth-highlight);
    box-shadow: 0 6px 20px rgba(var(--auth-highlight-rgb), .35);
}

/* ── 14. 响应式 ── */
@media (max-width: 800px) {
    .auth-container {
        flex-direction: column;
        min-height: auto;
    }
    .auth-brand {
        flex: none;
        padding: 2.5rem 2rem;
        min-height: auto;
    }
    .auth-brand::before,
    .auth-brand::after { display: none; }
    .brand-features { display: none; }
    .brand-title { font-size: 1.5rem; }
    .brand-desc { margin-bottom: 0; }
    .auth-form-section {
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-brand { padding: 2rem 1.5rem; }
    .auth-form-section { padding: 2rem 1.25rem; }
    .auth-form-inner { max-width: 100%; }
}

/* ── 15. 社交登录 ── */
.social-login {
    margin-top: 1.5rem;
}

.social-login-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}
.social-login-divider::before,
.social-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}
.social-login-divider span {
    font-size: .775rem;
    color: var(--auth-text-muted);
    white-space: nowrap;
}

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

/* 社交按钮基础 */
.btn-social {
    width: 100%;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    border: 1.5px solid var(--auth-border);
    border-radius: var(--radius-md);
    background: #fff;
    font-size: .9rem;
    font-weight: 500;
    font-family: var(--font-body);
    color: var(--auth-text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: border-color .2s, background .2s, box-shadow .2s, transform .15s;
    position: relative;
}
.btn-social:hover {
    border-color: rgba(0,0,0,.2);
    background: #fafaf9;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.btn-social:active {
    transform: scale(.98);
}

/* Google 按钮 hover 颜色 */
.btn-social--google:hover {
    border-color: #4285F4;
    box-shadow: 0 2px 10px rgba(66,133,244,.15);
}

/* 禁用/占位状态 */
.btn-social--disabled {
    opacity: .6;
    cursor: not-allowed;
    pointer-events: none;
}

/* 「即将推出」角标 */
.social-badge {
    position: absolute;
    right: .75rem;
    font-size: .7rem;
    font-weight: 600;
    color: var(--auth-text-muted);
    background: #f0f0ee;
    border-radius: 20px;
    padding: .15em .55em;
    letter-spacing: .02em;
}

