/* ═══════════════════════════════════════════════
   Telegram 纸飞机安全下载站 - 全局样式
   ═══════════════════════════════════════════════ */

/* ─── CSS 变量 ─── */
:root {
  --tg-blue: #229ED9;
  --tg-blue-dark: #1a8bc4;
  --tg-blue-light: #34b7f1;
  --tg-navy: #17212b;
  --tg-dark: #0e1621;
  --tg-text: #222222;
  --tg-text-secondary: #5a5a5a;
  --tg-bg: #ffffff;
  --tg-bg-alt: #f4f6f8;
  --tg-bg-dark: #1a1a2e;
  --tg-border: #e0e4e8;
  --tg-radius: 12px;
  --tg-radius-sm: 8px;
  --tg-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --tg-shadow-hover: 0 8px 30px rgba(34, 158, 217, 0.15);
  --max-width: 1200px;
}

/* ─── 重置与基础 ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--tg-text);
  background: var(--tg-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--tg-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--tg-blue-dark);
}

/* ─── 动画 ─── */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease forwards;
}

/* ─── 布局容器 ─── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--tg-bg-alt);
}

.section-dark {
  background: var(--tg-bg-dark);
  color: #fff;
}

/* ─── 导航栏 ─── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--tg-border);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tg-text);
}

.nav-brand svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-menu a {
  display: block;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--tg-text-secondary);
  transition: all 0.2s ease;
}

.nav-menu a:hover {
  color: var(--tg-blue);
  background: rgba(34, 158, 217, 0.06);
}

.nav-menu a.active {
  color: #fff;
  background: var(--tg-blue);
  font-weight: 600;
}

/* ─── 移动端菜单 ─── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

/* ─── Hero 区域 ─── */
.hero {
  position: relative;
  padding: 100px 0 80px;
  background: linear-gradient(135deg, #f0f7fb 0%, #ffffff 50%, #f4f6f8 100%);
  overflow: hidden;
}

.hero-bg-shape {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(34, 158, 217, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--tg-text);
}

.hero-content h1 .highlight {
  color: var(--tg-blue);
}

.hero-content .subtitle {
  font-size: 1.125rem;
  color: var(--tg-text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-visual .main-icon {
  width: 280px;
  height: 280px;
  animation: float 6s ease-in-out infinite;
}

.hero-visual .orbit-ring {
  position: absolute;
  width: 380px;
  height: 380px;
  border: 1px dashed rgba(34, 158, 217, 0.2);
  border-radius: 50%;
  animation: spin 20s linear infinite;
}

/* ─── 按钮 ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--tg-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--tg-blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.35);
}

.btn-primary:hover {
  background: var(--tg-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 158, 217, 0.45);
  color: #fff;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--tg-blue);
  border: 2px solid var(--tg-blue);
}

.btn-outline:hover {
  background: var(--tg-blue);
  color: #fff;
}

.btn-large {
  padding: 16px 40px;
  font-size: 1.0625rem;
}

.btn-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ─── 特性卡片 ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.feature-card {
  background: #fff;
  border-radius: var(--tg-radius);
  padding: 32px;
  box-shadow: var(--tg-shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--tg-border);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--tg-shadow-hover);
  border-color: rgba(34, 158, 217, 0.25);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(34, 158, 217, 0.08);
  border-radius: var(--tg-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: var(--tg-blue);
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--tg-text);
}

.feature-card p {
  font-size: 0.9375rem;
  color: var(--tg-text-secondary);
  line-height: 1.7;
}

/* ─── 下载卡片 ─── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.download-card {
  background: #fff;
  border-radius: var(--tg-radius);
  padding: 36px 28px;
  text-align: center;
  box-shadow: var(--tg-shadow);
  border: 1px solid var(--tg-border);
  transition: all 0.3s ease;
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tg-shadow-hover);
}

.download-card .platform-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  background: rgba(34, 158, 217, 0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-card .platform-icon svg {
  width: 32px;
  height: 32px;
  color: var(--tg-blue);
}

.download-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.download-card .version {
  font-size: 0.8125rem;
  color: var(--tg-text-secondary);
  margin-bottom: 20px;
}

.download-card .btn {
  width: 100%;
}

.download-card.featured {
  border: 2px solid var(--tg-blue);
  position: relative;
  overflow: hidden;
}

.download-card.featured::before {
  content: "推荐";
  position: absolute;
  top: 12px;
  right: -28px;
  background: var(--tg-blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 30px;
  transform: rotate(45deg);
}

/* ─── 评价卡片 ─── */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.review-card {
  background: #fff;
  border-radius: var(--tg-radius);
  padding: 28px;
  box-shadow: var(--tg-shadow);
  border: 1px solid var(--tg-border);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tg-blue), var(--tg-blue-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.review-meta h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.review-meta .stars {
  color: #ffc107;
  font-size: 0.875rem;
}

.review-card p {
  color: var(--tg-text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ─── FAQ ─── */
.faq-list {
  max-width: 800px;
  margin: 48px auto 0;
}

.faq-item {
  background: #fff;
  border-radius: var(--tg-radius);
  margin-bottom: 12px;
  box-shadow: var(--tg-shadow);
  border: 1px solid var(--tg-border);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--tg-text);
  transition: background 0.2s;
}

.faq-question:hover {
  background: rgba(34, 158, 217, 0.03);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  color: var(--tg-blue);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 24px 20px;
}

.faq-answer p {
  color: var(--tg-text-secondary);
  line-height: 1.8;
  font-size: 0.9375rem;
}

/* ─── 对比表格 ─── */
.compare-table-wrap {
  overflow-x: auto;
  margin-top: 40px;
  border-radius: var(--tg-radius);
  box-shadow: var(--tg-shadow);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.9375rem;
  min-width: 600px;
}

.compare-table th,
.compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--tg-border);
}

.compare-table th {
  background: var(--tg-bg-alt);
  font-weight: 700;
  color: var(--tg-text);
}

.compare-table td:first-child {
  font-weight: 600;
}

.compare-table .check {
  color: #22c55e;
  font-weight: 700;
}

.compare-table .cross {
  color: #ef4444;
  font-weight: 700;
}

.compare-table tr:hover td {
  background: rgba(34, 158, 217, 0.03);
}

/* ─── SEO 内容区块 ─── */
.seo-content {
  max-width: 800px;
  margin: 0 auto;
}

.seo-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 20px;
  margin-top: 48px;
}

.seo-content h2:first-child {
  margin-top: 0;
}

.seo-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 28px 0 12px;
}

.seo-content p {
  color: var(--tg-text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 1rem;
}

.seo-content ul {
  margin: 12px 0 20px 20px;
  color: var(--tg-text-secondary);
  line-height: 1.8;
}

.seo-content li {
  margin-bottom: 8px;
}

.seo-content strong {
  color: var(--tg-text);
}

/* ─── 关键词标签 ─── */
.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(34, 158, 217, 0.08);
  color: var(--tg-blue);
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ─── 版本日志 ─── */
.changelog {
  background: #fff;
  border-radius: var(--tg-radius);
  box-shadow: var(--tg-shadow);
  border: 1px solid var(--tg-border);
  padding: 28px;
  margin-top: 24px;
}

.changelog-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--tg-border);
}

