/* 登录页面样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', Arial, sans-serif;
}

/* 全局变量定义 */
:root {
    /* 亮色主题变量 */
    --light-primary-color: #3a7bd5;
    --light-primary-gradient: linear-gradient(to right, #3a7bd5, #00d2ff);
    --light-secondary-color: #6c757d;
    --light-success-color: #28a745;
    --light-danger-color: #dc3545;
    --light-light-color: #f8f9fa;
    --light-dark-color: #343a40;
    --light-bg-color: #f5f7fa;
    --light-text-color: #333;
    --light-border-color: #e0e0e0;
    --light-input-bg: #f9f9f9;
    --light-card-bg: #fff;

    /* 深色主题变量 */
    --dark-primary-color: #4d96ff;
    --dark-primary-gradient: linear-gradient(to right, #4d96ff, #00c6ff);
    --dark-secondary-color: #a0a0a0;
    --dark-success-color: #2fb85b;
    --dark-danger-color: #e74c3c;
    --dark-light-color: #e0e0e0;
    --dark-dark-color: #202124;
    --dark-bg-color: #121212;
    --dark-card-bg: #1e1e1e;
    --dark-input-bg: #2a2a2a;
    --dark-text-color: #e0e0e0;
    --dark-border-color: #444;
    
    /* 通用变量 */
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    --dark-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
}

/* 添加全局样式覆盖所有可能的边框 */
:root, html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, button, input, textarea, select {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* 特别处理登录按钮的焦点状态，添加自定义的焦点效果而不是绿色边框 */
.login-btn:focus, .login-btn:active, .login-btn.loading {
    outline: none !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(58, 123, 213, 0.3) !important;
}

.dark-theme .login-btn:focus, .dark-theme .login-btn:active, .dark-theme .login-btn.loading {
    box-shadow: 0 4px 20px rgba(77, 150, 255, 0.4) !important;
}

/* 移除特定容器的边框 */
.login-container {
    width: 100%;
    max-width: 580px;
    padding: 20px;
    position: relative;
    z-index: 1;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease, transform 0.5s ease;
    /* 使用硬件加速，减少闪烁 */
    will-change: opacity, transform;
    /* 移除容器边框 */
    border: none !important;
    outline: none !important;
    /* 防止抖动 */
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* 防止浏览器默认的聚焦边框 */
*:focus {
    outline: none !important;
    border-color: transparent !important;
}

/* 默认亮色主题 */
body {
    background-color: var(--light-bg-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: var(--light-text-color);
    transition: background-color 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    /* 使用硬件加速，减少闪烁 */
    transform: translateZ(0);
    will-change: opacity, transform;
}

/* 深色主题 */
body.dark-theme {
    background-color: var(--dark-bg-color);
    color: var(--dark-text-color);
}

/* 预加载样式 */
.preload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg-color);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.preload-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    border-top: 4px solid var(--dark-primary-color);
    animation: spin 1s linear infinite;
}

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

/* 背景动画效果 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

/* 亮色主题背景形状 */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    transition: transform 0.3s ease-out;
    /* 使用硬件加速，减少闪烁 */
    will-change: transform;
}

.shape1 {
    background: rgba(58, 123, 213, 0.4);
    width: 600px;
    height: 600px;
    top: -200px;
    left: -200px;
    animation: float 8s ease-in-out infinite;
}

.shape2 {
    background: rgba(0, 210, 255, 0.4);
    width: 400px;
    height: 400px;
    bottom: -150px;
    right: -100px;
    animation: float 10s ease-in-out infinite;
}

.shape3 {
    background: rgba(101, 78, 163, 0.2);
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 12s ease-in-out infinite;
}

/* 深色主题背景形状 */
.dark-theme .shape1 {
    background: rgba(77, 150, 255, 0.3);
}

.dark-theme .shape2 {
    background: rgba(0, 198, 255, 0.3);
}

.dark-theme .shape3 {
    background: rgba(138, 43, 226, 0.2);
}

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

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
}

/* 亮色主题登录框 */
.login-box {
    background-color: var(--light-card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    /* 降低过渡持续时间，减少抖动感 */
    transition: box-shadow 0.3s ease;
    animation: fadeIn 0.8s ease-out;
    /* 使用硬件加速，减少闪烁 */
    transform: translateZ(0);
    will-change: box-shadow;
    /* 确保没有边框 */
    border: none !important;
    outline: none !important;
    /* 防止3D变换导致的抖动 */
    transform-style: preserve-3d;
    backface-visibility: hidden;
    /* 设置最小宽度确保横向布局 */
    min-width: 540px;
}

/* 深色主题登录框 */
.dark-theme .login-box {
    background-color: var(--dark-card-bg);
    box-shadow: var(--dark-shadow);
    border: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-box:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    /* 移除translateY，防止悬停时抖动 */
    transform: translateZ(0);
}

.dark-theme .login-box:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* 亮色主题登录头部 */
.login-header {
    padding: 20px 30px 15px;
    text-align: center;
    background-color: var(--light-card-bg);
    border-bottom: 1px solid var(--light-border-color);
    /* 新增水平布局 */
    display: flex;
    align-items: center;
}

/* 深色主题登录头部 */
.dark-theme .login-header {
    background-color: var(--dark-card-bg);
    border-bottom: 1px solid var(--dark-border-color);
}

/* 亮色主题logo */
.login-header .logo {
    width: 70px;
    height: 70px;
    margin: 0 20px 0 0;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 10px rgba(58, 123, 213, 0.3);
    flex-shrink: 0;
}

/* 登录标题容器 */
.login-title-container {
    text-align: left;
    flex-grow: 1;
}

/* 深色主题logo */
.dark-theme .login-header .logo {
    background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
    box-shadow: 0 4px 15px rgba(142, 45, 226, 0.5);
}

/* 深色主题标题 */
.login-header h2 {
    color: var(--light-text-color);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 5px;
    text-align: left;
}

.dark-theme .login-header h2 {
    color: var(--dark-light-color);
}

.login-header .slogan {
    color: var(--light-secondary-color);
    font-size: 14px;
    margin-bottom: 0;
    text-align: left;
}

.dark-theme .login-header .slogan {
    color: var(--dark-secondary-color);
}

/* 亮色主题表单区域 */
.login-form {
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
}

/* 亮色主题消息 */
.login-message {
    display: none;
}

/* 输入组 */
.input-group {
    margin-bottom: 20px;
    position: relative;
    width: 100%;
}

/* 图标 */
.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-secondary-color);
    z-index: 2;
    transition: transform 0.2s ease, color 0.2s ease;
}

