/* ========================================
   认证页面样式 (Bootstrap 5 增强版)
======================================== */
:root {
    --auth-primary: #667eea;
    --auth-secondary: #764ba2;
    --auth-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Noto Sans SC', 'Segoe UI', sans-serif;
    overflow-x: hidden;
}

/* ========================================
   认证页面布局
======================================== */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 左侧装饰区域 */
.auth-side {
    flex: 1;
    background: var(--auth-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
}

.auth-side-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.brand-logo {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    margin-bottom: 3rem;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: scale(1.05);
    color: white;
}

.feature-list {
    margin-top: 3rem;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.feature-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
}

/* 右侧表单区域 */
.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.auth-form-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    max-width: 550px;
    margin: 0 auto;
    width: 100%;
}

.auth-icon {
    font-size: 4rem;
    color: var(--auth-primary);
}

/* ========================================
   表单样式增强
======================================== */
.form-control:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
}

.form-control-lg {
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border-radius: 10px;
}

/* ========================================
   按钮样式
======================================== */
.btn-primary {
    background: var(--auth-gradient);
    border: none;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.875rem 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.35);
    background: var(--auth-gradient);
}

.btn-outline-secondary {
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #f8f9fa;
    border-color: var(--auth-primary);
    color: var(--auth-primary);
}

/* ========================================
   分隔线
======================================== */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #6c757d;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dee2e6;
}

.divider span {
    padding: 0 1rem;
    font-size: 0.9rem;
}

/* ========================================
   社交登录按钮
======================================== */
.social-login {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 10px;
}

.btn-social i {
    font-size: 1.25rem;
}

/* ========================================
   验证码组件
======================================== */
.code-group {
    position: relative;
}

.code-input {
    display: flex;
    gap: 0.75rem;
}

.code-input input {
    flex: 1;
}

.btn-code {
    padding: 0.875rem 1.25rem;
    background: var(--auth-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.25);
}

.btn-code:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.35);
}

.btn-code:disabled {
    background: #adb5bd;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ========================================
   页脚
======================================== */
.auth-footer {
    padding: 2rem 3rem;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

/* ========================================
   消息提示
======================================== */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s;
}

.success-message {
    color: #198754;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.success-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ========================================
   响应式设计
======================================== */
@media (max-width: 992px) {
    .auth-side {
        display: none;
    }
    
    .auth-form-side {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .auth-form-container {
        padding: 2rem 1.5rem;
    }
    
    .social-login {
        grid-template-columns: 1fr;
    }
    
    .code-input {
        flex-direction: column;
    }
    
    .btn-code {
        width: 100%;
    }
    
    .auth-footer {
        padding: 1.5rem;
    }
}

/* ========================================
   输入框图标
======================================== */
.input-group-text {
    background: transparent;
    border-right: none;
    border-radius: 10px 0 0 10px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.input-group:focus-within .input-group-text {
    border-color: var(--auth-primary);
}

/* ========================================
   链接样式
======================================== */
a {
    color: var(--auth-primary);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--auth-secondary);
}

/* ========================================
   自定义复选框
======================================== */
.form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.form-check-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}
