/* ============================================================
   FinalShell 官网 · 全站样式
   ============================================================ */

:root {
  --bg:            #0f1419;
  --bg-soft:       #161c24;
  --bg-elev:       #1c242e;
  --bg-hover:      #232b35;
  --border:        #2a3540;
  --border-soft:   #232b35;

  --text:          #e6edf3;
  --text-dim:      #9aa7b4;
  --text-mute:     #6b7785;

  --accent:        #50c878;
  --accent-dim:    #3da361;
  --accent-soft:   rgba(80, 200, 120, 0.12);
  --link:          #7ab8ff;
  --warn-soft:     rgba(255, 186, 84, 0.10);
  --warn:          #ffba54;

  --radius:        10px;
  --radius-sm:     8px;
  --maxw:          1120px;
  --maxw-prose:    780px;

  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, "SF Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0; font-weight: 650; letter-spacing: -0.3px; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 0.12em 0.4em;
  color: #cfe3d4;
}

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #0b1014;
  padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ============ 导航 ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 20, 25, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  display: flex; align-items: center; gap: 20px;
  height: 58px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 650; font-size: 16px;
  letter-spacing: 0.2px; white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 27px; height: 27px; border-radius: 7px;
  background: var(--bg-elev);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); font-family: var(--mono); font-size: 13px; font-weight: 700;
  border: 1px solid var(--border);
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  color: var(--text-dim); font-size: 14.5px;
  transition: color .15s ease;
  position: relative;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--accent); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  width: 38px; height: 34px;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute; top: 58px; left: 0; right: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 0;
    padding: 6px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 24px; font-size: 15px; }
  .nav-links a + a { border-top: 1px solid var(--border-soft); }
}

/* ============ 面包屑 ============ */
.crumbs {
  font-size: 13px; color: var(--text-mute);
  padding: 16px 0 0;
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--border); }
.crumbs a { color: var(--text-dim); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current="page"] { color: var(--text-mute); }

/* ============ Hero ============ */
.hero { padding: 76px 0 64px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.hero h1 {
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.14;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.6px;
}
.hero h1 .accent { color: var(--accent); }
.lede { color: var(--text-dim); font-size: 17px; margin: 0 0 22px; max-width: 540px; }

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(80, 200, 120, 0.25);
  margin-bottom: 16px;
}

.prompt-row {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 26px;
}
.prompt-row .user { color: var(--accent); }

@media (max-width: 900px) {
  .hero { padding: 48px 0 36px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* ============ 按钮 ============ */
.btn {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-elev);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { border-color: var(--accent-dim); background: var(--bg-hover); text-decoration: none; }
.btn .icon { width: 22px; height: 22px; flex: 0 0 22px; color: var(--accent); }
.btn .meta { display: flex; flex-direction: column; line-height: 1.25; }
.btn .meta strong { font-weight: 600; font-size: 14px; }
.btn .meta span { font-size: 12px; color: var(--text-mute); margin-top: 1px; }

.btn-primary { background: var(--accent); color: #0b1014; border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: var(--accent-dim); border-color: var(--accent-dim); color: #0b1014; }
.btn-primary .icon, .btn-primary .meta span { color: rgba(11, 16, 20, 0.72); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.download-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
@media (max-width: 440px) { .download-grid { grid-template-columns: 1fr; } }

/* ============ 截图 ============ */
.shot {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.shot img { display: block; width: 100%; height: auto; }

/* ============ 区块 ============ */
section { padding: 68px 0; }
section + section { border-top: 1px solid var(--border-soft); }

.section-head { margin-bottom: 38px; }
.section-head.center { text-align: center; }
.section-head h2 { font-size: 27px; margin: 0 0 8px; }
.section-head p { color: var(--text-dim); font-size: 15px; margin: 0; }

/* ============ 特性卡片 ============ */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .features { grid-template-columns: 1fr; } }

.feat {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: border-color .15s ease;
}
.feat:hover { border-color: var(--border); }
.feat h3 { margin: 0 0 6px; font-size: 15.5px; }
.feat p { margin: 0; font-size: 13.5px; color: var(--text-dim); }
.feat a.more { font-size: 13px; }
.feat .ic {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 13px;
}

/* ============ 下载卡片 ============ */
.downloads {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
  max-width: 760px; margin: 0 auto;
}
@media (max-width: 580px) { .downloads { grid-template-columns: 1fr; } }

.dl-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color .15s ease;
}
.dl-card:hover { border-color: var(--accent-dim); text-decoration: none; }
.dl-card .ic {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: var(--radius-sm);
  background: var(--bg-elev); border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.dl-card .meta { display: flex; flex-direction: column; line-height: 1.35; }
.dl-card .meta strong { font-size: 15px; color: var(--text); font-weight: 600; }
.dl-card .meta span { font-size: 12.5px; color: var(--text-mute); }
.dl-card .arrow { margin-left: auto; color: var(--text-mute); font-size: 18px; }
.dl-card:hover .arrow { color: var(--accent); }

/* ============ 内容页排版 ============ */
.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(28px, 3.6vw, 38px); margin: 0 0 12px; }
.page-head .sub { color: var(--text-dim); font-size: 16.5px; margin: 0; max-width: 680px; }

main { flex: 1 0 auto; }

.prose { max-width: var(--maxw-prose); }
.prose h2 {
  font-size: 22px; margin: 44px 0 14px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border-soft);
}
.prose h3 { font-size: 17.5px; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--text-dim); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 7px; }
.prose li strong { color: var(--text); }
.prose > p:first-of-type { font-size: 16.5px; }

/* 步骤 */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1em; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 46px;
  color: var(--text-dim);
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid rgba(80, 200, 120, 0.3);
  color: var(--accent);
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps li:last-child { padding-bottom: 0; }
.steps li strong { display: block; color: var(--text); font-size: 15.5px; margin-bottom: 3px; }

/* 提示框 */
.callout {
  background: var(--warn-soft);
  border: 1px solid rgba(255, 186, 84, 0.28);
  border-left: 3px solid var(--warn);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 24px 0;
  font-size: 14.5px;
  color: var(--text-dim);
}
.callout strong { color: var(--warn); }
.callout p:last-child { margin-bottom: 0; }

.callout.tip {
  background: var(--accent-soft);
  border-color: rgba(80, 200, 120, 0.28);
  border-left-color: var(--accent);
}
.callout.tip strong { color: var(--accent); }

/* 表格 */
.table-wrap { overflow-x: auto; margin: 22px 0; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border-soft); }
th { color: var(--text); font-weight: 600; background: var(--bg-soft); }
td { color: var(--text-dim); }

