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

/* 主要内容区域 */
.auth-main {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.auth-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%236c757d" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
    opacity: 0.3;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* 登录卡片 */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(108, 117, 125, 0.1);
    transition: all 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* 头部 */
.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-header p {
    color: #718096;
    font-size: 16px;
    line-height: 1.5;
}

/* 表单样式 */
.auth-form {
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
}

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

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

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.input-wrapper input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

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

/* 密码切换按钮 */
.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

/* 自定义复选框 */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #4a5568;
    user-select: none;
}

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

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    margin-right: 8px;
    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-weight: 500;
    transition: all 0.2s ease;
}

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

/* 登录按钮 */
.btn-full {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

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

/* 页脚链接 */
.auth-footer {
    text-align: center;
    margin-bottom: 24px;
}

.auth-footer p {
    color: #718096;
    font-size: 14px;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

/* 分割线 */
.divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

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

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 16px;
    color: #a0aec0;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

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

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

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

.social-btn.wechat:hover {
    border-color: #07c160;
    color: #07c160;
}

.social-btn.qq:hover {
    border-color: #12b7f5;
    color: #12b7f5;
}

.social-btn i {
    font-size: 18px;
}

/* 表单验证状态 */
.form-group.error .input-wrapper input {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-group.success .input-wrapper input {
    border-color: #38a169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

.error-message {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* 加载状态 */
.btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: flex !important;
}

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

.password-strength.show {
    display: block;
}

.strength-bar {
    width: 100%;
    height: 4px;
    background-color: #e9ecef;
    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-color: #dc3545;
}

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

.strength-fill.strong {
    width: 100%;
    background-color: #28a745;
}

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

.strength-text.weak {
    color: #dc3545;
}

.strength-text.medium {
    color: #ffc107;
}

.strength-text.strong {
    color: #28a745;
}

/* 复选框组样式 */
.checkbox-group {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
}

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

.checkbox-label .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    margin-right: 10px;
    margin-top: 2px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label:hover .checkmark {
    border-color: #007bff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.checkbox-label 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);
}

/* 链接样式 */
.link {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-main {
        padding: 20px 16px;
        min-height: calc(100vh - 140px);
    }
    
    .auth-card {
        padding: 30px 24px;
        border-radius: 16px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-header p {
        font-size: 14px;
    }
    
    .input-wrapper input {
        padding: 14px 14px 14px 44px;
        font-size: 16px;
    }
    
    .input-wrapper i {
        left: 14px;
        font-size: 14px;
    }
    
    .password-toggle {
        right: 14px;
    }
    
    .btn-full {
        padding: 14px;
        font-size: 15px;
    }
    
    .form-options {
        font-size: 13px;
    }
    
    .social-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .social-btn i {
        font-size: 16px;
    }
    
    .checkbox-label {
        font-size: 13px;
    }
    
    .checkbox-label .checkmark {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .auth-main {
        padding: 16px 12px;
    }
    
    .auth-card {
        padding: 24px 20px;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .social-btn {
        width: 100%;
    }
}

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

.auth-card {
    animation: fadeInUp 0.6s ease-out;
}

/* 头部导航激活状态 */
.auth-buttons .btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.auth-buttons .btn.active:hover {
    background: #5a67d8;
    border-color: #5a67d8;
}