﻿/* ========== Design Tokens (Plants vs Zombies Theme) ========== */
:root {
  --color-primary: #2E7D32;
  --color-on-primary: #FFFFFF;
  --color-secondary: #66BB6A;
  --color-on-secondary: #1B5E20;
  --color-accent: #FFC107;
  --color-on-accent: #5D4037;
  --color-background: #E8F5E9;
  --color-foreground: #1B5E20;
  --color-card: #FFFDE7;
  --color-card-foreground: #33691E;
  --color-muted: #C8E6C9;
  --color-muted-foreground: #558B2F;
  --color-border: #A5D6A7;
  --color-border-light: #C8E6C9;
  --color-destructive: #C62828;
  --color-on-destructive: #FFFFFF;
  --color-ring: #2E7D32;
  --color-success: #43A047;
  --color-warning: #EF6C00;
  --color-code-bg: #F1F8E9;
  --color-code-text: #33691E;
  --color-wood: #6D4C41;
  --color-wood-light: #8D6E63;
  --color-zombie: #7B1FA2;
  --color-sun: #FFD54F;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", "Consolas", monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 2px 4px rgba(46,125,50,0.12);
  --shadow-md: 0 4px 14px rgba(46,125,50,0.15);
  --shadow-lg: 0 10px 36px rgba(46,125,50,0.2);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  --sidebar-width: 300px;
  --content-max: 960px;
}

/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--color-background);
  color: #0F172A;
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--color-secondary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-primary); }
a:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; border-radius: 2px; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
button:focus-visible { outline: 2px solid var(--color-ring); outline-offset: 2px; }

/* ========== Skip Link (Accessibility) ========== */
.skip-link {
  position: absolute; top: -40px; left: 0; z-index: 1000;
  background: var(--color-primary); color: var(--color-on-primary);
  padding: 10px 20px; font-weight: 600; border-radius: 0 0 var(--radius-md) 0;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 0; }

/* ========== Top Bar ========== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  height: 60px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border-light);
  display: flex; align-items: center;
  padding-block: 0;
  padding-inline: max(24px, calc((100vw - (var(--sidebar-width) + var(--content-max) + 48px)) / 2));
  gap: 20px;
}
.topbar-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; color: var(--color-primary);
  white-space: nowrap;
}
.topbar-logo .logo-mark {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px;
}
.topbar-manual-nav {
  display: flex; align-items: center; gap: 2px;
  padding: 3px;
  background: rgba(62,39,35,0.34);
  border: 1px solid rgba(255,236,179,0.2);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.manual-nav-tab {
  height: 30px; padding: 0 13px;
  border-radius: 4px;
  color: #EFEBE9;
  font-size: 13px; font-weight: 600;
  white-space: nowrap;
  transition: color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}
.manual-nav-tab:hover { color: #FFFDE7; background: rgba(255,255,255,0.1); }
.manual-nav-tab.active {
  color: #33691E;
  background: #FFFDE7;
  box-shadow: 0 1px 3px rgba(62,39,35,0.28);
}
.topbar-search {
  flex: 1; min-width: 0; max-width: 520px; position: relative;
}
.topbar-search input {
  width: 100%; height: 38px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 0 14px 0 40px;
  font-size: 14px; font-family: inherit;
  background: var(--color-background);
  color: #0F172A;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.topbar-search input:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.topbar-search input::placeholder { color: var(--color-muted-foreground); }
.topbar-search .search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--color-muted-foreground);
  pointer-events: none;
}
.topbar-search .search-count {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--color-muted-foreground);
  background: var(--color-muted); padding: 2px 8px; border-radius: 10px;
  display: none;
}
.topbar-search.has-results .search-count { display: block; }
.topbar-meta {
  margin-left: auto; display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--color-muted-foreground);
}
.topbar-meta .version-badge {
  background: var(--color-muted); padding: 4px 10px; border-radius: 12px;
  font-weight: 600; font-size: 12px; color: var(--color-primary);
}

/* ========== Layout ========== */
.layout {
  display: flex;
  max-width: calc(var(--sidebar-width) + var(--content-max) + 48px);
  margin: 0 auto;
  padding-top: 60px;
  min-height: 100vh;
}

