:root {
  /* 中文说明：黑白灰简约配色 */
  --xsc-bg: #ffffff;
  --xsc-border: #dee2e6;
  --xsc-text: #212529;
  --xsc-muted: #6c757d;
  --xsc-light: #f8f9fa;
}

body {
  background: var(--xsc-bg);
  color: var(--xsc-text);
}

.xsc-nav {
  border-color: var(--xsc-border) !important;
  background: #fbd7d2  !important;
  /* 中文说明：导航更大气一些 */
  min-height: 64px;
}

/* 中文说明：下拉菜单更大气：宽度、圆角、阴影 */
.xsc-dropdown-menu {
  min-width: 220px;
  border-radius: 12px;
  border-color: var(--xsc-border);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
  padding: 8px;
}

.xsc-dropdown-menu .dropdown-item {
  border-radius: 10px;
}

.xsc-dropdown-menu .dropdown-item:active {
  background: var(--xsc-text);
}

.xsc-banner-ad {
  border-color: var(--xsc-border) !important;
  background: var(--xsc-light) !important;
}

/* 中文说明：广告区域样式 */
.xsc-ad-header {
  text-align: center;
}

.xsc-ad-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--xsc-text);
  margin: 0 0 6px 0;
}

.xsc-ad-subtitle {
  font-size: 13px;
  color: var(--xsc-muted);
  margin: 0;
}

.xsc-ad-cards {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.xsc-ad-card {
  flex: 1;
  min-width: 240px;
  max-width: 320px;
  background: var(--xsc-bg);
  border: 1px solid var(--xsc-border);
  border-radius: 10px;
  padding: 16px;
  position: relative;
  transition: all 0.2s ease;
}

.xsc-ad-card:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  border-color: var(--xsc-text);
}

.xsc-ad-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
  color: #fff;
}

.xsc-badge-hot {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.xsc-badge-traffic {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.xsc-badge-performance {
  background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.xsc-badge-gift {
  background: linear-gradient(135deg, #fd7e14 0%, #e8590c 100%);
}

.xsc-ad-card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 8px 0 12px 0;
  color: var(--xsc-text);
}

/* 中文说明：新人礼券卡片特殊样式 */
.xsc-ad-gift {
  background: linear-gradient(135deg, #fff9f0 0%, #fff 100%);
  border: 2px solid #fd7e14;
}

.xsc-ad-gift:hover {
  border-color: #e8590c;
  box-shadow: 0 8px 24px rgba(253, 126, 20, 0.15);
}

.xsc-ad-gift-content {
  margin-bottom: 14px;
  text-align: center;
}

.xsc-ad-gift-text {
  font-size: 13px;
  color: var(--xsc-text);
  margin: 0 0 8px 0;
  line-height: 1.6;
}

.xsc-ad-gift-link {
  color: #fd7e14;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed #fd7e14;
  transition: all 0.2s ease;
}

.xsc-ad-gift-link:hover {
  color: #e8590c;
  border-bottom-color: #e8590c;
}

.xsc-ad-gift-highlight {
  font-size: 16px;
  color: var(--xsc-text);
  margin: 0;
  font-weight: 500;
}

.xsc-ad-gift-highlight strong {
  font-size: 22px;
  color: #fd7e14;
  font-weight: 700;
}

.xsc-ad-btn-gift {
  background: linear-gradient(135deg, #fd7e14 0%, #e8590c 100%);
  font-weight: 600;
}

.xsc-ad-btn-gift:hover {
  background: linear-gradient(135deg, #e8590c 0%, #d14d08 100%);
  box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3);
}

.xsc-ad-specs {
  margin-bottom: 14px;
}

.xsc-ad-specs p {
  font-size: 12px;
  line-height: 1.6;
  margin: 4px 0;
  color: var(--xsc-muted);
}

.xsc-ad-specs strong {
  color: var(--xsc-text);
  font-weight: 500;
}

.xsc-ad-price {
  font-size: 24px;
  font-weight: 700;
  color: #dc3545;
  margin: 12px 0;
}

.xsc-ad-period {
  font-size: 13px;
  font-weight: 400;
  color: var(--xsc-muted);
  margin-left: 2px;
}

.xsc-ad-btn {
  display: block;
  width: 100%;
  background: var(--xsc-text);
  color: var(--xsc-bg);
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.xsc-ad-btn:hover {
  background: #343a40;
  color: var(--xsc-bg);
  transform: scale(1.02);
}

/* 中文说明：移动端适配 */
@media (max-width: 768px) {
  .xsc-ad-cards {
    flex-direction: column;
  }
  
  .xsc-ad-card {
    max-width: 100%;
  }
}

.xsc-card {
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* 中文说明：卡片 hover 阴影效果 */
.xsc-card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

/* 中文说明：二级页左侧目录宽度控制（与设计稿一致：偏窄） */
.xsc-sidebar {
  width: 220px;
  /* 中文说明：在 d-flex 布局下防止侧栏被挤压到很窄 */
  flex: 0 0 220px;
  min-width: 220px;
}

/* 中文说明：内容区允许缩放，避免反向挤压侧栏 */
.xsc-content {
  min-width: 0;
}

.xsc-page {
  align-items: flex-start;
}

@media (max-width: 768px) {
  /* 中文说明：移动端让目录折到上方（简单降级） */
  .xsc-page {
    flex-direction: column;
  }
  .xsc-sidebar {
    width: 100%;
  }
}

/* 中文说明：目录树条目 hover/active */
.xsc-tree-item {
  color: var(--xsc-muted);
  padding: 4px 6px;
  border-radius: 6px;
}

.xsc-tree-item:hover {
  background: var(--xsc-light);
  color: var(--xsc-text);
}

.xsc-tree-item.active {
  background: var(--xsc-light);
  color: var(--xsc-text);
  border: 1px solid var(--xsc-border);
}

/* 中文说明：文章内容区内的基础排版 */
.xsc-article-body {
  font-size: 14px;
  line-height: 1.75;
}

.xsc-article-body pre {
  background: var(--xsc-light);
  border: 1px solid var(--xsc-border);
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
}

.xsc-article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* 中文说明：首页二级目录徽章显示优化 */
.xsc-home .badge {
  display: inline-block;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  white-space: nowrap;
  border-radius: 4px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.xsc-home .badge:hover {
  transform: translateY(-1px);
  background-color: var(--xsc-border) !important;
}
