/* Xshell 收藏分享站 - 静态模板样式 */
:root {
  --primary: #d32f2f;
  --primary-dark: #b71c1c;
  --primary-light: #ef5350;
  --navy: #1a2744;
  --navy-light: #243352;
  --text: #2c3e50;
  --text-muted: #6c757d;
  --bg: #f5f7fa;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(26, 39, 68, 0.08);
  --shadow-lg: 0 8px 32px rgba(26, 39, 68, 0.12);
  --radius: 8px;
  --header-h: 64px;
}

*, *::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(--bg);
  line-height: 1.7;
  padding-bottom: 80px;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.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(--white);
  font-size: 1.25rem;
  font-weight: 600;
}

.logo img { width: 36px; height: 36px; border-radius: 6px; }

.logo:hover { color: var(--white); opacity: 0.9; }

.nav-main { display: flex; gap: 4px; list-style: none; }

.nav-main a {
  color: rgba(255,255,255,0.85);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.95rem;
}

.nav-main a:hover,
.nav-main a.active {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #2a3f6b 100%);
  color: var(--white);
  padding: 80px 24px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(211,47,47,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner { max-width: 800px; margin: 0 auto; position: relative; z-index: 1; }

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  font-size: 1.125rem;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 36px;
}

.badge {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
}

.btn-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(211,47,47,0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(211,47,47,0.5);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
}

.btn-secondary:hover {
  background: #f0f0f0;
  color: var(--navy);
}

/* Container & Sections */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.section { padding: 72px 0; }

.section-title {
  text-align: center;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 48px;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--white);
}

.feature-card h3 {
  font-size: 1.125rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Product Showcase */
.showcase { background: var(--white); }

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.showcase-item:nth-child(even) .showcase-content { order: 2; }
.showcase-item:nth-child(even) .showcase-img { order: 1; }

.showcase-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.showcase-content h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 16px;
}

.showcase-content p { color: var(--text-muted); margin-bottom: 20px; }

.showcase-list {
  list-style: none;
  margin-bottom: 24px;
}

.showcase-list li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text);
}

.showcase-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* Download Section */
.download-section {
  background: linear-gradient(180deg, var(--bg) 0%, #eef1f6 100%);
}

.download-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.download-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 2px solid transparent;
  transition: border-color 0.25s;
}

.download-card:hover { border-color: var(--primary); }

.download-card .icon { font-size: 2.5rem; margin-bottom: 16px; }

.download-card h3 { color: var(--navy); margin-bottom: 8px; }

.download-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

/* Tutorial Cards */
.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.tutorial-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.25s;
}

.tutorial-card:hover { transform: translateY(-4px); }

.tutorial-card-body { padding: 24px; }

.tutorial-card h3 { color: var(--navy); margin-bottom: 8px; font-size: 1.05rem; }

.tutorial-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }

.tutorial-tag {
  display: inline-block;
  background: rgba(211,47,47,0.1);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Article / Tutorial Page */
.article-header {
  background: var(--navy);
  color: var(--white);
  padding: 48px 24px;
}

.article-header h1 { font-size: 1.75rem; margin-bottom: 12px; }

.article-meta { opacity: 0.8; font-size: 0.9rem; }

.article-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 48px 24px 72px;
  background: var(--white);
  margin-top: -24px;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--shadow);
}

.article-body h2 {
  color: var(--navy);
  font-size: 1.35rem;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.article-body h2:first-child { margin-top: 0; }

.article-body p { margin-bottom: 16px; color: var(--text); }

.article-body ul, .article-body ol {
  margin: 0 0 20px 24px;
  color: var(--text);
}

.article-body li { margin-bottom: 8px; }

.article-body code {
  background: #f1f3f5;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
  color: var(--primary-dark);
}

.article-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 20px;
  border-radius: var(--radius);
  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: #fff8e1;
  border-left: 4px solid #ffc107;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.tip-box strong { color: #f57f17; }

.breadcrumb {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }

.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--primary);
  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 24px 20px;
  color: var(--text-muted);
  line-height: 1.8;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 48px 24px 32px;
  margin-top: 48px;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-grid h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.footer-grid ul { list-style: none; }

.footer-grid li { margin-bottom: 8px; }

.footer-grid a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--white); }

.footer-disclaimer {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.8rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
}

.footer-disclaimer p { margin-bottom: 8px; }

.footer-copy {
  text-align: center;
  margin-top: 24px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* Floating Download Bar */
.float-download {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.float-download.visible { transform: translateY(0); }

.float-download-text {
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 500;
}

.float-download-text span { color: var(--primary); }

.float-download .btn { padding: 10px 24px; font-size: 0.9rem; }

.float-download .btn-baidu { background: #2932e1; color: #fff; }
.float-download .btn-baidu:hover { background: #1a22b8; color: #fff; }

.float-download .btn-quark { background: #00b4d8; color: #fff; }
.float-download .btn-quark:hover { background: #0096b4; color: #fff; }

/* Download Modal */
.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(26, 39, 68, 0.65);
}

.download-modal-box {
  position: relative;
  z-index: 1;
  background: var(--white);
  border-radius: 12px;
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.download-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.75rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.download-modal-close:hover {
  color: var(--text);
  background: var(--bg);
}

.download-modal-title {
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 8px;
  text-align: center;
}

.download-modal-desc {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.download-modal-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.download-modal-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  transition: all 0.25s;
  color: var(--text);
  position: relative;
}

.download-modal-quark {
  border-color: rgba(0, 180, 216, 0.35);
}

.download-modal-recommend {
  position: absolute;
  top: -10px;
  right: 14px;
  background: linear-gradient(135deg, #ff6b35, #f7931e);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  line-height: 1.4;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
}

.download-modal-option:hover {
  border-color: transparent;
  transform: translateX(4px);
  color: var(--text);
}

.download-modal-baidu:hover {
  background: rgba(41, 50, 225, 0.08);
  border-color: #2932e1;
}

.download-modal-quark:hover {
  background: rgba(0, 180, 216, 0.08);
  border-color: #00b4d8;
}

.download-modal-icon { font-size: 1.75rem; flex-shrink: 0; }

.download-modal-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.download-modal-info strong {
  font-size: 1.05rem;
  color: var(--navy);
}

.download-modal-info small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.download-modal-arrow {
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.download-modal-option:hover .download-modal-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

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: 768px) {
  .nav-main {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--navy-light);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow);
  }

  .nav-main.open { display: flex; }

  .nav-toggle { display: block; }

  .showcase-grid { grid-template-columns: 1fr; }

  .showcase-item:nth-child(even) .showcase-content,
  .showcase-item:nth-child(even) .showcase-img { order: unset; }

  .hero { padding: 56px 20px 72px; }

  .float-download {
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
  }

  .float-download-text { font-size: 0.85rem; text-align: center; }

  body { padding-bottom: 120px; }
}
