/* 
 * 雕络文学网 - 认证页面样式
 * 登录/注册页面专用样式
 */

/* ==================== 认证页面布局 ==================== */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 60px 20px;
    background: linear-gradient(135deg, #FDF8F0 0%, #F5EFE0 100%);
    position: relative;
    overflow: hidden;
}

/* 背景装饰 */
.auth-page::before {
    content: '文';
    position: absolute;
    font-size: 800px;
    font-family: "Noto Serif SC", serif;
    color: rgba(139, 37, 0, 0.02);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

.auth-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(184, 134, 11, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(139, 37, 0, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ==================== 认证卡片 ==================== */
.auth-box {
    width: 100%;
    max-width: 440px;
    background: #FFFFFF;
    border-radius: 24px;
    padding: 50px 45px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(184, 134, 11, 0.1) inset;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #8B2500 0%, #B8860B 50%, #8B2500 100%);
    border-radius: 24px 24px 0 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-box-wide {
    max-width: 560px;
}

/* ==================== 标题区域 ==================== */
.auth-box h1 {
    font-family: "Noto Serif SC", serif;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #8B2500 0%, #B8860B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
}

.auth-subtitle {
    text-align: center;
    color: #888;
    font-size: 15px;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

/* ==================== 表单样式 ==================== */
.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #5C5C5C;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

.form-group label .required {
    color: #8B2500;
    margin-left: 2px;
}

.form-group label .optional {
    color: #ACACAC;
    font-weight: normal;
    font-size: 12px;
    margin-left: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #E8E0D0;
    border-radius: 12px;
    font-size: 15px;
    background: #FDF8F0;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8B2500;
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(139, 37, 0, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #BBB;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

/* 输入框图标 */
.form-group-icon {
    position: relative;
}

.form-group-icon input {
    padding-left: 44px;
}

.form-group-icon .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #888;
    pointer-events: none;
}

.form-group-icon input:focus ~ .icon {
    color: #8B2500;
}

/* 表单提示 */
.form-hint {
    font-size: 13px;
    color: #ACACAC;
    margin-top: 6px;
    line-height: 1.5;
}

.form-error {
    font-size: 13px;
    color: #8B2500;
    margin-top: 6px;
}

/* ==================== 按钮样式 ==================== */
.btn-submit {
    width: 100%;
    padding: 15px 24px;
    background: linear-gradient(135deg, #8B2500 0%, #A52A2A 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 20px rgba(139, 37, 0, 0.3);
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(139, 37, 0, 0.4);
    background: linear-gradient(135deg, #A52A2A 0%, #8B2500 100%);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit:disabled {
    background: #ACACAC;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-submit:disabled::before {
    display: none;
}

/* 次要按钮 */
.btn-secondary {
    background: #FFFFFF;
    color: #8B2500;
    border: 2px solid #8B2500;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #8B2500;
    color: #FFFFFF;
}

/* ==================== 表单底部 ==================== */
.form-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #E8E0D0;
    font-size: 14px;
    color: #888;
}

.form-footer a {
    color: #8B2500;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #A52A2A;
    text-decoration: underline;
}

/* 分隔线 */
.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #ACACAC;
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E8E0D0;
}

.divider::before {
    margin-right: 12px;
}

.divider::after {
    margin-left: 12px;
}

/* ==================== 复选框样式 ==================== */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #8B2500;
}

.checkbox-group label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    margin: 0;
}

/* ==================== 社交登录按钮 ==================== */
.social-login {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.social-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid #E8E0D0;
    border-radius: 12px;
    background: #FFFFFF;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.social-btn:hover {
    border-color: #8B2500;
    background: #FDF8F0;
    color: #8B2500;
}

/* ==================== 验证码输入 ==================== */
.code-input-group {
    display: flex;
    gap: 12px;
}

.code-input-group input {
    flex: 1;
}

.code-input-group .btn-code {
    padding: 14px 24px;
    background: #FFFFFF;
    border: 2px solid #8B2500;
    color: #8B2500;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.code-input-group .btn-code:hover {
    background: #8B2500;
    color: #FFFFFF;
}

.code-input-group .btn-code:disabled {
    background: #F5F5F5;
    border-color: #E8E0D0;
    color: #ACACAC;
    cursor: not-allowed;
}

/* ==================== 密码强度指示器 ==================== */
.password-strength {
    margin-top: 8px;
    display: flex;
    gap: 4px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #E8E0D0;
    border-radius: 2px;
    transition: background 0.3s ease;
}

.strength-bar.active {
    background: #8B2500;
}

.strength-bar.weak {
    background: #FF6B6B;
}

.strength-bar.medium {
    background: #FFA500;
}

.strength-bar.strong {
    background: #2E8B57;
}

.strength-text {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .auth-page {
        padding: 40px 20px;
    }
    
    .auth-box {
        padding: 40px 30px;
        border-radius: 20px;
    }
    
    .auth-box h1 {
        font-size: 28px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 30px 24px;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    }
    
    .auth-box h1 {
        font-size: 24px;
    }
    
    .auth-subtitle {
        font-size: 14px;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .code-input-group {
        flex-direction: column;
    }
    
    .code-input-group .btn-code {
        width: 100%;
    }
}

/* ==================== 加载状态 ==================== */
.btn-submit.loading {
    pointer-events: none;
    position: relative;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== 成功/错误提示 ==================== */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(46, 139, 87, 0.1);
    color: #2E8B57;
    border: 1px solid rgba(46, 139, 87, 0.2);
}

.alert-error {
    background: rgba(139, 37, 0, 0.1);
    color: #8B2500;
    border: 1px solid rgba(139, 37, 0, 0.2);
}

.alert-warning {
    background: rgba(184, 134, 11, 0.1);
    color: #B8860B;
    border: 1px solid rgba(184, 134, 11, 0.2);
}

.alert-info {
    background: rgba(93, 64, 55, 0.1);
    color: #5D4037;
    border: 1px solid rgba(93, 64, 55, 0.2);
}
