/* 认证页面样式 */
.auth-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    width: 100%;
    max-width: none;
    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;
}

.auth-container {
    width: 100% !important;
    max-width: 650px !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    position: relative;
}

.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% !important;
    max-width: 650px !important;
    min-width: 300px !important;
    margin: 0 auto !important;
    display: block !important;
    animation: fadeIn 0.5s ease-out;
    position: relative;
}

.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;
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    opacity: 0.9;
}

.auth-form {
    padding: 2rem;
    width: 100% !important;
}

.form-group {
    margin-bottom: 1.5rem;
    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%;
}

.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-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;
}

.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;
    opacity: 0;
    transform: translateY(-10px);
    animation: slideIn 0.3s ease forwards;
}

/* 表单验证动画 */
.form-group.success .form-input {
    border-color: #2ecc71;
}

.form-group.error .form-input {
    border-color: #e74c3c;
    animation: shake 0.5s;
}

/* 登录模块专用浮动元素 */
.auth-card::before, .auth-card::after {
    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 {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    opacity: 0;
    animation: floatRandom 8s infinite ease-in-out;
}

/* 固定位置元素样式 */
.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;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .auth-container {
        padding: 0 1rem !important;
    }
}

/* 动画定义 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@keyframes slideIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes loadingShine {
    100% { left: 100%; }
}

@keyframes backgroundShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gradientBackground {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@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 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;
    }
}