/* ========== 首页专属样式 ========== */
body {
    padding-top: 70px !important;
    background: #f5f7fa !important;
}

/* 仅 PC 端：主页内容最大宽度 1800px，手机端不生效 */
@media (min-width: 1800px) {
  .container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 15px;
  }
}

/* 横向分类导航：自动循环左移 + 鼠标悬停暂停 */
.catalog {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 15px;
    background: #ffffff;
    border-radius: 12px;
    margin: 0 15px 20px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.catalog::-webkit-scrollbar {
    display: none;
}
.catalog-slide {
    display: flex;
    gap: 10px;
    white-space: nowrap;
    animation: slideLeft 25s linear infinite;
}
.catalog:hover .catalog-slide {
    animation-play-state: paused;
}
@keyframes slideLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.catalog a {
    flex-shrink: 0;
    padding: 7px 14px;
    background: #f8f9fa;
    border-radius: 50px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: 0.2s;
}
.catalog a:hover {
    background: #007bff;
    color: #fff;
}

/* 板块样式 */
.section {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.section h2 {
    font-size: 18px;
    margin: 0 0 14px 0;
    color: #222;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section h2::before {
    content: "";
    width: 4px;
    height: 18px;
    background: #007bff;
    border-radius: 4px;
}

/* 核心修复：工具网格，手机端强制自适应多列，不会变成1列 */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
/* 手机端额外适配，确保小屏幕至少2列 */
@media (max-width: 767px) {
    .tool-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.tool-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: 0.2s;
}
.tool-item:hover {
    background: #007bff;
    color: #fff;
    transform: translateY(-2px);
}

/* 底部 */
.footer {
    text-align: center;
    padding: 25px 15px;
    font-size: 12px;
    color: #999;
}

/* LOGO 图片尺寸修复 */
.nav-logo img {
    height: 36px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
}

/* 通用高亮标记 */
a.tool-item.red {
  color: #ff0000 !important;
  font-weight: bold !important;
  font-size: 15px !important;
}

/* 2. 登录页面修复验证码区域样式 */
.captcha-box{
    display:flex;
    gap:8px;
    margin-bottom:10px;
    width:100%;
}
.captcha-box input{
    flex:1;
    height:40px;
    box-sizing:border-box;
    border:1px solid #ddd;
    border-radius:4px;
    padding:0 10px;
}
.captcha-img{
    height:40px;
    border-radius:4px;
    cursor:pointer;
    border:1px solid #ddd;
}
/* 3. 补充卡片和表单样式，防止依赖缺失 */
.card {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
.form-item {
    margin-bottom: 15px;
}
.form-item input {
    width:100%;
    height:40px;
    box-sizing:border-box;
    border:1px solid #ddd;
    border-radius:4px;
    padding:0 10px;
}
.btn {
    width:100%;
    height:40px;
    background: #1677ff;
    color:#fff;
    border:none;
    border-radius:4px;
    cursor:pointer;
}
.text-center {
    text-align:center;
    margin-top:15px;
}
.tip {
    text-align:center;
}

/* 登录页面修复样式end */

/* 修复锚点跳转被顶部导航遮挡 */
html {
    scroll-padding-top: 70px !important;
}