/* ============================================
   Telegram 纸飞机下载站 - 主样式表
   ============================================ */

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

:root {
  --tg-primary: #2AABEE;
  --tg-primary-dark: #229ED9;
  --tg-primary-light: #4FC3F7;
  --tg-blue-50: #E3F2FD;
  --tg-blue-100: #BBDEFB;
  --tg-dark: #17212B;
  --tg-gray: #708499;
  --tg-gray-light: #E7EBF0;
  --tg-bg: #FFFFFF;
  --tg-bg-soft: #F4F8FB;
  --tg-shadow-sm: 0 2px 8px rgba(23, 33, 43, 0.06);
  --tg-shadow-md: 0 8px 24px rgba(23, 33, 43, 0.08);
  --tg-shadow-lg: 0 16px 48px rgba(42, 171, 238, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --container: 1200px;
  --nav-height: 64px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--tg-dark);
  background: var(--tg-bg);
  line-height: 1.6;
  font-size: 16px;
}

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

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

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

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--tg-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(42, 171, 238, 0.35);
}
.btn-primary:hover {
  background: var(--tg-primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(42, 171, 238, 0.45);
}

.btn-outline {
  background: transparent;
  color: var(--tg-primary);
  border: 2px solid var(--tg-primary);
}
.btn-outline:hover {
  background: var(--tg-primary);
  color: #fff;
}

.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(255,255,255,0.25); color: #fff; }

.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-sm { padding: 8px 18px; font-size: 14px; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  z-index: 1000;
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: var(--tg-shadow-sm); }

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--tg-dark);
}
.nav-logo:hover { color: var(--tg-dark); }
.nav-logo .logo-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--tg-gray);
  font-size: 15px;
  font-weight: 400;
  transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--tg-dark); }

.nav-cta { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px; height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--tg-dark);
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- Hero --- */
.hero {
  padding: calc(var(--nav-height) + 60px) 0 80px;
  background: linear-gradient(180deg, #E3F2FD 0%, #F4F8FB 60%, #FFFFFF 100%);
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(42, 171, 238, 0.1);
  color: var(--tg-primary-dark);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
  color: var(--tg-dark);
}

.hero-sub {
  font-size: 18px;
  color: var(--tg-gray);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-meta {
  display: flex;
  gap: 24px;
  color: var(--tg-gray);
  font-size: 14px;
}
.hero-meta span { display: flex; align-items: center; gap: 6px; }

.hero-image {
  position: relative;
  text-align: center;
}
.hero-image img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(42, 171, 238, 0.2));
}

/* --- Stats Bar --- */
.stats {
  background: var(--tg-primary);
  padding: 40px 0;
  color: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-num {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 14px;
  opacity: 0.85;
}

/* --- Features Section --- */
.features { padding: 100px 0; }

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 96px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse .feature-img { order: 2; }

.feature-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--tg-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.feature-row h2 {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--tg-dark);
}

.feature-row p {
  font-size: 17px;
  color: var(--tg-gray);
  line-height: 1.7;
  margin-bottom: 24px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--tg-dark);
}
.feature-list li svg {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--tg-primary);
  margin-top: 2px;
}

.feature-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--tg-shadow-lg);
}
.feature-img img { width: 100%; height: auto; }

/* --- Download Section --- */
.download {
  padding: 100px 0;
  background: var(--tg-bg-soft);
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-head h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--tg-dark);
}
.section-head p {
  font-size: 17px;
  color: var(--tg-gray);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.dl-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  transition: all 0.25s ease;
  border: 1px solid var(--tg-gray-light);
}
.dl-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tg-shadow-md);
  border-color: var(--tg-primary-light);
}

.dl-icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tg-blue-50);
  border-radius: var(--radius-md);
  color: var(--tg-primary);
}
.dl-icon svg { width: 28px; height: 28px; }

.dl-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--tg-dark);
}
.dl-card p {
  font-size: 14px;
  color: var(--tg-gray);
  margin-bottom: 16px;
}

/* --- FAQ Section --- */
.faq { padding: 100px 0; }

.faq-list {
  max-width: 760px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--tg-gray-light);
}
.faq-item:first-child { border-top: 1px solid var(--tg-gray-light); }

.faq-q {
  width: 100%;
  background: none;
  border: none;
  padding: 22px 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--tg-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  transition: color 0.2s;
}
.faq-q:hover { color: var(--tg-primary); }

.faq-q .arrow {
  flex-shrink: 0;
  width: 24px; height: 24px;
  transition: transform 0.3s;
  color: var(--tg-gray);
}
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-a p {
  padding: 0 0 22px;
  font-size: 15px;
  color: var(--tg-gray);
  line-height: 1.7;
}

/* --- CTA Section --- */
.cta {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--tg-primary) 0%, var(--tg-primary-dark) 100%);
  text-align: center;
  color: #fff;
}
.cta h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}
.cta p {
  font-size: 17px;
  opacity: 0.9;
  margin-bottom: 28px;
}

/* --- Footer --- */
.footer {
  background: var(--tg-dark);
  color: #8a9bb0;
  padding: 64px 0 32px;
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.footer-brand .logo-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

.footer-desc {
  line-height: 1.7;
  max-width: 320px;
}

.footer h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: #8a9bb0; transition: color 0.2s; }
.footer ul a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 968px) {
  .hero h1 { font-size: 36px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-image { order: -1; }

  .feature-row { grid-template-columns: 1fr; gap: 32px; margin-bottom: 64px; }
  .feature-row.reverse .feature-img { order: 0; }

  .download-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: var(--tg-shadow-md);
    transform: translateY(-120%);
    transition: transform 0.3s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .nav-cta .btn-outline { display: none; }

  .hero { padding: calc(var(--nav-height) + 32px) 0 48px; }
  .hero h1 { font-size: 30px; }
  .hero-sub { font-size: 16px; }

  .features, .download, .faq { padding: 64px 0; }
  .feature-row h2, .section-head h2, .cta h2 { font-size: 28px; }

  .download-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