.dark-theme .input-icon {
    color: var(--dark-secondary-color);
}

/* Font Awesome加载失败时的备用图标 */
.no-fontawesome .input-icon .fa-user:before {
    content: '👤';
}

.no-fontawesome .input-icon .fa-lock:before {
    content: '🔒';
}

.no-fontawesome .toggle-password .fa-eye-slash:before {
    content: '👁️';
}

.no-fontawesome .toggle-password .fa-eye:before {
    content: '👁️‍🗨️';
}

.no-fontawesome .login-btn .fa-sign-in:before {
    content: '➡️';
}

.no-fontawesome .login-btn .fa-spinner:before {
    content: '⏳';
}

/* 亮色主题输入框 */
.input-group input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid var(--light-border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    background: var(--light-input-bg);
    color: var(--light-text-color);
}

/* 深色主题输入框 */
.dark-theme .input-group input {
    background: var(--dark-input-bg);
    border: 1px solid var(--dark-border-color);
    color: var(--dark-text-color);
}

.input-group input::placeholder {
    color: #aaa;
    transition: opacity 0.3s ease;
}

.dark-theme .input-group input::placeholder {
    color: #777;
}

.input-group input:focus::placeholder {
    opacity: 0.7;
}

/* 亮色主题输入框焦点 */
.input-group input:focus {
    border-color: var(--light-primary-color);
    outline: none;
    background: var(--light-card-bg);
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.1);
}

