/* 认证页面样式 */
.auth-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    width: auto;
    width: 100%;
    max-width: none;
}

.auth-container {
    width: auto;
    height: auto;
   
    max-width: 650px !important; /* 恢复为管理员界面相同宽度 */
    padding: 0 20px;
    margin: 0 auto; /* 确保居中显示 */
}

.auth-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.auth-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 2rem;
    text-align: center;
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    opacity: 0.9;
}

.auth-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.form-label i {
    margin-right: 0.5rem;
    color: #3498db;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #777;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #3498db;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    color: #555;
}

.remember-me input {
    margin-right: 0.5rem;
}

.forgot-password {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease, margin-left 0.3s ease;
}

.forgot-password:hover {
    color: #2980b9;
    margin-left: 3px;
}

.auth-button {
    width: 100%;
    padding: 0.9rem;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-button i {
    margin-right: 0.5rem;
}

.auth-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-footer {
    text-align: center;
    padding: 1rem 2rem;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.auth-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.auth-footer a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.auth-footer a:hover {
    color: #2980b9;
}

.auth-footer a:hover:after {
    width: 100%;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    height: 1.2rem;
    transition: all 0.3s ease;
}

/* 表单验证动画 */
.form-group.success .form-input {
    border-color: #2ecc71;
}

.form-group.error .form-input {
    border-color: #e74c3c;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .auth-container {
        padding: 0 1rem;
    }
}

/* 新增动态效果 */
.auth-card {
    /* 已有的样式保持不变 */
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    position: relative;
    overflow: hidden;
}

.form-group::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.form-group:focus-within::after {
    width: 100%;
}

.error-message {
    /* 已有的样式保持不变 */
    opacity: 0;
    transform: translateY(-10px);
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    to { opacity: 1; transform: translateY(0); }
}

.auth-button.loading {
    position: relative;
    overflow: hidden;
}

.auth-button.loading::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loadingShine 1.5s infinite;
}

@keyframes loadingShine {
    100% { left: 100%; }
}

/* 添加背景动态效果 */
.auth-content {
    position: relative;
    min-height: calc(100vh - 180px);
    overflow: hidden;
}

.auth-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dfeeec 0%, #1eb6dc 100%, #53e66e 100%, #cee772 100%);
    z-index: -1;
    animation: backgroundShift 15s ease infinite;
}

@keyframes backgroundShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 增强背景渐变动画 */
.auth-container {
    width: auto;
    height: auto;
    max-width: 650px !important; /* 恢复为管理员界面相同宽度 */
    padding: 0 20px;
    margin: 0 auto; /* 确保居中显示 */
}

.auth-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.auth-header {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradientBackground 15s ease infinite;
    position: relative;
    overflow: hidden;
}

/* 登录模块专用浮动元素 - 增加数量并调整动画 */
.auth-card::before, .auth-card::after,
.auth-container .float-element-1, .auth-container .float-element-2,
.auth-container .float-element-3, .auth-container .float-element-4,
.auth-container .float-element-5, .auth-container .float-element-6 {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    z-index: 0;
}

/* 大型浮动元素 */
.auth-card::before {
    width: 250px;
    height: 250px;
    top: -100px;
    right: -100px;
    animation: float 20s infinite ease-in-out 0s;
}

.auth-card::after {
    width: 200px;
    height: 200px;
    bottom: -80px;
    left: -80px;
    animation: float 22s infinite ease-in-out 2s;
}

/* 小型浮动元素 */
.auth-container .float-element-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 15%;
    animation: float 18s infinite ease-in-out 1s;
}

.auth-container .float-element-2 {
    width: 50px;
    height: 50px;
    top: 60%;
    right: 20%;
    animation: float 16s infinite ease-in-out 3s;
}

.auth-container .float-element-3 {
    width: 120px;
    height: 120px;
    bottom: 30%;
    left: 25%;
    animation: float 24s infinite ease-in-out 4s;
}

.auth-container .float-element-4 {
    width: 60px;
    height: 60px;
    top: 40%;
    right: 30%;
    animation: float 14s infinite ease-in-out 5s;
}

.auth-container .float-element-5 {
    width: 90px;
    height: 90px;
    bottom: 45%;
    right: 15%;
    animation: float 21s infinite ease-in-out 6s;
}

.auth-container .float-element-6 {
    width: 70px;
    height: 70px;
    top: 75%;
    left: 35%;
    animation: float 19s infinite ease-in-out 7s;
}

/* 增强浮动动画效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) translateX(15px) rotate(5deg);
    }
    50% {
        transform: translateY(10px) translateX(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-20px) translateX(10px) rotate(-5deg);
    }
}

/* 增强背景渐变动画 */
@keyframes gradientBackground {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.decorative-element {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.decorative-element::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -50px;
    left: -50px;
    animation: float 10s ease-in-out infinite 2s;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* 替换现有.auth-container和.auth-card样式 */
/* 恢复为与管理员界面一致的650px宽度 */
.auth-container {
    width: 100% !important;
    max-width: 650px !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    /* border: 2px solid red !important; */ /* 移除调试边框 */
}

/* 保持优化后的选择器但使用正确宽度 */
.main-content.auth-content .auth-card {
    width: 100% !important;
    max-width: 650px !important;
    min-width: 300px !important;
    margin: 0 auto !important;
    display: block !important;
}

/* 确保表单内容不限制宽度 */
.auth-form {
    width: 100% !important;
}

/* 更新浮动元素基础样式 - 移除固定背景色 */
.auth-container .float-element {
    content: '';
    position: absolute;
    border-radius: 50%;
    /* 移除固定背景色定义 */
    z-index: 0;
    opacity: 0;
    animation: floatRandom 8s infinite ease-in-out;
}

/* 修改浮动动画，加快速度并增加随机性 */
@keyframes floatRandom {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--translate-x), var(--translate-y)) rotate(var(--rotate));
        opacity: 0;
    }
}