/* FAQ */
.faq { max-width: var(--maxw-prose); }
.faq h2 {
  font-size: 18px;
  margin: 32px 0 14px;
  color: var(--text);
}
.faq h2:first-child { margin-top: 0; }
.faq-item {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  margin-bottom: 10px;
  background: var(--bg-soft);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 15px 18px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text);
  list-style: none;
  display: flex; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; margin-left: auto; color: var(--accent);
  font-family: var(--mono); font-size: 19px; line-height: 1;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .answer {
  padding: 0 18px 16px;
  color: var(--text-dim);
  font-size: 14.5px;
}

/* 功能详解块 */
.fblock {
  display: grid; grid-template-columns: 40px 1fr; gap: 18px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border-soft);
}
.fblock:last-child { border-bottom: 0; }
.fblock .ic {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.fblock h2 { margin: 0 0 10px; font-size: 20px; border-bottom: 0; padding-bottom: 0; }
.fblock h3 { margin: 0 0 8px; font-size: 18px; }

/* 特性列表（功能页使用） */
.feat-list { list-style: none; padding: 0; margin: 6px 0 0; }
.feat-list li {
  position: relative;
  padding: 11px 0 11px 18px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.62;
}
.feat-list li:first-child { border-top: 0; }
.feat-list li::before {
  content: "";
  position: absolute; left: 0; top: 19px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
}
.feat-list strong { color: var(--text); font-weight: 600; }
.feat-list code { font-size: 0.88em; }
.fblock p { margin: 0 0 10px; color: var(--text-dim); font-size: 15px; }
.fblock ul { padding-left: 20px; margin: 0; }
.fblock li { color: var(--text-dim); font-size: 14.5px; margin-bottom: 5px; }

/* CTA */
.cta {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px 28px;
  text-align: center;
  margin-top: 44px;
}
.cta h2 { font-size: 22px; margin: 0 0 8px; }
.cta p { color: var(--text-dim); margin: 0 0 20px; }
.cta .btn-row { justify-content: center; }

/* ============ 页脚 ============ */
footer {
  border-top: 1px solid var(--border-soft);
  padding: 34px 0 28px;
  color: var(--text-mute);
  font-size: 13.5px;
  margin-top: auto;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 22px;
}
@media (max-width: 680px) {
  .foot-grid { grid-template-columns: 1fr; gap: 22px; }
}
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 15px; margin-bottom: 10px; }
.foot-brand:hover { text-decoration: none; }
.foot-about { color: var(--text-mute); font-size: 13px; max-width: 320px; }
.foot-col h4 { font-size: 13px; color: var(--text); margin: 0 0 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; }
.foot-col li { margin-bottom: 7px; }
.foot-col a { color: var(--text-dim); font-size: 13.5px; }
.foot-col a:hover { color: var(--text); }

.foot-bottom {
  border-top: 1px solid var(--border-soft);
  padding-top: 18px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 10px;
}
.friend-links { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.friend-links a { color: var(--text-dim); }
.friend-links a:hover { color: var(--text); }

/* ============ 其他 ============ */
::selection { background: var(--accent-soft); color: var(--text); }

@media print {
  .nav, .cta, footer { display: none; }
  body { background: #fff; color: #000; }
}
