:root {
  --bg: #f3f7fb;
  --surface: #ffffff;
  --ink: #183b56;
  --ink-soft: #5e7b94;
  --brand: #0f9d90;
  --brand-strong: #0a7f74;
  --accent: #f3a033;
  --line: #d8e4ef;
  --shadow: 0 10px 24px rgba(20, 57, 87, 0.08);
  --radius: 14px;
  
  /* 新增精致化变量 */
  --nav-shadow: 0 4px 20px rgba(15, 157, 144, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  --hero-glow: rgba(46, 196, 182, 0.4);
  --card-hover-shadow: 0 20px 40px rgba(15, 157, 144, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f6fbff 0%, #f3f7fb 220px, #f3f7fb 100%);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px) saturate(180%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
  border-bottom: 1px solid rgba(15, 157, 144, 0.08);
  box-shadow: var(--nav-shadow);
}

.site-top-nav::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15, 157, 144, 0.2), transparent);
}

.site-top-nav::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, 
    #2ec4b6 0%, 
    #0f9d90 25%, 
    #0d6e81 50%,
    #0f9d90 75%,
    #2ec4b6 100%);
  background-size: 200% 100%;
  animation: gradientFlow 8s ease infinite;
}

@keyframes gradientFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.site-top-nav__inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.site-brand {
  display: inline-flex;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  color: #203243;
  white-space: nowrap;
}

.site-brand__logo {
  width: clamp(46px, 3.2vw, 56px);
  height: clamp(46px, 3.2vw, 56px);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(15, 157, 144, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-brand:hover .site-brand__logo {
  transform: scale(1.05) rotate(-2deg);
  box-shadow: 0 6px 20px rgba(15, 157, 144, 0.3);
}

.site-brand__text-group {
  display: grid;
  gap: 2px;
}

.site-brand__title {
  font-size: clamp(24px, 2.1vw, 33px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0d6e81 0%, #0f9d90 50%, #2ec4b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.site-brand__domain {
  color: #6b8a9e;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.site-top-nav__links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-top-nav__links a {
  text-decoration: none;
  color: #3a5a6e;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-top-nav__links a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(15, 157, 144, 0.1) 0%, rgba(46, 196, 182, 0.05) 100%);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-top-nav__links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f9d90, #2ec4b6);
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-top-nav__links a:hover,
.site-top-nav__links a:focus-visible {
  color: var(--brand-strong);
}

.site-top-nav__links a:hover::before,
.site-top-nav__links a:focus-visible::before {
  opacity: 1;
  transform: scale(1);
}

.site-top-nav__links a:hover::after,
.site-top-nav__links a:focus-visible::after {
  transform: translateX(-50%) scaleX(1);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 42px 0 36px;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(46, 196, 182, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(13, 110, 129, 0.4) 0%, transparent 50%),
    radial-gradient(circle at 18% 20%, #2ec4b6 0%, #0f9d90 33%, #0d6e81 100%);
  color: #effaf9;
}

/* 光晕装饰 */
.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(46, 196, 182, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(120deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%),
    linear-gradient(300deg, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.6), transparent);
  border-radius: 2px;
}

.hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  margin: 0 0 18px;
  max-width: 640px;
  line-height: 1.6;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.search-box {
  position: relative;
  max-width: 640px;
}

.search-box::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230f9d90' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") no-repeat center;
  background-size: contain;
  opacity: 0.6;
  pointer-events: none;
  z-index: 2;
}

.search-box input {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 20px 14px 46px;
  font-size: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.05),
    0 10px 40px rgba(7, 56, 62, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-box input::placeholder {
  color: #8ba3b3;
  font-weight: 400;
}

.search-box input:hover {
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.08),
    0 12px 48px rgba(7, 56, 62, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.search-box input:focus {
  box-shadow: 
    0 0 0 4px rgba(46, 196, 182, 0.25),
    0 8px 16px rgba(0, 0, 0, 0.1),
    0 16px 48px rgba(7, 56, 62, 0.2);
  transform: translateY(-2px);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.quick-links a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.quick-links a:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.quick-links a:active {
  transform: translateY(0);
}

.main-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  margin: 26px auto 56px;
}

.category-sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 10px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.category-sidebar button {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  border-radius: 8px;
  padding: 4px 8px;
  margin: 0;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
  min-height: 32px;
}

.category-sidebar__parent {
  justify-content: space-between;
}

.category-sidebar__parent .category-sidebar__label {
  flex: 1;
}

.category-sidebar__caret {
  font-size: 14px;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.category-sidebar__group.is-open .category-sidebar__caret {
  transform: rotate(180deg);
}

.category-sidebar__sublist {
  display: grid;
  gap: 0;
  margin: 0 0 4px;
  padding-left: 24px;
}

.category-sidebar__child {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  min-height: 28px;
}

.category-sidebar__child:hover,
.category-sidebar__child.active {
  background: #e9f8f6;
  color: var(--brand-strong);
  font-weight: 600;
}

.category-sidebar__icon {
  width: 18px;
  min-width: 18px;
  text-align: center;
  font-size: 14px;
  opacity: 0.9;
}

.category-sidebar__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-sidebar button:hover,
.category-sidebar button.active {
  background: #e9f8f6;
  color: var(--brand-strong);
  font-weight: 600;
}

.cards-area {
  display: grid;
  gap: 20px;
}

.category-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 20px;
  transition: box-shadow 0.3s ease;
  scroll-margin-top: 100px;
}

.category-block:hover {
  box-shadow: 0 14px 32px rgba(20, 57, 87, 0.1);
}

.category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(216, 228, 239, 0.6);
}

.category-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.category-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-strong);
  background: linear-gradient(135deg, #e9f8f6 0%, #f0fdfa 100%);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(15, 157, 144, 0.15);
}

.category-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  background: transparent;
  border: 1px solid var(--line);
  transition: all 0.25s ease;
}

.category-more span {
  transition: transform 0.25s ease;
}

.category-more:hover {
  color: var(--brand-strong);
  border-color: var(--brand);
  background: linear-gradient(135deg, #e9f8f6 0%, #f0fdfa 100%);
}

.category-more:hover span {
  transform: translateX(3px);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.site-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(180deg, #ffffff 0%, #fafcfd 100%);
  position: relative;
  overflow: hidden;
}

.site-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), #2ec4b6);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 157, 144, 0.3);
  box-shadow: 0 12px 28px rgba(15, 157, 144, 0.12), 0 4px 8px rgba(0, 0, 0, 0.04);
}

.site-card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease;
}

.site-card:hover .site-logo {
  transform: scale(1.08);
}

.site-logo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: linear-gradient(135deg, #e9f8f6 0%, #f0fdfa 100%);
}


.site-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  object-fit: cover;
  flex: 0 0 24px;
  border: 1px solid #d8e4ef;
  background: #fff;
}

