/* ===== Docs Style ===== */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --accent: #06b6d4;
  --accent-2: #f59e0b;
  --bg: #ffffff;
  --bg-2: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #f8fafc;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --gradient-1: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --gradient-2: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px -5px rgba(79,70,229,0.15);
  --shadow-xl: 0 20px 50px -12px rgba(79,70,229,0.2);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 60px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo img { height: 40px; width: auto; }
.logo span { font-size: 1.2rem; font-weight: 700; color: var(--text); }
.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.2s;
  font-family: inherit;
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.nav-cta {
  background: var(--gradient-1) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600 !important;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ===== Docs Layout ===== */
.docs-wrapper {
  padding-top: 60px;
  min-height: 100vh;
}

/* ===== Hero ===== */
.docs-hero {
  padding: 70px 2rem 50px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  position: relative;
  overflow: hidden;
}
.docs-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}
.docs-hero h1 {
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--text);
}

/* ===== Manual Cards ===== */
.manuals-grid {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 2rem 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.manual-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.manual-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.manual-card.word::before { background: var(--gradient-1); }
.manual-card.pdf::before { background: var(--gradient-2); }
.manual-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary);
}
.manual-card-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 1.2rem;
}
.manual-card.word .manual-card-icon { background: linear-gradient(135deg, rgba(79,70,229,0.1), rgba(6,182,212,0.1)); }
.manual-card.pdf .manual-card-icon { background: linear-gradient(135deg, rgba(245,158,11,0.1), rgba(239,68,68,0.1)); }
.manual-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.manual-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.2rem; }
.manual-card-arrow { color: var(--primary); font-weight: 600; font-size: 0.88rem; }

/* ===== Page Header (for sub-pages) ===== */
.page-hero {
  padding: 50px 2rem 40px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.page-hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}
.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.page-hero h1 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 0.8rem;
}
.page-hero .subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
}
.tag-wps { background: rgba(79,70,229,0.1); color: var(--primary); }
.tag-win { background: rgba(245,158,11,0.1); color: var(--accent-2); }
.tag-free { background: rgba(16,185,129,0.1); color: #10b981; }

/* ===== Sidebar + Content ===== */
.content-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 80px;
  display: flex;
  gap: 0;
}

/* Sidebar */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg-sidebar);
  padding: 2rem 0;
}
.sidebar-group { margin-bottom: 1.5rem; }
.sidebar-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  padding: 0 1rem;
  margin-bottom: 0.5rem;
}
.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: block;
  padding: 0.45rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.15s;
}
.sidebar-nav li a:hover { background: rgba(79,70,229,0.07); color: var(--primary); }
.sidebar-nav li a.active { background: rgba(79,70,229,0.12); color: var(--primary); font-weight: 600; }
.sidebar-nav li a .tag {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
  margin-left: 4px;
}
.tag-hot { background: rgba(239,68,68,0.1); color: #ef4444; }

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
  padding: 2.5rem 2rem 4rem;
}

/* ===== Section ===== */
.doc-section { margin-bottom: 2.5rem; }
.section-heading {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}
.section-heading .num {
  width: 28px; height: 28px;
  background: var(--gradient-1);
  border-radius: 7px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== Info Card ===== */
.info-card {
  background: rgba(79,70,229,0.04);
  border: 1px solid rgba(79,70,229,0.1);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.8rem 1.2rem;
  margin: 1rem 0;
}
.info-card h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.info-card p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 0.15rem; }
.info-card p:last-child { margin-bottom: 0; }
.info-card.warn {
  background: rgba(245,158,11,0.04);
  border-color: rgba(245,158,11,0.1);
  border-left-color: var(--accent-2);
}
.info-card.success {
  background: rgba(16,185,129,0.04);
  border-color: rgba(16,185,129,0.1);
  border-left-color: #10b981;
}

/* ===== Steps ===== */
.step-list { margin: 1rem 0; }
.step-item {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}
.step-badge {
  flex-shrink: 0;
  width: 30px; height: 30px;
  background: var(--gradient-1);
  border-radius: 8px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.step-body h4 { font-size: 0.95rem; font-weight: 600; color: var(--text); margin-bottom: 0.2rem; }
.step-body p { font-size: 0.88rem; color: var(--text-secondary); }

/* ===== Feature List ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
  margin: 1rem 0;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 0.8rem;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.feature-item .emoji { font-size: 1rem; flex-shrink: 0; }
.feature-item strong { color: var(--text); font-weight: 600; }

/* ===== Screenshot ===== */
.screenshot {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 1.2rem 0;
  border: 1px solid var(--border);
}
.screenshot img { width: 100%; height: auto; max-height: 500px; display: block; }
.screenshot .caption {
  padding: 0.6rem 1rem;
  background: var(--bg-2);
  font-size: 0.8rem;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
}

/* ===== Table ===== */
table.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.88rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
table.docs-table th {
  background: var(--bg-2);
  font-weight: 600;
  color: var(--text);
  padding: 0.6rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.docs-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
table.docs-table tr:last-child td { border-bottom: none; }

/* ===== Typography ===== */
.doc-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.doc-section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.doc-section p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.6rem; }
.doc-section ul { padding-left: 1.3rem; margin-bottom: 0.7rem; }
.doc-section li { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 0.25rem; }

/* ===== Divider ===== */
.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* ===== Footer ===== */
.docs-footer {
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.docs-footer .contact-list { display: flex; gap: 1rem; font-size: 0.83rem; color: var(--text-secondary); }
.docs-footer .version { font-size: 0.75rem; color: var(--text-muted); }

/* ===== Site Footer ===== */
.site-footer { padding: 1.5rem; text-align: center; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.83rem; }

/* ===== Mobile Nav ===== */
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 4px; color: var(--text); }
.mobile-nav { display: none; position: fixed; top: 64px; left: 0; right: 0; background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 1rem 2rem; z-index: 99; box-shadow: var(--shadow-md); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 0.8rem 0; color: var(--text-secondary); text-decoration: none; font-size: 1rem; border-bottom: 1px solid var(--border); }
.mobile-nav a:last-child { border-bottom: none; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .manuals-grid { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main-content { padding: 1.5rem 0; }
  .content-layout { padding: 0 1rem 40px; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
}

/* ===== Dark Theme ===== */
body.dark {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --accent: #22d3ee;
  --accent-2: #fbbf24;
  --bg: #0f172a;
  --bg-2: #1e293b;
  --bg-card: #1e293b;
  --bg-sidebar: #1e293b;
  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 25px -5px rgba(99,102,241,0.2);
  --shadow-xl: 0 20px 50px -12px rgba(99,102,241,0.25);
}
body.dark { background: var(--bg); color: var(--text); }
body.dark .docs-hero, body.dark .page-hero { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
body.dark .sidebar { background: var(--bg-sidebar); border-right-color: var(--border); }
body.dark .navbar { background: rgba(15,23,42,0.95); border-bottom-color: var(--border); }
body.dark .manual-card { background: var(--bg-card); border-color: var(--border); }
body.dark .info-card { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.2); }
body.dark .info-card h5, body.dark .info-card p { color: var(--text); }
body.dark .docs-table th { background: var(--bg-2); color: var(--text); border-color: var(--border); }
body.dark .docs-table td { border-color: var(--border); }
body.dark .feature-item { background: var(--bg-2); border-color: var(--border); }
body.dark .screenshot { border-color: var(--border); }
body.dark .screenshot .caption { background: var(--bg-2); border-color: var(--border); }
/* ===== Lightbox ===== */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
