/* OpenClaw 中文站 - 全局样式 */
:root {
  --bg: #0a0a0f;
  --bg2: #13131a;
  --bg3: #1a1a24;
  --accent: #ff6b35;
  --accent2: #4ecdc4;
  --text: #e8e8e8;
  --text2: #aaa;
  --text3: #666;
  --border: rgba(255,255,255,0.08);
  --card-bg: rgba(255,255,255,0.04);
  --radius: 12px;
  --font: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
}
.nav-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.nav-logo:hover { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
  flex: 1;
}
.nav-links a {
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-right {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #e55a25; color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255,107,53,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(78,205,196,0.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 800px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,107,53,0.12);
  border: 1px solid rgba(255,107,53,0.3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 32px;
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text2);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-cta .btn { padding: 12px 28px; font-size: 16px; }

/* ── SECTIONS ── */
section {
  padding: 80px 24px;
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.section-sub {
  color: var(--text2);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 48px;
}

/* ── FEATURES GRID ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: rgba(255,107,53,0.3);
  transform: translateY(-2px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,107,53,0.1);
  border: 1px solid rgba(255,107,53,0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 22px; height: 22px; color: var(--accent); }
.lucide { display: inline-flex; align-items: center; justify-content: center; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.doc-card .card-icon { width: 36px; height: 36px; background: rgba(78,205,196,0.1); border: 1px solid rgba(78,205,196,0.2); border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.doc-card .card-icon svg { width: 18px; height: 18px; color: var(--accent2); }
.docs-content h1 svg { width: 28px; height: 28px; color: var(--accent); vertical-align: middle; margin-right: 8px; }
.flow-item svg { width: 16px; height: 16px; vertical-align: middle; margin-right: 6px; }
.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.6;
}

/* ── TESTIMONIALS ── */
.testimonials {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.testimonial-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}
.testimonial-card:hover { border-color: rgba(78,205,196,0.3); }
.testimonial-card p {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
}
.testimonial-author {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent2);
}

/* ── HOW IT WORKS ── */
.flow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 40px;
}
.flow-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
}
.flow-arrow {
  color: var(--accent);
  font-size: 1.4rem;
}

/* ── QUICKSTART ── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 700px;
}
.step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}
.step-content h3 { font-size: 1rem; margin-bottom: 8px; }
.step-content p { font-size: 0.9rem; color: var(--text2); margin-bottom: 10px; }

/* ── CODE BLOCKS ── */
pre {
  background: #0d0d14;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
}
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 4px;
}
pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}
.code-comment { color: #555; }
.code-cmd { color: var(--accent2); }
.code-flag { color: #c792ea; }
.code-str { color: #c3e88d; }

/* ── FOOTER ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  text-align: center;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-logo {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.footer-links a { font-size: 14px; color: var(--text3); }
.footer-links a:hover { color: var(--text); }
.footer-copy {
  font-size: 13px;
  color: var(--text3);
}

/* ── DOCS LAYOUT ── */
.docs-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 60px;
}
.docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 32px 0;
  position: fixed;
  top: 60px;
  bottom: 0;
  overflow-y: auto;
}
.sidebar-section {
  padding: 0 20px;
  margin-bottom: 28px;
}
.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
  padding: 0 4px;
}
.sidebar-link {
  display: block;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text2);
  transition: all 0.15s;
  margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--card-bg); color: var(--text); }
.sidebar-link.active { background: rgba(255,107,53,0.12); color: var(--accent); }
.docs-content {
  flex: 1;
  margin-left: 260px;
  padding: 48px 48px 80px;
  max-width: 900px;
}
.docs-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.docs-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 40px 0 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.docs-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text);
}
.docs-content p { color: var(--text2); margin-bottom: 16px; line-height: 1.8; }
.docs-content ul, .docs-content ol {
  color: var(--text2);
  padding-left: 24px;
  margin-bottom: 16px;
}
.docs-content li { margin-bottom: 6px; line-height: 1.7; }
.docs-content pre { margin-bottom: 20px; }
.docs-lead {
  font-size: 1.1rem;
  color: var(--text2);
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

/* ── INFO BOXES ── */
.info-box {
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  border-left: 3px solid;
}
.info-box.tip { background: rgba(78,205,196,0.08); border-color: var(--accent2); }
.info-box.note { background: rgba(255,107,53,0.08); border-color: var(--accent); }
.info-box.check { background: rgba(100,200,100,0.08); border-color: #6dbd6d; }
.info-box strong { color: var(--text); }

/* ── CARD GRID (DOCS) ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.doc-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s, transform 0.15s;
}
.doc-card:hover { border-color: rgba(78,205,196,0.3); transform: translateY(-2px); color: inherit; }
.doc-card h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.doc-card p { font-size: 0.85rem; color: var(--text2); }

/* ── TABLE ── */
table { width: 100%; border-collapse: collapse; margin-bottom: 24px; font-size: 0.9rem; }
th { background: var(--bg3); color: var(--text); font-weight: 600; padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border); }
td { padding: 10px 16px; color: var(--text2); border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }

/* ── BADGE ── */
.badge { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.badge-green { background: rgba(109,189,109,0.15); color: #6dbd6d; }
.badge-blue { background: rgba(78,205,196,0.15); color: var(--accent2); }

/* ── HAMBURGER ── */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
  margin-left: auto;
}
.nav-hamburger svg { width: 20px; height: 20px; display: block; }

/* Mobile drawer */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  background: rgba(10,10,15,0.98);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px 24px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text2);
  font-size: 15px;
  font-weight: 500;
  transition: all 0.15s;
}
.mobile-menu a:hover { background: var(--card-bg); color: var(--text); }
.mobile-menu .mobile-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}
.mobile-menu .btn { width: 100%; justify-content: center; margin-top: 4px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .docs-sidebar { display: none; }
  .docs-content { margin-left: 0; padding: 32px 20px; }
  .nav-links { display: none; }
  .nav-right { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: 90px 20px 50px; }
  section { padding: 60px 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
}
