/* ============================================================
   YYRMM 的软件库 — 详情页样式（石墨 + 深青，与主页同源）
   浅色：白底   深色：深空石墨玻璃
   变量命名与 assets/css/style.css 保持一致；同时保留 --gold /
   --patina 两个历史别名（都指向 --accent），兼容详情页里既有的行内样式。
   ============================================================ */

:root {
  /* ---------- 表面与文字：浅色（默认日间主题） ---------- */
  --bg:            #f7f8f8;
  --bg-soft:       #eff1f1;
  --surface:       #ffffff;
  --surface-2:     #f3f5f5;
  --surface-3:     #e8eceb;

  --text:          #101615;
  --text-body:     #3d4746;
  --text-muted:    #677170;
  --text-faint:    #98a2a1;

  --border:        #e1e5e4;
  --border-strong: #c5cdcc;

  /* ---------- 强调色：低饱和深青（刻意不用蓝色） ---------- */
  --accent:        #14655e;
  --accent-soft:   rgba(20, 101, 94, 0.08);
  --accent-line:   rgba(20, 101, 94, 0.3);
  --on-accent:     #ffffff;

  /* 状态色（资料板块沿用旧语义：琥珀=密码醒目，青绿=免费声明） */
  --amber:         #8a6220;
  --amber-soft:    rgba(138, 98, 32, 0.09);
  --ok:            #2f6b4f;
  --ok-soft:       rgba(47, 107, 79, 0.09);

  /* ---------- 背景层 ---------- */
  --grid-line:     rgba(16, 21, 20, 0.04);
  --glow-1:        rgba(20, 101, 94, 0.1);
  --glow-2:        rgba(47, 107, 79, 0.07);
  --glow-3:        rgba(138, 98, 32, 0.05);

  /* ---------- 派生 ---------- */
  --topbar-bg:     rgba(247, 248, 248, 0.85);
  --selection-bg:  rgba(20, 101, 94, 0.18);
  --selection-fg:  #101615;
  --shadow:        rgba(14, 24, 22, 0.16);
  --shadow-soft:   rgba(14, 24, 22, 0.07);

  --radius:     12px;
  --radius-sm:  8px;
  --radius-pill: 999px;
  --max-width:  1000px;
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);

  /* ---------- 历史别名（详情页行内样式仍在使用，统一指向 --accent） ---------- */
  --gold:        var(--accent);
  --gold-pale:   var(--accent);
  --gold-deep:   var(--accent);
  --patina:      var(--accent);
  --patina-pale: var(--accent);
  --patina-deep: var(--accent);
  --on-gold:     var(--on-accent);

  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas,
    "Liberation Mono", "Noto Sans Mono CJK SC", monospace;
}

/* ============================================================
   深色：深空玻璃（夜间主题）
   启用方式：<html data-theme="dark">（assets/js/theme.js 控制）
   ============================================================ */
[data-theme="dark"] {
  --bg:            #0c0f0f;
  --bg-soft:       #111615;
  --surface:       rgba(255, 255, 255, 0.032);
  --surface-2:     rgba(255, 255, 255, 0.055);
  --surface-3:     rgba(255, 255, 255, 0.08);

  --text:          #e8edec;
  --text-body:     #bdc6c5;
  --text-muted:    #8b9594;
  --text-faint:    #6b7473;

  --border:        rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.2);

  --accent:        #4bbfae;
  --accent-soft:   rgba(75, 191, 174, 0.13);
  --accent-line:   rgba(75, 191, 174, 0.4);
  --on-accent:     #06201d;

  --amber:         #d2a869;
  --amber-soft:    rgba(210, 168, 105, 0.13);
  --ok:            #6fc49a;
  --ok-soft:       rgba(111, 196, 154, 0.13);

  --grid-line:     rgba(255, 255, 255, 0.035);
  --glow-1:        rgba(75, 191, 174, 0.14);
  --glow-2:        rgba(111, 196, 154, 0.1);
  --glow-3:        rgba(210, 168, 105, 0.07);

  --topbar-bg:     rgba(12, 15, 15, 0.8);
  --selection-bg:  rgba(75, 191, 174, 0.28);
  --selection-fg:  #e8edec;
  --shadow:        rgba(0, 0, 0, 0.6);
  --shadow-soft:   rgba(0, 0, 0, 0.4);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-body);
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--selection-bg); color: var(--selection-fg); }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  border: 3px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.page, .site-footer { position: relative; z-index: 1; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

/* ============================================================
   背景层：细网格 + 柔光晕（纯 CSS，无图片）
   ============================================================ */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}