/* ========== Sidebar ========== */
.sidebar {
  position: sticky;
  top: 60px;
  width: var(--sidebar-width);
  height: calc(100vh - 60px);
  background: var(--color-card);
  border-right: 1px solid var(--color-border-light);
  overflow-y: auto;
  padding: 20px 0 40px;
  z-index: 80;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
  flex-shrink: 0;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
.sidebar-group { margin-bottom: 8px; }
.sidebar-group-title {
  padding: 12px 24px 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-muted-foreground);
  border-left: 3px solid transparent;
}
.sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 24px;
  font-size: 13.5px; color: #334155;
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.sidebar a:hover { background: var(--color-background); color: var(--color-primary); }
.sidebar a.active {
  color: var(--color-primary); font-weight: 600;
  border-left-color: var(--color-primary);
  background: linear-gradient(90deg, rgba(30,58,138,0.06), transparent);
}
.sidebar a.sub { padding-left: 24px; font-size: 13px; }

/* ========== Main Content ========== */
.main {
  flex: 1;
  padding: 40px 24px 80px;
  min-width: 0;
}
.content-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ========== Manual Views ========== */
.quick-use-view,
.software-update-view {
  min-height: 100vh;
  padding: 112px 24px 80px;
}
.quick-use-content {
  max-width: var(--content-max);
  margin: 0 auto;
}
.quick-use-header {
  padding: 42px 0 36px;
  border-top: 3px solid var(--color-secondary);
}
.quick-use-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--color-muted-foreground);
  font-size: 12px; font-weight: 700;
}
.quick-use-header h1 {
  margin-bottom: 12px;
  color: var(--color-primary);
  font-size: 28px; font-weight: 800;
}
.quick-use-header p { color: #334155; }
.quick-use-index {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.quick-use-index a {
  color: var(--color-primary);
  font-size: 13px; font-weight: 700;
}
.quick-use-index a:hover { color: var(--color-secondary); }
.quick-use-section {
  padding: 42px 0 18px;
  scroll-margin-top: 84px;
}
.quick-use-section + .quick-use-section { border-top: 1px solid var(--color-border); }
.quick-use-section h2 {
  margin-bottom: 24px;
  color: var(--color-primary);
  font-size: 22px; font-weight: 800;
}
.quick-use-block {
  padding: 22px 0;
  border-top: 1px solid var(--color-border-light);
}
.quick-use-block h3 {
  margin-bottom: 14px;
  color: #33691E;
  font-size: 16px; font-weight: 700;
}
.quick-use-setting-group + .quick-use-setting-group { margin-top: 24px; }
.quick-use-setting-group h4 {
  margin-bottom: 10px;
  color: var(--color-primary);
  font-size: 14px; font-weight: 700;
}
.quick-use-setting-group .quick-use-steps a {
  border-bottom: 1px solid currentColor;
  font-weight: 700;
}
.inline-image-button {
  margin-left: 8px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.inline-image-button:hover { color: var(--color-secondary); }
.quick-use-image-action { margin-top: 14px; }
.quick-use-image-action .inline-image-button { margin-left: 0; }
.image-dialog {
  width: min(860px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-card);
  color: var(--color-card-foreground);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.image-dialog::backdrop { background: rgba(15, 23, 42, 0.72); }
.image-dialog-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 34px);
}
.image-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border-light);
}
.image-dialog-header h2 { font-size: 16px; font-weight: 700; }
.image-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--color-primary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.image-dialog-close:hover { background: var(--color-muted); }
.image-dialog img {
  display: block;
  justify-self: center;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 90px);
  object-fit: contain;
  background: #202020;
}
.image-dialog-gallery {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 12px;
  overflow-y: auto;
  background: #202020;
}
.image-dialog-gallery img {
  width: 100%;
  max-height: none;
}
.quick-use-steps {
  display: grid; gap: 10px;
  list-style: none;
  counter-reset: quick-step;
}
.quick-use-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  min-height: 36px;
  color: #334155;
  counter-increment: quick-step;
}
.quick-use-steps li::before {
  content: counter(quick-step);
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: var(--color-card);
  color: var(--color-primary);
  font-size: 12px; font-weight: 800;
}
.quick-use-tip { margin-top: 18px; }
.software-update-view .quick-use-header { border-top-color: #D97706; }
.update-notice-copy p + p { margin-top: 10px; }
.update-steps li { align-items: start; }
.update-steps li::before { margin-top: 1px; }
.extension-help { margin-top: 28px; }
.extension-help p {
  margin-bottom: 14px;
  color: #334155;
}
.extension-help-links {
  display: flex; flex-wrap: wrap; gap: 10px 24px;
}
.extension-help-links a {
  color: var(--color-primary);
  border-bottom: 1px solid currentColor;
  font-size: 13px; font-weight: 700;
}
.extension-help-links a::after { content: " \2197"; }
.extension-help-links a:hover { color: var(--color-secondary); }
.static-video-tutorial {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
}
.static-video-header {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 12px;
}
.static-video-header span {
  color: var(--color-muted-foreground);
  font-size: 12px; font-weight: 700;
}
.static-video-header h4 {
  color: var(--color-primary);
  font-size: 15px; font-weight: 700;
}
.static-video-tutorial video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #111;
  object-fit: contain;
}

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1E40AF 50%, var(--color-accent) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  color: #fff;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.hero h1 { font-size: 32px; font-weight: 800; margin-bottom: 10px; letter-spacing: -0.02em; }
.hero p { font-size: 16px; opacity: 0.85; max-width: 600px; line-height: 1.7; }
.hero-stats {
  display: flex; gap: 32px; margin-top: 28px;
  position: relative; z-index: 1;
}
.hero-stat .num { font-size: 28px; font-weight: 800; }
.hero-stat .label { font-size: 12px; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.05em; }

