/* 登录页面样式 */

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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 登录容器 */
.login-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px - 100px); /* 减去header和footer的高度 */
    background: #ffffff;
    padding: 60px 20px;
    box-sizing: border-box;
}

/* 登录表单容器 */
.login-form-container {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 40px;
    width: 1280px;
    max-width: 95vw;
    margin: 0 auto;
}

/* 左侧图片 */
.login-image {
    flex: 2;
    height: 500px;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.login-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 右侧登录表单 */
.login-form {
    flex: 1;
    padding: 40px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    min-width: 400px;
}

.login-title {
    color: #333;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.login-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 2px;
}

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

.form-group {
    position: relative;
}

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

.input-icon {
    position: absolute;
    left: 15px;
    color: #666;
    font-size: 1.1rem;
    z-index: 2;
}

.form-input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    background: #ffffff;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    background: #fff;
}

.form-input::placeholder {
    color: #999;
}

/* 密码输入框特殊样式 */
.password-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 2;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #007bff;
}

/* 验证码输入框特殊样式 */
.captcha-input {
    padding-right: 100px;
}

.captcha-wrapper {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-canvas {
    width: 80px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
    font-size: 32px;
}

.captcha-refresh {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.captcha-refresh:hover {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

/* 错误消息 */
.error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    opacity: 1;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

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

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

.btn-text {
    transition: opacity 0.3s ease;
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-btn.loading .btn-text {
    opacity: 0;
}

.login-btn.loading .btn-loading {
    display: inline-block !important;
}

/* 登录选项 */
.login-options {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.forgot-password,
.register-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.forgot-password:hover,
.register-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .login-form-container {
        width: 1100px;
        gap: 30px;
    }
}

@media (max-width: 1200px) {
    .login-container {
        padding: 50px 20px;
    }
    
    .login-form-container {
        width: 1000px;
        gap: 30px;
    }
    
    .login-form {
        padding: 30px;
    }
}

@media (max-width: 1024px) {
    .login-container {
        padding: 40px 20px;
    }
    
    .login-form-container {
        width: 900px;
        gap: 25px;
    }
    
    .login-image {
        flex: 1.5;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        justify-content: center;
        padding: 30px 20px;
        min-height: calc(100vh - 80px - 100px);
    }
    
    .login-form-container {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        gap: 20px;
    }
    
    .login-image {
        height: 200px;
        width: 100%;
        flex: none;
    }
    
    .login-form {
        width: 100%;
        padding: 30px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 20px 15px;
    }
    
    .login-form {
        padding: 25px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .form-input {
        padding: 12px 12px 12px 40px;
        font-size: 0.9rem;
    }
    
    .input-icon {
        font-size: 1rem;
        left: 12px;
    }
    
    .captcha-input {
        padding-right: 70px;
    }
    
    .captcha-canvas {
        width: 60px;
        height: 28px;
        font-size: 22px;
    }
    
    .captcha-refresh {
        width: 22px;
        height: 22px;
        font-size: 0.9rem;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 1rem;
    }
}

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

.login-form {
    animation: fadeInUp 0.6s ease-out;
}

/* 输入框聚焦动画 */
.form-input:focus + .input-icon {
    color: #007bff;
}

/* 验证码刷新动画 */
.captcha-refresh:active {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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