.bg-scene::before {
  content: "";
  position: absolute;
  inset: -60px;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(125% 78% at 50% 0%, #000 22%, transparent 76%);
  mask-image: radial-gradient(125% 78% at 50% 0%, #000 22%, transparent 76%);
  animation: grid-drift 44s linear infinite;
}
@keyframes grid-drift {
  to { transform: translate3d(-56px, -56px, 0); }
}
.bg-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 40% at 8% -8%, var(--glow-1), transparent 68%),
    radial-gradient(50% 38% at 96% 2%, var(--glow-2), transparent 70%),
    radial-gradient(70% 46% at 48% 106%, var(--glow-3), transparent 74%);
}

/* 旧版装饰层（若仍被引用则隐藏） */
.aurora, .bg-grid, .bg-vignette, .cursor-glow { display: none; }

/* ============================================================
   顶部导航栏
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 55;
  background: var(--topbar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent) 62%, var(--accent));
  box-shadow: 0 4px 14px -4px var(--accent-line);
}
[data-theme="dark"] .brand-mark { color: #05101d; }
.brand:hover { color: var(--accent); }

.top-nav {
  display: flex;
  gap: 2px;
  margin-right: auto;
}

.top-link {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease, background 0.2s ease;
}
.top-link:hover { color: var(--accent); background: var(--accent-soft); }

.top-actions { display: flex; align-items: center; gap: 8px; }

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.social-link:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.lang-toggle {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.lang-toggle:hover {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ============================================================
   详情 Hero
   ============================================================ */
.page { min-height: 100vh; padding: 44px 0 72px; }

.detail-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 26px;
  flex-wrap: wrap;
  padding: 30px 30px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
/* 顶部一缕柔光 + 主题色细线 */
.detail-hero::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--card-accent, var(--accent)), transparent 72%);
}
.detail-hero::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    90% 120% at 0% 0%,
    color-mix(in srgb, var(--card-accent, var(--accent)) 10%, transparent),
    transparent 62%
  );
}

.detail-icon {
  position: relative;
  z-index: 1;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border-radius: var(--radius);
  background:
    radial-gradient(125% 125% at 50% 0%, color-mix(in srgb, var(--card-accent, var(--accent)) 15%, transparent), transparent 72%),
    var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--card-accent, var(--accent)) 42%, var(--border));
}

.detail-hero-text { position: relative; z-index: 1; flex: 1; min-width: 260px; }

.detail-name {
  font-size: clamp(25px, 4.4vw, 34px);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.24;
  color: var(--text);
}

/* 标题内的版本徽章 */
.detail-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 2px 9px;
  margin-left: 10px;
  vertical-align: 5px;
}
.detail-badge.is-off {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: color-mix(in srgb, var(--amber) 50%, transparent);
}

.detail-tagline {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-muted);
}

.detail-meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.chip.is-off {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: color-mix(in srgb, var(--amber) 45%, transparent);
}

.detail-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: -0.005em;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn svg { flex-shrink: 0; }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  box-shadow: 0 10px 24px -14px var(--accent);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, #000);
  border-color: color-mix(in srgb, var(--accent) 86%, #000);
  transform: translateY(-1px);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text-body);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent-line);
  color: var(--accent);
  background: var(--accent-soft);
}

/* 次操作：天青描边（沿用 btn-cyan 类名） */
.btn-cyan {
  background: transparent;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
}
.btn-cyan:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ============================================================
   详情区块
   ============================================================ */
.detail-section {
  margin-top: 18px;
  padding: 26px 30px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 18px;
}
.detail-title::before {
  content: "";
  width: 4px;
  height: 18px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
}