.changelog-item:last-child {
  border-bottom: none;
}

.changelog-badge {
  flex-shrink: 0;
  padding: 4px 12px;
  background: var(--tg-blue);
  color: #fff;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  height: fit-content;
}

.changelog-text h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.changelog-text p {
  font-size: 0.875rem;
  color: var(--tg-text-secondary);
}

/* ─── CTA 区块 ─── */
.cta-section {
  background: linear-gradient(135deg, var(--tg-blue) 0%, var(--tg-blue-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 80px 0;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.0625rem;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn {
  background: #fff;
  color: var(--tg-blue);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.cta-section .btn:hover {
  background: #f4f6f8;
  color: var(--tg-blue-dark);
  transform: translateY(-2px);
}

/* ─── 页脚 ─── */
.footer {
  background: var(--tg-bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.footer-brand svg {
  width: 28px;
  height: 28px;
}

.footer-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.6);
}

.footer-links h4 {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--tg-blue-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
}

.footer-bottom .safe-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #22c55e;
  font-weight: 500;
}

/* ─── 面包屑 ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--tg-text-secondary);
  margin-bottom: 24px;
}

.breadcrumb a:hover {
  color: var(--tg-blue);
}

.breadcrumb .sep {
  color: var(--tg-border);
}

/* ─── 页面标题 ─── */
.page-header {
  text-align: center;
  padding: 60px 0 40px;
  background: linear-gradient(180deg, #f0f7fb 0%, #ffffff 100%);
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1.0625rem;
  color: var(--tg-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ─── 使用技巧网格 ─── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.tip-card {
  background: #fff;
  border-radius: var(--tg-radius);
  padding: 24px;
  box-shadow: var(--tg-shadow);
  border: 1px solid var(--tg-border);
}

.tip-card .tip-num {
  display: inline-block;
  width: 32px;
  height: 32px;
  background: var(--tg-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.tip-card h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.tip-card p {
  font-size: 0.875rem;
  color: var(--tg-text-secondary);
  line-height: 1.6;
}

/* ─── 响应式 ─── */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content .subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-visual .main-icon {
    width: 200px;
    height: 200px;
  }

  .hero-visual .orbit-ring {
    width: 280px;
    height: 280px;
  }

  .btn-group {
    justify-content: center;
  }

  .section {
    padding: 56px 0;
  }

  .menu-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--tg-border);
    box-shadow: var(--tg-shadow);
  }

  .nav-menu.open {
    display: flex;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .page-header h1 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .features-grid,
  .download-grid,
  .reviews-grid,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-content h1 {
    font-size: 1.625rem;
  }
}

/* ─── 工具类 ─── */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none; }
