/* ========== Reset & Base ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a56db;
  --primary-dark: #1e40af;
  --primary-light: #3b82f6;
  --bg: #f8fafc;
  --bg-white: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --radius: 8px;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

ul, ol { list-style: none; }

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ========== Navbar ========== */
.navbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo img { height: 36px; }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  background: rgba(26,86,219,0.08);
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--text);
  padding: 4px 8px;
}

/* ========== Hero ========== */
.hero {
  background: linear-gradient(135deg, #1a56db 0%, #1e40af 50%, #1e3a8a 100%);
  color: #fff;
  padding: 80px 0 70px;
  text-align: center;
}

.hero-logo { width: 100px; margin: 0 auto 24px; }

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 680px;
  margin: 0 auto 32px;
  line-height: 1.8;
}

.hero-btns { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary { background: #fff; color: var(--primary); }
.btn-primary:hover { background: #e2e8f0; color: var(--primary-dark); }

.btn-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.5);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ========== Section ========== */
.section { padding: 70px 0; }

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.section-desc {
  text-align: center;
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

/* ========== Feature Cards ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
}

.feature-card h3 { font-size: 1.1rem; margin-bottom: 8px; }

.feature-card p { color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }

/* ========== Screenshot Gallery ========== */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.screenshot-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.screenshot-item img { width: 100%; object-fit: cover; }

.screenshot-caption {
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
}

/* ========== OS Icons (Text + CSS) ========== */
.os-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  text-align: center;
}

.os-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  transition: transform 0.15s;
}
.os-item:hover { transform: translateY(-2px); }
.os-item .os-icon { font-size: 2rem; display: block; margin-bottom: 6px; }

/* ========== Download Page ========== */
.download-section { padding: 50px 0; }
.download-section:nth-child(even) { background: var(--bg-white); }

.download-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.download-info h3 { font-size: 1.3rem; margin-bottom: 6px; }
.download-info p { color: var(--text-light); font-size: 0.9rem; }

.download-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-sm {
  padding: 5px 16px;
  font-size: 13px;
  border-radius: 4px;
  box-shadow: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-block;
  transition: color 0.15s, background 0.15s;
}
.btn-sm.btn-primary { background: var(--primary); color: #fff; }
.btn-sm.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-sm.btn-orange { background: #f97316; color: #fff; }
.btn-sm.btn-orange:hover { background: #ea580c; color: #fff; }
.btn-sm.btn-outline-sm {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-sm.btn-outline-sm:hover { border-color: var(--primary); color: var(--primary); }

/* ========== QR Modal ========== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active { display: flex; }

.modal-box {
  background: #fff;
  border-radius: 12px;
  padding: 32px 28px 24px;
  text-align: center;
  max-width: 380px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-close {
  position: absolute;
  top: 10px; right: 14px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}
.modal-close:hover { color: #333; }

/* ========== QR Code Breathing Border ========== */
@keyframes qr-breathe {
  0%   { border-color: rgba(26,86,219,0.45); transform: scale(0.97); }
  50%  { border-color: rgba(26,86,219,0.90); transform: scale(1.02); }
  100% { border-color: rgba(26,86,219,0.45); transform: scale(0.97); }
}

.qrcode-wrapper {
  display: inline-block;
  border: 3px solid rgba(26,86,219,0.6);
  border-radius: 10px;
  padding: 6px;
  margin: 16px auto;
  animation: qr-breathe 2.2s ease-in-out infinite;
}

.qrcode-img {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 6px;
}

.qr-guide {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 8px;
}

.qr-guide strong { color: var(--primary); }

.qr-tips {
  text-align: left;
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.8;
  padding-left: 18px;
  margin-top: 8px;
}

.qr-tips li {
  list-style: disc;
  margin-bottom: 2px;
}

/* ========== Tutorial Steps ========== */
.tutorial-steps { counter-reset: step; }

.tutorial-step {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  position: relative;
  padding-left: 80px;
}

.tutorial-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 28px;
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tutorial-step h3 { font-size: 1.2rem; margin-bottom: 8px; }
.tutorial-step p { color: var(--text-light); margin-bottom: 12px; }
.tutorial-step img { border-radius: 6px; margin-top: 12px; border: 1px solid var(--border); }

/* ========== Features Page ========== */
.feature-detail {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.feature-detail h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--primary); }
.feature-detail p { color: var(--text-light); line-height: 1.7; }

/* ========== FAQ ========== */
.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after { content: '+'; font-size: 1.4rem; color: var(--primary); font-weight: 400; }
.faq-item.open .faq-q::after { content: '\2212'; }

.faq-a {
  display: none;
  padding: 0 24px 18px;
  color: var(--text-light);
  line-height: 1.7;
}
.faq-item.open .faq-a { display: block; }

/* ========== Page Header (Subpages) ========== */
.page-header {
  background: linear-gradient(135deg, #1a56db 0%, #1e40af 100%);
  color: #fff;
  padding: 48px 0;
  text-align: center;
}

.page-header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.page-header p { opacity: 0.85; font-size: 1rem; max-width: 600px; margin: 0 auto; }

/* ========== Footer ========== */
.footer {
  background: #1e293b;
  color: #cbd5e1;
  padding: 32px 0;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.8;
}

.footer a { color: #93c5fd; }
.footer a:hover { color: #bfdbfe; }

.footer-disclaimer {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ========== Breadcrumb ========== */
.breadcrumb {
  padding: 12px 0;
  font-size: 0.88rem;
  color: var(--text-light);
}
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text); }

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 8px 0;
  }

  .nav-links.show { display: flex; }

  .menu-toggle { display: block; }

  .hero h1 { font-size: 1.8rem; }
  .hero { padding: 50px 0 40px; }
  .section { padding: 50px 0; }
  .section-title { font-size: 1.5rem; }

  .tutorial-step { padding-left: 24px; padding-top: 56px; }
  .tutorial-step::before { left: 24px; top: 16px; }

  .download-card { flex-direction: column; align-items: flex-start; }
}
