/* ===== Ditto Website - Shared Styles ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6; color: #333; background: #f5f7fa; min-height: 100vh;
}

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

/* Header */
.site-header {
  background: #fff; border-bottom: 1px solid #e8e8e8; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 32px; height: 32px; border-radius: 6px; }
.logo-text { font-size: 20px; font-weight: 700; color: #1a1a2e; }
.nav-menu { display: flex; gap: 6px; list-style: none; }
.nav-menu a {
  display: block; padding: 8px 16px; text-decoration: none; color: #555; font-size: 14px;
  border-radius: 6px; transition: all 0.2s;
}
.nav-menu a:hover, .nav-menu a.active { background: #eef2ff; color: #4c5fd7; }
.nav-menu.show { display: flex; position: absolute; top: 60px; right: 20px; flex-direction: column; background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); padding: 8px; z-index: 99; }
.nav-menu.show a { padding: 10px 20px; white-space: nowrap; }
.mobile-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; color: #555; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff; padding: 60px 0 50px; text-align: center;
}
.hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.hero p { font-size: 16px; color: #c0c8e0; max-width: 640px; margin: 0 auto 28px; line-height: 1.7; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 12px 28px; border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: all 0.2s; cursor: pointer; border: none;
}
.btn-primary { background: #4c5fd7; color: #fff; }
.btn-primary:hover { background: #3b4dc0; transform: translateY(-1px); }
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.2); }
.btn-secondary:hover { background: rgba(255,255,255,0.2); }

/* Sections */
.section { padding: 50px 0; }
.section-title { font-size: 26px; font-weight: 700; color: #1a1a2e; text-align: center; margin-bottom: 10px; }
.section-subtitle { text-align: center; color: #777; font-size: 14px; margin-bottom: 36px; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: #fff; border-radius: 12px; padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06); border: 1px solid #eee;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.card-icon { font-size: 28px; margin-bottom: 12px; }
.card h3 { font-size: 16px; color: #1a1a2e; margin-bottom: 8px; }
.card p { font-size: 14px; color: #666; line-height: 1.6; }

/* Comparison table */
.comparison-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); font-size: 14px; }
.comparison-table th, .comparison-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.comparison-table th { background: #f8f9fc; font-weight: 600; color: #444; }
.comparison-table tr:hover td { background: #fafbff; }
.comparison-table .highlight { color: #4c5fd7; font-weight: 600; }
.comparison-table .check { color: #22c55e; font-weight: 700; }
.comparison-table .cross { color: #ef4444; }

/* Screenshot gallery */
.screenshots { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.screenshot-item { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.06); border: 1px solid #eee; }
.screenshot-item img { width: 100%; display: block; height: auto; }
.screenshot-item p { padding: 12px 16px; font-size: 13px; color: #555; margin: 0; }

/* Steps */
.steps { counter-reset: step; }
.step-item { display: flex; gap: 16px; margin-bottom: 24px; background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #eee; }
.step-num {
  width: 36px; height: 36px; min-width: 36px; background: #4c5fd7; color: #fff;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.step-content h4 { font-size: 15px; color: #1a1a2e; margin-bottom: 6px; }
.step-content p { font-size: 14px; color: #666; line-height: 1.6; }
.step-content img { width: 100%; max-width: 500px; border-radius: 8px; margin-top: 10px; border: 1px solid #eee; }

/* FAQ */
.faq-item { background: #fff; border-radius: 12px; padding: 20px 24px; margin-bottom: 16px; border: 1px solid #eee; }
.faq-item h4 { font-size: 15px; color: #1a1a2e; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.faq-item p { font-size: 14px; color: #555; line-height: 1.7; }
.faq-item ul { margin: 8px 0 0 20px; font-size: 14px; color: #555; }
.faq-item li { margin-bottom: 4px; }

/* Download buttons */
.download-options { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }
.download-card {
  background: #fff; border-radius: 12px; padding: 24px; border: 1px solid #eee;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06); text-align: center; min-width: 220px; flex: 1; max-width: 300px;
}
.download-card .dl-icon { font-size: 32px; margin-bottom: 10px; }
.download-card h4 { font-size: 16px; color: #1a1a2e; margin-bottom: 6px; }
.download-card p { font-size: 13px; color: #888; margin-bottom: 14px; }

/* Info boxes */
.info-box {
  background: #eef2ff; border-left: 4px solid #4c5fd7; padding: 14px 18px; border-radius: 6px;
  font-size: 14px; color: #333; margin: 16px 0;
}
.info-box.warn { background: #fff8e1; border-left-color: #f59e0b; }

/* Footer */
.site-footer {
  background: #1a1a2e; color: #9ca3af; padding: 40px 0 20px; font-size: 13px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 20px; margin-bottom: 24px; }
.footer-brand .logo-text { color: #fff; font-size: 18px; }
.footer-brand p { color: #9ca3af; margin-top: 6px; font-size: 13px; }
.footer-links { display: flex; gap: 24px; list-style: none; }
.footer-links a { color: #9ca3af; text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { text-align: center; padding-top: 16px; border-top: 1px solid #2a2a3e; color: #6b7280; font-size: 12px; }

/* Breadcrumb */
.breadcrumb { padding: 12px 0; font-size: 13px; color: #888; background: #f0f2f5; }
.breadcrumb a { color: #4c5fd7; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #aaa; margin: 0 6px; }

/* Page header */
.page-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff; padding: 40px 0; text-align: center;
}
.page-header h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.page-header p { color: #c0c8e0; font-size: 14px; max-width: 600px; margin: 0 auto; }

/* Tags */
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; background: #eef2ff; color: #4c5fd7; margin-right: 6px; }

/* ===== Modal ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 9999;
  display: flex; align-items: center; justify-content: center; animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff; border-radius: 16px; padding: 36px 32px 28px; max-width: 380px; width: 90%;
  position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.2); text-align: center;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.modal-close {
  position: absolute; top: 12px; right: 16px; background: none; border: none;
  font-size: 24px; color: #999; cursor: pointer; line-height: 1; padding: 4px 8px;
}
.modal-close:hover { color: #333; }
.modal-title { font-size: 18px; font-weight: 700; color: #1a1a2e; margin-bottom: 18px; }
.modal-body { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.modal-qr-text { font-size: 13px; color: #666; line-height: 1.6; margin: 0; }
.modal-features { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #555; text-align: left; width: 100%; padding-left: 8px; }
.modal-warn {
  background: #fff8e1; border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #92400e;
  line-height: 1.6; text-align: left; border: 1px solid #fde68a;
}

/* QR Code pulse border - subtle animated glow */
.qr-pulse {
  display: inline-block; border-radius: 12px; padding: 4px;
  border: 3px solid transparent;
  background-clip: padding-box;
  position: relative;
}
.qr-pulse::before {
  content: ''; position: absolute; inset: -3px; border-radius: 14px; z-index: -1;
  border: 3px solid #4c5fd7;
  animation: qrGlow 2s ease-in-out infinite;
}
@keyframes qrGlow {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}
.qr-pulse img {
  display: block; border-radius: 8px; width: 150px; height: 150px;
}

/* Download buttons - no direct link, use modal trigger */
.dl-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; width: 100%; gap: 6px;
  transition: all 0.2s; text-align: center; text-decoration: none;
}
.dl-btn-quark { background: #4c5fd7; color: #fff; }
.dl-btn-quark:hover { background: #3b4dc0; transform: translateY(-1px); }
.dl-btn-baidu { background: #fff; color: #333; border: 1px solid #ddd; }
.dl-btn-baidu:hover { background: #f5f5f5; transform: translateY(-1px); }

/* Inline QR on download page */
.download-section { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }
.download-section .download-card { flex: 0 0 260px; }
.download-inline-qr { flex: 0 0 auto; text-align: center; padding-top: 10px; }
.download-inline-qr .qr-pulse { margin-bottom: 8px; }
.download-inline-qr .qr-desc { font-size: 13px; color: #666; max-width: 180px; margin: 0 auto; line-height: 1.5; }

/* Mobile adjustments */
@media (max-width: 768px) {
  .download-section { flex-direction: column; align-items: center; }
  .download-section .download-card { flex: 1 1 auto; width: 100%; max-width: 320px; }
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 14px; }
  .section-title { font-size: 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .nav-menu { display: none; }
  .mobile-toggle { display: block; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { gap: 14px; }
  .comparison-table { font-size: 12px; }
  .comparison-table th, .comparison-table td { padding: 10px 12px; }
}