/* 移除之前为特定浮动元素定义的样式 */
/* 删除所有 .auth-card::before, .auth-card::after, .float-element-1 等相关样式 */
.auth-container .float-element-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 15%;
    animation: float 18s infinite ease-in-out 1s;
}

.auth-container .float-element-2 {
    width: 50px;
    height: 50px;
    top: 60%;
    right: 20%;
    animation: float 16s infinite ease-in-out 3s;
}

.auth-container .float-element-3 {
    width: 120px;
    height: 120px;
    bottom: 30%;
    left: 25%;
    animation: float 24s infinite ease-in-out 4s;
}

.auth-container .float-element-4 {
    width: 60px;
    height: 60px;
    top: 40%;
    right: 30%;
    animation: float 14s infinite ease-in-out 5s;
}

.auth-container .float-element-5 {
    width: 90px;
    height: 90px;
    bottom: 45%;
    right: 15%;
    animation: float 21s infinite ease-in-out 6s;
}

.auth-container .float-element-6 {
    width: 70px;
    height: 70px;
    top: 75%;
    left: 35%;
    animation: float 19s infinite ease-in-out 7s;
}

/* 增强浮动动画效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) translateX(15px) rotate(5deg);
    }
    50% {
        transform: translateY(10px) translateX(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-20px) translateX(10px) rotate(-5deg);
    }
}

/* 增强背景渐变动画 */
@keyframes gradientBackground {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.decorative-element {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.decorative-element::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -50px;
    left: -50px;
    animation: float 10s ease-in-out infinite 2s;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* 替换现有.auth-container和.auth-card样式 */
/* 恢复为与管理员界面一致的650px宽度 */
.auth-container {
    width: 100% !important;
    max-width: 650px !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    /* border: 2px solid red !important; */ /* 移除调试边框 */
}

/* 保持优化后的选择器但使用正确宽度 */
.main-content.auth-content .auth-card {
    width: 100% !important;
    max-width: 650px !important;
    min-width: 300px !important;
    margin: 0 auto !important;
    display: block !important;
}

/* 确保表单内容不限制宽度 */
.auth-form {
    width: 100% !important;
}

/* 更新浮动元素基础样式 - 移除固定背景色 */
.auth-container .float-element {
    content: '';
    position: absolute;
    border-radius: 50%;
    /* 移除固定背景色定义 */
    z-index: 0;
    opacity: 0;
    animation: floatRandom 8s infinite ease-in-out;
}

/* 修改浮动动画，加快速度并增加随机性 */
@keyframes floatRandom {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translate(var(--translate-x), var(--translate-y)) rotate(var(--rotate));
        opacity: 0;
    }
}

/* 移除之前为特定浮动元素定义的样式 */
/* 删除所有 .auth-card::before, .auth-card::after, .float-element-1 等相关样式 */
.auth-container .float-element-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 15%;
    animation: float 18s infinite ease-in-out 1s;
}

.auth-container .float-element-2 {
    width: 50px;
    height: 50px;
    top: 60%;
    right: 20%;
    animation: float 16s infinite ease-in-out 3s;
}

.auth-container .float-element-3 {
    width: 120px;
    height: 120px;
    bottom: 30%;
    left: 25%;
    animation: float 24s infinite ease-in-out 4s;
}

.auth-container .float-element-4 {
    width: 60px;
    height: 60px;
    top: 40%;
    right: 30%;
    animation: float 14s infinite ease-in-out 5s;
}

.auth-container .float-element-5 {
    width: 90px;
    height: 90px;
    bottom: 45%;
    right: 15%;
    animation: float 21s infinite ease-in-out 6s;
}

.auth-container .float-element-6 {
    width: 70px;
    height: 70px;
    top: 75%;
    left: 35%;
    animation: float 19s infinite ease-in-out 7s;
}

/* 增强浮动动画效果 */
@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) translateX(15px) rotate(5deg);
    }
    50% {
        transform: translateY(10px) translateX(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-20px) translateX(10px) rotate(-5deg);
    }
}

/* 增强背景渐变动画 */
@keyframes gradientBackground {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.decorative-element {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.decorative-element::after {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -50px;
    left: -50px;
    animation: float 10s ease-in-out infinite 2s;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* 替换现有.auth-container和.auth-card样式 */
/* 恢复为与管理员界面一致的650px宽度 */
.auth-container {
    width: 100% !important;
    max-width: 650px !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    /* border: 2px solid red !important; */ /* 移除调试边框 */
}

/* 保持优化后的选择器但使用正确宽度 */
.main-content.auth-content .auth-card {
    width: 100% !important;
    max-width: 650px !important;
    min-width: 300px !important;
    margin: 0 auto !important;
    display: block !important;
}

/* 确保表单内容不限制宽度 */
.auth-form {
    width: 100% !important;
}

/* 固定位置元素样式 */
.auth-container .float-element.fixed-position {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 159, 64, 0.3);
    animation: none;
    cursor: move;
    z-index: 1;
}

/* 拖拽状态样式 */
.auth-container .float-element.dragging {
    opacity: 0.8;
    transform: scale(1.05);
    transition: transform 0.2s;
}