.detail-text p {
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.9;
}
.detail-text p:last-child { margin-bottom: 0; }

.detail-text strong { color: var(--text); font-weight: 650; }

/* 段末小注（版权说明、「暂未提供预编译包」这类如实交代） */
.detail-text p.detail-note {
  border-left: 2px solid var(--border-strong);
  padding-left: 12px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-muted);
}

.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-list li {
  position: relative;
  padding-left: 20px;
  font-size: 14.5px;
  color: var(--text-body);
  line-height: 1.8;
}
.detail-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.detail-list li strong { color: var(--text); font-weight: 650; }

/* 功能特性网格 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 12px;
}
.feature-card {
  padding: 15px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.feature-card:hover {
  border-color: var(--accent-line);
  background: var(--surface);
  transform: translateY(-2px);
}
.feature-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-weight: 650;
}

/* 双列信息 */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.info-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.info-item .info-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.info-item .info-value {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-body);
}

/* ============================================================
   更新记录（数据由 scripts/sync-changelog.py 生成）
   ============================================================ */
.changelog {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.changelog-empty {
  font-size: 14px;
  color: var(--text-muted);
}
/* 更新记录提醒条：集满 3 条后推送至 GitHub Pages 上线 */
.changelog-note {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  background: var(--accent-soft);
  color: var(--text-muted);
}
.changelog-note::before {
  content: "";
  flex-shrink: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.changelog-note strong { color: var(--text); font-weight: 700; }

.changelog-entry {
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 15px 18px 13px;
}
.changelog-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 8px;
}
.changelog-ver {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.changelog-tagline {
  font-size: 13px;
  color: var(--text-muted);
}
.changelog-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.changelog-items li {
  position: relative;
  padding-left: 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-body);
}
.changelog-items li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.7em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.changelog-items li strong { color: var(--text); font-weight: 650; }

/* 同系列软件互链（内部链接：把 OBS 三个版本串起来，也便于爬虫走通） */
.related {
  margin-top: 28px;
  padding: 15px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.related-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}
.related a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-body);
  text-decoration: none;
  font-size: 13.5px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.related a:hover { border-color: var(--accent-line); color: var(--accent); }

/* 返回链接 */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 28px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--accent); }

/* 「停止开发」告示横幅 */
.status-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--border));
  border-left: 2px solid var(--amber);
  background: var(--amber-soft);
  border-radius: var(--radius-sm);
}
.status-banner::before {
  content: "!";
  flex-shrink: 0;
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--amber);
  border: 1.5px solid color-mix(in srgb, var(--amber) 60%, transparent);
  border-radius: 50%;
}
.status-banner p { font-size: 14px; line-height: 1.7; color: var(--text-body); }
.status-banner strong { color: var(--amber); font-weight: 700; }
.status-banner a { color: var(--accent); text-decoration: none; }
.status-banner a:hover { text-decoration: underline; }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 24px 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--text-faint);
}
.site-footer a { color: var(--accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ============================================================
   滚动进场 reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 640px) {
  .topbar .brand { display: none; }
  .topbar-inner { height: auto; min-height: 58px; flex-wrap: wrap; padding: 4px 0; row-gap: 2px; }
  .top-nav { flex-wrap: wrap; min-width: 0; gap: 0; }
  .top-link { font-size: 13px; padding: 5px 8px; }
  .social-link { width: 30px; height: 30px; }
  .theme-toggle { width: 30px; height: 30px; }
  .lang-toggle { font-size: 11px; padding: 6px 10px; }
  .top-actions { gap: 6px; margin-left: auto; flex-shrink: 0; }
  .page { padding: 28px 0 52px; }
  .detail-hero { padding: 22px 20px 22px; gap: 18px; }
  .detail-hero-text { min-width: 0; }
  .detail-section { padding: 22px 18px 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   动效减弱
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .bg-scene::before { animation: none; }

  .reveal, .btn, .lang-toggle, .theme-toggle, .social-link, .feature-card {
    transition: none !important;
    animation: none !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .feature-card:hover { transform: none; }
}
