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

/* 主体区域 */
.auth-main {
    min-height: calc(100vh - 80px - 200px); /* 减去header和footer高度 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    padding: 110px 0 40px 0;
}

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

.auth-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 600px;
    max-width: 500px;
    margin: 0 auto;
}

/* 左侧装饰区域 */
.auth-decoration {
    display: none;
}

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

.decoration-content p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
}

.decoration-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.feature-item i {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 装饰图形 */
.decoration-graphic {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.graphic-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.graphic-element.element-1 {
    width: 120px;
    height: 120px;
    top: 10%;
    right: 10%;
    animation: float 6s ease-in-out infinite;
}

.graphic-element.element-2 {
    width: 80px;
    height: 80px;
    top: 60%;
    right: 20%;
    animation: float 8s ease-in-out infinite reverse;
}

.graphic-element.element-3 {
    width: 60px;
    height: 60px;
    top: 30%;
    right: 40%;
    animation: float 10s ease-in-out infinite;
}

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

/* 表单区域 */
.auth-form-section {
    padding: 60px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
}

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

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

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

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

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

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

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: #a0aec0;
    font-size: 1rem;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input::placeholder {
    color: #a0aec0;
}

/* 密码切换按钮 */
.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

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

.strength-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

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

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

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

.strength-fill.strong {
    width: 100%;
    background: #48bb78;
}

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

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4a5568;
}

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

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

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

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

.forgot-password:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.radio-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4a5568;
}

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

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

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

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

/* 提交按钮 */
.auth-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* 分割线 */
.auth-divider {
    text-align: center;
    margin: 30px 0 20px;
    position: relative;
    color: #a0aec0;
    font-size: 0.9rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.auth-divider span {
    background: white;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* 社交登录 */
.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

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

.social-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.wechat-btn:hover {
    border-color: #38a169;
    color: #38a169;
}

.qq-btn:hover {
    border-color: #3182ce;
    color: #3182ce;
}

/* 切换链接 */
.auth-switch {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
}

.auth-switch a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    margin-left: 5px;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* 错误信息 */
.error-message {
    color: #e53e3e;
    font-size: 0.8rem;
    margin-top: 5px;
    display: block;
    min-height: 1rem;
}

.form-group.error .input-wrapper input {
    border-color: #e53e3e;
    background: #fed7d7;
}

.form-group.error .input-wrapper i {
    color: #e53e3e;
}

/* 成功状态 */
.form-group.success .input-wrapper input {
    border-color: #38a169;
    background: #f0fff4;
}

.form-group.success .input-wrapper i {
    color: #38a169;
}

/* 链接样式 */
.terms-link,
.privacy-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.terms-link:hover,
.privacy-link:hover {
    color: #5a67d8;
    text-decoration: underline;
}

/* 导航栏激活状态 */
.nav-auth .btn-login.active,
.nav-auth .btn-register.active {
    background: #667eea;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-wrapper {
        margin: 0 20px;
        max-width: none;
    }
    
    .auth-form-section {
        padding: 40px 30px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .radio-group {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .auth-main {
        padding: 20px 0;
    }
    
    .auth-container {
        padding: 0 15px;
    }
    
    .auth-wrapper {
        margin: 0 10px;
    }
    
    .auth-form-section {
        padding: 30px 20px;
    }
    
    .auth-header h1 {
        font-size: 1.8rem;
    }
    
    .decoration-features {
        flex-direction: column;
        align-items: center;
    }
}

/* 动画效果 */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form-container {
    animation: slideInUp 0.6s ease-out;
}

.decoration-content {
    animation: slideInUp 0.8s ease-out;
}

/* 加载状态 */
.form-group.loading .input-wrapper::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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