/* 终端连接手册：清爽的技术资料站样式 */
:root {
  --ink: #18212b;
  --ink-soft: #2a3642;
  --coral: #e4572e;
  --coral-dark: #b83b1d;
  --teal: #167d7f;
  --teal-dark: #0d5b5d;
  --text: #26313a;
  --text-muted: #67737c;
  --paper: #f3f5f4;
  --white: #ffffff;
  --line: #d9dfdd;
  --line-dark: #b6c0bd;
  --gold: #d69a2d;
  --shadow: 0 10px 28px rgba(24, 33, 43, 0.08);
  --shadow-lg: 0 18px 45px rgba(24, 33, 43, 0.14);
  --radius: 5px;
  --header-h: 72px;
}

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

html { scroll-behavior: smooth; font-size: 16px; scrollbar-gutter: stable; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--paper);
  line-height: 1.75;
  padding-bottom: 78px;
}

a { color: var(--coral); text-decoration: none; transition: color 0.2s, border-color 0.2s, background-color 0.2s; }
a:hover { color: var(--coral-dark); }

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 1.12rem; font-weight: 750; }
.logo img { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--coral); }
.logo:hover { color: var(--coral); }

.nav-main { display: flex; gap: 5px; list-style: none; }
.nav-main a { display: block; color: var(--text-muted); padding: 22px 13px 17px; border-bottom: 3px solid transparent; font-size: 0.9rem; font-weight: 600; }
.nav-main a:hover, .nav-main a.active { color: var(--ink); border-bottom-color: var(--coral); }

.nav-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--ink); font-size: 1.35rem; cursor: pointer; padding: 5px 10px; border-radius: 3px; }

/* Hero */
.hero { background: var(--ink); color: var(--white); padding: 86px 24px 94px; text-align: left; border-bottom: 5px solid var(--coral); }
.hero-inner { max-width: 1200px; margin: 0 auto; }
.hero h1 { max-width: 850px; font-size: clamp(2rem, 4vw, 3.45rem); line-height: 1.2; font-weight: 760; margin-bottom: 20px; }
.hero .subtitle { max-width: 720px; color: rgba(255,255,255,0.76); font-size: 1.08rem; margin-bottom: 30px; line-height: 1.9; }
.hero-badges { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; margin-bottom: 34px; }
.badge { background: transparent; border: 1px solid rgba(255,255,255,0.32); padding: 5px 12px; border-radius: 3px; color: rgba(255,255,255,0.86); font-size: 0.8rem; }

