:root {
  --color-main: #222;
  --color-sub: #fff;
  --color-accent: #88af8e;
  --color-accent-light: #d4efd8;
  --color-danger: #f8745c;
  --color-success: #41e254;
  --color-pageMain: #333333;
  --color-selected: #edf3ee;
  --color-disabled: #f2f2f2;
  --color-border: #e7e8ea;
  --color-bg: #f2f2f2;
  --color-footer: #333333;
  --color-glass: rgba(255,255,255,0.78);
}

body {
  background: var(--color-bg) url('./background.png') repeat;
  color: var(--color-main);
  font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  margin: 0;
}

/* =================== 首页头部 =================== */
.tk-header {
  background: rgba(255,255,255,0.18);
  box-shadow: 0 2px 8px 0 rgba(60,62,68,0.10);
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(24px) saturate(1.12) brightness(1.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.12) brightness(1.12);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
  transition: background 0.18s;
}
.tk-header-inner {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 56px;
  min-height: 56px;
  box-sizing: border-box;
}
.tk-logo {
  display: flex;
  align-items: center;
  flex: none;
}
.logo-img {
  height: 32px;
  width: auto;
  display: block;
  object-fit: contain;
  margin-right: 2px;
}
.site-nav-title {
  display: inline-block;
  font-size: 14px;
  font-family: 'PingFang SC','Microsoft Yahei',Arial,sans-serif;
  color: #222;
  background: #fff;
  border: 1px solid #e5e6eb;
  border-radius: 6px;
  padding: 0 10px;
  line-height: 26px;
  height: 26px;
  margin-left: 8px;
  font-weight: 400;
  box-sizing: border-box;
  position: relative;
  top: -1px;
  letter-spacing: 0.5px;
}

.tk-menu {
  display: flex;
  align-items: center;
  margin-left: 34px;
  gap: 0;
}
.tk-menu-link {
  display: inline-block;
  padding: 0 13px;
  font-size: 17px;
  color: #222;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  border-radius: 0;
  height: 56px;
  line-height: 56px;
  text-decoration: none;
  transition: color .16s;
  font-family: inherit;
  font-weight: 400;
  position: relative;
}
.tk-menu-link:hover {
  color: #1ca57d;
  background: none;
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}
.header-btn#settings-btn,
.header-btn.setting-btn {
  margin-left: auto;
}
.header-btn {
  background: none;
  color: #222;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  padding: 0 15px;
  height: 32px;
  line-height: 32px;
  cursor: pointer;
  transition: color .16s;
  font-family: inherit;
  text-decoration: none;
}
.header-btn:hover {
  color: #1ca57d;
  background: none;
  border: none;
}

