html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* 禁止全局滚动条 */
}

/* 登录页面专用样式 - 优化版本 */

/* 移除重复的容器样式，这些已在布局中内联 */

.login-container {
    min-height: 100vh;
    height: 100vh;
    width: 100vw;
    overflow: hidden; /* 防止内容溢出 */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    box-sizing: border-box;
}

.login-container::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="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

/* 简化动画，提高性能 */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    min-height: 340px; /* 新增：锁定最小高度，防止内容加载时跳动 */
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    /* 移除动画，防止抖动 */
}

/* 移除slideUp动画相关样式 */

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: #666;
    font-size: 14px;
}

.form-floating {
    margin-bottom: 20px;
    position: relative;
}

.form-floating > .form-control {
    height: 56px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-floating > .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-floating > label {
    color: #6c757d;
    font-weight: 400;
}

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

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-login {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.1);
}

.btn-login:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.2);
}

.btn-login:active {
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.btn-login:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 简化错误样式 */
.invalid-feedback {
    display: block !important;
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

/* 响应式优化 */
@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .login-title {
        font-size: 24px;
    }
}

/* 减少复杂的粒子效果相关样式，提高性能 */
.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}
