/* 登录/注册页面样式 */

/* 主体布局 */
.auth-main {
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.auth-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

/* 左侧装饰区域 */
.auth-decoration {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-decoration::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="%23ffffff" opacity="0.1"/></svg>') repeat;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-50px) translateY(-50px); }
}

.decoration-content {
    text-align: center;
    z-index: 1;
    position: relative;
}

.decoration-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.decoration-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    line-height: 1.5;
}

.decoration-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
}

.feature-item i {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* 右侧表单区域 */
.auth-form-section {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #666;
    font-size: 1rem;
}

/* 表单样式 */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

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

.input-wrapper i {
    position: absolute;
    left: 1rem;
    color: #666;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
    background: #f8f9fa;
}

.form-input:focus {
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-input.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.form-input.success {
    border-color: #2ecc71;
    background: #f2fdf2;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #3498db;
}

.verify-btn {
    position: absolute;
    right: 0.5rem;
    background: #3498db;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.verify-btn:hover {
    background: #2980b9;
}

.verify-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.input-status {
    position: absolute;
    right: 1rem;
    font-size: 1.2rem;
}

.input-status.success {
    color: #2ecc71;
}

.input-status.error {
    color: #e74c3c;
}

.form-hint {
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e1e8ed;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-fill.weak {
    width: 33%;
    background: #e74c3c;
}

.strength-fill.medium {
    width: 66%;
    background: #f39c12;
}

.strength-fill.strong {
    width: 100%;
    background: #2ecc71;
}

.strength-text {
    font-size: 0.8rem;
    color: #666;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 2rem;
}

.radio-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
}

.radio-wrapper input[type="radio"] {
    display: none;
}

.radio-mark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.radio-wrapper input[type="radio"]:checked + .radio-mark {
    border-color: #3498db;
    background: #3498db;
}

.radio-wrapper input[type="radio"]:checked + .radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* 复选框样式 */
.form-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
    line-height: 1.4;
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e8ed;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    border-color: #3498db;
    background: #3498db;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #3498db;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #2980b9;
    text-decoration: underline;
}

.link {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 按钮样式 */
.auth-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.auth-btn.primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

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

/* 分割线 */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1rem 0;
    color: #666;
    font-size: 0.9rem;
}

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

.auth-divider span {
    padding: 0 1rem;
}

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

.social-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    background: white;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.social-btn.wechat:hover {
    border-color: #2ecc71;
    color: #2ecc71;
}

.social-btn.qq:hover {
    border-color: #3498db;
    color: #3498db;
}

/* 页脚链接 */
.auth-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e1e8ed;
}

.auth-footer p {
    color: #666;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .auth-decoration {
        display: none;
    }
    
    .auth-form-section {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .auth-main {
        padding: 1rem;
        min-height: calc(100vh - 60px);
    }
    
    .auth-wrapper {
        border-radius: 15px;
        min-height: auto;
    }
    
    .auth-form-section {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 1rem;
    }
    
    .social-login {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .auth-form-section {
        padding: 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.3rem;
    }
    
    .form-input {
        padding: 0.6rem 0.8rem 0.6rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .input-wrapper i {
        left: 0.8rem;
        font-size: 0.9rem;
    }
    
    .password-toggle {
        right: 0.8rem;
        padding: 0.3rem;
    }
    
    .verify-btn {
        right: 0.3rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .auth-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .social-btn {
        padding: 0.6rem;
        font-size: 0.8rem;
    }
}

/* 加载动画 */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 错误提示 */
.error-message {
    background: #fdf2f2;
    color: #e74c3c;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message {
    background: #f2fdf2;
    color: #2ecc71;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-left: 4px solid #2ecc71;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}