/* =====================================================================
   Sveev AI · 流体渐变 · 飞书风格「详情页」模板（gradient-templates2）
   依赖：../styles/gradient.css + components.css + feishu.css
   本文件只负责详情页的排版与信息面板，保证与列表页同一套视觉语言。
   ===================================================================== */

/* ================= 详情页主栅格 ================= */
.fs-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

/* 左列容器（多个卡片纵向堆叠） */
.fs-col {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

/* 通用信息面板 */
.fs-panel {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--fs-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--fs-shadow);
}
.fs-panel + .fs-panel {
  margin-top: 16px;
}
.fs-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--fs-ink-3);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.fs-rail {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* 键值信息表 */
.fs-kv {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 9px 12px;
  font-size: 12.5px;
  line-height: 1.6;
}
.fs-kv .k {
  color: var(--fs-ink-3);
}
.fs-kv .v {
  color: var(--text-main);
  word-break: break-word;
}
.fs-kv .v.mono {
  font-family: var(--fs-mono);
}

/* 右侧目录（TOC） */
.fs-toc {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fs-toc a {
  display: block;
  padding: 7px 11px;
  border-radius: 9px;
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-sub);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.fs-toc a:hover {
  background: var(--fs-soft);
  color: var(--accent);
}
.fs-toc a.is-active {
  color: var(--accent);
  font-weight: 600;
  background: var(--fs-soft);
  border-left-color: var(--accent);
}
.fs-toc li.sub a {
  padding-left: 24px;
  font-size: 12.5px;
}

/* 相关推荐 / 侧栏列表 */
.fs-rel {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.fs-rel-item {
  display: flex;
  gap: 11px;
  text-decoration: none;
  color: inherit;
}
.fs-rel-item .fs-rel-thumb {
  width: 66px;
  height: 48px;
  flex: none;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}
.fs-rel-item h5 {
  font-size: 13px;
  line-height: 1.48;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fs-rel-item:hover h5 {
  color: var(--accent);
}
.fs-rel-item .rel-meta {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--fs-ink-3);
  font-family: var(--fs-mono);
}

/* 热榜 */
.fs-rank {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.fs-rank-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-sub);
  text-decoration: none;
}
.fs-rank-no {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-family: var(--fs-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  background: rgba(31, 35, 64, 0.06);
}
.fs-rank-item:nth-child(1) .fs-rank-no {
  color: #fff;
  background: linear-gradient(135deg, #ff7eb3, #ff9a6d);
}
.fs-rank-item:nth-child(2) .fs-rank-no {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.fs-rank-item:nth-child(3) .fs-rank-no {
  color: #fff;
  background: linear-gradient(135deg, #00b8d4, #0f9d76);
}
.fs-rank-item:hover {
  color: var(--accent);
}

/* 标签云 */
.fs-tagcloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* 操作按钮组 */
.fs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.fs-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-sub);
  background: #fff;
  border: 1px solid var(--fs-border);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), color 0.2s, border-color 0.2s, background 0.2s;
}
.fs-action:hover {
  color: var(--accent);
  border-color: var(--fs-border-strong);
  transform: translateY(-2px);
}
.fs-action.is-on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 18px rgba(109, 93, 246, 0.28);
}

/* 指标小卡 */
.fs-metric {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.fs-metric div {
  padding: 11px 10px;
  border-radius: 12px;
  text-align: center;
  background: rgba(109, 93, 246, 0.06);
  border: 1px solid var(--fs-border);
}
.fs-metric span {
  display: block;
  font-size: 11.5px;
  color: var(--fs-ink-3);
  margin-bottom: 5px;
}
.fs-metric b {
  font-family: var(--fs-mono);
  font-size: 15px;
  color: var(--text-main);
}

/* ================= 卡片头（评论区 / 相似素材） ================= */
.fs-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--fs-border);
  background: linear-gradient(180deg, rgba(109, 93, 246, 0.07), rgba(109, 93, 246, 0));
}
.fs-card-head h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  color: var(--text-main);
}
.fs-card-head h3 b {
  font-family: var(--fs-mono);
  color: var(--accent);
}
.fs-card-body {
  padding: 18px;
}

