/* === 基础变量 === */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #93c5fd;
    --primary-bg: #eff6ff;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* === 基础样式重置 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === 登录容器 === */
.login-container {
    display: flex;
    width: 900px;
    max-width: 90%;
    height: 600px;
    max-height: 90vh;
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

/* === 登录卡片 === */
.login-card {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: var(--primary-bg);
    border-radius: 50%;
    opacity: 0.6;
    z-index: 0;
}

.login-card::after {
    content: '';
    position: absolute;
    bottom: -5%;
    left: -5%;
    width: 150px;
    height: 150px;
    background: var(--primary-bg);
    border-radius: 50%;
    opacity: 0.4;
    z-index: 0;
}

/* === 特性卡片 === */
.features-card {
    flex: 1;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.features-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 80%);
    pointer-events: none;
}

/* === 登录头部 === */
.login-header {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.logo svg {
    margin-right: 0.625rem;
}

.logo span {
    font-weight: 600;
    font-size: 1.125rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(90deg, var(--text-primary), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.02em;
}

.login-header h1 span {
    color: var(--primary-color);
    -webkit-text-fill-color: var(--primary-color);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* === 登录表单 === */
.login-form {
    width: 100%;
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: calc(var(--border-radius) / 2);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* 密码输入框 */
.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.05);
}

/* 记住我和忘记密码 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.remember-me {
    display: flex;
    align-items: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 1.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    user-select: none;
    color: var(--text-secondary);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 1.125rem;
    width: 1.125rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
    background-color: var(--bg-primary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: var(--primary-color);
    font-size: 0.875rem;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 错误消息 */
.error-message {
    display: none;
    color: var(--danger-color);
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 0.75rem 1rem;
    border-radius: calc(var(--border-radius) / 2);
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

/* 社交登录 */
.social-login {
    margin-bottom: 1.5rem;
}

.social-divider {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.social-divider:before,
.social-divider:after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.social-divider span {
    padding: 0 1rem;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

.social-buttons {
    display: flex;
    gap: 0.75rem;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    gap: 0.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: calc(var(--border-radius) / 2);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.social-btn:hover {
    background-color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.social-btn svg {
    flex-shrink: 0;
}

.social-btn.wechat {
    color: #07C160;
}

.social-btn.qq {
    color: #12B7F5;
}

/* 登录按钮 */
.login-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: calc(var(--border-radius) / 2);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.login-button:hover {
    background-color: var(--primary-hover);
}

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

.login-button:hover:before {
    left: 100%;
}

.login-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 加载动画 */
.loader {
    display: none;
    justify-content: center;
    align-items: center;
}

.loader .dot1,
.loader .dot2,
.loader .dot3 {
    width: 8px;
    height: 8px;
    background-color: white;
    border-radius: 50%;
    margin: 0 3px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader .dot1 {
    animation-delay: -0.32s;
}

.loader .dot2 {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0);
    } 40% { 
        transform: scale(1.0);
    }
}

/* 登录页脚 */
.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.login-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 特性卡片 */
.feature {
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 2;
    animation: fadeIn 0.5s ease-out both;
}

.feature:nth-child(1) { animation-delay: 0.1s; }
.feature:nth-child(2) { animation-delay: 0.3s; }
.feature:nth-child(3) { animation-delay: 0.5s; }

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    margin-bottom: 1rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature p {
    opacity: 0.8;
    font-size: 0.9375rem;
    max-width: 300px;
}

/* 粒子效果 */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    bottom: -10%;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float linear infinite;
    z-index: 1;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-120vh) rotate(720deg);
        opacity: 0;
    }
}

/* 表单晃动动画 */
@keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
    20%, 40%, 60%, 80% {transform: translateX(5px);}
}

.shake {
    animation: shake 0.6s ease-in-out;
}

/* 淡入动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header, .form-group, .form-options, .social-login, .login-button, .login-footer {
    animation: fadeIn 0.5s ease-out both;
}

.login-header { animation-delay: 0s; }
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-options { animation-delay: 0.3s; }
.social-login { animation-delay: 0.4s; }
.login-button { animation-delay: 0.5s; }
.login-footer { animation-delay: 0.6s; }

/* 响应式设计 */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        height: auto;
        max-height: none;
    }
    
    .features-card {
        padding: 2rem;
        order: -1;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .feature {
        margin-bottom: 1.5rem;
    }
    
    .feature:last-child {
        margin-bottom: 0;
    }
    
    .login-card {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .social-buttons {
        flex-direction: column;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
    }
    
    .feature h3 {
        font-size: 1.125rem;
    }
}

/* 为注册页面添加的额外样式 */

/* 密码强度指示器 */
.password-strength {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.strength-meter {
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    margin-bottom: 6px;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    background-color: var(--danger-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* 协议同意复选框 */
.form-agreement {
    margin: 1rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-agreement a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.form-agreement a:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* 注册表单中的链接样式 */
.terms-link, .privacy-link {
    font-weight: 500;
} 