/* 深色主题输入框焦点 */
.dark-theme .input-group input:focus {
    border-color: var(--dark-primary-color);
    background: rgba(77, 150, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(77, 150, 255, 0.2);
}

/* 密码切换按钮 */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--light-secondary-color);
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.dark-theme .toggle-password {
    color: var(--dark-secondary-color);
}

.toggle-password:hover {
    color: var(--light-primary-color);
}

.dark-theme .toggle-password:hover {
    color: var(--dark-primary-color);
}

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

/* 记住我 */
.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: var(--light-primary-color);
    transition: accent-color 0.3s ease;
}

.dark-theme .remember-me input[type="checkbox"] {
    accent-color: var(--dark-primary-color);
}

.remember-me label {
    font-size: 14px;
    color: var(--light-secondary-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.dark-theme .remember-me label {
    color: var(--dark-secondary-color);
}

/* 忘记密码链接 */
.forgot-password {
    font-size: 14px;
    color: var(--light-primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.dark-theme .forgot-password {
    color: var(--dark-primary-color);
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 亮色主题登录按钮 */
.login-btn {
    width: 100%;
    padding: 12px 15px;
    background: var(--light-primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition), transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(58, 123, 213, 0.2);
    /* 使用硬件加速，减少闪烁 */
    transform: translateZ(0);
    will-change: transform, box-shadow, background;
    /* 确保点击时没有边框 */
    outline: none !important;
}

.login-btn:focus {
    outline: none !important;
    border: none !important;
    box-shadow: 0 6px 15px rgba(58, 123, 213, 0.3);
}

/* 深色主题登录按钮 */
.dark-theme .login-btn {
    background: var(--dark-primary-gradient);
    box-shadow: 0 4px 15px rgba(77, 150, 255, 0.3);
}

.login-btn span {
    margin-right: 8px;
    position: relative;
    z-index: 1;
}

.login-btn i {
    position: relative;
    z-index: 1;
}

/* 按钮加载动画 */
.login-btn i.fa-spinner {
    animation: fa-spin 1s infinite linear;
}

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

/* 亮色主题按钮悬停 */
.login-btn:hover {
    background: linear-gradient(to right, #3178c6, #00bcd4);
    box-shadow: 0 6px 15px rgba(58, 123, 213, 0.3);
    transform: translateY(-2px) translateZ(0);
}

/* 深色主题按钮悬停 */
.dark-theme .login-btn:hover {
    background: linear-gradient(to right, #4285f4, #00b8d4);
    box-shadow: 0 6px 20px rgba(77, 150, 255, 0.4);
}

.login-btn:active {
    transform: translateY(0) translateZ(0);
    box-shadow: 0 2px 5px rgba(58, 123, 213, 0.3);
}

.login-btn:disabled {
    background: #b3b3b3;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.8;
    transform: translateY(0) translateZ(0);
}

.dark-theme .login-btn:disabled {
    background: #555;
}

/* 页脚 */
.login-footer {
    padding: 12px 15px;
    text-align: center;
    border-top: 1px solid var(--light-border-color);
    font-size: 12px;
    color: var(--light-secondary-color);
}

.dark-theme .login-footer {
    border-top: 1px solid var(--dark-border-color);
    color: #777;
}

.login-footer p {
    margin-bottom: 5px;
}

.browser-support {
    font-size: 11px;
    color: #aaa;
}

.dark-theme .browser-support {
    color: #666;
}

/* 添加新的交互动画和状态样式 */
.login-box.shown {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

.login-box.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.login-box.success-animation {
    animation: successPulse 1.2s ease-in-out;
}

.dark-theme .login-box.success-animation {
    animation: darkSuccessPulse 1.2s ease-in-out;
}

.input-group.focused input {
    border-color: var(--light-primary-color);
    background: var(--light-card-bg);
    box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.1);
}

.dark-theme .input-group.focused input {
    border-color: var(--dark-primary-color);
    background: rgba(77, 150, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(77, 150, 255, 0.2);
}

/* 添加特定的transform动画，防止抖动 */
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes successPulse {
    0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(40, 167, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

@keyframes darkSuccessPulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

body.loaded .background-animation .shape {
    opacity: 0.4;
}

body.loaded.dark-theme .background-animation .shape {
    opacity: 0.3;
}

body.loaded .background-animation .shape1 {
    animation: float 8s ease-in-out infinite;
}

body.loaded .background-animation .shape2 {
    animation: float 10s ease-in-out infinite;
}

body.loaded .background-animation .shape3 {
    animation: pulse 12s ease-in-out infinite;
}

/* 增强背景动画效果 */
.shape4 {
    background: rgba(111, 66, 193, 0.3);
    width: 250px;
    height: 250px;
    top: 60%;
    right: 10%;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphing 15s ease-in-out infinite alternate;
}

.shape5 {
    background: rgba(45, 149, 237, 0.25);
    width: 350px;
    height: 350px;
    bottom: 10%;
    left: 15%;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: morphing 12s ease-in-out infinite alternate-reverse;
}

@keyframes morphing {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(0deg);
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 40% 60% 30% 70% / 60% 40% 70% 30%;
        transform: rotate(5deg);
    }
    75% {
        border-radius: 60% 40% 70% 30% / 30% 60% 40% 70%;
    }
    100% {
        border-radius: 40% 60% 40% 60% / 50% 40% 60% 50%;
        transform: rotate(-5deg);
    }
}

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

.particles:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(white 2px, transparent 2px),
        radial-gradient(white 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    opacity: 0.1;
    animation: particles-float 40s linear infinite;
}

.dark-theme .particles:before {
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    opacity: 0.2;
}

@keyframes particles-float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-1000px) rotate(360deg);
    }
}

/* 鼠标移动视差效果 */
body.dark-theme {
    background-color: var(--dark-bg-color);
    color: var(--dark-text-color);
    perspective: 1000px;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    transform-style: preserve-3d;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    transform-style: preserve-3d;
    will-change: transform;
}

/* 闪烁效果 */
.shape1 {
    animation: float 8s ease-in-out infinite, glow 4s ease-in-out infinite alternate;
}

.shape2 {
    animation: float 10s ease-in-out infinite, glow 6s ease-in-out infinite alternate-reverse;
}

.shape3 {
    animation: pulse 12s ease-in-out infinite, glow 5s ease-in-out infinite alternate;
}

.shape4 {
    animation: morphing 15s ease-in-out infinite alternate, glow 7s ease-in-out infinite alternate-reverse;
}

.shape5 {
    animation: morphing 12s ease-in-out infinite alternate-reverse, glow 8s ease-in-out infinite alternate;
}

@keyframes glow {
    0% {
        opacity: 0.3;
        filter: blur(60px);
    }
    50% {
        opacity: 0.5;
        filter: blur(50px);
    }
    100% {
        opacity: 0.4;
        filter: blur(70px);
    }
}

/* 响应式调整 */
@media (max-width: 640px) {
    .login-container {
        max-width: 420px;
    }
    
    .login-box {
        min-width: unset;
    }
    
    .login-header {
        flex-direction: column;
        padding: 20px 20px 15px;
    }
    
    .login-header .logo {
        margin: 0 auto 15px;
    }
    
    .login-title-container {
        text-align: center;
    }
    
    .login-header h2,
    .login-header .slogan {
        text-align: center;
    }
}

/* 图标颜色设置 */
.input-icon .fa-user {
    color: #42a5f5; /* 蓝色系 - 用户图标 */
    transition: color 0.3s ease, transform 0.3s ease;
}

.dark-theme .input-icon .fa-user {
    color: #64b5f6; /* 深色主题下的用户图标 - 更亮的蓝色 */
}

.input-icon .fa-lock {
    color: #7e57c2; /* 紫色系 - 密码图标 */
    transition: color 0.3s ease, transform 0.3s ease;
}

.dark-theme .input-icon .fa-lock {
    color: #9575cd; /* 深色主题下的密码图标 - 更亮的紫色 */
}

.login-header .logo .fa-database {
    color: #ffffff; /* 白色 - 数据库图标 */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 图标悬停效果 */
.input-group:hover .fa-user {
    color: #1e88e5; /* 悬停时更深的蓝色 */
    transform: scale(1.05);
}

.dark-theme .input-group:hover .fa-user {
    color: #90caf9; /* 深色主题下悬停时更亮的蓝色 */
}

.input-group:hover .fa-lock {
    color: #5e35b1; /* 悬停时更深的紫色 */
    transform: scale(1.05);
}

.dark-theme .input-group:hover .fa-lock {
    color: #b39ddb; /* 深色主题下悬停时更亮的紫色 */
}

/* 聚焦时的图标效果 */
.input-group.focused .fa-user {
    color: #1976d2; /* 聚焦时的蓝色 */
    transform: scale(1.1);
}

.input-group.focused .fa-lock {
    color: #512da8; /* 聚焦时的紫色 */
    transform: scale(1.1);
}

.dark-theme .input-group.focused .fa-user {
    color: #bbdefb; /* 深色主题下聚焦时的亮蓝色 */
}

.dark-theme .input-group.focused .fa-lock {
    color: #d1c4e9; /* 深色主题下聚焦时的亮紫色 */
}

/* 改变数据库图标的背景渐变 */
.login-header .logo {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%); /* 更鲜明的渐变 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark-theme .login-header .logo {
    background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%); /* 深色主题下的渐变 */
    box-shadow: 0 4px 15px rgba(142, 45, 226, 0.5);
}

.login-header .logo:hover {
    transform: rotate(5deg) scale(1.05);
    box-shadow: 0 6px 20px rgba(106, 17, 203, 0.6);
}

.dark-theme .login-header .logo:hover {
    box-shadow: 0 6px 25px rgba(142, 45, 226, 0.7);
}

/* 添加淡入淡出过渡，减少闪烁 */
.login-box, 
.login-header, 
.login-form, 
.login-footer, 
.input-group input,
.login-btn,
.login-message {
    backface-visibility: hidden;
    -webkit-font-smoothing: subpixel-antialiased;
}

/* 优化状态切换时的平滑过渡 */
.login-btn.loading {
    background-image: linear-gradient(to right, #3a7bd5, #00d2ff);
    background-size: 200% 100%;
    animation: gradientShift 2s linear infinite;
}

.dark-theme .login-btn.loading {
    background-image: linear-gradient(to right, #4d96ff, #00c6ff);
    background-size: 200% 100%;
    animation: gradientShift 2s linear infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 移除页面边框 */
html, body {
    border: none !important;
    outline: none !important;
}

/* 登录按钮成功提示 */
.login-btn.success {
    background: var(--light-success-color) !important;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3) !important;
}

.dark-theme .login-btn.success {
    background: var(--dark-success-color) !important;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4) !important;
}

/* 登录按钮成功文本提示 */
.login-btn-message {
    position: absolute;
    width: 100%;
    text-align: center;
    color: white;
    font-size: 16px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.login-btn-message.show {
    opacity: 1;
}

/* 登录按钮内容淡出 */
.login-btn.success .btn-content {
    opacity: 0;
}

/* 登录按钮过渡效果 */
.login-btn .btn-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    transition: opacity 0.3s ease;
}

.login-btn span, .login-btn i {
    position: relative;
    z-index: 1;
}

.login-btn span {
    margin-right: 8px;
} 