/* 随浪毕设 · 设计系统
   薄荷绿 + 青绿主色，浅色渐变背景，卡片化布局。 */
:root {
  --bg: #f7fbf9;
  --bg-grad-1: #e9f8f1;
  --bg-grad-2: #f7fbf9;
  --card: #ffffff;
  --ink: #14332b;
  --ink-2: #2c4a41;
  --muted: #6b8078;
  --line: #dfeee8;
  --line-2: #c9e3d8;
  --brand: #0f9d7a;
  --brand-dark: #0a7a5e;
  --brand-soft: #e6f7f1;
  --accent: #14b8a6;
  --warn: #e8663c;
  --gold: #d98a1f;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 51, 43, .05);
  --shadow: 0 2px 6px rgba(20, 51, 43, .05), 0 18px 40px -22px rgba(20, 51, 43, .28);
  --mono: "SF Mono", Menlo, Consolas, "Courier New", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.75 -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: none; color: var(--brand); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶部导航 ---------- */
header.top {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
header.top .wrap { display: flex; align-items: center; gap: 10px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; color: var(--ink); letter-spacing: .3px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; font-size: 17px;
  box-shadow: 0 6px 14px -6px rgba(15, 157, 122, .7);
}
.brand small { display: block; font-size: 10px; letter-spacing: 2px; color: var(--muted); font-weight: 600; }
nav.topnav { display: flex; align-items: center; gap: 6px; margin-left: 26px; }
nav.topnav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2);
}
nav.topnav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
nav.topnav a.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.head-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.head-cta .ghost { font-size: 14px; color: var(--muted); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink); cursor: pointer;
  transition: .18s;
}
.btn:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border: none; color: #fff; box-shadow: 0 10px 22px -12px rgba(15, 157, 122, .9);
}
.btn.primary:hover { color: #fff; filter: brightness(1.05); }
.btn.sm { padding: 7px 14px; font-size: 13px; }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 78% -10%, #d6f5e7 0%, rgba(214, 245, 231, 0) 70%),
    radial-gradient(700px 380px at 8% 0%, #e6f7f1 0%, rgba(230, 247, 241, 0) 70%),
    linear-gradient(180deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 78%);
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 157, 122, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 157, 122, .05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 78%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.06fr .94fr; gap: 40px; align-items: center; padding-top: 58px; padding-bottom: 62px; }
.hero h1 { font-size: 46px; line-height: 1.24; margin: 0 0 16px; letter-spacing: -.6px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { color: var(--muted); font-size: 16px; margin: 0 0 20px; max-width: 540px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px; background: #fff;
  border: 1px solid var(--line); color: var(--ink-2); font-size: 13px;
  box-shadow: var(--shadow-sm);
}
.pill b { color: var(--brand); font-weight: 700; }
.searchbar {
  display: flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 6px 6px 20px;
  box-shadow: var(--shadow); max-width: 560px;
}
.searchbar input { flex: 1; border: none; outline: none; font-size: 15px; color: var(--ink); background: transparent; padding: 10px 0; }
.searchbar input::placeholder { color: #9db3ab; }
.searchbar .btn { flex: none; }
.hot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--muted); }
.hot a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px; }
.hot a:hover { border-color: var(--brand); color: var(--brand-dark); }

