  :root{
    --bg:#f3f5f9;
    --card:#ffffff;
    --accent:#0780e3;
    --muted:#6b7280;
    --glass: rgba(255,255,255,0.6);
    --max-width:1200px;
    --radius:12px;
  }
  *{box-sizing:border-box}
  body{
    margin:0;font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    background: linear-gradient(180deg,#e6eefc 0%, #f7fbff 60%);
    color:#111;
  }
  .container{width:98%;margin:28px auto;padding:0 18px}

  /* 顶部导航 */
  .top-bar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:#f7fbff;
    padding:5px 38px;
    box-shadow:0 2px 6px rgba(0,0,0,0.05);
    position:sticky;
    top:0;
    z-index:100;
  }
  .top-bar .logo{
    font-size:24px;
    display:flex;
    align-items:center;
    gap:10px;
  }

.top-bar .logo a{
  display:flex;
  align-items:center;
}

  .top-bar .logo img{
    height:50px;
  }
  .top-bar .menu{
    display:flex;
    gap:20px;
    font-size:14px;
    color:#333;
    font-weight:500;
  }
  .top-bar .menu a{
    color:#333;
    text-decoration:none;
  }
  .top-bar .menu a:hover{
    color:var(--accent);
  }


.nav-menu{
  display:flex;
  gap:20px;
  list-style:none;
  margin:0;
  padding:0;
}
.nav-menu li a{
  color:#333;
  font-size:14px;
  font-weight:500;
  text-decoration:none;
}
.nav-menu li a:hover{
  color:var(--accent);
}

/* 移动端菜单图标 */
.menu-icon{
  display:none;
  font-size:26px;
  line-height:1;
  cursor:pointer;
}


  /* 居中搜索区 */
  .search-section{
    height:100px;line-height:100px;
    text-align:center;

  }
  .search-box{
    display:inline-flex;
    align-items:center;
    background:var(--card);
    padding:8px 18px;
    border-radius:999px;
    width:60%;
    max-width:800px;
    box-shadow:0 6px 18px rgba(12,24,48,0.08);
  }
  .search-box input{
    flex:1;
    border:0;
    outline:0;
    font-size:17px;
    padding:6px 12px;
    text-align:left;
  }
  .search-btn{
    background:var(--accent);
    color:#fff;
    border:0;
    padding:10px 18px;
    border-radius:999px;
    font-weight:600;
    cursor:pointer
  }


  /* 分类广告区整体 (PC+手机) */
  .category-ad-section{
    width:96%;
    margin:20px auto;
    display:flex;
    background:var(--card);
    border-radius:var(--radius);
    box-shadow:0 6px 18px rgba(0,0,0,0.06);
    overflow:hidden;
  }
  .category-list{
    width:180px;

    border-right:1px solid #eee;
    background:#f9f9f9;
  }
  .category-list div{
    padding:8px 12px;   /* 原14px改为8px */
    text-align:center;   /* 左右居中 */
    cursor:pointer;
    font-size:16px;
  }
  .category-list div:hover,
  .category-list .active{
    background:#ffd6d6;
    color:#000;
  }
  .category-ads{
    flex:1;
    padding:20px;
    display:none;
  }
  .category-ads.active{
    display:block;
  }
  .category-ads .ad-box{
    display:flex;
    flex-wrap:wrap;
    gap:16px;
  }

/* PC 端：广告图片统一高度 200px */
.category-ads .ad-box img {
    width: 32.3%;
    max-height: 200px;
    object-fit: cover; /* 重要：自动裁剪保持比例 */
    border-radius: var(--radius);
}

  .category-ads .ad-box div{
    flex:0 0 calc(50% - 16px);
    height:120px;
    background:#f5f5f5;
    border-radius:var(--radius);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:16px;
  }


#adBox {
  position: relative;
   /*    height: 500px;      可调整高度 */
}

