/* 登录/注册弹窗样式 */

/* 弹窗背景 */
.auth-modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.auth-modal-backdrop.show {
    display: block;
}

/* 弹窗容器 */
.auth-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.auth-modal.show {
    display: flex;
    pointer-events: auto;
}

.auth-modal-content {
    background: #fff;
    width: 420px;
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    padding: 25px 30px 30px;
}

/* 关闭按钮 */
.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
}

.auth-modal-close:hover {
    color: #666;
}

/* 标签页 */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.auth-tab-btn {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 2px solid transparent;
}

.auth-tab-btn.active {
    color: var(--theme-color, #ff1493);
    border-bottom-color: var(--theme-color, #ff1493);
    font-weight: 600;
}

/* 表单内容 */
.auth-tab-content {
    display: none;
}

.auth-tab-content.active {
    display: block;
}

.auth-tab-content h2 {
    font-size: 18px;
    margin: 0 0 15px 0;
    color: #333;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    border-color: var(--theme-color, #ff1493);
    box-shadow: 0 0 0 2px rgba(var(--theme-color-rgb, 255, 20, 147), 0.1);
}

.error-message {
    min-height: 16px;
    font-size: 12px;
    color: #dc3545;
}

.form-group.checkbox {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.form-group.checkbox label {
    font-size: 13px;
    color: #666;
}

.forgot-password {
    font-size: 12px;
    color: var(--theme-color, #ff1493);
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 提交按钮 */
.auth-btn {
    margin-top: 5px;
    padding: 10px 0;
    background: linear-gradient(135deg, var(--theme-color, #ff1493), var(--theme-color-light, #ff69b4));
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(var(--theme-color-rgb, 255, 20, 147), 0.4);
}

/* 分隔线 */
.auth-divider {
    text-align: center;
    margin: 15px 0;
    font-size: 12px;
    color: #aaa;
}

/* 社交登录 */
.social-login {
    display: flex;
    gap: 10px;
}

.social-btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #fff;
}

.social-btn.wechat {
    background: #1aad19;
}

.social-btn.qq {
    background: #12b7f5;
}

/* 密码强度 */
.password-strength {
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0;
    background: #dc3545;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-text {
    font-size: 12px;
    color: #999;
}

/* 链接 */
.auth-form .link {
    color: var(--theme-color, #ff1493);
    text-decoration: none;
}

.auth-form .link:hover {
    text-decoration: underline;
}

/* 响应式 */
@media (max-width: 480px) {
    .auth-modal-content {
        padding: 20px 15px 20px;
    }
    
    .auth-tab-content h2 {
        font-size: 16px;
    }
}