/* ================= 文章 / 图文正文排版 ================= */
.fs-doc {
  padding: 30px 34px;
}
.fs-doc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.fs-doc-title {
  font-size: clamp(21px, 2.9vw, 30px);
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -0.3px;
  color: var(--text-main);
}
.fs-doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 15px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--fs-border);
  font-size: 12.5px;
  color: var(--fs-ink-3);
}
.fs-doc-meta b {
  color: var(--accent);
  font-family: var(--fs-mono);
}
.fs-doc-meta .fs-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
}
.fs-doc-lead {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(135deg, rgba(109, 93, 246, 0.09), rgba(0, 184, 212, 0.07));
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-main);
}
/* 详情页文章卡片：外层背景与正文区背景保持一致，避免内外两层底色 */
.fs-card.fs-card--article {
  background: linear-gradient(135deg, rgba(109, 93, 246, 0.09), rgba(0, 184, 212, 0.07));
}
.fs-card--article .fs-doc-lead {
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: none;
}
.fs-doc-body {
  margin-top: 24px;
}
.fs-doc-body h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 30px 0 13px;
  font-size: 18px;
  color: var(--text-main);
}
.fs-doc-body h2::before {
  content: "";
  width: 4px;
  height: 17px;
  border-radius: 2px;
  flex: none;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.fs-doc-body h3 {
  margin: 22px 0 10px;
  font-size: 15.5px;
  color: var(--text-main);
}
.fs-doc-body p {
  margin-bottom: 15px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-sub);
}
.fs-doc-body ul,
.fs-doc-body ol {
  margin: 0 0 16px 20px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-sub);
}
.fs-doc-body li {
  margin-bottom: 7px;
}
.fs-doc-body strong {
  color: var(--text-main);
}
.fs-doc-body a {
  color: var(--accent);
}
.fs-doc-body blockquote {
  margin: 18px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: rgba(109, 93, 246, 0.06);
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--text-sub);
}
.fs-doc-body code {
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(31, 35, 64, 0.06);
  font-family: var(--fs-mono);
  font-size: 12.5px;
  color: #5b4be0;
}
.fs-doc-body pre {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: #1f2340;
  color: #dfe2f2;
  font-family: var(--fs-mono);
  font-size: 12.5px;
  line-height: 1.78;
  overflow-x: auto;
}
.fs-doc-figure {
  margin: 20px 0;
}
.fs-doc-figure .fig {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 54px;
  color: rgba(255, 255, 255, 0.94);
}
.fs-doc-figure .fig::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 22%, rgba(255, 255, 255, 0.32), transparent 46%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 8px);
}
.fs-doc-figure .fig .fs-img-ico {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 6px 18px rgba(31, 35, 64, 0.28));
}
.fs-doc-figure figcaption {
  margin-top: 9px;
  text-align: center;
  font-size: 12px;
  color: var(--fs-ink-3);
}
.fs-doc-table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  font-size: 13px;
}
.fs-doc-table th,
.fs-doc-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(109, 93, 246, 0.12);
  color: var(--text-sub);
  line-height: 1.6;
}
.fs-doc-table th {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(109, 93, 246, 0.06);
}
.fs-doc-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--fs-border);
}

/* ================= 图文详情：头图 Hero ================= */
.fs-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 30px 32px;
  box-shadow: var(--fs-shadow);
}
.fs-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 20, 45, 0.1) 0%, rgba(20, 20, 45, 0.62) 62%, rgba(20, 20, 45, 0.82) 100%),
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, 0.22), transparent 52%);
}
.fs-hero .fs-hero-ico {
  position: absolute;
  right: 46px;
  top: 42px;
  font-size: 108px;
  opacity: 0.34;
  z-index: 1;
  filter: drop-shadow(0 10px 26px rgba(20, 20, 45, 0.4));
}
.fs-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 780px;
}
.fs-hero h1 {
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.3px;
  color: #fff;
  text-shadow: 0 2px 20px rgba(20, 20, 45, 0.4);
}
.fs-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 14px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.88);
}
.fs-hero-meta .fs-avatar {
  width: 26px;
  height: 26px;
  font-size: 11.5px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.fs-hero-meta b {
  color: #fff;
  font-family: var(--fs-mono);
}
.fs-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.fs-hero-tags .fs-tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.36);
}

