:root {
  --ink: #0b3d3a;
  --ink-soft: #2f5653;
  --muted: #5d7572;
  --paper: #f7fbfa;
  --panel: rgba(255, 248, 240, 0.72);
  --line: rgba(11, 61, 58, 0.12);
  --accent: #e85d04;
  --accent-deep: #c24b00;
  --ocean: #1b6b93;
  --mist: #d7efe9;
  --sand: #fff4e8;
  --shadow: 0 18px 40px rgba(11, 61, 58, 0.08);
  --radius: 18px;
  --font-brand: "ZCOOL QingKe HuangYou", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", serif;
  --font-body: "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(27, 107, 147, 0.16), transparent 60%),
    radial-gradient(900px 520px at 88% 8%, rgba(232, 93, 4, 0.14), transparent 55%),
    linear-gradient(165deg, #eaf6f3 0%, var(--paper) 42%, var(--sand) 100%);
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
}

.site-wrap {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  overflow: clip;
}

.hero__glow {
  position: absolute;
  inset: auto auto 8% -8%;
  width: 42vw;
  height: 42vw;
  max-width: 480px;
  max-height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(27, 107, 147, 0.18), transparent 68%);
  filter: blur(8px);
  pointer-events: none;
  animation: drift 12s ease-in-out infinite alternate;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
  padding: 4.5rem 0 3rem;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  font-family: var(--font-brand);
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: 0.04em;
  color: var(--ink);
  line-height: 1.05;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s ease forwards 0.1s;
}

.brand__mark {
  color: var(--accent);
}

.hero__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  color: var(--ink-soft);
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s ease forwards 0.25s;
}

.hero__desc {
  margin: 0 0 1.75rem;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.02rem;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s ease forwards 0.4s;
}

.search {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  opacity: 0;
  transform: translateY(18px);
  animation: rise 0.8s ease forwards 0.55s;
}

.search__engines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.search__engine {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.search__engine.is-active,
.search__engine:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}

.search__bar {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  padding: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(11, 61, 58, 0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.search__bar:focus-within {
  border-color: rgba(232, 93, 4, 0.45);
  box-shadow: 0 18px 40px rgba(232, 93, 4, 0.12);
  transform: translateY(-1px);
}

.search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0.85rem 1.1rem;
  color: var(--ink);
  font-size: 1.05rem;
}

.search__input::placeholder {
  color: #8aa09d;
}

.search__submit {
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.45rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.search__submit:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.hero__visual {
  justify-self: end;
  width: min(100%, 420px);
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  animation: rise-scale 1s ease forwards 0.35s;
}

.hero__visual img {
  width: 100%;
  filter: drop-shadow(0 24px 40px rgba(11, 61, 58, 0.12));
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.hero__scroll span {
  display: block;
  width: 1px;
  height: 28px;
  margin: 0.45rem auto 0;
  background: linear-gradient(to bottom, var(--ocean), transparent);
  animation: pulse 1.8s ease-in-out infinite;
}

/* —— Nav sections —— */
.nav-panel {
  padding: 1rem 0 4.5rem;
}

.section {
  margin-bottom: 1.75rem;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.is-inview {
  opacity: 1;
  transform: none;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  padding: 0 0.2rem;
}

.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.section__title em {
  font-style: normal;
  color: var(--accent);
  margin-right: 0.35rem;
}

.section__more {
  color: var(--ocean);
  font-size: 0.92rem;
}

.section__more:hover {
  color: var(--accent);
}

.link-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.65rem 0.75rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.link-board a {
  display: block;
  padding: 0.55rem 0.35rem;
  border-radius: 10px;
  color: var(--ink-soft);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.link-board a:hover {
  background: rgba(232, 93, 4, 0.1);
  color: var(--accent-deep);
  transform: translateY(-2px);
}

/* 限高两行试值：padding 2.2rem + gap 0.65rem + 行高约 2.7rem * 2 */
.link-board--rows2 {
  max-height: 8.6rem;
  overflow: hidden;
}

.link-board--rows2 a {
  white-space: nowrap;
}

.site-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.site-item {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.95rem 1rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.site-item:hover {
  transform: translateY(-3px);
  border-color: rgba(232, 93, 4, 0.28);
  box-shadow: var(--shadow);
}

.site-item__thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--mist);
  flex-shrink: 0;
}

.site-item__body {
  min-width: 0;
}

.site-item__title {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-item__desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-empty {
  padding: 1.4rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
}

/* —— Footer —— */
.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.site-footer strong {
  color: var(--ink);
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: 0.04em;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise-scale {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(24px, -18px, 0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.25;
    transform: scaleY(0.7);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
    padding-top: 3.2rem;
  }

  .hero__visual {
    justify-self: center;
    order: -1;
    width: min(100%, 300px);
  }

  .link-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .site-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-wrap {
    width: min(100% - 1.25rem, 1120px);
  }

  .brand {
    font-size: 2.2rem;
  }

  .search__bar {
    border-radius: 16px;
    flex-direction: column;
    gap: 0.45rem;
  }

  .search__submit {
    width: 100%;
  }

  .link-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0.85rem;
  }

  .link-board--rows2 {
    max-height: 8rem;
  }

  .site-list {
    grid-template-columns: 1fr;
  }

  .hero__scroll {
    display: none;
  }
}
