:root {
  /* 护眼配色 + 参考 aihot 的层次化设计：降饱和蓝绿 + 暖米绿背景 + 分层卡片 */
  --theme-primary: #5e9bc7;
  --theme-primary-dark: #4a7da8;
  --theme-primary-light: #8fbbda;

  /* 分层背景：页面底色 -> 卡片底色 */
  --theme-bg: #eef2ea;
  --theme-surface: #faf9f3;
  --theme-surface-2: #f3f5ef;
  --theme-footer-bg: #e7ece1;
  --theme-border: #dde3d6;
  --theme-border-strong: #cfd7c6;

  /* 文字三级层次（参考 aihot text-0/1/2） */
  --theme-text: #34383a;
  --theme-text-1: #5c6670;
  --theme-text-2: #8a9188;
  --theme-text-muted: #6b7a8c;

  /* 强调色（参考 aihot 的 accent 体系，统一为柔和色） */
  --accent-cyan: #5e9bc7;
  --accent-amber: #c9a25a;
  --accent-emerald: #5fa885;
  --accent-rose: #c97a64;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --shadow-card: 0 1px 2px rgba(60, 70, 55, 0.04), 0 8px 24px rgba(60, 70, 55, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(60, 70, 55, 0.06), 0 12px 32px rgba(60, 70, 55, 0.10);

  --sidebar-w: 232px;
}

body,
html {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  background: var(--theme-bg);
  color: var(--theme-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

/* ===== 左右布局（参考 aihot 的 sidebar + app-main）===== */
.layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* 左侧边栏 */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--theme-surface);
  border-right: 1px solid var(--theme-border);
  padding: 20px 14px 16px;
  box-sizing: border-box;
}

/* 左上角 logo + 网站标题 */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 18px;
  border-bottom: 1px solid var(--theme-border);
  margin-bottom: 16px;
}

.logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 0;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(60, 70, 55, 0.12);
}

/* logo 区可点击链接 */
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
  min-width: 0;
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--theme-text);
  white-space: nowrap;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--theme-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 左侧菜单 */
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--theme-text-1);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  transition: background .15s ease, color .15s ease, transform .1s ease;
}

.nav-item:hover {
  background: var(--theme-surface-2);
  color: var(--theme-text);
}

.nav-item.active {
  background: color-mix(in srgb, var(--accent-cyan) 14%, transparent);
  color: var(--theme-primary-dark);
  font-weight: 700;
}

.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--theme-border-strong);
  flex-shrink: 0;
  transition: background .15s ease, box-shadow .15s ease;
}

.nav-item:hover .nav-dot,
.nav-item.active .nav-dot {
  background: var(--accent-cyan);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-cyan) 16%, transparent);
}

/* 左下角备案号 */
.sidebar-footer {
  margin-top: 12px;
  padding: 12px 8px 4px;
  border-top: 1px solid var(--theme-border);
  font-size: 12px;
  color: var(--theme-text-2);
}

.sidebar-footer a {
  color: var(--theme-text-2);
  text-decoration: none;
}

.sidebar-footer a:hover {
  color: var(--theme-text-1);
}

/* 右侧主内容区 */
.app-main {
  flex: 1;
  min-width: 0;
  padding: 40px 48px 48px;
  max-width: 920px;
}

/* 页面头部（参考 aihot 的 page-header） */
.page-head {
  margin-bottom: 12px;
}

.page-head .hero-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--theme-text);
  margin: 0 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.page-head .hero-title::after {
  content: "";
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
}

.page-head .hero-sub {
  font-size: 14px;
  color: var(--theme-text-2);
  margin: 0;
  letter-spacing: 0.3px;
}

/* 分区标题（参考 aihot 的 section-head 小标签风格） */
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--theme-text-2);
  margin: 26px 0 14px;
  padding-left: 12px;
  position: relative;
}

.section-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent-cyan);
}

/* 内容卡片流 —— 网格布局，一行三列 */
.feed {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* 中等屏（窄桌面/平板横屏）两列，避免卡片过窄 */
@media (max-width: 1100px) {
  .feed {
    grid-template-columns: repeat(2, 1fr);
  }
}

.header {
  display: none;
}

/* Bootstrap 5 主题覆盖 */
.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--theme-primary);
  --bs-btn-border-color: var(--theme-primary);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--theme-primary-dark);
  --bs-btn-hover-border-color: var(--theme-primary-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--theme-primary-dark);
  --bs-btn-active-border-color: var(--theme-primary-dark);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--theme-primary);
  --bs-btn-disabled-border-color: var(--theme-primary);
  border-radius: 10px;
  font-weight: 600;
  padding: 8px 18px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(74, 125, 168, 0.25);
}

.btn-outline-primary {
  --bs-btn-color: var(--theme-primary-dark);
  --bs-btn-border-color: var(--theme-border-strong);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--theme-primary);
  --bs-btn-hover-border-color: var(--theme-primary);
  border-radius: 10px;
  font-weight: 600;
  padding: 8px 18px;
}

/* 卡片：参考 aihot 的分层圆角卡片 + 柔和阴影 + hover 抬升 */
.card {
  border: 1px solid var(--theme-border);
  background: var(--theme-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.card:visited,
.card:hover,
.card:focus {
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--theme-border-strong);
}

.card .card-body {
  padding: 22px 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--theme-text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.card-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-cyan) 18%, transparent);
}

.card-text {
  color: var(--theme-text-1);
  font-size: 14.5px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.text-muted {
  color: var(--theme-text-muted) !important;
}

.lead {
  color: var(--theme-text-1);
}

/* 兼容旧结构（非桌面隐藏容器） */
.container {
  width: auto;
  max-width: 640px;
  padding: 0 18px;
}

.bd-placeholder-img {
  font-size: 1.125rem;
  text-anchor: middle;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

@media (min-width: 768px) {
  .bd-placeholder-img-lg {
    font-size: 3.5rem;
  }
}
