/* ========== 登陆页面样式 ========== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 20px 0;
}

.login-page .container {
    width: 100%;
    max-width: none;
    padding: 0;
    margin: 0;
}

.login-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    animation: slideUp 0.3s ease-out;
    margin: 0 auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.login-header p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* 标签页切换 */
.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.tab-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: none;
    color: #999;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #667eea;
}

.tab-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* 标签页内容 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 图形验证码 */
.captcha-group {
    margin-bottom: 20px;
}

.captcha-group label {
    margin-bottom: 8px;
}

.captcha-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap; /* 允许验证码提示文字换行 */
}

.captcha-input {
    flex: 1;
    order: 1;
}

.captcha-img {
    width: 150px;
    height: 50px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    display: block;
    order: 2;
}

/* 修复验证提示文字挤压输入框的问题 */
.captcha-input-group .invalid-feedback {
    display: block;
    width: 100%;
    order: 3;
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

.captcha-img:hover {
    opacity: 0.8;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-primary {
    background: #4a90e2; /* 更柔和的蓝色，与页面主题保持一致 */
    color: white;
}

.btn-primary:hover {
    background: #357abd; /* 悬停时稍微深一点的蓝色 */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4); /* 与新颜色匹配的阴影 */
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease; /* 添加过渡动画 */
}

.btn-secondary:hover {
    background: #667eea; /* 使用与主色调一致的蓝色 */
    color: white; /* 白色文字确保足够的对比度 */
    border-color: #667eea;
    transform: translateY(-2px); /* 添加轻微的上移效果 */
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3); /* 添加阴影效果 */
}

.btn-secondary:active {
    transform: translateY(0);
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 提示文字 */
.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

/* 页脚 */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.login-footer p {
    margin: 5px 0;
    font-size: 12px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-card {
        padding: 30px 20px;
        max-width: 100%;
        margin: 0 20px;
    }

    .login-page {
        padding: 10px;
    }

    .login-header h2 {
        font-size: 24px;
    }

    .captcha-img {
        width: 120px;
        height: 40px;
    }

    .form-control {
        padding: 8px 10px;
        font-size: 14px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Alert消息框 */
.alert {
    padding: 12px 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert .close {
    background: none;
    border: none;
    color: inherit;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

.alert .close:hover {
    opacity: 0.7;
}