/* 代码卡片 */
.codecard {
  background: #0e2a24; border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(10, 60, 50, .55); border: 1px solid #123a31;
  transform: rotate(-.6deg);
}
.codecard .bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #0a231e; }
.codecard .bar i { width: 11px; height: 11px; border-radius: 50%; display: block; }
.codecard .bar i:nth-child(1) { background: #ff5f57; }
.codecard .bar i:nth-child(2) { background: #febc2e; }
.codecard .bar i:nth-child(3) { background: #28c840; }
.codecard .bar span { margin-left: 8px; color: #6f9c90; font: 12px var(--mono); }
.codecard pre {
  margin: 0; padding: 20px 22px 26px; color: #cfe9df;
  font: 13.5px/1.9 var(--mono); white-space: pre-wrap;
}
.codecard .c { color: #6f9c90; }
.codecard .k { color: #7dd3b0; }
.codecard .s { color: #f0c674; }
.codecard .f { color: #8ec7ff; }

/* ---------- 区块 ---------- */
section { padding: 56px 0; }
.sec-head { text-align: center; margin-bottom: 32px; }
.sec-head .eyebrow {
  display: inline-block; font: 700 11.5px/1 var(--mono); letter-spacing: 3px;
  color: var(--brand); text-transform: uppercase; margin-bottom: 12px;
}
.sec-head h2 { font-size: 30px; margin: 0 0 8px; letter-spacing: -.4px; font-weight: 800; }
.sec-head p { color: var(--muted); margin: 0; font-size: 14.5px; }
.sec-head.left { text-align: left; }
.sec-head.left p { margin: 0; }

/* ---------- 卡片网格 ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: .2s; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-2); }
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 15.5px; line-height: 1.55; margin: 0 0 8px; font-weight: 700; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--brand-dark); }
.card .meta { color: var(--muted); font-size: 12.5px; margin-bottom: 10px; }
.card .snippet { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 12px; }
.panel .role { margin-bottom: 16px; }
.panel .role:last-child { margin-bottom: 0; }
.panel .role h3 { font-size: 15px; margin: 0 0 8px; color: var(--brand-dark); }
.card .tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
/* 详情页等非卡片场景的标签也要有间隔 */
.tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #d2ece2;
}
.tag.hot { background: #fdeee7; color: var(--warn); border-color: #f8d8ca; }
.tag.new { background: #fff6e6; color: var(--gold); border-color: #f6e2bd; }

/* 成品卡（封面 + 角标 + 价格） */
.card.prod .cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--brand-soft); }
.card.prod .cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; transition: .35s; }
.card.prod:hover .cover img { transform: scale(1.03); }
.card.prod .badge {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  background: rgba(255, 255, 255, .95); color: var(--warn);
  font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.card.prod .price { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 12px; }
.card.prod .price b { color: var(--warn); font-size: 21px; font-weight: 800; }
.card.prod .price b small { font-size: 13px; margin-right: 1px; }
.card.prod .price del { color: #a8bcb4; font-size: 13px; }

/* ---------- 分类标签 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  display: inline-block; padding: 9px 18px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  font-size: 14px; transition: .18s; box-shadow: var(--shadow-sm);
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-1px); }

/* ---------- 信任区 ---------- */
.trust { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.trust .item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}
.trust .ico {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); font-size: 20px; margin-bottom: 12px;
}
.trust h3 { font-size: 16px; margin: 0 0 8px; }
.trust p { color: var(--muted); font-size: 13.5px; margin: 0; }

/* ---------- 列表/详情 ---------- */
.page-head { padding: 44px 0 10px; }
.page-head h1 { font-size: 32px; margin: 0 0 8px; letter-spacing: -.4px; }
.page-head .count { color: var(--muted); font-size: 14px; margin: 0; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

.filters {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 18px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-sm);
}
.filters select, .filters input {
  background: #fff; color: var(--ink); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 9px 12px; font-size: 14px; min-width: 140px;
  outline: none;
}
.filters input { flex: 1 1 220px; }
.filters select:focus, .filters input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 157, 122, .12); }
.count { color: var(--muted); font-size: 13.5px; }

.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.panel h2 { font-size: 17px; margin: 0 0 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.panel h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--brand); display: block; }
.panel p { margin: 0 0 10px; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: 108px 1fr; gap: 10px 14px; font-size: 14.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); }
ul.plain { margin: 0; padding-left: 20px; color: var(--ink-2); }
ul.plain li { margin-bottom: 7px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th, table.tbl td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
table.tbl th { color: var(--muted); font-weight: 600; width: 132px; background: #fbfefc; }

.shots { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.shots figure { margin: 0; }
.shots img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; background: #fff; }
.shots figcaption { color: var(--muted); font-size: 12px; margin-top: 6px; text-align: center; }
.shots img, .zoom { cursor: zoom-in; }

/* 视频区（16:9 自适应） */
.video-wrap { position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #0e2a24; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.note {
  border: 1px solid #f6e2bd; background: #fffaf0;
  border-radius: 12px; padding: 14px 16px; font-size: 13.5px; color: #8a5a12;
}
.cta-box {
  border: 1px solid #cfece2; background: linear-gradient(135deg, #f0fbf6, #f7fffd);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.cta-box h2 { color: var(--brand-dark); margin: 0 0 10px; font-size: 18px; }
.cta-box h2::before { display: none; }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq details:last-child { border-bottom: none; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "＋ "; color: var(--brand); font-weight: 700; }
.faq details[open] summary::before { content: "－ "; }
.faq p { color: var(--muted); margin: 8px 0 0; }

/* ---------- 右下角咨询浮窗 ---------- */
.consult {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; border-radius: 14px; padding: 12px 16px;
  box-shadow: 0 16px 32px -14px rgba(15, 157, 122, .8); cursor: pointer;
  font-size: 13.5px; line-height: 1.35;
}
.consult:hover { filter: brightness(1.05); }
.consult .ic { font-size: 20px; }
.consult small { display: block; font-size: 11px; opacity: .85; }
.consult-panel {
  position: fixed; right: 22px; bottom: 92px; z-index: 81; display: none;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 18px; width: 240px; text-align: center;
}
.consult-panel.open { display: block; }
.consult-panel b { display: block; margin-bottom: 6px; }
.consult-panel p { color: var(--muted); font-size: 12.5px; margin: 0 0 8px; }
.consult-panel code { display: inline-block; background: var(--brand-soft); color: var(--brand-dark); padding: 4px 10px; border-radius: 8px; font-size: 13px; margin: 3px 2px; }

/* ---------- 页脚 ---------- */
footer.site {
  border-top: 1px solid var(--line); margin-top: 30px; padding: 44px 0 36px;
  background: #fff; color: var(--muted); font-size: 13.5px;
}
footer.site .cols { display: grid; gap: 28px; grid-template-columns: 1.5fr 1fr 1fr; }
footer.site h4 { color: var(--ink); font-size: 14px; margin: 0 0 10px; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--brand); }
footer.site p { margin: 0 0 8px; }
footer.site .legal { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; }

/* ---------- 图片灯箱 ---------- */
#lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(8, 24, 20, .93);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
#lightbox.open { display: flex; }
#lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 24px 70px rgba(0,0,0,.55); cursor: zoom-out; }

/* ---------- 响应式 ---------- */
@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 30px; padding-top: 40px; padding-bottom: 46px; }
  .hero h1 { font-size: 34px; }
  .codecard { transform: none; }
  .sec-head h2 { font-size: 24px; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 29px; }
  nav.topnav { display: none; }
  footer.site .cols { grid-template-columns: 1fr; }
  .searchbar { flex-wrap: wrap; border-radius: 16px; padding: 12px; }
}
