/* ============================================================
   AI 导航 · 白蓝科技版
   配色：纯白底 + 亮蓝主色 + 深蓝文字
============================================================ */

:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-deep: #eef6ff;
  --surface: #ffffff;
  --surface-soft: #f4f9ff;

  --ink: #07152f;
  --ink-soft: #15335f;
  --muted: #58708f;
  --muted-soft: #8aa0ba;

  --blue: #1268ff;
  --blue-deep: #0846c9;
  --blue-soft: #e8f2ff;
  --blue-glow: rgba(18, 104, 255, 0.18);
  --cyan: #19b7ff;

  /* 线条与阴影 */
  --line: #dbe7f5;
  --line-strong: #b9cdea;
  --shadow-sm: 0 1px 2px rgba(18, 104, 255, 0.06);
  --shadow-md: 0 16px 34px -18px rgba(18, 104, 255, 0.32);
  --shadow-lg: 0 34px 70px -34px rgba(18, 104, 255, 0.42);

  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 12px;
  --page-max: 1740px;

  --serif: "Cormorant Garamond", "Noto Serif SC", "Source Han Serif SC",
    "Songti SC", "STSong", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  background-image:
    linear-gradient(rgba(18, 104, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 104, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: var(--blue);
  color: #ffffff;
}

/* ============================================================
   顶部导航
============================================================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 82px;
  padding: 14px clamp(24px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 240px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid #b7d4ff;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.92),
    0 10px 24px -16px rgba(18, 104, 255, 0.55);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px auto 5px 5px;
  width: 3px;
  border-radius: 999px;
  background: var(--blue);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 12px;
  height: 1px;
  background: var(--blue);
  opacity: 0.72;
}

.brand > span {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--ink);
  line-height: 1;
}

.brand small {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1;
}

.header-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
}

.header-meta strong {
  color: var(--blue);
  font-weight: 800;
}

.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 4px;
  padding-left: 0;
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 1px;
  background: var(--blue);
}

.tool-logo {
  width: 34px;
  height: 34px;
  border-radius: 6px;
}

/* ============================================================
   控制条 / 搜索筛选
============================================================ */

.control-band {
  scroll-margin-top: 128px;
  padding: clamp(36px, 5vw, 70px) clamp(24px, 6vw, 88px) clamp(34px, 4vw, 54px);
  background:
    linear-gradient(135deg, rgba(18, 104, 255, 0.07), transparent 34%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  border-bottom: 1px solid var(--line);
}

.control-inner,
.content-inner {
  width: min(100%, var(--page-max));
  margin: 0 auto;
}

.control-inner {
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(560px, 1.22fr);
  align-items: start;
  gap: clamp(36px, 6vw, 120px);
}

.section-heading {
  max-width: 720px;
  padding-top: 0;
}

.section-heading h2 {
  max-width: 640px;
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.5px;
  color: var(--ink);
}

.section-heading p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
  max-width: 640px;
}

.search-panel {
  width: 100%;
  display: grid;
  gap: 18px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(18, 104, 255, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 62px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-box:focus-within {
  border-color: var(--blue);
  box-shadow:
    var(--shadow-sm),
    0 0 0 4px var(--blue-glow);
}

.search-box > span {
  font-size: 20px;
  color: var(--blue);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0.3px;
}

.search-box input::placeholder {
  color: var(--muted-soft);
  font-style: italic;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-button,
.text-button,
.visit-link {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: background 0.25s ease, color 0.25s ease,
    border-color 0.25s ease, transform 0.25s ease;
}

.filter-button {
  min-height: 38px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.filter-button:hover,
.text-button:hover,
.visit-link:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--surface);
}

.filter-button.is-active,
.text-button.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.intent-row .filter-button {
  font-size: 12px;
  min-height: 34px;
  padding: 0 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ============================================================
   工具卡片网格
============================================================ */

.content-section {
  padding: clamp(48px, 6vw, 88px) clamp(24px, 6vw, 88px) clamp(64px, 7vw, 112px);
  background: var(--bg-deep);
}

.toolbar-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.toolbar-line p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.5px;
}

.text-button,
.visit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
  gap: 20px;
}

.tool-card {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 312px;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.35s ease, border-color 0.35s ease;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--blue) 0%, var(--cyan) 100%);
  transition: width 0.4s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--blue);
  box-shadow: var(--shadow-lg);
}

