/* Site 1 - Root: Telegram Blue Product Landing */
:root {
  --primary: #229ED9;
  --primary-dark: #1A7FB0;
  --primary-light: #E8F6FC;
  --text: #1A2332;
  --text-muted: #5A6A7A;
  --bg: #FFFFFF;
  --bg-alt: #F4F8FB;
  --border: #D8E4EC;
  --success: #22A06B;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(34, 158, 217, 0.12);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { 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;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
.container { max-width: 1120px; 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.2rem;
  color: var(--text);
  text-decoration: none;
}
.logo svg { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--primary); background: var(--primary-light); }
.nav-links a.active {
  color: #fff;
  background: var(--primary);
}
.nav-cta {
  margin-left: 8px;
  padding: 8px 18px !important;
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: 8px !important;
}
.nav-cta:hover { background: var(--primary-dark) !important; text-decoration: none !important; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.7; cursor: wait; transform: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Hero - left text right visual */
.hero {
  padding: 72px 0 64px;
  background: linear-gradient(135deg, #E8F6FC 0%, #FFFFFF 55%, #F0F7FA 100%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 2.4rem;
  line-height: 1.25;
  margin-bottom: 16px;
  color: var(--text);
}
.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 520px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-visual svg { width: 100%; max-width: 380px; height: auto; }

/* Sections */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: 1.85rem;
  text-align: center;
  margin-bottom: 12px;
}
.section-desc {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
}

/* Stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-card {
  text-align: center;
  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);
  line-height: 1.2;
}
.stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 6px; }

/* Feature cards */
.feature-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);
  transition: box-shadow 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow); }
.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 12px;
  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 */
.platform-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 dive */
.dive-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 48px;
}
.dive-block:nth-child(even) { direction: rtl; }
.dive-block:nth-child(even) > * { direction: ltr; }
.dive-text h3 { font-size: 1.4rem; margin-bottom: 12px; }
.dive-text p { color: var(--text-muted); margin-bottom: 12px; }
.dive-visual {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dive-visual svg { width: 120px; height: 120px; color: var(--primary); }

/* Compare 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); }
.yes { color: var(--success); font-weight: 600; }
.no { color: #C0392B; }

/* Reviews */
.review-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-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.review-name { font-weight: 600; }
.stars { color: #F5A623; letter-spacing: 2px; font-size: 0.9rem; }
.review-card p { color: var(--text-muted); font-size: 0.95rem; }

/* FAQ */
.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;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 1.3rem;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a {
  padding: 0 20px 16px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin: 0 20px 16px;
}

/* Download page */
.dl-hero {
  padding: 56px 0;
  background: linear-gradient(180deg, var(--primary-light), #fff);
  text-align: center;
}
.dl-hero h1 { font-size: 2.2rem; margin-bottom: 12px; }
.dl-hero p { color: var(--text-muted); margin-bottom: 24px; }
.dl-meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.dl-platform-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.dl-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.dl-card h3 { margin: 12px 0 8px; }
.dl-card .meta { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 12px; }
.dl-card ol { padding-left: 18px; color: var(--text-muted); font-size: 0.92rem; margin-bottom: 16px; }
.steps { counter-reset: step; list-style: none; }
.steps li {
  position: relative;
  padding: 20px 20px 20px 72px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.steps li h3 { margin-bottom: 6px; }
.steps li p { color: var(--text-muted); font-size: 0.95rem; }

.changelog { max-width: 800px; margin: 0 auto; }
.changelog-item {
  padding: 20px 24px;
  border-left: 3px solid var(--primary);
  background: #fff;
  margin-bottom: 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
}
.changelog-item h3 { font-size: 1.05rem; margin-bottom: 4px; }
.changelog-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.req-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.req-table th, .req-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.req-table th { background: var(--bg-alt); }

.security-box {
  padding: 28px;
  background: var(--primary-light);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.security-box h3 { margin-bottom: 12px; }
.security-box p { color: var(--text-muted); margin-bottom: 8px; }

/* zh-cn article */
.article-hero {
  padding: 48px 0 32px;
  background: var(--bg-alt);
  text-align: center;
}
.article-hero h1 { font-size: 2rem; margin-bottom: 12px; }
.article-body { max-width: 780px; margin: 0 auto; padding: 40px 20px 64px; }
.article-body h2 { font-size: 1.45rem; margin: 36px 0 14px; color: var(--text); }
.article-body h3 { font-size: 1.15rem; margin: 24px 0 10px; }
.article-body p { margin-bottom: 14px; color: var(--text-muted); }
.article-body ul, .article-body ol { margin: 0 0 16px 22px; color: var(--text-muted); }
.article-body li { margin-bottom: 6px; }
.cta-banner {
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  color: #fff;
  margin-top: 40px;
}
.cta-banner h2 { color: #fff; margin-bottom: 10px; }
.cta-banner p { color: rgba(255,255,255,0.9); margin-bottom: 20px; }
.cta-banner .btn {
  background: #fff;
  color: var(--primary);
  text-decoration: none;
}
.cta-banner .btn:hover { background: var(--primary-light); text-decoration: none; }

/* Footer */
.site-footer {
  background: #1A2332;
  color: #A8B5C4;
  padding: 40px 0 28px;
  margin-top: 0;
}
.footer-safe {
  text-align: center;
  padding: 12px 20px;
  background: rgba(34,158,217,0.15);
  border-radius: 8px;
  color: #7EC8E8;
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.footer-copy {
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.6;
}
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  list-style: none;
}
.footer-nav a { color: #C5D0DA; }
.footer-nav a:hover { color: #fff; }

@media (max-width: 900px) {
  .hero-grid, .dive-block, .dive-block:nth-child(even) { grid-template-columns: 1fr; direction: ltr; }
  .feature-grid, .review-grid, .dl-platform-grid { grid-template-columns: 1fr 1fr; }
  .stats-row, .platform-grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 1.85rem; }
}
@media (max-width: 600px) {
  .nav-links a:not(.active):not(.nav-cta) { display: none; }
  .feature-grid, .review-grid, .dl-platform-grid, .stats-row, .platform-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0; }
}
