/* 全局两栏布局 */
.tuneboto-hub-layout {
  display: flex;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 左侧侧边栏区域占 30% 宽度 */
.sidebar-area {
  width: 320px;
  flex-shrink: 0;
}

/* 粘性固定：页面向下滚动时导航栏自动悬浮跟随时 */
.sticky-sidebar {
  position: sticky;
  top: 40px; /* 距离浏览器顶部的悬浮间距 */
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
}

.sidebar-title {
  font-size: 18px;
  color: #0f172a;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 8px;
}

/* 导航按钮样式 */
.sidebar-tab-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: none;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: #475569;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.sidebar-tab-btn:hover {
  background: #f1f5f9;
  color: #0073ff; /* TuneBoto主题蓝 */
}

/* 激活高亮状态 */
.sidebar-tab-btn.active {
  background: #0073ff;
  color: #ffffff;
}

/* 文章数量小角标 */
.tab-count {
  font-size: 12px;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}
.sidebar-tab-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* 内置软件转换 Banner */
.sidebar-ad-box {
  margin-top: 24px;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border-radius: 12px;
  padding: 20px;
  color: #ffffff;
  text-align: center;
}
.sidebar-ad-box h5 { margin: 0 0 8px 0; font-size: 16px; color: #38bdf8; }
.sidebar-ad-box p { margin: 0 0 16px 0; font-size: 13px; color: #94a3b8; line-height: 1.4; }
.ad-download-btn {
  display: inline-block;
  background: #0073ff;
  color: white;
  text-decoration: none;
  padding: 8px 24px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
}
.ad-download-btn:hover { background: #0056bd; }


/* 右侧文章区域占 70% 宽度 */
.articles-area {
  flex: 1;
  min-width: 0;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
}

/* 文章卡片设计 */
.article-card {
  background: #ffffff;
  border: 1px solid #e5eaf0;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px -3px rgba(0, 115, 255, 0.15);
  border-color: #0073ff;
}

.card-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.tag-product { background: #e0f0ff; color: #0073ff; }
.tag-alts { background: #eef9f2; color: #10b981; }
.tag-trouble { background: #fff1f2; color: #f43f5e; }

.card-title {
  font-size: 18px;
  color: #1e293b;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.card-desc {
  font-size: 14px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-link {
  color: #0073ff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.card-link:hover { color: #0056bd; }

/* 隐藏不匹配文章的控制类 */
.article-card.is-hidden {
  display: none !important;
}

/* 📱 移动端自适应响应式（小屏幕下分类自动切换到文章上方展示） */
@media (max-width: 768px) {
  .tuneboto-hub-layout {
    flex-direction: column; /* 顺向排列：导航在上，文章在下 */
    gap: 30px;
  }
  .sidebar-area {
    width: 100%;
  }
  .sticky-sidebar {
    position: static; /* 移动端取消固定悬浮 */
  }
}