.tool-card:hover::before {
  width: 100%;
}

.tool-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.tool-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.tool-title h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.2px;
  color: var(--ink);
}

.tool-title p {
  margin: 4px 0 0;
  color: var(--muted-soft);
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.tagline {
  margin: 0;
  color: var(--blue);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
  line-height: 1.5;
}

.summary {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.7;
}

.favorite-button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted-soft);
  font-size: 16px;
  transition: border-color 0.25s ease, color 0.25s ease,
    background 0.25s ease;
}

.favorite-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.favorite-button.is-active {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #fff;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 50px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.4px;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}

.card-actions .text-button {
  flex: 1;
}

.card-actions .visit-link {
  border-color: var(--blue);
  color: var(--blue);
  font-weight: 600;
}

.card-actions .visit-link:hover {
  background: var(--blue);
  color: #ffffff;
}

/* ============================================================
   抽屉详情
============================================================ */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}

.drawer[aria-hidden="false"] {
  pointer-events: auto;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 21, 52, 0);
  backdrop-filter: blur(0);
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.drawer[aria-hidden="false"] .drawer-backdrop {
  background: rgba(6, 21, 52, 0.55);
  backdrop-filter: blur(4px);
}

.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(600px, 100vw);
  height: 100%;
  overflow-y: auto;
  padding: 40px 44px;
  background: var(--bg);
  box-shadow: -40px 0 80px -20px rgba(6, 21, 52, 0.4);
  transform: translateX(105%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0.2, 1);
}

.drawer[aria-hidden="false"] .drawer-panel {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  transition: background 0.25s ease, color 0.25s ease,
    border-color 0.25s ease, transform 0.25s ease;
}

.drawer-close:hover {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
  transform: rotate(90deg);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
}

.drawer-title {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-right: 60px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-title .tool-logo {
  width: 56px;
  height: 56px;
  margin-top: 2px;
}

.drawer-title .eyebrow {
  margin-bottom: 2px;
}

.drawer-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--ink);
  line-height: 1.1;
}

.drawer-summary {
  margin: 22px 0 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.drawer-section {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.drawer-section h3 {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--ink);
  position: relative;
  padding-left: 16px;
}

.drawer-section h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
}

.drawer-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 14px;
}

.drawer-section ul {
  margin: 0;
  padding-left: 22px;
}

.drawer-section li {
  margin: 6px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.drawer-section.warning h3::before {
  background: #c44d2e;
}

.drawer-section.warning p {
  color: #a0421f;
}

.official-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.official-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--blue);
  border-radius: var(--radius-sm);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}

.official-links a::after {
  content: "↗";
  margin-left: 8px;
  font-size: 14px;
}

.official-links a:hover {
  background: var(--blue);
  color: #ffffff;
}

.drawer-open {
  overflow: hidden;
}

/* ============================================================
   页脚
============================================================ */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 42px clamp(24px, 6vw, 88px);
  border-top: 1px solid var(--line);
  background: #07152f;
  color: #b9c9df;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.footer strong {
  display: inline-block;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #ffffff;
}

.footer p {
  margin: 4px 0 0;
}

.footer div:last-child {
  display: flex;
  gap: 28px;
  align-items: center;
  text-align: right;
}

.footer a {
  color: #79b8ff;
  position: relative;
  padding-bottom: 2px;
  transition: color 0.25s ease;
}

.footer a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0.4;
}

.footer a:hover {
  color: #ffffff;
}

[hidden] {
  display: none !important;
}

/* ============================================================
   响应式
============================================================ */

@media (max-width: 1180px) {
  .control-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .section-heading {
    max-width: 820px;
  }
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
    gap: 12px;
    min-height: auto;
    padding: 16px clamp(20px, 5vw, 32px);
  }
}

@media (max-width: 640px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .brand {
    min-width: auto;
  }

  .control-band,
  .content-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .search-panel {
    padding: 16px;
    gap: 14px;
  }

  .search-box {
    min-height: 54px;
    padding: 0 16px;
  }

  .filter-button {
    min-height: 34px;
    padding: 0 12px;
  }

  .toolbar-line,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .footer div:last-child {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
  }

  .drawer-panel {
    padding: 32px 22px;
  }

  .drawer-title h2 {
    font-size: 28px;
  }

  .control-band {
    scroll-margin-top: 156px;
  }
}
