/* Set 1 Root — Official Telegram Blue, centered corporate layout */
:root {
  --primary: #229ED9;
  --primary-dark: #1A8BC0;
  --primary-light: #E8F6FC;
  --text: #1A2B3C;
  --text-muted: #5A6A7A;
  --bg: #FFFFFF;
  --bg-alt: #F4F9FC;
  --border: #D6E8F2;
  --success: #2AABEE;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(34, 158, 217, 0.12);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --max: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}
img, svg { max-width: 100%; vertical-align: middle; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Nav — fixed white bar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.97);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; color: var(--primary); }
.logo svg { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 8px; list-style: none; }
.nav-links a {
  display: block;
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--text-muted);
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.nav-links a:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.nav-links a.active {
  background: var(--primary);
  color: #fff;
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn:disabled { opacity: 0.7; cursor: wait; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover:not(:disabled) { background: var(--primary-light); }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* Hero — centered */
.hero {
  text-align: center;
  padding: 72px 0 64px;
  background: linear-gradient(180deg, var(--primary-light) 0%, #fff 100%);
}
.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text);
}
.hero .lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-visual {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}
.hero-visual svg { width: min(420px, 90vw); height: auto; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  text-align: center;
  font-size: 1.75rem;
  margin-bottom: 12px;
}
.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 40px;
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-item {
  padding: 28px 16px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.stat-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 6px;
}
.stat-label { font-size: 0.9rem; color: var(--text-muted); }

/* Features cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 28px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--primary); }
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-icon svg { width: 28px; height: 28px; color: var(--primary); }
.feature-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Platforms */
.platforms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.platform-card {
  text-align: center;
  padding: 28px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.platform-card svg { width: 40px; height: 40px; margin-bottom: 12px; color: var(--primary); }
.platform-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.platform-card p { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 16px; }

/* Deep features */
.deep-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 56px;
}
.deep-block:nth-child(even) { direction: rtl; }
.deep-block:nth-child(even) > * { direction: ltr; }
.deep-block h2 { font-size: 1.4rem; margin-bottom: 14px; }
.deep-block p { color: var(--text-muted); margin-bottom: 12px; }
.deep-visual {
  background: var(--primary-light);
  border-radius: 16px;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.deep-visual svg { width: 160px; height: 160px; color: var(--primary); }

/* Reviews */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.review-card {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.review-stars { color: #F5A623; margin-bottom: 10px; display: flex; gap: 2px; }
.review-stars svg { width: 16px; height: 16px; }
.review-card p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 14px; }
.review-author { font-weight: 600; font-size: 0.9rem; }

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.compare-table th, .compare-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th { background: var(--primary); color: #fff; font-weight: 600; }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: var(--bg-alt); }
.compare-yes { color: #16A34A; font-weight: 600; }
.compare-no { color: #DC2626; }

/* FAQ accordion — CSS only */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 400;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-answer {
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Download page */
.dl-hero {
  padding: 56px 0;
  background: linear-gradient(135deg, #1A8BC0 0%, #229ED9 50%, #5BC0EB 100%);
  color: #fff;
  text-align: center;
}
.dl-hero h1 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin-bottom: 12px; }
.dl-hero .lead { opacity: 0.92; margin-bottom: 28px; max-width: 560px; margin-left: auto; margin-right: auto; }
.dl-meta { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-top: 20px; font-size: 0.9rem; opacity: 0.9; }
.dl-platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dl-card {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.dl-card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dl-card h3 svg { width: 28px; height: 28px; color: var(--primary); }
.dl-card .meta { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 16px; }
.dl-card ol { padding-left: 18px; margin: 12px 0 20px; color: var(--text-muted); font-size: 0.92rem; }
.dl-card ol li { margin-bottom: 6px; }

.steps { counter-reset: step; }
.step-item {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.step-body h3 { margin-bottom: 6px; }
.step-body p { color: var(--text-muted); font-size: 0.95rem; }

.req-table { width: 100%; border-collapse: collapse; }
.req-table th, .req-table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: left;
}
.req-table th { background: var(--bg-alt); }

.changelog { border-left: 3px solid var(--primary); padding-left: 24px; }
.changelog-item { margin-bottom: 28px; position: relative; }
.changelog-item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  border: 2px solid #fff;
}
.changelog-ver { font-weight: 700; color: var(--primary); }
.changelog-date { font-size: 0.85rem; color: var(--text-muted); margin-left: 10px; }
.changelog-item ul { margin-top: 8px; padding-left: 18px; color: var(--text-muted); }
.changelog-item li { margin-bottom: 4px; }

.security-box {
  padding: 28px;
  background: var(--primary-light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.security-box h2 { margin-bottom: 12px; }
.security-box p { color: var(--text-muted); margin-bottom: 8px; }

/* zh-cn article style */
.article-hero {
  padding: 48px 0 32px;
  background: var(--bg-alt);
  text-align: center;
}
.article-hero h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.article-body { max-width: 760px; margin: 0 auto; padding: 48px 20px; }
.article-body h2 { font-size: 1.35rem; margin: 36px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.article-body h3 { font-size: 1.1rem; margin: 24px 0 10px; }
.article-body p { margin-bottom: 14px; color: var(--text-muted); }
.article-body ul { margin: 0 0 16px 20px; color: var(--text-muted); }
.article-body li { margin-bottom: 6px; }
.cta-box {
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(135deg, var(--primary-light), #fff);
  border: 2px solid var(--primary);
  border-radius: 16px;
  margin: 48px 0 24px;
}
.cta-box h2 { margin-bottom: 10px; }
.cta-box p { color: var(--text-muted); margin-bottom: 20px; }
.cta-box a.btn { text-decoration: none; }

/* Footer */
.site-footer {
  background: #1A2B3C;
  color: #B8C8D8;
  padding: 40px 0 28px;
  margin-top: 0;
  text-align: center;
  font-size: 0.9rem;
}
.site-footer .safe-note {
  margin-bottom: 12px;
  color: #E0EEF6;
}
.site-footer .copy { opacity: 0.75; line-height: 1.6; }
.footer-links { margin-bottom: 16px; display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.footer-links a { color: #8EC8E8; }

/* Responsive */
@media (max-width: 900px) {
  .stats-grid, .features-grid, .platforms-grid, .reviews-grid, .dl-platforms {
    grid-template-columns: repeat(2, 1fr);
  }
  .deep-block { grid-template-columns: 1fr; }
  .deep-block:nth-child(even) { direction: ltr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: #fff; padding: 12px; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
  .stats-grid, .features-grid, .platforms-grid, .reviews-grid, .dl-platforms {
    grid-template-columns: 1fr;
  }
  .hero { padding: 48px 0 40px; }
}