.search-bar {
  margin-left: 24px;
  min-width: 200px;
  max-width: 320px;
  width: 30%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.search-bar input {
  width: 100%;
  font-size: 1em;
  padding: 8px 15px;
  border-radius: 10px;
  border: 1px solid #edf3ee;
  background: #f5f5f5;
  color: #222;
  outline: none;
  transition: background 0.15s, border 0.15s;
  box-shadow: none;
}
.search-bar input:focus {
  background: #fff;
  border: 1.5px solid #88af8e;
}

/* =================== 首页主体 =================== */
.container {
  display: flex;
  max-width: 1200px;
  /* ↓↓↓ 距离头部间距减少一半（原 margin: 54px auto 0 auto;） ↓↓↓ */
  margin: 27px auto 0 auto;
  min-height: 70vh;
  padding: 0 32px;
  box-sizing: border-box;
  gap: 28px;
  align-items: flex-start;
}

/* 左侧边栏 */
.sidebar {
  width: 120px;
  flex: none;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 28px 0 rgba(60,62,68,0.15), 0 1.5px 14px rgba(60,62,68,0.10);
  padding: 22px 0 18px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
  justify-content: flex-start;
  position: sticky;
  top: 70px;
}

.sidebar-categories-label {
  font-size: 1.25em; /* 放大并加粗，与分类按钮一致更大一点 */
  font-weight: bold;
  color: #88af8e;
  margin-bottom: 13px;
  letter-spacing: 2px;
  width: 100%;
  text-align: center;
  user-select: none;
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 0;
  margin-bottom: 28px;
}
.category-item {
  background: #f2f2f2;
  color: #88af8e;
  border-radius: 8px;
  border: none;
  font-size: 1.1em;
  width: 90px;
  height: 38px;
  outline: none;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: background 0.15s, color 0.15s, border 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 1px;
  padding: 0;
  text-align: center;
  box-shadow: none;
}
.category-item.active,
.category-item:hover {
  background: #88af8e;
  color: #fff;
  border-left: 4px solid #88af8e;
}

/* TOP按钮 */
.sidebar-top-btn {
  width: 64px;
  height: 32px;
  margin-top: 10px;
  margin-bottom: 8px;
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #88af8e;
  border-radius: 16px;
  background: #fff;
  color: #88af8e;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.17s, color 0.17s;
  box-shadow: none;
}
.sidebar-top-btn:hover {
  background: #88af8e;
  color: #fff;
}

/* 主内容区 */
.main-content {
  flex: 1;
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 8px 28px 0 rgba(60,62,68,0.15), 0 1.5px 14px rgba(60,62,68,0.10);
  padding: 42px 18px 42px 18px;
  min-height: 520px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 42px;
}

/* 其它组件及响应式与原样式保持一致 */

.group-title-bar {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
  gap: 24px;
}
.group-title {
  margin: 0;
  font-size: 1.2em;
  font-weight: bold;
  color: #88af8e;
  letter-spacing: 1px;
  flex: none;
}
.subcat-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
  margin-left: 0;
}
.subcat-tab {
  border: none;
  background: #f2f2f2;
  color: #88af8e;
  border-radius: 8px;
  padding: 7px 18px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.subcat-tab.active,
.subcat-tab:hover {
  background: #88af8e;
  color: #fff;
}

.group-section {
  display: grid;
  grid-template-rows: auto 1fr;
  grid-template-columns: 1fr;
}

.nav-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 18px;
  justify-items: center;
  align-items: start;
  padding: 0;
  margin: 0;
  grid-row: 2;
  grid-column: 1;
}