/* ================= 图片详情：预览台 ================= */
.fs-preview {
  padding: 18px;
}
.fs-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 74px;
  color: rgba(255, 255, 255, 0.94);
}
.fs-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 26% 20%, rgba(255, 255, 255, 0.34), transparent 46%),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 8px);
}
.fs-stage .fs-img-ico {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 22px rgba(31, 35, 64, 0.3));
}
.fs-stage-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.fs-stage-bar span {
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--fs-mono);
  font-size: 11.5px;
  color: #fff;
  background: rgba(20, 20, 45, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.fs-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.fs-thumb {
  position: relative;
  overflow: hidden;
  padding: 0;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 2px solid transparent;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s, box-shadow 0.2s;
}
.fs-thumb:hover {
  transform: translateY(-2px);
}
.fs-thumb.is-active {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(109, 93, 246, 0.3);
}
.fs-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.fs-swatch {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid rgba(31, 35, 64, 0.14);
  cursor: pointer;
  transition: transform 0.2s;
}
.fs-swatch:hover {
  transform: translateY(-2px) scale(1.04);
}

/* ================= 评论区 ================= */
.fs-cmt-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--fs-border);
}
.fs-cmt-input {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--fs-border);
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.fs-cmt-input::placeholder {
  color: var(--fs-ink-3);
}
.fs-cmt-input:focus {
  border-color: var(--fs-border-strong);
  box-shadow: 0 0 0 3px rgba(109, 93, 246, 0.12);
}
.fs-cmt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.fs-cmt-hint {
  font-size: 12px;
  color: var(--fs-ink-3);
}
.fs-comments {
  padding: 4px 18px;
}
.fs-comment {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(109, 93, 246, 0.1);
}
.fs-comment:last-child {
  border-bottom: none;
}
.fs-comment .fs-avatar {
  width: 34px;
  height: 34px;
  font-size: 13px;
}
.fs-comment-main {
  flex: 1;
  min-width: 0;
}
.fs-comment-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.fs-comment-top .cm-name {
  font-weight: 600;
  color: var(--text-main);
}
.fs-comment-top .cm-time {
  font-family: var(--fs-mono);
  font-size: 11.5px;
  color: var(--fs-ink-3);
}
.fs-comment-text {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.78;
  color: var(--text-sub);
}
.fs-comment-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--fs-ink-3);
}
.fs-comment-foot span {
  cursor: pointer;
}
.fs-comment-foot span:hover {
  color: var(--accent);
}
.fs-comment-reply {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--fs-border);
  background: rgba(109, 93, 246, 0.06);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--text-sub);
}
.fs-comment-reply b {
  color: var(--accent);
}

/* ================= 响应式 ================= */
@media (max-width: 1120px) {
  .fs-detail {
    grid-template-columns: minmax(0, 1fr);
  }
  .fs-rail {
    position: static;
  }
}

@media (max-width: 900px) {
  .fs-doc {
    padding: 24px 22px;
  }
  .fs-hero {
    min-height: 230px;
    padding: 24px 22px;
  }
  .fs-hero .fs-hero-ico {
    font-size: 82px;
    right: 24px;
    top: 30px;
  }
}

@media (max-width: 720px) {
  .fs-doc {
    padding: 20px 17px;
  }
  .fs-doc-body p,
  .fs-doc-body ul,
  .fs-doc-body ol {
    font-size: 13.5px;
  }
  .fs-doc-body pre {
    padding: 13px 14px;
    font-size: 11.5px;
  }
  .fs-doc-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .fs-hero {
    min-height: 200px;
    border-radius: 18px;
    padding: 20px 18px;
  }
  .fs-hero .fs-hero-ico {
    display: none;
  }
  .fs-stage {
    font-size: 52px;
    border-radius: 14px;
  }
  .fs-preview {
    padding: 14px;
  }
  .fs-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    gap: 8px;
  }
  .fs-card-body {
    padding: 14px;
  }
  .fs-comments,
  .fs-cmt-form {
    padding-left: 14px;
    padding-right: 14px;
  }
  .fs-kv {
    grid-template-columns: 68px minmax(0, 1fr);
  }
  .fs-doc-foot {
    gap: 9px;
  }
}

@media (max-width: 460px) {
  .fs-metric {
    grid-template-columns: 1fr 1fr;
  }
  .fs-rel-item .fs-rel-thumb {
    width: 56px;
    height: 42px;
  }
}
