/* =============================================
   TG中文版安全下载站 - 全局样式表
   纯原生 CSS，无框架依赖
   ============================================= */

/* CSS 变量 */
:root {
  --primary: #0e7ac6;
  --primary-dark: #0a5f9e;
  --primary-light: #17a3e8;
  --secondary: #34b7f1;
  --accent: #2aabee;
  --text: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --bg: #ffffff;
  --bg-warm: #f7f9fc;
  --bg-cool: #edf2f7;
  --dark-bg: #0f1729;
  --dark-card: #1a2332;
  --border: #e2e8f0;
  --success: #48bb78;
  --warning: #ed8936;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --max-width: 1200px;
  --nav-height: 72px;
}

/* 基础重置 */
*, *::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;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 加载动画 */
@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 pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* 通用工具类 */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-title {
  font-size: 2.4rem; font-weight: 700; text-align: center;
  margin-bottom: 16px; color: var(--text);
}
.section-subtitle {
  font-size: 1.1rem; color: var(--text-muted); text-align: center;
  max-width: 600px; margin: 0 auto 56px;
}
.dark-section { background: var(--dark-bg); color: #e2e8f0; }
.dark-section .section-title { color: #fff; }
.dark-section .section-subtitle { color: #a0aec0; }

/* 按钮样式 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 32px; border-radius: var(--radius-sm);
  font-size: 1rem; font-weight: 600; border: none; cursor: pointer;
  transition: all 0.3s ease; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(14,122,198,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14,122,198,0.45);
}
.btn-secondary {
  background: var(--bg); color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-dark {
  background: var(--dark-card); color: #fff;
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-dark:hover { background: rgba(255,255,255,0.1); }
.btn-lg { padding: 16px 40px; font-size: 1.1rem; }

/* =============================================
   导航栏
   ============================================= */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height); background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.navbar.scrolled { box-shadow: var(--shadow); }
.nav-inner {
  max-width: var(--max-width); 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: 1.3rem; font-weight: 700; color: var(--text);
  text-decoration: none;
}
.nav-logo svg { width: 36px; height: 36px; flex-shrink: 0; }
.nav-links {
  display: flex; align-items: center; gap: 8px; list-style: none;
}
.nav-links a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: var(--radius-sm);
  color: var(--text-secondary); text-decoration: none;
  font-weight: 500; font-size: 0.95rem; transition: all 0.2s ease;
}
.nav-links a:hover { color: var(--primary); background: rgba(14,122,198,0.06); }
.nav-links a.active {
  color: var(--primary); background: rgba(14,122,198,0.1);
  font-weight: 600;
}
.nav-links a svg { width: 18px; height: 18px; }

/* 移动端菜单按钮 */
.menu-toggle {
  display: none; width: 40px; height: 40px; border: none;
  background: transparent; cursor: pointer; padding: 8px;
}
.menu-toggle svg { width: 24px; height: 24px; stroke: var(--text); }

/* =============================================
   页脚
   ============================================= */
.footer {
  background: var(--dark-bg); color: #a0aec0; padding: 48px 0 32px;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
  text-align: center;
}
.footer-brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 16px;
}
.footer-brand svg { width: 32px; height: 32px; }
.footer-links {
  display: flex; justify-content: center; gap: 24px; margin-bottom: 24px;
  flex-wrap: wrap; list-style: none;
}
.footer-links a { color: #a0aec0; text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--secondary); }
.footer-seal {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(72,187,120,0.15); color: var(--success);
  padding: 8px 16px; border-radius: 20px; font-size: 0.85rem; margin-bottom: 16px;
}
.footer-copy {
  font-size: 0.85rem; color: #64748b; line-height: 1.8;
}

/* =============================================
   卡片
   ============================================= */
.card {
  background: var(--bg); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 32px;
  transition: all 0.3s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-4px);
  border-color: transparent;
}
.card-icon {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(14,122,198,0.1) 0%, rgba(52,183,241,0.1) 100%);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.card-icon svg { width: 28px; height: 28px; color: var(--primary); }
.card-title { font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.card-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; }

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* =============================================
   星级评分
   ============================================= */