.site-icon--placeholder {
  display: inline-block;
  background: linear-gradient(145deg, #dbe8f2, #f2f7fb);
}

.site-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.site-title-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-title-link:hover,
.site-title-link:focus-visible {
  color: var(--brand-strong);
  border-bottom-color: rgba(10, 127, 116, 0.35);
}

.site-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* .site-meta 已移除 - 卡片简化为两行结构 */


.site-card--rich {
  align-content: start;
}

.site-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.site-link {
  text-decoration: none;
  font-size: 12px;
  color: #fff;
  background: var(--brand-strong);
  padding: 6px 10px;
  border-radius: 8px;
}

.site-link--ghost {
  background: #e6f3f1;
  color: var(--brand-strong);
}


.empty-state {
  background: #fff;
  border: 1px dashed #bed2e4;
  color: #56708a;
  border-radius: 12px;
  padding: 26px;
  text-align: center;
}

.site-footer {
  padding: 20px 16px 36px;
  text-align: center;
  color: #738ea5;
  font-size: 13px;
}

@media (max-width: 980px) {
  .site-top-nav__inner {
    min-height: 72px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 0 14px;
    gap: 12px;
  }

  .site-brand__logo {
    width: 42px;
    height: 42px;
  }

  .site-brand__title {
    font-size: clamp(20px, 7vw, 28px);
  }

  .site-brand__domain {
    font-size: 11px;
  }

  .site-top-nav__links {
    gap: 10px 16px;
    justify-content: flex-start;
  }

  .site-top-nav__links a {
    font-size: 16px;
  }

  .main-layout {
    grid-template-columns: 1fr;
  }

  .category-sidebar {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: none;
  }

  .category-sidebar button {
    width: auto;
  }
}


[hidden] {
  display: none !important;
}