/* ========== Section Headings ========== */
.section { margin-bottom: 56px; scroll-margin-top: 80px; }
.section-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px; padding-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
}
.section-num {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.section-header h2 {
  font-size: 22px; font-weight: 700; color: var(--color-primary);
  letter-spacing: -0.01em;
}
.subsection { margin: 36px 0 28px; scroll-margin-top: 80px; }
.subsection h3 {
  font-size: 17px; font-weight: 700; color: #0F172A;
  padding-left: 14px; border-left: 4px solid var(--color-secondary);
  margin-bottom: 16px;
}
.subsection h4 {
  font-size: 15px; font-weight: 600; color: var(--color-primary);
  margin: 20px 0 12px;
}
.subsection p { color: #334155; margin-bottom: 12px; }

/* ========== Cards ========== */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-title {
  font-size: 15px; font-weight: 700; color: var(--color-primary);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.card-title .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-secondary);
}

/* ========== Parameter Tables ========== */
.param-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 13.5px; margin: 12px 0 20px;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.param-table thead th {
  background: var(--color-primary);
  color: #fff;
  padding: 11px 14px;
  text-align: left;
  font-weight: 600; font-size: 13px;
  white-space: nowrap;
}
.param-table thead th:first-child { border-top-left-radius: 0; }
.param-table tbody td {
  padding: 10px 14px;
  border-top: 1px solid var(--color-border-light);
  vertical-align: top;
  color: #334155;
}
.param-table tbody tr:nth-child(even) { background: var(--color-background); }
.param-table tbody tr:hover { background: rgba(59,130,246,0.05); }
.param-table .pname { font-weight: 600; color: var(--color-primary); white-space: nowrap; }
.param-table .pkey {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--color-code-bg); color: var(--color-code-text);
  padding: 2px 7px; border-radius: 3px; border: 1px solid var(--color-border-light);
}
.param-table .prange { color: var(--color-success); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.param-table .pdefault { color: var(--color-accent); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.param-table .ptype {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
}
.ptype.toggle { background: #DBEAFE; color: #1E40AF; }
.ptype.slider { background: #EDE9FE; color: #6D28D9; }
.ptype.combo { background: #FEF3C7; color: #92400E; }
.ptype.hotkey { background: #FCE7F3; color: #9D174D; }
.ptype.button { background: #D1FAE5; color: #065F46; }

/* ========== Callouts ========== */
.callout {
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 13.5px;
  border-left: 4px solid;
  display: flex; gap: 12px; align-items: flex-start;
}
.callout-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.callout.info { background: #EFF6FF; border-color: var(--color-secondary); color: #1E3A8A; }
.callout.success { background: #ECFDF5; border-color: var(--color-success); color: #065F46; }
.callout.warning { background: #FFFBEB; border-color: var(--color-warning); color: #92400E; }
.callout.danger { background: #FEF2F2; border-color: var(--color-destructive); color: #991B1B; }
.callout strong { font-weight: 700; }

/* ========== Option Lists ========== */
.option-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px; margin: 14px 0 20px;
}
.option-item {
  background: var(--color-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: all var(--transition-fast);
}
.option-item:hover { border-color: var(--color-secondary); box-shadow: var(--shadow-sm); }
.option-item .opt-name { font-weight: 600; color: var(--color-primary); font-size: 14px; margin-bottom: 4px; }
.option-item .opt-val {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--color-muted-foreground); display: block; margin-bottom: 6px;
}
.option-item .opt-desc { font-size: 12.5px; color: #475569; line-height: 1.5; }

/* ========== Gun Grid ========== */
.gun-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px; margin: 14px 0 24px;
}
.gun-chip {
  background: var(--color-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font-mono); font-size: 12px;
  text-align: center; color: var(--color-primary);
  transition: all var(--transition-fast);
}
.gun-chip:hover { border-color: var(--color-secondary); background: var(--color-background); }
.gun-chip .gun-type { display: block; font-size: 10px; color: var(--color-muted-foreground); margin-top: 2px; font-family: var(--font-sans); }

/* ========== Code ========== */
code {
  font-family: var(--font-mono); font-size: 12.5px;
  background: var(--color-code-bg); color: var(--color-code-text);
  padding: 2px 6px; border-radius: 3px; border: 1px solid var(--color-border-light);
}
pre {
  background: #0F172A; color: #E2E8F0;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  overflow-x: auto;
  margin: 14px 0 20px;
  font-family: var(--font-mono); font-size: 12.5px;
  line-height: 1.7;
}
pre code { background: none; border: none; padding: 0; color: inherit; }

/* ========== Badges ========== */
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: 14px;
  font-size: 12px; font-weight: 600;
  background: var(--color-muted); color: var(--color-muted-foreground);
  border: 1px solid var(--color-border-light);
}
.badge.primary { background: #DBEAFE; color: var(--color-primary); border-color: #BFDBFE; }
.badge.accent { background: #EDE9FE; color: var(--color-accent); border-color: #DDD6FE; }
.badge.success { background: #D1FAE5; color: var(--color-success); border-color: #A7F3D0; }

/* ========== Search Highlight ========== */
.search-highlight {
  background: #FEF08A; color: #0F172A;
  padding: 1px 2px; border-radius: 2px;
}
.search-hidden { display: none !important; }

/* ========== Video Tutorial ========== */
.video-tutorial {
  margin-top: 24px;
  background: var(--color-card);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.video-tutorial-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #FB7299 0%, #E54D72 100%);
  color: #fff;
}
.video-tutorial-header .vt-icon {
  width: 28px; height: 28px; flex-shrink: 0;
  background: rgba(255,255,255,0.2); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.video-tutorial-header .vt-heading { min-width: 0; }
.video-tutorial-header .vt-title { font-weight: 700; font-size: 15px; }
.video-tutorial-header .vt-subtitle { margin-top: 1px; font-size: 12px; opacity: 0.78; }
.video-tutorial-header .vt-tag {
  margin-left: auto; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.2); padding: 3px 10px; border-radius: 10px;
}
.video-tutorial-body { padding: 16px 20px 20px; }
.video-tutorial-player {
  width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; border-radius: var(--radius-sm);
  background: #111;
}
.video-tutorial-player iframe {
  display: block; width: 100%; height: 100%; border: none;
}
.video-tutorial-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 14px; font-size: 13px; color: var(--color-muted-foreground);
}
.video-tutorial-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: #FB7299;
  padding: 6px 14px; border: 1px solid #FB7299; border-radius: var(--radius-sm);
  white-space: nowrap; transition: all var(--transition-fast);
}
.video-tutorial-link:hover { background: #FB7299; color: #fff; }
.driver-direct-note { margin-top: 14px; }
.driver-tutorial-heading {
  margin-top: 28px;
  color: var(--color-primary);
  font-size: 16px; font-weight: 700;
}
.driver-tutorial-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 14px;
}
.driver-tutorial-grid .video-tutorial { margin-top: 0; }
@media (max-width: 900px) {
  .driver-tutorial-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .video-tutorial-header { align-items: flex-start; flex-wrap: wrap; }
  .video-tutorial-body { padding: 12px; }
  .video-tutorial-actions { align-items: stretch; flex-direction: column; gap: 10px; }
  .video-tutorial-link { width: 100%; }
}

/* ========== Footer ========== */
.footer {
  margin-top: 60px; padding-top: 28px;
  border-top: 1px solid var(--color-border-light);
  text-align: center; color: var(--color-muted-foreground); font-size: 13px;
}
.footer a { color: var(--color-secondary); }
.sidebar-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 24px 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #8D6E63;
  color: #5D4037;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.4;
}
.sidebar-contact strong {
  color: var(--color-primary);
  font-size: 30px;
  letter-spacing: 0.02em;
}

/* ========== Scroll Reveal Animation ========== */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1), transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    top: 60px; left: 0; bottom: 0;
    height: auto;
    transform: translateX(-100%);
    transition: transform var(--transition-base);
  }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main { margin-left: 0; padding: 28px 24px 60px; }
  .menu-toggle { display: flex !important; }
  .topbar-meta { display: none; }
}
@media (max-width: 640px) {
  .topbar { gap: 10px; padding-inline: 12px; }
  .topbar-logo span, .topbar-search { display: none; }
  .topbar-manual-nav { margin-left: auto; }
  .manual-nav-tab { padding: 0 8px; }
  .quick-use-view, .software-update-view { padding: 92px 24px 60px; }
  .quick-use-header { padding: 32px 0 28px; }
  .quick-use-header h1 { font-size: 24px; }
  .quick-use-index { gap: 8px 18px; }
  .quick-use-section { padding-top: 34px; }
  .hero { padding: 32px 24px; }
  .hero h1 { font-size: 24px; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 22px; }
  .param-table { font-size: 12px; }
  .param-table thead th, .param-table tbody td { padding: 8px 10px; }
  .option-grid { grid-template-columns: 1fr; }
}

.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--radius-md);
  background: var(--color-background); border: 1px solid var(--color-border-light);
  color: var(--color-primary);
}
.menu-toggle[hidden] { display: none !important; }
.sidebar-overlay {
  display: none; position: fixed; inset: 0; z-index: 79;
  background: rgba(15,23,42,0.4); backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ========== Plants vs Zombies Theme Overrides ========== */

/* 草地背景纹理 */
body {
  background-color: var(--color-background);
  background-image:
    radial-gradient(circle at 20% 80%, rgba(104,159,56,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,193,7,0.08) 0%, transparent 40%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(76,175,80,0.04) 28px,
      rgba(76,175,80,0.04) 29px
    );
  background-attachment: fixed;
}

/* 顶部栏 - 木质风格 */
.topbar {
  background: linear-gradient(180deg, #8D6E63 0%, #6D4C41 100%);
  border-bottom: 3px solid #4E342E;
  box-shadow: 0 2px 8px rgba(78,52,46,0.3);
}
.topbar-logo { color: #FFECB3; }
.topbar-logo .logo-mark {
  background: linear-gradient(135deg, #66BB6A, #2E7D32);
  border: 2px solid #1B5E20;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.topbar-search input {
  background: #FFFDE7;
  border: 2px solid #A1887F;
  color: #3E2723;
}
.topbar-search input:focus {
  border-color: #66BB6A;
  box-shadow: 0 0 0 3px rgba(102,187,106,0.25);
}
.topbar-search .search-icon { color: #8D6E63; }
.topbar-meta { color: #D7CCC8; }
.topbar-meta .version-badge {
  background: #FFECB3;
  color: #5D4037;
  border: 1px solid #FFC107;
}
.menu-toggle {
  background: #A1887F;
  border: 1px solid #6D4C41;
  color: #FFFDE7;
}

/* 侧边栏 - 羊皮纸+木质 */
.sidebar {
  background: linear-gradient(180deg, #FFFDE7 0%, #FFF9C4 100%);
  border-right: 3px solid #8D6E63;
  box-shadow: 2px 0 8px rgba(78,52,46,0.15);
}
.sidebar-group-title {
  color: #5D4037;
  background: linear-gradient(90deg, rgba(141,110,99,0.15), transparent);
  border-bottom: 1px dashed #A1887F;
}
.sidebar a {
  color: #33691E;
  border-bottom: 1px solid rgba(165,214,167,0.3);
}
.sidebar a:hover {
  background: rgba(102,187,106,0.12);
  color: #1B5E20;
}
.sidebar a.active {
  color: #1B5E20;
  border-left-color: #2E7D32;
  background: linear-gradient(90deg, rgba(102,187,106,0.2), transparent);
  font-weight: 700;
}

/* Hero - 草坪战场 */
.hero {
  background:
    linear-gradient(135deg, #2E7D32 0%, #388E3C 40%, #66BB6A 100%);
  border: 3px solid #1B5E20;
  box-shadow: 0 6px 20px rgba(27,94,32,0.3), inset 0 2px 0 rgba(255,255,255,0.15);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: repeating-linear-gradient(
    90deg,
    #558B2F 0px, #558B2F 20px,
    #689F38 20px, #689F38 40px
  );
  opacity: 0.5;
}
.hero::after {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,213,79,0.4) 0%, transparent 70%);
  border-radius: 50%;
}
.hero h1 { color: #FFECB3; text-shadow: 2px 2px 0 #1B5E20; }
.hero p { color: #C8E6C9; }
.hero-stat .num { color: #FFD54F; text-shadow: 1px 1px 0 #1B5E20; }
.hero-stat .label { color: #A5D6A7; }

/* 豌豆射手装饰 */
.peashooter {
  position: absolute;
  bottom: 30px; right: 40px;
  width: 80px; height: 90px;
  z-index: 2;
  animation: peashooter-bob 2s ease-in-out infinite;
}
@keyframes peashooter-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-6px) rotate(2deg); }
}
.peashooter .head {
  width: 50px; height: 45px;
  background: radial-gradient(circle at 35% 35%, #9CCC65, #66BB6A 60%, #43A047);
  border-radius: 50% 50% 45% 45%;
  border: 3px solid #2E7D32;
  position: relative;
  margin: 0 auto;
}
.peashooter .head::before {
  content: '';
  position: absolute;
  top: 12px; left: 10px;
  width: 10px; height: 12px;
  background: #fff;
  border-radius: 50%;
  border: 2px solid #1B5E20;
}
.peashooter .head::after {
  content: '';
  position: absolute;
  top: 16px; left: 14px;
  width: 5px; height: 6px;
  background: #1B5E20;
  border-radius: 50%;
}
.peashooter .mouth {
  position: absolute;
  top: 24px; right: -6px;
  width: 16px; height: 14px;
  background: #2E7D32;
  border-radius: 0 50% 50% 0;
  border: 2px solid #1B5E20;
  border-left: none;
}
.peashooter .stem {
  width: 10px; height: 35px;
  background: linear-gradient(90deg, #558B2F, #7CB342, #558B2F);
  margin: -2px auto 0;
  border-radius: 0 0 4px 4px;
  border: 2px solid #33691E;
  border-top: none;
}
.peashooter .leaf {
  position: absolute;
  bottom: 18px;
  width: 22px; height: 12px;
  background: #66BB6A;
  border: 2px solid #33691E;
  border-radius: 50% 0 50% 0;
}
.peashooter .leaf.left { left: 8px; transform: rotate(-30deg); }
.peashooter .leaf.right { right: 8px; transform: rotate(30deg) scaleX(-1); }

/* 豌豆子弹 */
.pea {
  position: absolute;
  width: 12px; height: 12px;
  background: radial-gradient(circle at 30% 30%, #AED581, #7CB342 60%, #558B2F);
  border-radius: 50%;
  border: 2px solid #33691E;
  box-shadow: 0 0 6px rgba(124,179,66,0.5);
  animation: pea-shoot 1.5s linear infinite;
}
.pea.p1 { bottom: 60px; right: 100px; animation-delay: 0s; }
.pea.p2 { bottom: 65px; right: 100px; animation-delay: 0.5s; }
.pea.p3 { bottom: 55px; right: 100px; animation-delay: 1s; }
@keyframes pea-shoot {
  0% { transform: translateX(0) scale(1); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translateX(-280px) scale(0.6); opacity: 0; }
}

/* 阳光粒子 */
.sun-particle {
  position: absolute;
  width: 24px; height: 24px;
  background: radial-gradient(circle, #FFEB3B, #FFC107 60%, #FF8F00);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255,193,7,0.6);
  animation: sun-float 4s ease-in-out infinite;
  opacity: 0.7;
}
.sun-particle.s1 { top: 20px; left: 15%; animation-delay: 0s; }
.sun-particle.s2 { top: 50px; left: 45%; animation-delay: 1.2s; }
.sun-particle.s3 { top: 10px; left: 70%; animation-delay: 2.5s; }
@keyframes sun-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(180deg); }
}

/* 章节标题 - 植物风格 */
.section-header {
  border-bottom: 3px solid #66BB6A;
  background: linear-gradient(90deg, rgba(102,187,106,0.08), transparent);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
}
.section-num {
  background: linear-gradient(135deg, #66BB6A, #2E7D32);
  border: 2px solid #1B5E20;
  box-shadow: 0 2px 4px rgba(27,94,32,0.3);
  color: #FFECB3;
}
.section-header h2 { color: #1B5E20; }

.subsection h3 {
  border-left-color: #FFC107;
  color: #33691E;
  background: linear-gradient(90deg, rgba(255,193,7,0.08), transparent);
  padding: 6px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.subsection h4 { color: #2E7D32; }

/* 参数表格 - 植物风格 */
.param-table {
  border: 2px solid #8D6E63;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.param-table thead th {
  background: linear-gradient(180deg, #43A047 0%, #2E7D32 100%);
  color: #FFECB3;
  border-bottom: 2px solid #1B5E20;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}
.param-table tbody tr:nth-child(even) { background: #F1F8E9; }
.param-table tbody tr:hover { background: rgba(255,193,7,0.1); }
.param-table .pname { color: #1B5E20; }
.param-table .pkey {
  background: #FFF9C4;
  color: #5D4037;
  border: 1px solid #FFC107;
}
.param-table .prange { color: #2E7D32; }
.param-table .pdefault { color: #E65100; }

/* 类型标签 */
.ptype.toggle { background: #C8E6C9; color: #1B5E20; border: 1px solid #81C784; }
.ptype.slider { background: #FFF9C4; color: #E65100; border: 1px solid #FFE082; }
.ptype.combo { background: #FFE0B2; color: #BF360C; border: 1px solid #FFCC80; }
.ptype.hotkey { background: #F8BBD0; color: #880E4F; border: 1px solid #F48FB1; }
.ptype.button { background: #B2DFDB; color: #004D40; border: 1px solid #80CBC4; }

/* 选项卡片 */
.option-item {
  background: #FFFDE7;
  border: 2px solid #A5D6A7;
  transition: all var(--transition-base);
}
.option-item:hover {
  border-color: #66BB6A;
  background: #F1F8E9;
  box-shadow: 0 4px 12px rgba(46,125,50,0.15);
  transform: translateY(-2px);
}
.option-item .opt-name { color: #1B5E20; }
.option-item .opt-val { color: #5D4037; background: #FFF9C4; }

/* 枪械芯片 */
.gun-chip {
  background: #FFFDE7;
  border: 2px solid #A5D6A7;
  color: #33691E;
  transition: all var(--transition-fast);
}
.gun-chip:hover {
  border-color: #66BB6A;
  background: #C8E6C9;
  transform: scale(1.05);
}

/* Callout */
.callout.info { background: #E8F5E9; border-color: #43A047; color: #1B5E20; }
.callout.success { background: #F1F8E9; border-color: #7CB342; color: #33691E; }
.callout.warning { background: #FFF8E1; border-color: #FFB300; color: #E65100; }
.callout.danger { background: #FFEBEE; border-color: #E53935; color: #B71C1C; }

/* Badge */
.badge { background: #FFF9C4; color: #5D4037; border-color: #FFE082; }
.badge.primary { background: #C8E6C9; color: #1B5E20; border-color: #81C784; }
.badge.accent { background: #FFF9C4; color: #E65100; border-color: #FFE082; }
.badge.success { background: #DCEDC8; color: #33691E; border-color: #AED581; }

/* 代码 */
code {
  background: #F1F8E9;
  color: #33691E;
  border: 1px solid #A5D6A7;
}
pre {
  background: #1B5E20;
  color: #C8E6C9;
  border: 2px solid #33691E;
}
pre code { background: none; border: none; color: #AED581; }

/* 视频教程 */
.video-tutorial {
  border: 2px solid #8D6E63;
  box-shadow: var(--shadow-md);
}
.video-tutorial-header {
  background: linear-gradient(135deg, #66BB6A 0%, #2E7D32 100%);
  border-bottom: 2px solid #1B5E20;
}
.video-tutorial-link {
  color: #2E7D32;
  border-color: #66BB6A;
}
.video-tutorial-link:hover { background: #2E7D32; color: #FFECB3; }

/* 页脚 */
.footer {
  border-top: 2px solid #8D6E63;
  color: #5D4037;
  background: linear-gradient(180deg, transparent, rgba(141,110,99,0.08));
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #E8F5E9; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #66BB6A, #43A047);
  border-radius: 5px;
  border: 2px solid #E8F5E9;
}
::-webkit-scrollbar-thumb:hover { background: #2E7D32; }