.nav-card {
  background: #fff;
  border-radius: 13px;
  box-shadow: 0 0 8px 2px rgba(136,175,142,0.07), 0 1.5px 8px rgba(60,62,68,0.03);
  display: flex;
  align-items: center;
  transition: box-shadow 0.18s, transform 0.13s, background 0.13s, border 0.13s;
  position: relative;
  padding: 16px 12px 16px 12px;
  border: 1px solid #edf3ee;
  width: 220px;
  min-width: 0;
  margin: 0;
  will-change: box-shadow, transform;
}
.nav-card:hover {
  box-shadow: 0 6px 24px 0 rgba(60,62,68,0.14), 0 0 16px 4px #d4efd8;
  background: #f5f5f5;
  transform: translateY(-2px) scale(1.035);
  border: none;
  z-index: 2;
}
.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  vertical-align: middle;
  margin-right: 12px;
  background: #fff;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #edf3ee;
  display: block;
}
.nav-icon-default {
  display: inline-block;
  width: 34px; height: 34px;
  background: #88af8e;
  color: #fff;
  font-size: 1.08em;
  border-radius: 7px;
  text-align: center;
  line-height: 34px;
  margin-right: 12px;
  font-weight: bold;
  flex-shrink: 0;
  border: 1px solid #edf3ee;
  user-select: none;
}
.nav-card-content {
  flex: 1;
  min-width: 0;
}
.nav-title {
  font-size: 1.03em;
  font-weight: 700;
  color: #222;
  margin: 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-desc {
  font-size: 0.96em;
  color: #888;
  margin: 2px 0 0 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.nav-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  width: 100%;
}

.nav-tooltip {
  position: absolute;
  z-index: 9999;
  min-width: 180px;
  max-width: 340px;
  max-height: 320px;
  overflow: visible;
  background: #88af8e;
  color: #f5faf8;
  border: none;
  border-radius: 13px;
  padding: 0;
  font-size: 1em;
  box-shadow: 0 4px 18px 0 rgba(136,175,142,0.18), 0 1.5px 10px rgba(136,175,142,0.12);
  pointer-events: none;
  display: none;
  word-break: break-all;
  line-height: 1.6;
  transition: opacity 0.13s;
  backdrop-filter: blur(10px) saturate(1.07);
  -webkit-backdrop-filter: blur(10px) saturate(1.07);
}
.nav-tooltip-content {
  padding: 13px 13px;
  text-align: center;
  font-size: 1.01em;
  color: #f5faf8;
  font-weight: normal;
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}
.nav-tooltip-arrow {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  z-index: 2;
  pointer-events: none;
}
.nav-tooltip-down .nav-tooltip-arrow {
  top: -12px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 12px solid #88af8e;
}
.nav-tooltip-up .nav-tooltip-arrow {
  bottom: -12px;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 12px solid #88af8e;
}

footer {
  text-align: center;
  font-size: 0.97em;
  color: var(--color-footer);
  margin: 44px 0 14px 0;
  text-shadow: 0 2px 6px #fff;
}

/* 响应式适配 */
@media (max-width: 1200px) {
  .container {
    padding: 0 8px;
    gap: 18px;
  }
  .nav-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px 10px;
  }
}
@media (max-width: 900px) {
  .tk-header-inner { padding: 0 8px;}
  .sidebar { padding: 14px 0;}
  .tk-menu-link { font-size: 15px; padding: 0 10px;}
  .container {
    flex-direction: column;
    gap: 14px;
    padding: 0 2px;
    margin-top: 14px; /* 头部间距减半 */
  }
  .sidebar {
    flex-direction: row;
    width: 100%;
    min-height: 0;
    margin-bottom: 18px;
    border-radius: 13px;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 14px 0;
    gap: 6px;
    top: 70px;
  }
  .sidebar-categories-label {
    writing-mode: vertical-lr;
    font-size: 1.25em;
    margin-bottom: 0;
    margin-right: 7px;
    text-align: left;
    min-width: 16px;
    width: auto;
    letter-spacing: 0;
    font-weight: bold;
  }
  .category-list {
    flex-direction: row;
    width: auto;
    gap: 7px;
    padding: 0 8px;
    margin-bottom: 0;
  }
  .category-item {
    border-radius: 8px;
    border-left: none;
    border-bottom: 4px solid transparent;
    height: 36px;
    min-width: 54px;
    max-width: 66px;
    padding: 0 3px;
    line-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .category-item.active,
  .category-item:hover {
    border-bottom: 4px solid #88af8e;
    border-left: none;
  }
  .sidebar-top-btn {
    width: 54px;
    height: 28px;
    font-size: 11px;
    margin-bottom: 2px;
    border-radius: 13px;
  }
  .main-content {
    min-height: 400px;
    border-radius: 13px;
    gap: 24px;
    padding: 24px 2px;
  }
  .nav-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 4px;
  }
  .group-title-bar {
    gap: 12px;
    margin-bottom: 18px;
  }
  .subcat-tabs {
    gap: 7px;
    padding-left: 0;
  }
  .group-title {
    font-size: 1em;
  }
}
@media (max-width: 600px) {
  .tk-header-inner {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 10px 8px;
    gap: 8px;
  }
  .tk-menu-link { font-size: 14px; }
  .sidebar {
    padding: 8px 0;
    gap: 4px;
    top: 60px;
  }
  .main-content {
    padding: 12px 2px;
  }
  .nav-list {
    grid-template-columns: 1fr;
    gap: 12px 0;
  }
}