.stars { display: flex; gap: 3px; color: #f6ad55; margin-bottom: 8px; }
.stars svg { width: 18px; height: 18px; fill: currentColor; }

/* =============================================
   对比表格
   ============================================= */
.compare-table {
  width: 100%; border-collapse: collapse; font-size: 0.95rem;
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.compare-table th {
  background: var(--primary); color: #fff; padding: 16px 20px;
  text-align: left; font-weight: 600;
}
.compare-table td {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: var(--bg-warm); }
.compare-table .check { color: var(--success); }
.compare-table .cross { color: #e53e3e; }
.compare-table .neutral { color: var(--text-muted); }

/* =============================================
   FAQ 折叠面板
   ============================================= */
.faq-item {
  border-bottom: 1px solid var(--border); overflow: hidden;
}
.faq-question {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; cursor: pointer; font-weight: 600; font-size: 1.05rem;
  color: var(--text); background: none; border: none; width: 100%; text-align: left;
}
.faq-question svg { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; transition: transform 0.3s ease; }
.faq-question:hover { color: var(--primary); }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease;
  color: var(--text-secondary); line-height: 1.8; font-size: 0.95rem;
}
.faq-item.open .faq-answer { max-height: 500px; padding-bottom: 20px; }

/* =============================================
   数据统计计数器
   ============================================= */
.stat-number {
  font-size: 2.8rem; font-weight: 700; color: var(--primary);
  line-height: 1; margin-bottom: 8px;
}
.stat-label { font-size: 0.95rem; color: var(--text-muted); }

/* =============================================
   评价卡片
   ============================================= */
.review-card {
  background: var(--bg); border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--border); transition: all 0.3s ease;
}
.review-card:hover { box-shadow: var(--shadow); }
.review-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.review-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 1rem;
}
.review-meta { display: flex; flex-direction: column; }
.review-name { font-weight: 600; font-size: 1rem; color: var(--text); }
.review-date { font-size: 0.8rem; color: var(--text-muted); }
.review-text { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; }

/* =============================================
   平台下载卡片
   ============================================= */
.platform-card {
  background: var(--bg); border-radius: var(--radius); padding: 36px 28px;
  border: 1px solid var(--border); text-align: center; transition: all 0.3s ease;
}
.platform-card:hover {
  box-shadow: var(--shadow-lg); transform: translateY(-6px);
  border-color: var(--primary-light);
}
.platform-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius); background: var(--bg-warm);
}
.platform-icon svg { width: 36px; height: 36px; color: var(--primary); }
.platform-name { font-size: 1.25rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.platform-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }

/* =============================================
   步骤指引
   ============================================= */
.step-item {
  display: flex; gap: 20px; margin-bottom: 32px;
}
.step-num {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}
.step-content h4 { font-size: 1.15rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.step-content p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.7; }

/* =============================================
   版本日志
   ============================================= */
.changelog-item {
  padding: 24px; border-left: 3px solid var(--primary); margin-bottom: 16px;
  background: var(--bg-warm); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.changelog-version {
  font-size: 1.1rem; font-weight: 700; color: var(--primary); margin-bottom: 4px;
}
.changelog-date { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.changelog-list { list-style: none; }
.changelog-list li {
  padding: 4px 0; padding-left: 20px; position: relative;
  font-size: 0.95rem; color: var(--text-secondary);
}
.changelog-list li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--secondary);
}

/* =============================================
   标签/徽章
   ============================================= */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
}
.badge-green { background: rgba(72,187,120,0.15); color: var(--success); }
.badge-blue { background: rgba(14,122,198,0.12); color: var(--primary); }
.badge-orange { background: rgba(237,137,54,0.15); color: var(--warning); }

/* =============================================
   响应式
   ============================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .section { padding: 56px 0; }
  .section-title { font-size: 1.8rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-height); left: 0; right: 0;
    background: rgba(255,255,255,0.98); backdrop-filter: blur(16px);
    flex-direction: column; padding: 16px 24px; gap: 4px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 12px 16px; }
  .menu-toggle { display: block; }
  .compare-table { font-size: 0.85rem; }
  .compare-table th, .compare-table td { padding: 12px 14px; }
  .footer-links { gap: 16px; }
}
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section-title { font-size: 1.6rem; }
  .btn-lg { padding: 14px 28px; font-size: 1rem; }
}