.btn-group { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 3px; font-size: 0.94rem; font-weight: 700; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--coral); color: var(--white); border-color: var(--coral); box-shadow: 0 4px 0 rgba(0,0,0,0.15); }
.btn-primary:hover { background: var(--coral-dark); color: var(--white); border-color: var(--coral-dark); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-outline:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-secondary { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-secondary:hover { background: var(--teal); color: var(--white); border-color: var(--teal); }

/* Container and sections */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 82px 0; }
.section-title { max-width: 760px; text-align: left; font-size: 2rem; line-height: 1.25; font-weight: 760; color: var(--ink); margin-bottom: 12px; }
.section-desc { max-width: 700px; text-align: left; color: var(--text-muted); margin: 0 0 38px; }

/* Feature list */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature-card { min-height: 190px; background: var(--white); padding: 28px 26px 24px; border-top: 3px solid transparent; transition: border-color 0.2s, background-color 0.2s; }
.feature-card:hover { border-top-color: var(--coral); background: #fffaf8; }
.feature-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; margin-bottom: 18px; border-radius: 3px; background: var(--teal); color: var(--white); font-size: 1.2rem; }
.feature-card h3 { font-size: 1.08rem; color: var(--ink); margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }

/* Showcase */
.showcase { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.showcase-grid { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 58px; align-items: center; }
.showcase-item:nth-child(even) .showcase-content { order: 2; }
.showcase-item:nth-child(even) .showcase-img { order: 1; }
.showcase-img { overflow: hidden; border: 1px solid var(--line-dark); box-shadow: var(--shadow-lg); background: var(--paper); }
.showcase-content h3 { font-size: 1.55rem; line-height: 1.35; color: var(--ink); margin-bottom: 14px; }
.showcase-content p { color: var(--text-muted); margin-bottom: 18px; }
.showcase-list { list-style: none; margin-bottom: 24px; }
.showcase-list li { padding: 7px 0 7px 25px; position: relative; color: var(--text); }
.showcase-list li::before { content: ""; position: absolute; left: 0; top: 17px; width: 9px; height: 3px; background: var(--coral); }

/* Download and article cards */
.download-section { background: #e8efed; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.download-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; max-width: 820px; margin: 0 auto; }
.download-card { background: var(--white); padding: 30px; text-align: left; border: 1px solid var(--line-dark); border-top: 4px solid var(--teal); transition: border-top-color 0.2s, box-shadow 0.2s; }
.download-card:hover { border-top-color: var(--coral); box-shadow: var(--shadow); }
.download-card .icon { font-size: 2rem; margin-bottom: 13px; }
.download-card h3 { color: var(--ink); margin-bottom: 8px; }
.download-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 21px; }

.tutorial-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tutorial-card { min-height: 235px; display: block; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--teal); transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.tutorial-card:hover { border-left-color: var(--coral); box-shadow: var(--shadow); transform: translateY(-3px); }
.tutorial-card-body { padding: 23px 20px; }
.tutorial-card h3 { color: var(--ink); margin-bottom: 8px; font-size: 1.03rem; line-height: 1.45; }
.tutorial-card p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.65; margin-bottom: 18px; }
.tutorial-tag { display: inline-block; background: #e8efed; color: var(--teal-dark); padding: 3px 8px; border-radius: 2px; font-size: 0.72rem; font-weight: 750; margin-bottom: 12px; }

/* Article */
.article-header { background: var(--teal); color: var(--white); padding: 54px 24px 62px; border-bottom: 5px solid var(--coral); }
.article-header h1 { max-width: 900px; font-size: clamp(1.9rem, 4vw, 2.65rem); line-height: 1.25; margin-bottom: 12px; }
.article-meta { color: rgba(255,255,255,0.78); font-size: 0.88rem; }
.article-body { max-width: 850px; margin: 0 auto; padding: 54px 32px 76px; background: var(--white); border-left: 4px solid var(--coral); box-shadow: var(--shadow); }
.article-body img { width: 100%; border: 1px solid var(--line-dark); margin: 26px 0; }
.article-body h2 { color: var(--ink); font-size: 1.42rem; line-height: 1.35; margin: 38px 0 15px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.article-body h2:first-child { margin-top: 0; }
.article-body p { margin-bottom: 17px; color: var(--text); }
.article-body ul, .article-body ol { margin: 0 0 22px 23px; color: var(--text); }
.article-body li { margin-bottom: 8px; }
.article-body code { background: #edf1f0; padding: 2px 7px; border-radius: 3px; font-family: Consolas, "Courier New", monospace; font-size: 0.9em; color: var(--coral-dark); }
.article-body pre { background: var(--ink); color: #e7eeec; padding: 20px; border-radius: 3px; overflow-x: auto; margin: 20px 0; font-size: 0.875rem; line-height: 1.6; }
.article-body pre code { background: none; padding: 0; color: inherit; }
.tip-box { background: #fff7e5; border-left: 4px solid var(--gold); padding: 16px 20px; margin: 24px 0; color: var(--text); }
.tip-box strong { color: #9b680f; }
.breadcrumb { max-width: 1200px; margin: 0 auto; padding: 17px 24px; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumb a { color: var(--teal-dark); }
.breadcrumb a:hover { color: var(--coral); }

/* FAQ */
.faq-list { max-width: 850px; margin: 0 auto; border-top: 1px solid var(--line-dark); }
.faq-item { background: var(--white); border: 1px solid var(--line-dark); border-top: none; overflow: hidden; }
.faq-question { width: 100%; text-align: left; padding: 19px 22px; background: none; border: none; font-size: 1rem; font-weight: 700; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question:hover { color: var(--coral); background: #fffaf8; }
.faq-question::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--coral); transition: transform 0.2s; }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer-inner { padding: 0 22px 20px; color: var(--text-muted); line-height: 1.8; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.72); padding: 52px 24px 32px; margin-top: 0; }
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(200px, 1fr)); gap: 32px; margin-bottom: 35px; }
.footer-grid h4 { color: var(--white); font-size: 0.92rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 7px; }
.footer-grid a { color: rgba(255,255,255,0.68); font-size: 0.88rem; }
.footer-grid a:hover { color: var(--white); }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,0.16); padding-top: 22px; font-size: 0.78rem; line-height: 1.8; color: rgba(255,255,255,0.48); }
.footer-disclaimer p { margin-bottom: 8px; }
.footer-stats { text-align: center; margin-top: 24px; font-size: 0.82rem; color: rgba(255,255,255,0.55); }
.footer-copy { text-align: center; margin-top: 11px; font-size: 0.78rem; color: rgba(255,255,255,0.38); }

/* Floating bar and modal */
.float-download { position: fixed; bottom: 0; left: 0; right: 0; z-index: 200; background: var(--white); border-top: 1px solid var(--line-dark); box-shadow: 0 -5px 20px rgba(24,33,43,0.12); padding: 11px 24px; display: flex; align-items: center; justify-content: center; gap: 13px; transform: translateY(100%); transition: transform 0.35s ease; }
.float-download.visible { transform: translateY(0); }
.float-download-text { font-size: 0.9rem; color: var(--text); font-weight: 650; }
.float-download-text span { color: var(--coral); }
.float-download .btn { padding: 8px 17px; font-size: 0.82rem; }
.float-download .btn-baidu { background: #3157c9; color: var(--white); border-color: #3157c9; }
.float-download .btn-baidu:hover { background: #2443a1; color: var(--white); }
.float-download .btn-quark { background: var(--teal); color: var(--white); border-color: var(--teal); }
.float-download .btn-quark:hover { background: var(--teal-dark); color: var(--white); }

.download-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s ease, visibility 0s linear 0.25s; }
.download-modal.active { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.25s ease, visibility 0s linear 0s; }
.download-modal-overlay { position: absolute; inset: 0; background: rgba(24,33,43,0.78); }
.download-modal-box { position: relative; z-index: 1; background: var(--white); border-top: 5px solid var(--coral); padding: 34px 30px 27px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,0.28); }
.download-modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 1.65rem; color: var(--text-muted); cursor: pointer; line-height: 1; padding: 4px 8px; border-radius: 3px; }
.download-modal-close:hover { color: var(--ink); background: var(--paper); }
.download-modal-title { font-size: 1.3rem; color: var(--ink); margin-bottom: 7px; text-align: center; }
.download-modal-desc { text-align: center; color: var(--text-muted); font-size: 0.86rem; margin-bottom: 25px; }
.download-modal-options { display: flex; flex-direction: column; gap: 11px; }
.download-modal-option { display: flex; align-items: center; gap: 15px; padding: 16px 18px; border: 1px solid var(--line-dark); color: var(--text); position: relative; }
.download-modal-option:hover { border-color: var(--coral); background: #fffaf8; color: var(--text); }
.download-modal-icon { font-size: 1.6rem; flex-shrink: 0; }
.download-modal-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.download-modal-info strong { font-size: 1rem; color: var(--ink); }
.download-modal-info small { font-size: 0.78rem; color: var(--text-muted); }
.download-modal-arrow { font-size: 1.2rem; color: var(--text-muted); transition: transform 0.2s; }
.download-modal-option:hover .download-modal-arrow { transform: translateX(4px); color: var(--coral); }
body.modal-open { overflow: hidden; position: fixed; width: 100%; left: 0; right: 0; }
body.modal-open .site-header, body.modal-open .float-download { padding-right: var(--scrollbar-width, 0px); }

/* Responsive */
@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .tutorial-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-inner { height: 64px; }
  :root { --header-h: 64px; }
  .nav-main { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--white); flex-direction: column; padding: 8px 18px 14px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-main a { padding: 11px 4px 9px; border-bottom: 1px solid var(--line); }
  .nav-main a.active { border-bottom-color: var(--coral); }
  .nav-main.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { padding: 61px 20px 70px; }
  .hero h1 { font-size: 2.15rem; }
  .hero .subtitle { font-size: 1rem; }
  .container { padding: 0 20px; }
  .section { padding: 62px 0; }
  .section-title { font-size: 1.7rem; }
  .features-grid, .tutorial-grid { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: 1fr; gap: 30px; }
  .showcase-item:nth-child(even) .showcase-content, .showcase-item:nth-child(even) .showcase-img { order: unset; }
  .article-header { padding: 42px 20px 49px; }
  .article-header h1 { font-size: 2rem; }
  .article-body { padding: 38px 20px 55px; border-left-width: 3px; }
  .breadcrumb { padding: 14px 20px; }
  .float-download { flex-direction: column; gap: 8px; padding: 11px 16px 13px; }
  .float-download-text { font-size: 0.82rem; text-align: center; }
  body { padding-bottom: 126px; }
}
