/*
  挥动网球官网样式（浅色主题，品牌色 #1479B8）
  - Apple 风格：留白、卡片、细边框、柔和阴影
  - 响应式：移动端优先
*/

:root {
  /* 基础配色 */
  --brand: #1479B8;         /* 主色 */
  --brand-2: #0f5f91;       /* 主色深一点，用于渐变/hover */
  --brand-3: #1e86c5;       /* 主色浅一点，用于渐变/聚焦 */

  --bg: #f6f8fb;            /* 页面背景浅灰 */
  --card: #ffffff;          /* 卡片底 */
  --text: #0b1220;          /* 主要文字 */
  --text-dim: #5b6b80;      /* 次要文字 */
  --border: #e6ecf2;        /* 细边框 */
  --shadow: 0 6px 20px rgba(15, 31, 55, 0.08), 0 2px 8px rgba(15, 31, 55, 0.06);
}

* { box-sizing: border-box; }

html, body {
  padding: 0;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", "Source Han Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: saturate(180%) blur(10px);
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid var(--border);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand img { border-radius: 10px;}
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-text strong { font-weight: 800; letter-spacing: 0.2px; }
.brand-text em { font-style: normal; color: var(--text-dim); font-size: 14px; }

.nav { display: none; gap: 16px; }
.nav a { color: var(--text-dim); text-decoration: none; transition: color 0.2s ease; }
.nav a:hover { color: var(--text); }

@media (min-width: 768px) { .nav { display: flex; } }

/* Hero */
.hero {
  padding: 56px 0 40px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(20,121,184,0.10) 0%, rgba(20,121,184,0.04) 40%, transparent 100%),
    var(--bg);
}

.hero-inner { display: grid; grid-template-columns: 1fr; gap: 24px; }

.hero-copy h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 8px; letter-spacing: 0.3px; }
.subtitle { color: var(--text-dim); margin: 0 0 20px; }

.cta-group { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); border: 1px solid var(--border); }
.hero-visual img { display: block; width: 100%; height: auto; }

@media (min-width: 960px) { .hero-inner { grid-template-columns: 1.1fr 1fr; align-items: center; } }

/* Buttons */
.btn {
  --btn-fg: #ffffff;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-radius: 12px;
  text-decoration: none; font-weight: 700; letter-spacing: 0.2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary { color: var(--btn-fg); background: linear-gradient(180deg, var(--brand-3), var(--brand)); box-shadow: 0 6px 16px rgba(20, 121, 184, 0.24); border: 1px solid rgba(20,121,184,0.25); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(20,121,184,0.3); }

.btn-ghost { color: var(--brand); background: #ffffff; border: 1px solid var(--border); }
.btn-ghost:hover { border-color: #d6e4ef; box-shadow: 0 6px 16px rgba(15,31,55,0.06); }

.btn-download { color: #fff; background: linear-gradient(180deg, var(--brand-3), var(--brand)); border: 1px solid rgba(20,121,184,0.25); box-shadow: 0 6px 16px rgba(20,121,184,0.18); }
.btn-download .icon { font-weight: 700; }

.download-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: #f9fbfd; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { margin: 0 0 12px; font-size: clamp(20px, 2.8vw, 28px); letter-spacing: 0.3px; }
.section-desc, .hint { color: var(--text-dim); margin: 0 0 20px; }
.hint { font-size: 14px; }

/* Changelog */
.changelog-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 600;
}

.tab-btn:hover {
  background: var(--bg);
  color: var(--text);
}

.tab-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.history-link {
  margin-left: auto;
  color: var(--brand);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.history-link:hover {
  color: var(--brand-2);
}

.changelog-content {
  position: relative;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.changelog-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.changelog-list li { display: grid; grid-template-columns: 96px 120px 1fr; gap: 12px; align-items: baseline; padding: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow); }
.changelog-list .version { font-weight: 800; color: var(--brand); }
.changelog-list .date { color: var(--text-dim); font-size: 14px; }
.changelog-list .notes { color: var(--text); }

/* 最新版本样式 */
.latest-versions li { grid-template-columns: 140px 120px 1fr; }
.version-with-badge { 
  display: flex; 
  flex-direction: column; 
  gap: 6px; 
  align-items: flex-start;
}
.version-with-badge .version { 
  font-weight: 800; 
  color: var(--brand); 
  margin: 0;
}
.version-with-badge .badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

@media (max-width: 600px) { .changelog-list li { grid-template-columns: 1fr; gap: 4px; } }

/* Feature blocks */
.feature { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: center; margin: 24px 0; }
.feature .feature-media { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: var(--card); border: 1px solid var(--border); }
.feature .feature-content { padding: 8px 0 0; }
.feature .feature-content h3 { margin: 0 0 8px; font-size: clamp(18px, 2.6vw, 24px); }
.feature .feature-content p, .feature .feature-content li { color: var(--text); }
.feature .feature-content ul { margin: 0; padding-left: 18px; }

@media (min-width: 960px) {
  .feature { grid-template-columns: 1fr 1.1fr; gap: 28px; }
  .feature.reverse { grid-template-columns: 1.1fr 1fr; }
  .feature.reverse .feature-media { order: 2; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: #ffffff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.footer-inner a { color: var(--text-dim); text-decoration: none; }
.footer-inner a:hover { color: var(--brand); }

/* 链接基础色 */
 a { color: var(--brand); }
 a:hover { color: var(--brand-2); }

/* Hero Small (for changelog page) */
.hero-small {
  text-align: center;
  padding: 40px 0 20px;
  background: linear-gradient(135deg, #f6f8fb 0%, #ffffff 100%);
}

.hero-small h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  color: var(--text);
}

.hero-small .subtitle {
  margin: 0;
  color: var(--text-dim);
  font-size: clamp(16px, 2.2vw, 18px);
}

/* Version History Styles */
.changelog-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 600;
}

.filter-btn:hover {
  background: var(--bg);
  color: var(--text);
  border-color: var(--brand);
}

.filter-btn.active {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}

.version-timeline {
  display: grid;
  gap: 24px;
}

.version-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.version-item:hover {
  box-shadow: 0 8px 32px rgba(15, 31, 55, 0.12), 0 4px 16px rgba(15, 31, 55, 0.08);
  transform: translateY(-2px);
}

.version-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.version-info h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  color: var(--brand);
}

.platform-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.badge {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge.ios {
  background: #007AFF;
  color: white;
}

.badge.android {
  background: #34A853;
  color: white;
}

.badge.hongmeng {
  background: #FF4D00;
  color: white;
}

.release-date {
  color: var(--text-dim);
  font-size: 14px;
}

.version-status {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.version-status.current {
  background: #34C759;
  color: white;
}

.version-status.milestone {
  background: #FF9500;
  color: white;
}

.platform-updates {
  display: grid;
  gap: 20px;
}

.platform-section h4 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.platform-section ul {
  margin: 0;
  padding-left: 18px;
  list-style: none;
}

.platform-section li {
  position: relative;
  margin-bottom: 6px;
  padding-left: 16px;
  color: var(--text);
  line-height: 1.5;
}

.platform-section li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: bold;
}

@media (min-width: 768px) {
  .platform-updates {
    grid-template-columns: 1fr 1fr;
  }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