#adBox img {
  width:100%;
  max-height:500px;
  position:absolute;
  top:0;
  left:0;
  opacity:0;
  transition: opacity 0.8s ease-in-out; /* ← 渐变时间 */
  pointer-events:none;        /* ← 新增，非 active 不接收点击 */
}

#adBox img.active {
  opacity:1;
  pointer-events:auto;        /* ← 只有 active 才能被点击 */
}


  /* 手机分类九宫格 */
.mobile-category-grid{
  display:none;
  width:96%;
  margin:10px auto;
  background:var(--card);
  padding:5px;
  border-radius:var(--radius);
  box-shadow:0 6px 18px rgba(0,0,0,0.05);
  overflow:hidden;
}
.mobile-category-grid::after{
content:"";
display:block;
clear:both;
}
.mobile-category-grid div{
width:33.33%;
float:left;
padding:12px 0;
text-align:center;
border-bottom:1px solid #eee;
border-right:1px solid #eee;
font-size:12px;
box-sizing:border-box;
}
.mobile-category-grid div:nth-child(3n){
border-right:0;
}
.mobile-category-grid div:nth-last-child(-n+3){
border-bottom:0;
}


  /* 轮播图 */
.carousel {margin:22px 0;width:100%;overflow:hidden;}
.track {display:flex;transition:.4s;}
.track img {
  width:calc((100% - 30px) / 5);  /* 5 张等分，margin 5×6 =30 */
  margin:0 6px;
  height:150px;
  object-fit:cover;
  border-radius:12px;
}

.ask { max-width: 500px; margin: 20px auto; }
.ask textarea { width: 100%; padding: 10px; font-size: 14px; }
.ask .button {  width: 100%; padding: 10px 16px; background:#4b9cff; color:#fff; border:0; cursor:pointer; }


  @keyframes scroll{0%{transform:translateX(0);}100%{transform:translateX(-50%);}}
  .masonry{column-count:3;column-gap:18px;width:100%;}

  @media (max-width:1100px){.masonry{column-count:2}}

  @media (max-width:640px){

  .track img {
    width:calc(50% - 12px); /* 2 张 */
    height:90px;
  }

  #adBox {
    height: auto !important;    /* 不固定高度 */
  }

  #adBox img {
    position: static !important; /* 不叠放 */
    opacity: 1 !important;       /* 全部显示 */
    display: block !important;
    pointer-events: auto !important;
    margin-bottom: 10px;
  }


    .masonry{column-count:1}

  .nav-menu{ display:none; } /* 隐藏PC菜单 */
  .menu-icon{ display:block; } /* 显示菜单图标 */
  .top-bar{ padding:10px 16px; }
  .top-bar .logo img{ width:38px; }
  .search-box{    width:90%;    padding:8px 14px;  }
  .search-box input{    font-size:14px;  }

  .search-btn{
    padding:5px 18px;
    border-radius:999px;
    font-weight:600;

  }

  .category-ads .ad-box img {

      width: 100% !important;
      height: auto !important;   /* ← 自动高度 */

    object-fit: cover;
    display: block;
  }

  .mobile-category-grid{
    display:block;
  }

  /* 只隐藏 PC 左侧分类，不隐藏广告内容 */
.category-list {  display: none;}
  }
  .card{display:inline-block;width:100%;margin:0 0 18px;border-radius:12px;background:var(--card);box-shadow:0 8px 24px rgba(11,22,44,0.06);overflow:hidden;vertical-align:top}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block; /* 让链接覆盖整个卡片区域 */
}
.card-link:visited {
  color: inherit;
}
.card-link:hover {
  color: inherit;
}



  .card img{width:100%;height:auto;display:block}
  .card-body{padding:12px}
  .card-title{font-size:15px;font-weight:700;margin-bottom:6px}
  .card-snippet{font-size:13px;color:var(--muted);line-height:1.45;margin-bottom:10px}
  .card-meta{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--muted)}

  .tag{background:rgba(15,23,42,0.05);padding:6px 8px;border-radius:8px;font-weight:600}

  footer{margin:40px 0 80px;text-align:center;color:var(--muted)}


