/* ========= 主题变量（可按需调整） ========= */
:root {
  --brand: #E53935;               /* 强调色（标题悬停/焦点） */
  --text: #1F2937;                /* 主文本 */
  --muted: #6B7280;               /* 次文本 */
  --card-bg: #fff;                /* 卡片背景 */
  --card-border: #ddd;            /* 卡片边框 */
  --card-hover-shadow: 0 8px 16px rgba(0,0,0,0.2);
  --card-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

/* 暗色模式（可选） */
@media (prefers-color-scheme: dark) {
  :root {
    --text: #E5E7EB;
    --muted: #A1A7B3;
    --card-bg: #111827;
    --card-border: #374151;
    --card-shadow: 0 1px 2px rgba(0,0,0,0.4);
    --card-hover-shadow: 0 10px 18px rgba(0,0,0,0.55);
  }
}

/* ========= 卡片容器（可选：网格布局） ========= */
/* 如果你有一个外层容器，比如 .card-grid，启用这段可实现自适应布局 */
.card-grid {
  display: grid;
  grid-template-columns: repeat( auto-fit, minmax(280px, 1fr) );
  gap: 16px;
}


/* ========= 单个卡片 ========= */
.card {
  text-align: center;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.3s ease, transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

/* 让整个卡片可点击：a 链接充满卡片 */
.card .article-a {
  display: flex;
  padding: 30px;
  flex-direction: column;
  align-items: center;
  text-decoration: none;          /* 去下划线 */
  color: inherit;                 /* 继承文本颜色 */
}


/* 图片尺寸与间距 */
.card img {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  object-fit: contain;
}

/* 标题 */
.card h3 {
  margin: 6px 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

/* 说明文字（可选） */
.card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* 悬停与聚焦效果 */
.card:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--card-border) 80%, var(--brand) 20%);
}

.card .article-a:focus-visible {
  outline: none;
}

.card:has(.article-a:focus-visible) {
  box-shadow: 0 0 0 3px rgba(229,57,53,0.25), var(--card-shadow);
  border-color: var(--brand);
}

/* 标题在悬停/聚焦时色彩强调 */
.card:hover h3,
.card:has(.article-a:focus-visible) h3 {
  color: var(--brand);
}

/* ========= 移除“标题前的点” ========= */
/* 覆盖任何通过伪元素或全局样式给 h3 加的点 */
.card h3::before,
.article-a h3::before,
.card h3::after {
  content: none !important;
}

/* 设置 main-welcome 的布局为水平排列 */
#main-welcome {
  display: flex; /* 使用 flexbox 布局 */
  align-items: flex-start; /* 顶部对齐 */
  gap: 60px; /* 左右内容间距 */
  width: 80%;
  margin-bottom: 60px;
}

/* 左侧 sidebar 样式 */
.sidebar {
  width: 120px;
  min-width: 120px;
  padding: 15px;
  align-self: flex-start;
  flex-shrink: 0;
  border-right: 1px solid #ddd; /* 添加右边框 */
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.sidebar li.active a {
    font-weight: bold;
    text-decoration: underline;
}

.sidebar li:hover a {
    text-decoration: underline;
}

.model-selector input[type="radio"] {
  /* Hide the default radio button */
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

.model-option {
  display: block;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.model-selector input[type="radio"]:checked + .model-option,
.model-selector .active .model-option {
  background-color: #92a6bd;
  color: white;
}

.model-selector .model-option:hover {
  background-color: #f8f9fa;
}

.model-selector input[type="radio"]:focus + .model-option {
  outline: 2px solid #92a6bd;
  outline-offset: 2px;
}

/* 侧边栏的选择区：竖排 + 居中 */
.sidebar .model-selector {
  display: flex;
  flex-direction: column;  /* 垂直排列：标题在上、列表在下 */
  align-items: center;     /* 让标题和列表整体在水平方向居中对齐 */
  gap: 10px;               /* 标题与列表之间的间距 */
}

/* 去掉 UL 的默认缩进，避免左侧偏移 */
.sidebar .model-selector ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 让每个列表项的“卡片”宽度统一，并居中摆放 */
.sidebar .model-selector li {
  width: 200px;            /* 根据你的侧边栏实际宽度调整，例如 120–160px */
  margin: 2px 0;           /* 上下间距 */
}

/* 列表项内容（radio + 文本）居中 */
.sidebar .model-selector li > label {
  display: flex;
  justify-content: center; /* 水平居中文本和图标 */
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

/* 标题加粗，并与列表同中线 */
.sidebar .model-selector > p {
  font-weight: 700;        /* 加粗 */
  margin: 0;               /* 去默认外边距，防止视觉错位 */
  text-align: center;      /* 标题文字居中 */
  width: 200px;            /* 与 li 一致，确保在同一中线 */
}


/* 右侧 main-content 样式 */
#main-content {
    flex: 1; /* 占满剩余空间 */
}

.placeholder {
  width: 140px; /* 设置固定高度为 200px */
}
