/* ============================================
   Xshell 终端模拟器下载站 - 公共样式
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  color: #333;
  background: #f5f7fa;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: #00A86B; text-decoration: none; }
a:hover { color: #008b56; }
img { max-width: 100%; height: auto; display: block; }

/* Container */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header / Navigation */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e8ecf1;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
}
.logo img { width: 32px; height: 32px; }
.logo:hover { color: #00A86B; }

.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a {
  display: block;
  padding: 6px 16px;
  font-size: 14px;
  color: #555;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
  font-weight: 500;
}
.nav-links a:hover { background: #f0f4f8; color: #00A86B; }
.nav-links a.active { background: #e8f5e9; color: #00A86B; font-weight: 600; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  padding: 4px 8px;
}

/* Buttons - Compact */
.btn {
  display: inline-block;
  padding: 5px 16px;
  font-size: 13px;
  border-radius: 4px;
  box-shadow: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  text-align: center;
  transition: background 0.15s, color 0.15s;
  line-height: 1.5;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #00A86B, #1a73e8);
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(135deg, #008b56, #1565c0); color: #fff; }
.btn-green {
  background: #00A86B;
  color: #fff;
}
.btn-green:hover { background: #008b56; color: #fff; }
.btn-blue {
  background: #1a73e8;
  color: #fff;
}
.btn-blue:hover { background: #1565c0; color: #fff; }
.btn-outline {
  background: #fff;
  color: #1a73e8;
  border: 1px solid #1a73e8;
}
.btn-outline:hover { background: #e6f2fc; }
.btn-white {
  background: #fff;
  color: #00A86B;
}
.btn-white:hover { background: #f0faf3; }
.btn-lg { padding: 10px 28px; font-size: 15px; border-radius: 6px; }
.btn-block { display: block; width: 100%; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0a0e27 0%, #121a2f 40%, #0a3320 100%);
  color: #fff;
  padding: 60px 0 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0,168,107,0.12) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(26,115,232,0.10) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; }
.hero-icon { width: 80px; height: 80px; margin: 0 auto 16px; }
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.5px; }
.hero .subtitle { font-size: 16px; color: #b0c4d8; margin-bottom: 24px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero .tagline { font-size: 13px; color: #8aa0b8; margin-bottom: 24px; }
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Stats Bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 20px 0;
  margin-top: 12px;
}
.stat-item { text-align: center; }
.stat-item .stat-num { font-size: 28px; font-weight: 700; color: #fff; display: block; }
.stat-item .stat-label { font-size: 12px; color: #8aa0b8; }

/* Sections */
.section {
  padding: 48px 0;
}
.section-dark {
  background: #f0f4f8;
}
.section-title {
  text-align: center;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #1a1a2e;
}
.section-desc {
  text-align: center;
  color: #777;
  font-size: 14px;
  margin-bottom: 32px;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: #fff;
  border-radius: 8px;
  padding: 24px 20px;
  transition: box-shadow 0.2s;
  border: 1px solid #eef1f5;
}
.feature-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.feature-card .fc-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 12px;
}
.feature-card h3 { font-size: 16px; margin-bottom: 6px; color: #1a1a2e; }
.feature-card p { font-size: 13px; color: #666; line-height: 1.6; }

.icon-terminal { background: #e3f2fd; color: #1a73e8; }
.icon-ssh { background: #e8f5e9; color: #00A86B; }
.icon-sftp { background: #f3e5f5; color: #7c4dff; }
.icon-tab { background: #fff3e0; color: #f57c00; }
.icon-script { background: #e0f7fa; color: #00838f; }
.icon-sync { background: #fce4ec; color: #c62828; }

/* Screenshot Area */
.screenshot-area {
  text-align: center;
}
.screenshot-area img {
  max-width: 900px;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  margin: 0 auto;
  border: 1px solid #e0e4e8;
}

/* Platform Cards */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.platform-card {
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 20px 16px;
  text-align: center;
  transition: box-shadow 0.2s;
}
.platform-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.platform-card .pf-icon { font-size: 36px; margin-bottom: 8px; }
.platform-card h4 { font-size: 15px; color: #1a1a2e; margin-bottom: 4px; }
.platform-card .pf-ver { font-size: 12px; color: #999; margin-bottom: 12px; }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 6px;
  margin-bottom: 10px;
  padding: 16px 20px;
}
.faq-item h4 { font-size: 14px; color: #1a1a2e; margin-bottom: 4px; }
.faq-item p { font-size: 13px; color: #666; margin-top: 8px; line-height: 1.7; }
.faq-item .faq-q { color: #00A86B; margin-right: 8px; font-weight: 700; }

/* Use Cases Grid */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.usecase-card {
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.2s;
}
.usecase-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.usecase-card h4 { font-size: 15px; color: #1a1a2e; margin-bottom: 6px; }
.usecase-card p { font-size: 13px; color: #666; line-height: 1.6; }
.usecase-card .uc-icon { font-size: 28px; margin-bottom: 8px; display: block; }

/* Download Page Specific */
.download-hero {
  background: linear-gradient(135deg, #0a0e27, #0a3320);
  color: #fff;
  padding: 40px 0 36px;
  text-align: center;
}
.download-hero h1 { font-size: 30px; font-weight: 700; }
.download-hero p { color: #b0c4d8; font-size: 14px; margin-top: 6px; }

.dl-platform-section {
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 16px;
}
.dl-platform-section h3 {
  font-size: 18px;
  border-bottom: 2px solid #00A86B;
  padding-bottom: 10px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl-platform-section .dl-info {
  font-size: 13px;
  color: #666;
  margin-bottom: 14px;
  line-height: 1.7;
}
.dl-buttons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dl-buttons .extract-code {
  font-size: 12px;
  color: #e65100;
  background: #fff3e0;
  padding: 3px 8px;
  border-radius: 3px;
  font-weight: 600;
  margin-left: 4px;
}

/* Cloud drive buttons */
.cloud-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  font-size: 13px;
  border-radius: 4px;
  box-shadow: none;
  border: 1px solid #ddd;
  cursor: pointer;
  font-weight: 500;
  background: #fff;
  color: #333;
  transition: background 0.15s, border-color 0.15s;
}
.cloud-btn:hover { background: #f5f5f5; border-color: #bbb; }
.cloud-btn.quark { border-color: #1677ff; color: #1677ff; }
.cloud-btn.quark:hover { background: #e6f0ff; }
.cloud-btn.baidu { border-color: #e33b24; color: #e33b24; }
.cloud-btn.baidu:hover { background: #fef0ee; }

/* QR Code Breathing Animation */
@keyframes qr-breathe {
  0%, 100% { border-color: rgba(0,168,107,0.5); transform: scale(1); }
  50% { border-color: rgba(0,168,107,0.9); transform: scale(1.02); }
}
.qr-breathe {
  border: 3px solid rgba(0,168,107,0.5);
  border-radius: 10px;
  animation: qr-breathe 2.2s ease-in-out infinite;
  display: inline-block;
  line-height: 0;
}
.qr-breathe img {
  width: 170px;
  height: 170px;
  border-radius: 7px;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px;
  text-align: center;
  max-width: 380px;
  width: 92%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.modal-box h4 { font-size: 17px; margin-bottom: 6px; color: #1a1a2e; }
.modal-box .modal-subtitle { font-size: 12px; color: #999; margin-bottom: 16px; }
.modal-box .qr-img { margin: 0 auto 14px; }
.modal-box .qr-tips { text-align: left; font-size: 12px; color: #555; line-height: 1.8; margin-bottom: 14px; padding: 0 4px; }
.modal-box .qr-tips i { color: #00A86B; font-style: normal; margin-right: 4px; }
.modal-box .qr-warn { font-size: 11px; color: #e65100; background: #fff3e0; padding: 8px 12px; border-radius: 4px; margin-bottom: 14px; line-height: 1.6; }
.modal-box .modal-close-btn { margin-top: 8px; }

/* Features Page */
.feature-detail {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 8px;
  padding: 28px 24px;
  margin-bottom: 20px;
}
.feature-detail .fd-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.feature-detail .fd-content h3 { font-size: 18px; color: #1a1a2e; margin-bottom: 6px; }
.feature-detail .fd-content p { font-size: 14px; color: #555; line-height: 1.75; }
.feature-detail .fd-content .fd-highlight {
  margin-top: 10px;
  font-size: 13px;
  color: #00A86B;
  font-weight: 500;
}

/* Page Header (for sub-pages) */
.page-header {
  background: linear-gradient(135deg, #0a0e27, #0a3320);
  color: #fff;
  padding: 36px 0 32px;
  text-align: center;
}
.page-header h1 { font-size: 28px; font-weight: 700; }
.page-header p { color: #b0c4d8; font-size: 14px; margin-top: 6px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* Footer */
.site-footer {
  background: #1a1a2e;
  color: #8899aa;
  padding: 24px 0;
  margin-top: auto;
  font-size: 12px;
  text-align: center;
  line-height: 1.8;
}
.site-footer .disclaimer {
  color: #667788;
  font-size: 11px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid #2a2a3e;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner { height: 48px; }
  .hero { padding: 36px 0 32px; }
  .hero h1 { font-size: 24px; }
  .hero .subtitle { font-size: 14px; }
  .section { padding: 32px 0; }
  .section-title { font-size: 22px; }
  .features-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .platform-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .usecase-grid { grid-template-columns: 1fr; }
  .feature-detail { flex-direction: column; text-align: center; }
  .feature-detail .fd-icon { margin: 0 auto; }
  .stats-bar { gap: 20px; }
  
  .nav-links { 
    display: none; 
    position: absolute; 
    top: 56px; 
    left: 0; 
    right: 0; 
    background: #fff; 
    flex-direction: column; 
    padding: 8px 0;
    border-bottom: 1px solid #e8ecf1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 20px; border-radius: 0; font-size: 15px; }
  .menu-toggle { display: block; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .usecase-grid { grid-template-columns: 1fr; }
  .platform-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 20px; }
  .dl-buttons { flex-direction: column; align-items: stretch; }
  .dl-buttons .btn, .dl-buttons .cloud-btn { text-align: center; }
}

/* Utility */
.text-center { text-align: center; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.hidden { display: none; }
