/* 登录页面专用样式 */

.login-container {
    max-width: 414px;
    margin: 0 auto;
    background: var(--bg-primary);
    min-height: 100vh;
    box-shadow: 0 0 30px var(--shadow-light);
    border-radius: 0 0 20px 20px;
    position: relative;
    overflow: hidden;
}

/* 头部装饰区域 */
.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--text-white);
    padding: 60px 20px 40px;
    text-align: center;
    position: relative;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 8px 30px var(--shadow-medium);
    overflow: hidden;
}

.header-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 80px;
    height: 80px;
    top: 20px;
    right: 30px;
    animation-delay: 0s;
}

.circle-2 {
    width: 60px;
    height: 60px;
    top: 80px;
    left: 20px;
    animation-delay: 2s;
}

.circle-3 {
    width: 40px;
    height: 40px;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation-delay: 4s;
}

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

.app-icon {
    font-size: 48px;
    margin-bottom: 16px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.app-subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
    margin: 0;
}

/* 登录表单容器 */
.login-form-container {
    padding: 40px 20px 20px;
    position: relative;
    z-index: 2;
}

.login-form {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px var(--shadow-light);
    border: 1px solid var(--border-light);
    margin-bottom: 30px;
}

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

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

.input-icon {
    position: absolute;
    left: 16px;
    font-size: 18px;
    color: var(--text-muted);
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 16px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    outline: none;
    font-weight: 400;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary-color);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(139, 157, 195, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-muted);
    z-index: 2;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

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

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-medium);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--text-white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-strong);
}

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

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

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 第三方登录 */
.social-login {
    margin-bottom: 30px;
}

.divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-light);
}

.divider-text {
    background: var(--bg-primary);
    color: var(--text-muted);
    font-size: 12px;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.social-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.wechat-btn:hover {
    border-color: #07c160;
    background: rgba(7, 193, 96, 0.1);
}

.qq-btn:hover {
    border-color: #12b7f5;
    background: rgba(18, 183, 245, 0.1);
}

.social-icon {
    font-size: 18px;
}

.social-text {
    font-size: 14px;
}

/* 注册链接 */
.register-link {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.register-btn {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: all 0.2s ease;
}

.register-btn:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 底部装饰 */
.login-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    overflow: hidden;
    z-index: 1;
}

.footer-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
}

.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0.1;
    animation: wave 4s ease-in-out infinite;
}

.wave-1 {
    animation-delay: 0s;
}

.wave-2 {
    height: 30px;
    animation-delay: 1s;
}

.wave-3 {
    height: 40px;
    animation-delay: 2s;
}

@keyframes wave {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

/* 消息提示 */
.message-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--shadow-medium);
    border: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    transition: all 0.3s ease;
}

.message-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.message-toast.success {
    border-left: 4px solid var(--success-color);
}

.message-toast.error {
    border-left: 4px solid var(--danger-color);
}

.message-toast.info {
    border-left: 4px solid var(--info-color);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-container {
        border-radius: 0;
    }
    
    .login-header {
        border-radius: 0;
        padding: 50px 16px 30px;
    }
    
    .login-form-container {
        padding: 30px 16px 20px;
    }
    
    .login-form {
        padding: 24px 16px;
    }
    
    .app-icon {
        font-size: 40px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .social-buttons {
        flex-direction: column;
    }
}

/* 输入框聚焦动画 */
.form-input:focus + .input-icon {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* 按钮点击效果 */
.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:active::before {
    width: 300px;
    height: 300px;
}
