* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
  --container-max-width: 1600px;
  --container-padding: 20px;
}
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f6f6f8;
  color: #222;
}
header.topbar {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  transition: box-shadow 0.2s ease;
  position: sticky;
  top: 0;
  z-index: 100;
}
header.topbar.fixed {
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.header-inner {
  max-width: min(var(--container-max-width), 95vw);
  margin: 0 auto;
  padding: 16px var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.logo {
  font-size: 1.2rem;
  font-weight: 700;
}
.tab-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.tab-btn {
  border: 1px solid transparent;
  background: #f0f0f6;
  color: #333;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.tab-btn:hover,
.tab-btn.active {
  background: #2d65ff;
  color: #fff;
  border-color: #2d65ff;
}
.page-body {
  max-width: min(var(--container-max-width), 95vw);
  margin: 0 auto;
  padding: 22px var(--container-padding) 40px;
}
.content-panel {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}
.content-panel.active {
  display: block;
}
.section-title {
  font-size: 16px;
  margin-bottom: 16px;
}
.red-title {
  color: #c40000;
}
.accordion details {
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
}
.accordion summary {
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.accordion summary::-webkit-details-marker {
  display: none;
}
.accordion details[open] {
  box-shadow: inset 0 0 0 1px rgba(45, 101, 255, 0.12);
}
.accordion p {
  margin: 12px 0 0;
  line-height: 1.75;
  color: #4b4b4b;
}
/* 新增：两块布局与外壳水平分类样式 */
.category-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  justify-content: flex-start;
  align-items: center;
  padding: 6px 8px;
  transition: all 0.25s ease;
}
.category-tab {
  background: rgba(240, 240, 246, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.65);
  color: #23262f;
  padding: 10px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  min-width: 120px;
  text-align: center;
}
.category-tab:hover {
  transform: translateY(-1px);
}
.category-tab.active {
  background: linear-gradient(180deg, #e8eaef 0%, #697289 100%);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 16px 35px rgba(8, 13, 28, 0.14);
}

.split {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.split .block {
  background: #fff;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  padding: 16px;
  flex: 1 1 320px;
  min-width: 280px;
  display: none; /* 默认隐藏，由 active 控制显示 */
}
.block-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
}
.split .block.active { display: block; }
.shell-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.shell-tab {
  background: #f0f0f6;
  border: 1px solid transparent;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: #333;
  white-space: nowrap;
}
.shell-tab.active,
.shell-tab:hover {
  background: #2d65ff;
  color: #fff;
  border-color: #2d65ff;
}
.shell-content .shell-item { display: none; }
.shell-content .shell-item.active { display: block; }
.caps-gallery {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.caps-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e3e3e8;
  border-radius: 16px;
  overflow: hidden;
  min-height: 0;
}
.caps-card img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  min-height: 0;
}
.caps-card figcaption {
  padding: 10px 12px;
  font-size: 0.95rem;
  color: #333;
  border-top: 1px solid #f0f0f6;
  background: #fafafb;
}
/* 编号样式，允许 figcaption 中包含自定义标签 */
.cap-index {
  display: inline-block;
  min-width: 20px;
  font-weight: 700;
  margin-right: 5px;
  color: #2d65ff;
}

/* 固定 category-tabs 到 header 下方并铺满屏幕 */
.category-tabs.fixed {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100vw;
  /* height: var(--header-height); */
  padding: 10px 20px;
  z-index: 115;
  background: #f1f1f1;
  border-radius: 0;
  border: none;
  box-shadow: 0 18px 38px rgba(5, 12, 28, 0.22);
  backdrop-filter: blur(12px);
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
}
.category-tabs.fixed .category-tab {
  padding: 10px 18px;
}
.category-tabs.fixed .category-tab.active {
  background: linear-gradient(180deg, #cfd3db 0%, #6c7281 100%);
}
@media (max-width: 720px) {
  .caps-gallery {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
  }
}
@media (min-width: 1080px) {
  .caps-gallery {
    grid-template-columns: repeat(4, minmax(200px, 1fr));
  }
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

/* Ensure mouse cards stack vertically and fill the parent */
#mouse .card-grid {
  grid-template-columns: 1fr;
}
.mouse-card {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid #e3e3e8;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mouse-card h3 {
  margin: 0;
}
.mouse-card p {
  margin: 0;
  color: #4d4d4d;
}
.mouse-image {
  width: 100%;
  min-height: 180px;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.gallery img {
  width: 100%;
  border-radius: 16px;
  display: block;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .tab-nav {
    justify-content: center;
  }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 10vh; /* 距离底部 10% 的高度 */
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2d65ff;
  color: #fff;
  border: none;
  display: none; /* 默认隐藏 */
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(45,101,255,0.18);
  transition: transform 0.18s ease, opacity 0.18s ease;
  z-index: 120;
}
.back-to-top.show {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:active { transform: scale(0.96); }



.qred{
  color: #ff0000!important;
}
.cgap p{
  text-align: center;
  font-size: 0.95rem;
  margin: 5px 0;
}
.cgap img{
  height: 430px;
  min-height: 200px;
}