/* ==========================================================================
   天涯社首页 - 按分类模块化排版与全站视觉整体美化样式表
   版本：20261026-v3
   ========================================================================== */

/* 1. 首页主容器重构：去除默认白底内嵌重叠，启用纯净模块流 */
.joe_index {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* 2. 全站热榜精选卡片 (joe_index__hot) */
.joe_index__hot {
  background: var(--background, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 18px 20px 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.joe_index__hot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ff7675, #fab1a0, #fdcb6e);
}

html[data-theme='dark'] .joe_index__hot,
body.dark .joe_index__hot {
  background: var(--background, #202124);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.joe_index__hot:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* 热榜头部 */
.tianya-hot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
  gap: 10px;
}

html[data-theme='dark'] .tianya-hot-header,
body.dark .tianya-hot-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.tianya-hot-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tianya-hot-icon {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(255, 118, 117, 0.15), rgba(253, 203, 110, 0.2));
  border-radius: 8px;
}

.tianya-hot-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--main, #2c3e50);
}

.tianya-hot-tagline {
  font-size: 13px;
  color: var(--minor, #888888);
  font-weight: 400;
}

.tianya-hot-badge {
  font-size: 11px;
  font-weight: 600;
  color: #ff7675;
  background: rgba(255, 118, 117, 0.1);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* 热榜列表项定制 */
.joe_index__hot-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.joe_index__hot-list .item {
  overflow: hidden;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

html[data-theme='dark'] .joe_index__hot-list .item,
body.dark .joe_index__hot-list .item {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

.joe_index__hot-list .item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.joe_index__hot-list .item .inner {
  position: relative;
  margin: 0;
}

.joe_index__hot-list .item .inner .image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  transition: transform 0.35s ease;
  display: block;
}

.joe_index__hot-list .item:hover .inner .image {
  transform: scale(1.06);
}

/* 热榜角标 (TOP 1, 2, 3, 4) */
.rank-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

.rank-tag-1 {
  background: linear-gradient(135deg, #f1c40f, #e67e22);
}
.rank-tag-2 {
  background: linear-gradient(135deg, #95a5a6, #7f8c8d);
}
.rank-tag-3 {
  background: linear-gradient(135deg, #e17055, #d63031);
}
.rank-tag-4 {
  background: linear-gradient(135deg, #0984e3, #74b9ff);
}

.joe_index__hot-list .item .inner .views {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 11px;
  height: 20px;
  line-height: 20px;
  padding: 0 7px;
  border-radius: 4px;
}

.joe_index__hot-list .item .inner .title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  height: 36px;
  padding: 8px 10px;
  color: var(--main, #333333);
  background: var(--background, #ffffff);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: left;
}

/* 3. 现代化公告栏 (tianya-notice-bar) */
.tianya-notice-bar {
  display: flex;
  align-items: center;
  background: var(--background, #ffffff);
  border: 1px solid rgba(64, 158, 255, 0.22);
  border-radius: 10px;
  padding: 10px 18px;
  margin-bottom: 22px;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(64, 158, 255, 0.04);
  transition: all 0.25s ease;
}

html[data-theme='dark'] .tianya-notice-bar,
body.dark .tianya-notice-bar {
  background: var(--background, #202124);
  border-color: rgba(64, 158, 255, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tianya-notice-bar:hover {
  border-color: #409EFF;
  box-shadow: 0 4px 14px rgba(64, 158, 255, 0.12);
}

.tianya-notice-icon-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tianya-notice-pulse {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(64, 158, 255, 0.25);
  animation: notice-pulse 2s infinite ease-out;
}

@keyframes notice-pulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.tianya-notice-tag {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #409EFF, #67C23A);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.tianya-notice-link {
  flex: 1;
  font-size: 13.5px;
  color: var(--routine, #444444);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
  transition: color 0.2s ease;
}

.tianya-notice-link:hover {
  color: #409EFF;
}

.tianya-notice-arrow {
  color: #409EFF;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.25s ease;
}

.tianya-notice-bar:hover .tianya-notice-arrow {
  transform: translateX(4px);
}

/* 4. 分类模块卡片容器 (tianya-cat-block) */
.tianya-cat-block {
  background: var(--background, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

html[data-theme='dark'] .tianya-cat-block,
body.dark .tianya-cat-block {
  background: var(--background, #202124);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.tianya-cat-block:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.09);
}

html[data-theme='dark'] .tianya-cat-block:hover,
body.dark .tianya-cat-block:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* 分类板块顶部渐变条 */
.tianya-cat-block::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--cat-accent, linear-gradient(90deg, #409EFF, #67C23A));
}

/* 板块头部 (标题 + Tagline + 查看更多) */
.tianya-cat-header {
  padding-bottom: 15px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.tianya-cat-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 12px;
}

html[data-theme='dark'] .tianya-cat-header,
body.dark .tianya-cat-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.tianya-cat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.tianya-cat-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  background: var(--cat-accent, #409EFF);
  color: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.tianya-cat-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--main, #2c3e50);
}

.tianya-cat-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tianya-cat-title a:hover {
  color: #409EFF;
}

.tianya-cat-tagline {
  font-size: 13px;
  color: var(--minor, #888888);
  font-weight: 400;
}

.tianya-cat-count-badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--minor, #666666);
  font-weight: 500;
}

html[data-theme='dark'] .tianya-cat-count-badge,
body.dark .tianya-cat-count-badge {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.06);
  color: #aaaaaa;
}

.tianya-cat-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--minor, #666666);
  padding: 6px 15px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.04);
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  font-weight: 500;
}

html[data-theme='dark'] .tianya-cat-more,
body.dark .tianya-cat-more {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #bbbbbb;
}

.tianya-cat-more:hover {
  background: var(--cat-accent, #409EFF);
  color: #ffffff !important;
  border-color: transparent;
  transform: translateX(3px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* 5. 首席大卡 (Lead Feature Card) */
.tianya-lead-card {
  display: flex;
  gap: 22px;
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.045);
  border-radius: 11px;
  padding: 16px;
  margin-bottom: 18px;
  transition: all 0.25s ease;
}

html[data-theme='dark'] .tianya-lead-card,
body.dark .tianya-lead-card {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

.tianya-lead-card:hover {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.tianya-lead-thumb-wrap {
  width: 260px;
  height: 162px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  background: #f0f2f5;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.tianya-lead-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.tianya-lead-card:hover .tianya-lead-thumb-wrap img {
  transform: scale(1.06);
}

.tianya-lead-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--cat-accent, #409EFF);
  color: #ffffff;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 5px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.5px;
}

.tianya-lead-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tianya-lead-title {
  margin: 0 0 10px 0;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.48;
}

.tianya-lead-title a {
  color: var(--main, #2c3e50);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tianya-lead-title a:hover {
  color: #409EFF;
}

.tianya-lead-excerpt {
  font-size: 13.5px;
  color: var(--minor, #666666);
  line-height: 1.65;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tianya-lead-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--minor, #999999);
  flex-wrap: wrap;
  gap: 8px;
}

.tianya-lead-meta-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tianya-lead-meta-left span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tianya-lead-btn {
  font-size: 12.5px;
  font-weight: 600;
  color: #409EFF;
  background: rgba(64, 158, 255, 0.08);
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.25s ease;
}

.tianya-lead-btn:hover {
  background: #409EFF;
  color: #ffffff;
  transform: translateX(3px);
}

/* 6. 辅推精品卡网格 (4 Sub Cards Grid) */
.tianya-sub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.tianya-sub-card {
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.045);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
}

html[data-theme='dark'] .tianya-sub-card,
body.dark .tianya-sub-card {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.05);
}

.tianya-sub-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.09);
}

html[data-theme='dark'] .tianya-sub-card:hover,
body.dark .tianya-sub-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.tianya-sub-thumb-wrap {
  width: 100%;
  height: 114px;
  overflow: hidden;
  position: relative;
  background: #f0f2f5;
  display: block;
}

.tianya-sub-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.tianya-sub-card:hover .tianya-sub-thumb-wrap img {
  transform: scale(1.08);
}

.tianya-sub-views-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.tianya-sub-body {
  padding: 11px 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tianya-sub-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.45;
  height: 39px;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tianya-sub-title a {
  color: var(--main, #333333);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tianya-sub-title a:hover {
  color: #409EFF;
}

.tianya-sub-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--minor, #999999);
}

.tianya-sub-read {
  color: #409EFF;
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.2s ease;
}

.tianya-sub-card:hover .tianya-sub-read {
  opacity: 1;
  transform: translateX(0);
}

/* 7. 分类专属配色标牌 */
.cat-software {
  --cat-accent: linear-gradient(135deg, #0084ff, #00c6ff);
}
.cat-mac {
  --cat-accent: linear-gradient(135deg, #7c5295, #b886d6);
}
.cat-ubuntu {
  --cat-accent: linear-gradient(135deg, #e67e22, #f39c12);
}
.cat-tech {
  --cat-accent: linear-gradient(135deg, #00b894, #00cec9);
}
.cat-novel {
  --cat-accent: linear-gradient(135deg, #d4af37, #996515);
  border-color: rgba(212, 175, 55, 0.25);
  background: linear-gradient(180deg, rgba(254, 252, 248, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.06);
}

html[data-theme='dark'] .cat-novel,
body.dark .cat-novel {
  background: linear-gradient(180deg, rgba(32, 28, 22, 0.6) 0%, rgba(22, 22, 25, 0.8) 100%);
  border-color: rgba(212, 175, 55, 0.18);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.cat-novel .tianya-cat-icon {
  background: linear-gradient(135deg, #d4af37, #996515);
  color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(212, 175, 55, 0.3);
}

.cat-novel .tianya-cat-more {
  border-color: rgba(212, 175, 55, 0.4);
  color: #b8860b;
}

.cat-novel .tianya-cat-more:hover {
  background: #d4af37;
  color: #ffffff;
  border-color: #d4af37;
}

/* ===================================================================
   8. 首页天涯书阁专属文渊阁布局 (首席镇阁大卡 + 4 席典藏立轴书架)
   =================================================================== */

/* 8.1 首席名作大卡 (Lead Novel Card) */
.tianya-novel-home-lead {
  display: flex;
  gap: 22px;
  align-items: stretch;
  padding: 20px 22px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.2);
  position: relative;
  margin-bottom: 18px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html[data-theme='dark'] .tianya-novel-home-lead,
body.dark .tianya-novel-home-lead {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(212, 175, 55, 0.16);
}

.tianya-novel-home-lead:hover {
  border-color: rgba(212, 175, 55, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.12);
}

/* 左侧 3D 典藏书封 */
.tianya-novel-lead-cover-wrap {
  width: 118px;
  height: 166px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  perspective: 600px;
  text-decoration: none;
}

.tianya-novel-lead-cover-3d {
  width: 100%;
  height: 100%;
  border-radius: 4px 8px 8px 4px;
  overflow: hidden;
  position: relative;
  box-shadow: -4px 6px 14px rgba(0, 0, 0, 0.28), 0 2px 4px rgba(0, 0, 0, 0.12);
  transform: rotateY(-8deg);
  transform-origin: left center;
  transition: all 0.4s ease;
  background: #2d3436;
}

.tianya-novel-home-lead:hover .tianya-novel-lead-cover-3d {
  transform: rotateY(0deg) scale(1.04);
  box-shadow: -2px 8px 20px rgba(0, 0, 0, 0.32);
}

.tianya-novel-lead-cover-3d img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tianya-novel-lead-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.38) 0%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

.tianya-novel-lead-ribbon {
  position: absolute;
  top: -2px;
  right: 12px;
  width: 12px;
  height: 24px;
  background: linear-gradient(180deg, #e74c3c, #c0392b);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%);
  z-index: 5;
}

.tianya-novel-lead-seal {
  margin-top: 8px;
  font-size: 10.5px;
  font-weight: 700;
  color: #c0392b;
  border: 1px solid rgba(192, 57, 43, 0.4);
  background: rgba(192, 57, 43, 0.08);
  padding: 1px 7px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  font-family: "Noto Serif SC", "Songti SC", "SimSun", serif;
  white-space: nowrap;
}

/* 右侧文学详情与名句 */
.tianya-novel-lead-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.tianya-novel-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tianya-novel-badge-gold {
  font-size: 11px;
  font-weight: 700;
  color: #8c6d16;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.08));
  border: 1px solid rgba(212, 175, 55, 0.45);
  padding: 2px 8px;
  border-radius: 4px;
}

html[data-theme='dark'] .tianya-novel-badge-gold,
body.dark .tianya-novel-badge-gold {
  color: #d4af37;
  background: rgba(212, 175, 55, 0.15);
}

.tianya-novel-badge-status {
  font-size: 11px;
  font-weight: 700;
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
}

.tianya-novel-badge-size {
  font-size: 11px;
  font-weight: 600;
  color: #e67e22;
  background: rgba(230, 126, 34, 0.1);
  border: 1px solid rgba(230, 126, 34, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
}

.tianya-novel-lead-title {
  margin: 6px 0 4px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tianya-novel-lead-title a {
  color: var(--main, #2c3e50);
  text-decoration: none;
  transition: color 0.2s;
}

.tianya-novel-lead-title a:hover {
  color: #d4af37;
}

.tianya-novel-lead-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--minor, #888888);
  margin-bottom: 2px;
}

.tianya-novel-author strong {
  color: var(--main, #333333);
}

html[data-theme='dark'] .tianya-novel-author strong,
body.dark .tianya-novel-author strong {
  color: #eeeeee;
}

.tianya-novel-dot {
  color: rgba(212, 175, 55, 0.5);
}

.tianya-novel-format {
  color: #b8860b;
  font-weight: 600;
}

/* 名句/故事简介引言盒 */
.tianya-novel-lead-quote {
  margin: 4px 0 8px;
  padding: 8px 14px;
  background: rgba(212, 175, 55, 0.05);
  border-left: 3px solid #d4af37;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--routine, #555555);
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-theme='dark'] .tianya-novel-lead-quote,
body.dark .tianya-novel-lead-quote {
  background: rgba(212, 175, 55, 0.07);
  color: #b8b8b8;
}

/* 底部行动按钮行 */
.tianya-novel-lead-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.tianya-novel-btn-read {
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 18px;
  border-radius: 6px;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #ffffff !important;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.32);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.tianya-novel-btn-read:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(212, 175, 55, 0.45);
}

.tianya-novel-btn-dl {
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 6px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #b8860b !important;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

html[data-theme='dark'] .tianya-novel-btn-dl,
body.dark .tianya-novel-btn-dl {
  color: #e0be5a !important;
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.12);
}

.tianya-novel-btn-dl:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: #d4af37;
  color: #d4af37 !important;
}

.tianya-novel-tip {
  font-size: 11.5px;
  color: var(--minor, #888888);
  white-space: nowrap;
}

/* 8.2 典藏立轴画廊 (5 列双层书架，支持 6 卷 / 10 卷快捷交互切换) */
.tianya-novel-toggle-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.04);
  padding: 2px;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  margin-left: 12px;
  vertical-align: middle;
}

html[data-theme='dark'] .tianya-novel-toggle-tabs,
body.dark .tianya-novel-toggle-tabs {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(212, 175, 55, 0.2);
}

.tianya-novel-tab-btn {
  border: none;
  background: transparent;
  color: var(--routine, #666666);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.22s ease;
  outline: none;
  white-space: nowrap;
}

.tianya-novel-tab-btn:hover {
  color: #b8860b;
}

.tianya-novel-tab-btn.active {
  background: linear-gradient(135deg, #d4af37, #b8860b);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(212, 175, 55, 0.35);
}

.tianya-novel-shelf-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

/* 6 卷视图下默认隐藏后续书籍卡片，10 卷全景视图展开 */
.tianya-novel-shelf-row .tianya-novel-shelf-extra {
  display: none;
}

.tianya-novel-shelf-row.show-10 .tianya-novel-shelf-extra {
  display: flex;
  animation: tianyaFadeIn 0.35s ease forwards;
}

@keyframes tianyaFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tianya-novel-shelf-item {
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 12px 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.28s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
}

html[data-theme='dark'] .tianya-novel-shelf-item,
body.dark .tianya-novel-shelf-item {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
}

.tianya-novel-shelf-item:hover {
  background: var(--background, #ffffff);
  border-color: rgba(212, 175, 55, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(212, 175, 55, 0.12);
}

html[data-theme='dark'] .tianya-novel-shelf-item:hover,
body.dark .tianya-novel-shelf-item:hover {
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* 书籍 3D 封面容器 */
.tianya-novel-shelf-cover-box {
  width: 76px;
  height: 108px;
  flex-shrink: 0;
  display: block;
  perspective: 500px;
  position: relative;
  text-decoration: none;
}

.tianya-novel-shelf-cover {
  width: 100%;
  height: 100%;
  border-radius: 3px 6px 6px 3px;
  overflow: hidden;
  position: relative;
  box-shadow: -3px 4px 10px rgba(0, 0, 0, 0.22);
  transform: rotateY(-6deg);
  transform-origin: left center;
  transition: all 0.3s ease;
  background: #2d3436;
}

.tianya-novel-shelf-item:hover .tianya-novel-shelf-cover {
  transform: rotateY(0deg) scale(1.05);
  box-shadow: -2px 6px 14px rgba(0, 0, 0, 0.28);
}

.tianya-novel-shelf-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tianya-novel-shelf-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.38) 0%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
}

.tianya-novel-shelf-tag {
  position: absolute;
  top: 4px;
  right: -4px;
  background: rgba(39, 174, 96, 0.9);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

/* 书籍信息 */
.tianya-novel-shelf-meta {
  width: 100%;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tianya-novel-shelf-title {
  margin: 0 0 3px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.tianya-novel-shelf-title a {
  color: var(--main, #2c3e50);
  text-decoration: none;
  transition: color 0.2s;
}

.tianya-novel-shelf-title a:hover {
  color: #d4af37;
}

.tianya-novel-shelf-author-row {
  font-size: 11.5px;
  color: var(--routine, #666666);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-bottom: 6px;
}

.tianya-novel-shelf-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 11px;
  border-top: 1px dashed rgba(0, 0, 0, 0.06);
  padding-top: 6px;
}

html[data-theme='dark'] .tianya-novel-shelf-footer,
body.dark .tianya-novel-shelf-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.tianya-novel-shelf-size {
  color: #e67e22;
  font-weight: 600;
}

.tianya-novel-shelf-link {
  color: #b8860b;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.tianya-novel-shelf-link:hover {
  color: #d4af37;
}

/* 10 卷全景视图补充卡：馆藏万卷楼入口卡 */
.tianya-novel-shelf-more-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(184, 134, 11, 0.03)) !important;
  border: 1px dashed rgba(212, 175, 55, 0.45) !important;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  cursor: pointer;
  min-height: 190px;
}

html[data-theme='dark'] .tianya-novel-shelf-more-card,
body.dark .tianya-novel-shelf-more-card {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(0, 0, 0, 0.3)) !important;
  border-color: rgba(212, 175, 55, 0.35) !important;
}

.tianya-novel-shelf-more-card:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(184, 134, 11, 0.08)) !important;
  border-color: #d4af37 !important;
}

.tianya-novel-more-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4af37, #b8860b);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
  margin-bottom: 10px;
}

.tianya-novel-more-icon {
  font-size: 20px;
}

.tianya-novel-more-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.tianya-novel-more-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #b8860b;
}

html[data-theme='dark'] .tianya-novel-more-title,
body.dark .tianya-novel-more-title {
  color: #d4af37;
}

.tianya-novel-more-sub {
  font-size: 11px;
  color: var(--minor, #888888);
}

.tianya-novel-more-btn {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #b8860b;
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 2px 8px;
  border-radius: 12px;
  transition: all 0.2s;
}

.tianya-novel-shelf-more-card:hover .tianya-novel-more-btn {
  background: #d4af37;
  color: #ffffff;
}

/* ==========================================================================
   9. 响应式布局优化 (全面适配移动端、折叠屏与平板)
   ========================================================================== */

/* 9.1 平板与窄屏桌面 (max-width: 992px) */
@media (max-width: 992px) {
  .tianya-cat-tagline {
    display: none;
  }
  .tianya-sub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .joe_index__hot-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .tianya-novel-shelf-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 9.2 移动端核心适配 (max-width: 768px) - 涵盖主流手机与小平板 */
@media (max-width: 768px) {
  /* 板块外框与内边距 */
  .tianya-cat-block {
    padding: 14px 12px !important;
    margin-bottom: 16px !important;
    border-radius: 12px !important;
  }

  /* 头部标题与操作行 */
  .tianya-cat-header {
    padding-bottom: 10px !important;
    margin-bottom: 12px !important;
  }

  .tianya-cat-header-main {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
  }

  .tianya-cat-header-left {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  .tianya-cat-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 15px !important;
    border-radius: 7px !important;
    flex-shrink: 0 !important;
  }

  .tianya-cat-title {
    font-size: 16px !important;
    margin: 0 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .tianya-cat-count-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .tianya-cat-tagline,
  .tianya-hot-tagline {
    display: none !important;
  }

  .tianya-cat-more {
    order: 2 !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    font-size: 11.5px !important;
    padding: 3px 10px !important;
    border-radius: 14px !important;
    white-space: nowrap !important;
  }

  /* 书阁 6卷 / 10卷 移动端专属居中切换条 (Segmented Control) */
  .tianya-novel-toggle-tabs {
    order: 3 !important;
    width: 100% !important;
    margin: 6px 0 0 !important;
    display: flex !important;
    justify-content: space-around !important;
    background: rgba(0, 0, 0, 0.035) !important;
    border: 1px solid rgba(212, 175, 55, 0.25) !important;
    border-radius: 20px !important;
    padding: 3px !important;
    box-sizing: border-box !important;
  }

  html[data-theme='dark'] .tianya-novel-toggle-tabs,
  body.dark .tianya-novel-toggle-tabs {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(212, 175, 55, 0.2) !important;
  }

  .tianya-novel-tab-btn {
    flex: 1 !important;
    text-align: center !important;
    padding: 5px 0 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-radius: 16px !important;
  }

  /* 通用分类首席大卡移动端自适应 (竖排布局) */
  .tianya-lead-card {
    flex-direction: column !important;
    padding: 10px !important;
    gap: 10px !important;
    border-radius: 10px !important;
    margin-bottom: 12px !important;
  }

  .tianya-lead-thumb-wrap {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    max-height: 190px !important;
    border-radius: 8px !important;
  }

  .tianya-lead-badge {
    top: 6px !important;
    left: 6px !important;
    font-size: 10px !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
  }

  .tianya-lead-title {
    font-size: 15px !important;
    line-height: 1.4 !important;
    margin: 0 0 5px 0 !important;
    font-weight: 700 !important;
  }

  .tianya-lead-excerpt {
    font-size: 12px !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
    -webkit-line-clamp: 2 !important;
  }

  .tianya-lead-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    font-size: 11px !important;
    gap: 6px !important;
  }

  .tianya-lead-meta-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  .tianya-lead-btn {
    font-size: 11.5px !important;
    padding: 4px 10px !important;
    border-radius: 14px !important;
    white-space: nowrap !important;
  }

  /* 辅推小卡网格移动端美化 (双列排版) */
  .tianya-sub-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-top: 10px !important;
  }

  .tianya-sub-card {
    border-radius: 8px !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .tianya-sub-thumb-wrap {
    height: 94px !important;
    width: 100% !important;
  }

  .tianya-sub-views-badge {
    top: 4px !important;
    right: 4px !important;
    font-size: 9.5px !important;
    padding: 1px 4px !important;
  }

  .tianya-sub-body {
    padding: 7px 8px 6px !important;
  }

  .tianya-sub-title {
    font-size: 12px !important;
    line-height: 1.4 !important;
    height: 34px !important;
    -webkit-line-clamp: 2 !important;
    margin: 0 0 5px 0 !important;
  }

  .tianya-sub-meta {
    font-size: 10.5px !important;
  }

  .tianya-sub-read {
    opacity: 1 !important;
    transform: none !important;
    font-size: 10.5px !important;
  }

  /* 天涯书阁首席大卡移动端美化 */
  .tianya-novel-home-lead {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 14px 12px !important;
    gap: 12px !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
  }

  .tianya-novel-lead-cover-wrap {
    width: 96px !important;
    height: 136px !important;
  }

  .tianya-novel-badge-row {
    justify-content: center !important;
    gap: 6px !important;
  }

  .tianya-novel-badge-gold,
  .tianya-novel-badge-status,
  .tianya-novel-badge-size {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  .tianya-novel-lead-title {
    font-size: 17px !important;
    margin: 6px 0 4px !important;
  }

  .tianya-novel-lead-author-row {
    justify-content: center !important;
    font-size: 11.5px !important;
    gap: 6px !important;
  }

  .tianya-novel-lead-quote {
    font-size: 12px !important;
    line-height: 1.55 !important;
    text-align: left !important;
    padding: 8px 10px !important;
    margin: 6px 0 10px !important;
    border-radius: 6px !important;
  }

  .tianya-novel-lead-actions {
    width: 100% !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: center !important;
    margin-top: 2px !important;
  }

  .tianya-novel-btn-read,
  .tianya-novel-btn-dl {
    flex: 1 1 45% !important;
    min-width: 110px !important;
    text-align: center !important;
    padding: 7px 0 !important;
    font-size: 12px !important;
    border-radius: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .tianya-novel-tip {
    width: 100% !important;
    text-align: center !important;
    font-size: 10.5px !important;
    margin-top: 2px !important;
  }

  /* 天涯书阁双列书架移动端美化 */
  .tianya-novel-shelf-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .tianya-novel-shelf-item {
    padding: 10px 6px 8px !important;
    border-radius: 8px !important;
  }

  .tianya-novel-shelf-cover-box {
    width: 72px !important;
    height: 102px !important;
  }

  .tianya-novel-shelf-tag {
    font-size: 8.5px !important;
    padding: 1px 4px !important;
  }

  .tianya-novel-shelf-meta {
    margin-top: 6px !important;
  }

  .tianya-novel-shelf-title {
    font-size: 12px !important;
    line-height: 1.35 !important;
    margin: 0 0 2px !important;
  }

  .tianya-novel-shelf-author-row {
    font-size: 10.5px !important;
    margin-bottom: 4px !important;
  }

  .tianya-novel-shelf-footer {
    font-size: 10px !important;
    padding-top: 4px !important;
  }

  /* 6卷模式下移动端展示万卷楼补充卡，使得 5 本 + 1 卡 = 6 张卡片，在双列下完美 3 行对称，杜绝留白空洞 */
  .tianya-novel-shelf-row:not(.show-10) .tianya-novel-shelf-more-card {
    display: flex !important;
  }

  /* 公告栏移动端自适应 */
  .tianya-notice-bar {
    padding: 7px 10px !important;
    gap: 7px !important;
    margin-bottom: 14px !important;
    border-radius: 8px !important;
  }

  .tianya-notice-pulse {
    width: 20px !important;
    height: 20px !important;
  }

  .tianya-notice-tag {
    font-size: 10px !important;
    padding: 1px 5px !important;
    flex-shrink: 0 !important;
  }

  .tianya-notice-link {
    font-size: 12px !important;
    flex: 1 !important;
    min-width: 0 !important;
  }

  .tianya-notice-arrow {
    display: none !important;
  }
}

/* 9.3 窄屏手机极致紧凑优化 (max-width: 380px) */
@media (max-width: 380px) {
  .tianya-lead-meta-left span:nth-child(3) {
    display: none !important;
  }
  .tianya-cat-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 13px !important;
  }
  .tianya-cat-title {
    font-size: 15px !important;
  }
  .tianya-novel-shelf-cover-box {
    width: 64px !important;
    height: 90px !important;
  }
}

/* ==========================================================================
   Windows 纯净系统专区门户与首页分类模块样式 (参考 aichunjing.com 模式)
   版本：20261125-v1
   ========================================================================== */

/* 1. 操作系统门户主容器 */
.tianya-os-portal {
  margin-bottom: 24px;
}

/* 2. 操作系统专区旗舰 Hero 横幅 */
.tianya-os-hero {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  border-radius: 16px;
  padding: 24px 28px;
  margin-bottom: 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 32, 39, 0.15);
}

.tianya-os-hero::after {
  content: "WINDOWS";
  position: absolute;
  right: -20px;
  bottom: -25px;
  font-size: 88px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.04);
  letter-spacing: 4px;
  pointer-events: none;
}

.tianya-os-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}

.tianya-os-hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tianya-os-hero-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tianya-os-hero-title-box h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tianya-os-hero-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(0, 168, 255, 0.25);
  color: #70a1ff;
  border: 1px solid rgba(112, 161, 255, 0.4);
  border-radius: 20px;
  font-weight: 500;
}

.tianya-os-hero-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.tianya-os-hero-stats {
  display: flex;
  gap: 12px;
}

.tianya-os-stat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tianya-os-stat-pill strong {
  color: #00d2d3;
  font-size: 14px;
}

/* 常用装机必备工具卡片栏 */
.tianya-os-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tianya-os-tool-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #ffffff !important;
  transition: all 0.25s ease;
}

.tianya-os-tool-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.25);
}

.tianya-os-tool-icon {
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tianya-os-tool-name {
  font-size: 13px;
  font-weight: 600;
  display: block;
}

.tianya-os-tool-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  display: block;
}

/* 3. 操作系统独立频道 (ChannelBox) - 参考 aichunjing.com 布局 */
.tianya-os-channel {
  background: var(--background, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html[data-theme='dark'] .tianya-os-channel,
body.dark .tianya-os-channel {
  background: var(--background, #202124);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.tianya-os-channel:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* 频道头部 */
.tianya-os-channel-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

html[data-theme='dark'] .tianya-os-channel-header,
body.dark .tianya-os-channel-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.tianya-os-channel-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

/* 各系统专属配色指示条 */
.channel-win11 .tianya-os-channel-header::before {
  background: linear-gradient(90deg, #0078d4, #00b4d8, #90e0ef);
}
.channel-win10 .tianya-os-channel-header::before {
  background: linear-gradient(90deg, #005a9e, #0078d4, #50e3c2);
}
.channel-win7 .tianya-os-channel-header::before {
  background: linear-gradient(90deg, #107c41, #ffb900, #d83b01);
}

.tianya-os-channel-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tianya-os-channel-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.channel-win11 .tianya-os-channel-icon {
  background: rgba(0, 120, 212, 0.12);
  color: #0078d4;
}
.channel-win10 .tianya-os-channel-icon {
  background: rgba(0, 90, 158, 0.12);
  color: #005a9e;
}
.channel-win7 .tianya-os-channel-icon {
  background: rgba(16, 124, 65, 0.12);
  color: #107c41;
}

.tianya-os-channel-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tianya-os-channel-title a {
  color: var(--main, #333333);
  text-decoration: none !important;
}

html[data-theme='dark'] .tianya-os-channel-title a,
body.dark .tianya-os-channel-title a {
  color: #e4e4e4;
}

.tianya-os-channel-count {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.05);
  color: var(--minor, #666);
}

html[data-theme='dark'] .tianya-os-channel-count,
body.dark .tianya-os-channel-count {
  background: rgba(255, 255, 255, 0.08);
  color: #aaa;
}

.tianya-os-channel-sub {
  font-size: 12px;
  color: var(--minor, #888);
}

.tianya-os-channel-more {
  font-size: 13px;
  color: var(--theme, #1e90ff);
  text-decoration: none !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.2s;
}

.tianya-os-channel-more:hover {
  transform: translateX(3px);
  color: var(--theme-hover, #0984e3);
}

/* 频道主体双栏布局 (左侧焦点大卡 + 右侧最新列表) */
.tianya-os-channel-body {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 22px;
  align-items: stretch;
}

/* 左侧 Lead 焦点主推卡片 (ChannelPic & ChannelInfo) */
.tianya-os-lead {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

html[data-theme='dark'] .tianya-os-lead,
body.dark .tianya-os-lead {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.tianya-os-lead:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.tianya-os-lead-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 比例 */
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #1e272e;
}

.tianya-os-lead-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tianya-os-lead:hover .tianya-os-lead-thumb img {
  transform: scale(1.05);
}

.tianya-os-lead-badge-top {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.tianya-os-lead-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tianya-os-lead-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.tianya-os-tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 120, 212, 0.08);
  color: #0078d4;
  font-weight: 500;
}

html[data-theme='dark'] .tianya-os-tag,
body.dark .tianya-os-tag {
  background: rgba(0, 120, 212, 0.2);
  color: #4da6ff;
}

.tianya-os-lead-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 8px 0;
}

.tianya-os-lead-title a {
  color: var(--main, #222);
  text-decoration: none !important;
  transition: color 0.2s;
}

.tianya-os-lead-title a:hover {
  color: var(--theme, #1e90ff);
}

html[data-theme='dark'] .tianya-os-lead-title a,
body.dark .tianya-os-lead-title a {
  color: #eee;
}

.tianya-os-lead-desc {
  font-size: 12px;
  color: var(--minor, #666);
  line-height: 1.6;
  margin: 0 0 12px 0;
  flex: 1;
}

html[data-theme='dark'] .tianya-os-lead-desc,
body.dark .tianya-os-lead-desc {
  color: #999;
}

.tianya-os-lead-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

html[data-theme='dark'] .tianya-os-lead-bottom,
body.dark .tianya-os-lead-bottom {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.tianya-os-lead-date {
  font-size: 12px;
  color: var(--minor, #888);
}

.tianya-os-lead-btn {
  background: var(--theme, #0078d4);
  color: #ffffff !important;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 6px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tianya-os-lead-btn:hover {
  background: #005a9e;
  transform: translateY(-1px);
}

/* 右侧 ChannelList 列表 */
.tianya-os-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tianya-os-list-item {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none !important;
  color: inherit;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

html[data-theme='dark'] .tianya-os-list-item,
body.dark .tianya-os-list-item {
  border-bottom-color: rgba(255, 255, 255, 0.03);
}

.tianya-os-list-item:last-child {
  border-bottom: none;
}

.tianya-os-list-item:hover {
  background: rgba(0, 0, 0, 0.025);
  transform: translateX(4px);
}

html[data-theme='dark'] .tianya-os-list-item:hover,
body.dark .tianya-os-list-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.tianya-os-list-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  color: var(--minor, #666);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

html[data-theme='dark'] .tianya-os-list-num,
body.dark .tianya-os-list-num {
  background: rgba(255, 255, 255, 0.08);
  color: #aaa;
}

.tianya-os-list-item:nth-child(1) .tianya-os-list-num {
  background: #ff7675;
  color: #fff;
}
.tianya-os-list-item:nth-child(2) .tianya-os-list-num {
  background: #fdcb6e;
  color: #fff;
}
.tianya-os-list-item:nth-child(3) .tianya-os-list-num {
  background: #74b9ff;
  color: #fff;
}

.tianya-os-list-title {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--main, #333);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 12px;
}

html[data-theme='dark'] .tianya-os-list-title,
body.dark .tianya-os-list-title {
  color: #ddd;
}

.tianya-os-list-item:hover .tianya-os-list-title {
  color: var(--theme, #0078d4);
}

.tianya-os-list-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--minor, #777);
  margin-right: 12px;
  flex-shrink: 0;
}

html[data-theme='dark'] .tianya-os-list-badge,
body.dark .tianya-os-list-badge {
  background: rgba(255, 255, 255, 0.06);
  color: #aaa;
}

.tianya-os-list-date {
  font-size: 12px;
  color: var(--minor, #888);
  margin-right: 10px;
  flex-shrink: 0;
}

.tianya-os-list-arrow {
  color: var(--minor, #bbb);
  font-size: 12px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.tianya-os-list-item:hover .tianya-os-list-arrow {
  transform: translateX(2px);
  color: var(--theme, #0078d4);
}

/* 4. 底部装机指南与安全防范流程卡片 */
.tianya-os-guide {
  background: var(--background, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 24px;
}

html[data-theme='dark'] .tianya-os-guide,
body.dark .tianya-os-guide {
  background: var(--background, #202124);
  border-color: rgba(255, 255, 255, 0.08);
}

.tianya-os-guide-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--main, #333);
  display: flex;
  align-items: center;
  gap: 8px;
}

html[data-theme='dark'] .tianya-os-guide-title,
body.dark .tianya-os-guide-title {
  color: #eee;
}

.tianya-os-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tianya-os-step-card {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  padding: 14px 16px;
  position: relative;
}

html[data-theme='dark'] .tianya-os-step-card,
body.dark .tianya-os-step-card {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.05);
}

.tianya-os-step-num {
  font-size: 18px;
  font-weight: 900;
  color: var(--theme, #0078d4);
  opacity: 0.35;
  margin-bottom: 6px;
}

.tianya-os-step-name {
  font-size: 13.5px;
  font-weight: 600;
  margin: 0 0 4px 0;
  color: var(--main, #333);
}

html[data-theme='dark'] .tianya-os-step-name,
body.dark .tianya-os-step-name {
  color: #ddd;
}

.tianya-os-step-desc {
  font-size: 11.5px;
  color: var(--minor, #777);
  line-height: 1.5;
  margin: 0;
}

/* 5. 首页系统分类板块专用样式 (含板块区分与子系统 Tab) */
.tianya-os-home-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tianya-os-tab-btn {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid transparent;
  color: var(--minor, #666);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

html[data-theme='dark'] .tianya-os-tab-btn,
body.dark .tianya-os-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #aaa;
}

.tianya-os-tab-btn:hover {
  background: rgba(0, 120, 212, 0.1);
  color: #0078d4;
}

.tianya-os-tab-btn.active {
  background: #0078d4;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 120, 212, 0.3);
}

/* 首页全系精选：三列横向矩阵 (Win11 / Win10 / Win7 并排展示) */
.tianya-os-matrix-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.tianya-os-matrix-col {
  background: rgba(0, 0, 0, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}

html[data-theme='dark'] .tianya-os-matrix-col,
body.dark .tianya-os-matrix-col {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.06);
}

.tianya-os-matrix-col:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 120, 212, 0.3);
}

.tianya-os-matrix-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

html[data-theme='dark'] .tianya-os-matrix-head,
body.dark .tianya-os-matrix-head {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.tianya-os-matrix-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tianya-os-matrix-more {
  font-size: 11px;
  color: var(--theme, #0078d4);
  text-decoration: none !important;
}

.tianya-os-matrix-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #111;
}

.tianya-os-matrix-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.tianya-os-matrix-col:hover .tianya-os-matrix-thumb img {
  transform: scale(1.05);
}

.tianya-os-matrix-thumb-tag {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.tianya-os-matrix-lead-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 10px 0;
}

.tianya-os-matrix-lead-title a {
  color: var(--main, #333);
  text-decoration: none !important;
}

html[data-theme='dark'] .tianya-os-matrix-lead-title a,
body.dark .tianya-os-matrix-lead-title a {
  color: #ddd;
}

.tianya-os-matrix-subs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed rgba(0, 0, 0, 0.05);
}

html[data-theme='dark'] .tianya-os-matrix-subs,
body.dark .tianya-os-matrix-subs {
  border-top-color: rgba(255, 255, 255, 0.05);
}

.tianya-os-matrix-sub-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--minor, #666);
  text-decoration: none !important;
  padding: 3px 0;
}

html[data-theme='dark'] .tianya-os-matrix-sub-item,
body.dark .tianya-os-matrix-sub-item {
  color: #aaa;
}

.tianya-os-matrix-sub-item:hover {
  color: var(--theme, #0078d4);
}

.tianya-os-matrix-sub-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 8px;
}

/* 首页单系统专区视图 (当选中 Win11/Win10/Win7 Tab 时展开) */
.tianya-os-home-panel {
  display: none;
}

.tianya-os-home-panel.active {
  display: block;
}

/* 6. 移动端与自适应优化 */
@media (max-width: 900px) {
  .tianya-os-channel-body {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .tianya-os-tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .tianya-os-steps-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .tianya-os-matrix-row {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
}

@media (max-width: 600px) {
  .tianya-os-hero {
    padding: 18px 16px !important;
  }
  .tianya-os-hero-title-box h1 {
    font-size: 18px !important;
  }
  .tianya-os-hero-stats {
    display: none !important;
  }
  .tianya-os-tools-grid {
    grid-template-columns: 1fr !important;
  }
  .tianya-os-steps-grid {
    grid-template-columns: 1fr !important;
  }
  .tianya-os-channel-header {
    padding: 12px 14px !important;
  }
  .tianya-os-channel-body {
    padding: 12px 14px !important;
  }
}

/* ==========================================================================
   纯净系统板块排版精准修复与 Grid 防溢出优化
   ========================================================================== */

/* 1. 纯净系统板块头部单行防折行排版 */
.cat-system .tianya-cat-header-main {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  width: 100% !important;
}

.cat-system .tianya-cat-header-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

.cat-system .tianya-cat-title {
  white-space: nowrap !important;
  margin: 0 !important;
}

.cat-system .tianya-cat-count-badge {
  white-space: nowrap !important;
}

/* 隐藏纯净系统头部冗长标语，彻底释放空间给 4 大分类 Tab */
.cat-system .tianya-cat-tagline {
  display: none !important;
}

.cat-system .tianya-os-home-tabs {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex-wrap: nowrap !important;
  margin: 0 auto 0 8px !important;
}

.cat-system .tianya-os-tab-btn {
  white-space: nowrap !important;
  padding: 3px 10px !important;
  font-size: 12px !important;
  flex-shrink: 0 !important;
}

.cat-system .tianya-cat-more {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}

/* 2. 全系三列矩阵 Grid 严密均分与防横向溢出 */
.tianya-os-home-container {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.tianya-os-matrix-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
  margin-top: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.tianya-os-matrix-col {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  padding: 12px !important;
}

.tianya-os-matrix-head {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.tianya-os-matrix-title {
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 13.5px !important;
}

.tianya-os-matrix-more {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  font-size: 11px !important;
  margin-left: 6px !important;
}

.tianya-os-matrix-thumb {
  width: 100% !important;
  box-sizing: border-box !important;
}

.tianya-os-matrix-lead-title {
  font-size: 13px !important;
  line-height: 1.4 !important;
  margin: 0 0 8px 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  word-break: break-all !important;
  height: 36px !important;
}

.tianya-os-matrix-subs {
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.tianya-os-matrix-sub-item {
  width: 100% !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.tianya-os-matrix-sub-title {
  min-width: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
}

/* 3. 响应式微调 (小屏幕下优雅换行与单列堆叠) */
@media (max-width: 860px) {
  .cat-system .tianya-cat-header-main {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .cat-system .tianya-os-home-tabs {
    order: 3 !important;
    width: 100% !important;
    margin: 4px 0 0 0 !important;
    overflow-x: auto !important;
    padding-bottom: 2px !important;
  }
  .tianya-os-matrix-row {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

/* ==========================================================================
   天涯软件 20 大细分分类磁贴导航矩阵样式
   ========================================================================== */
.sw-subcat-grid-box {
  background: var(--background, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

html[data-theme='dark'] .sw-subcat-grid-box,
body.dark .sw-subcat-grid-box {
  background: var(--background, #202124);
  border-color: rgba(255, 255, 255, 0.08);
}

.sw-subcat-header {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--main, #1e293b);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

html[data-theme='dark'] .sw-subcat-header,
body.dark .sw-subcat-header {
  color: #e2e8f0;
}

.sw-subcat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 10px;
}

.sw-subcat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 11px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-decoration: none !important;
  color: var(--main, #334155) !important;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-sizing: border-box;
}

html[data-theme='dark'] .sw-subcat-item,
body.dark .sw-subcat-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  color: #cbd5e1 !important;
}

.sw-subcat-item:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.3);
  transform: translateY(-2px);
  color: #0284c7 !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.1);
}

.sw-subcat-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.sw-subcat-ico {
  font-size: 15px;
  flex-shrink: 0;
}

.sw-subcat-name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw-subcat-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--minor, #64748b);
  font-weight: 500;
  flex-shrink: 0;
  margin-left: 6px;
}

html[data-theme='dark'] .sw-subcat-count,
body.dark .sw-subcat-count {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.sw-subcat-item:hover .sw-subcat-count {
  background: #0284c7;
  color: #ffffff;
}

@media (max-width: 600px) {
  .sw-subcat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }
}

/* ==========================================================================
   天涯软件专区全新现代化排版样式 (重构版)
   ========================================================================== */

/* 1. 软件大厅整体容器 */
.tianya-sw-portal-hero {
  margin-bottom: 20px;
}

/* 2. 旗舰 Hero 横幅 */
.sw-hero-card {
  background: linear-gradient(135deg, #091e3a 0%, #173865 50%, #1b497f 100%);
  border-radius: 14px;
  padding: 22px 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(9, 30, 58, 0.15);
  margin-bottom: 16px;
}

.sw-hero-card::after {
  content: "SOFTWARE";
  position: absolute;
  right: -15px;
  bottom: -20px;
  font-size: 80px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.04);
  letter-spacing: 4px;
  pointer-events: none;
}

.sw-hero-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.sw-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sw-hero-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: #ffc107;
}

.sw-hero-titles h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #ffffff;
  display: inline-block;
  vertical-align: middle;
}

.sw-hero-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.sw-hero-badge {
  font-size: 11px;
  padding: 2px 8px;
  background: rgba(0, 168, 255, 0.25);
  color: #70a1ff;
  border: 1px solid rgba(112, 161, 255, 0.4);
  border-radius: 20px;
  font-weight: 500;
}

.sw-badge-green {
  background: rgba(46, 213, 115, 0.2) !important;
  color: #2ed573 !important;
  border-color: rgba(46, 213, 115, 0.35) !important;
}

.sw-hero-desc {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  line-height: 1.5;
}

.sw-hero-stats {
  display: flex;
  gap: 10px;
}

.sw-stat-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.sw-stat-pill strong {
  color: #00d2d3;
  font-size: 14px;
}

/* 4 大核心装机必备卡片网格 */
.sw-quick-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sw-tool-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #ffffff !important;
  transition: all 0.25s ease;
}

.sw-tool-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.3);
}

.sw-tool-ico {
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sw-tool-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sw-tool-name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sw-tool-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 3. 分类检索与胶囊导航栏 (Category Filter Bar) */
.sw-nav-box {
  background: var(--background, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.02);
}

html[data-theme='dark'] .sw-nav-box,
body.dark .sw-nav-box {
  background: var(--background, #202124);
  border-color: rgba(255, 255, 255, 0.08);
}

.sw-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

html[data-theme='dark'] .sw-nav-top,
body.dark .sw-nav-top {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.sw-nav-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sw-nav-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--main, #1e293b);
}

html[data-theme='dark'] .sw-nav-title,
body.dark .sw-nav-title {
  color: #e2e8f0;
}

.sw-nav-sub {
  font-size: 12px;
  color: var(--minor, #64748b);
}

/* 轻量实时检索搜索框 */
.sw-search-form {
  display: flex;
  align-items: center;
  position: relative;
  width: 280px;
}

.sw-search-ico {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

.sw-search-inp {
  width: 100%;
  height: 34px;
  padding: 0 65px 0 32px;
  font-size: 12.5px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
  color: var(--main, #1e293b);
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

html[data-theme='dark'] .sw-search-inp,
body.dark .sw-search-inp {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
}

.sw-search-inp:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

html[data-theme='dark'] .sw-search-inp:focus,
body.dark .sw-search-inp:focus {
  background: #1e293b;
}

.sw-search-btn {
  position: absolute;
  right: 4px;
  top: 3px;
  height: 28px;
  padding: 0 12px;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.sw-search-btn:hover {
  background: #0369a1;
}

/* 分类胶囊按钮滑块 (Pills Wrap) */
.sw-pills-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sw-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 12.5px;
  color: var(--main, #334155) !important;
  text-decoration: none !important;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  user-select: none;
}

html[data-theme='dark'] .sw-pill,
body.dark .sw-pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #cbd5e1 !important;
}

.sw-pill:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0284c7 !important;
  transform: translateY(-1px);
}

.sw-pill.active {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.sw-pill-ico {
  font-size: 14px;
}

.sw-pill-name {
  font-weight: 500;
}

.sw-pill-count {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--minor, #64748b);
  font-weight: 500;
}

html[data-theme='dark'] .sw-pill-count,
body.dark .sw-pill-count {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.sw-pill.active .sw-pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* 更多分类下拉 */
.sw-pill-more-dropdown {
  position: relative;
  display: inline-block;
}

.sw-pill-more-btn {
  background: transparent !important;
  border-style: dashed !important;
  color: var(--minor, #64748b) !important;
}

.sw-more-dropdown-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: var(--background, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  z-index: 100;
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
}

html[data-theme='dark'] .sw-more-dropdown-panel,
body.dark .sw-more-dropdown-panel {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.sw-pill-more-dropdown:hover .sw-more-dropdown-panel {
  display: block;
}

.sw-dropdown-item {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--main, #334155) !important;
  text-decoration: none !important;
  transition: background 0.15s;
}

html[data-theme='dark'] .sw-dropdown-item,
body.dark .sw-dropdown-item {
  color: #cbd5e1 !important;
}

.sw-dropdown-item:hover {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7 !important;
}

/* 4. 移动端响应式优化 */
@media (max-width: 860px) {
  .sw-quick-tools-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .sw-search-form {
    width: 100% !important;
  }
  .sw-hero-stats {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .sw-hero-card {
    padding: 16px !important;
  }
  .sw-hero-titles h1 {
    font-size: 17px !important;
  }
  .sw-quick-tools-grid {
    grid-template-columns: 1fr !important;
  }
  .sw-pills-wrap {
    gap: 6px !important;
  }
  .sw-pill {
    padding: 4px 10px !important;
    font-size: 12px !important;
  }
}
