/* 基础样式 */
.login-container {
    max-width: 450px;
    margin: 2rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.login-container:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* 表单样式 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input {
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.form-group input.error {
    border-color: #e74c3c;
}

/* 密码输入框特殊样式 */
.password-group {
    position: relative;
}

.password-input-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.toggle-password:hover {
    opacity: 1;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7f8c8d;
}

.forgot-password {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 按钮样式 */
.btn-login-submit {
    background-color: #3498db;
    color: white;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login-submit:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-login-submit:active {
    transform: translateY(0);
}

/* 注册链接 */
.register-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.register-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.register-link a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* 错误消息样式 */
.error-message {
    background-color: #fdecea;
    color: #d32f2f;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border-left: 4px solid #d32f2f;
}

.field-error {
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* 响应式设计 */
@media (max-width: 576px) {
    .login-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* 添加以下样式到login.css */

/* 错误动画 */
.error-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.error-animate {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 错误输入框样式 */
input.error {
    border-color: #e74c3c !important;
    background-color: #fdecea;
}


/* 登录表单基础样式 */
.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-header h2 {
    color: #333;
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
}

/* 错误消息样式 */
.error-message {
    background-color: #ffeeee;
    color: #ff4444;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #ff4444;
}

.field-error {
    color: #ff4444;
    font-size: 14px;
    margin-top: 5px;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group input.error {
    border-color: #ff4444;
}

/* 密码输入容器 */
.password-input-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
}

/* 表单选项 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
}

/* 登录按钮 */
.btn-login-submit {
    width: 100%;
    padding: 12px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 15px;
}

.btn-login-submit:hover {
    background-color: #3367d6;
}

/* 注册链接 */
.register-link {
    text-align: center;
    color: #666;
}

.register-link a {
    color: #4285f4;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

/* ========== 悬浮攻略提示组件  ========== */

 /* 精致卡片气泡悬浮提示 */
.guide-float-cloud {
    position: fixed;
    top: 120px;
    right: 40px;
    z-index: 99999;
    cursor: pointer;
    animation: cloudFloat 3s ease-in-out infinite;
    text-decoration: none;
}

.guide-float-cloud:hover {
    animation-play-state: paused;
    transform: scale(1.05);
}

.guide-cloud-body {
    width: 110px;
    height: 42px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 14px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    box-shadow:
        0 4px 15px rgba(102, 126, 234, 0.3),
        0 2px 6px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

/* 卡片内部白色背景 */
.guide-cloud-body::before {
    content: '';
    position: absolute;
    inset: 2px;
    background: #ffffff;
    border-radius: 12px;
}

/* 卡片小尾巴 */
.guide-cloud-body::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    right: -5px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    background: #ffffff;
    border-top: 2px solid #764ba2;
    border-right: 2px solid #764ba2;
    border-radius: 0 3px 0 0;
}

/* 提示文字 */
.guide-cloud-text {
    position: relative;
    z-index: 10;
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.guide-cloud-text::before {
    content: '✨';
    font-size: 13px;
}

/* 脉冲动画效果 */
.guide-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    border: 2px solid rgba(102, 126, 234, 0.4);
    animation: pulseRing 2s ease-out infinite;
    top: 0;
    left: 0;
}

/* 小标签 */
.guide-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    color: white;
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255,107,107,0.4);
    z-index: 20;
    animation: badgePulse 1.5s ease-in-out infinite;
}

/* 动画定义 */
@keyframes cloudFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}