/* ========================================
   每日八段锦 官方网站 - 全局样式
   Primary: #059669 | Background: #FFFBF5
   ======================================== */

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

:root {
  --green: #059669;
  --green-dark: #047857;
  --green-light: #10b981;
  --green-bg: #ecfdf5;
  --warm-bg: #FFFBF5;
  --text: #1F2937;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
  --radius: 12px;
  --max-width: 1024px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--warm-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

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

/* === Navigation === */
.nav {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}

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

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; color: var(--text);
}

.nav-logo img { width: 36px; height: 36px; border-radius: 8px; }

.nav-links { display: flex; gap: 28px; list-style: none; }

.nav-links a {
  color: var(--text-secondary); font-size: 15px; font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--green); }

.nav-toggle {
  display: none; background: none; border: none;
  font-size: 24px; cursor: pointer; color: var(--text);
}

@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    background: white; flex-direction: column; padding: 16px 20px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
}

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 50px; font-size: 16px;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
  border: none; text-decoration: none;
}

.btn-primary {
  background: var(--green); color: white;
}
.btn-primary:hover { background: var(--green-dark); color: white; }

.btn-outline {
  background: transparent; color: var(--green);
  border: 2px solid var(--green);
}
.btn-outline:hover { background: var(--green-bg); }

.btn-lg { padding: 16px 36px; font-size: 18px; }

.btn-sm { padding: 8px 18px; font-size: 14px; }

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-title {
  font-size: 32px; font-weight: 800; text-align: center;
  margin-bottom: 16px; color: var(--text);
}

.section-subtitle {
  font-size: 17px; text-align: center;
  color: var(--text-secondary); margin-bottom: 48px;
}

/* === Hero === */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--green-bg) 0%, var(--warm-bg) 100%);
}

.hero-icon { width: 96px; height: 96px; border-radius: 24px; margin: 0 auto 24px; box-shadow: var(--shadow-lg); }

.hero h1 {
  font-size: 40px; font-weight: 900; color: var(--text);
  margin-bottom: 12px;
}

.hero .subtitle {
  font-size: 20px; color: var(--text-secondary);
  margin-bottom: 32px; line-height: 1.6;
}

.hero .badge {
  display: inline-block; padding: 4px 14px; border-radius: 50px;
  background: rgba(5,150,105,0.1); color: var(--green);
  font-size: 13px; font-weight: 600; margin-bottom: 24px;
}

.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* === Highlights === */
.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.highlight-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px 24px; text-align: center;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.highlight-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.highlight-icon {
  font-size: 40px; margin-bottom: 16px; display: block;
}

.highlight-card h3 {
  font-size: 18px; margin-bottom: 8px; color: var(--text);
}

.highlight-card p {
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
}

/* === Screenshots === */
.screenshots { text-align: center; }

.screenshot-scroll {
  display: flex; gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.screenshot-scroll::-webkit-scrollbar { height: 6px; }
.screenshot-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.screenshot-scroll img {
  scroll-snap-align: start;
  border-radius: 16px; box-shadow: var(--shadow-lg);
  height: 480px; width: auto; flex-shrink: 0;
}

@media (max-width: 768px) {
  .screenshot-scroll img { height: 360px; }
}

@media (max-width: 480px) {
  .screenshot-scroll img { height: 280px; }
}

/* === Forms Grid (Baduanjin forms) === */
.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.form-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}

.form-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.form-card img { width: 100%; height: 160px; object-fit: cover; }

.form-card-body { padding: 16px 20px 20px; }

.form-card-body h3 {
  font-size: 17px; margin-bottom: 8px; color: var(--text);
}

.form-card-body .meta {
  font-size: 13px; color: var(--text-muted); margin-bottom: 8px;
}

.form-card-body p {
  font-size: 14px; color: var(--text-secondary); line-height: 1.5;
}

/* === Download Cards === */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.download-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px 24px; text-align: center;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}

.download-card .platform-icon { font-size: 48px; margin-bottom: 12px; }

.download-card h3 {
  font-size: 20px; margin-bottom: 8px; color: var(--text);
}

.download-card p {
  font-size: 14px; color: var(--text-secondary); margin-bottom: 20px;
}

/* === Article page === */
.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
}

.article-sidebar {
  position: sticky; top: 80px; align-self: start;
}

.article-sidebar h3 {
  font-size: 15px; color: var(--text-secondary); margin-bottom: 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
}

.article-sidebar ul { list-style: none; }

.article-sidebar li { margin-bottom: 4px; }

.article-sidebar a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 14px; color: var(--text-secondary);
  transition: background 0.15s;
}

.article-sidebar a:hover,
.article-sidebar a.active { background: var(--green-bg); color: var(--green); }

.article-content {
  background: var(--white); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow); border: 1px solid var(--border);
  line-height: 1.9; font-size: 16px;
}

.article-content h1 { font-size: 28px; margin-bottom: 16px; color: var(--text); }

.article-content h2 {
  font-size: 22px; margin: 32px 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--green-bg); color: var(--text);
}

.article-content h3 { font-size: 18px; margin: 24px 0 8px; color: var(--text); }

.article-content p { margin-bottom: 14px; }

.article-content ul, .article-content ol { margin: 8px 0 14px 24px; }

.article-content li { margin-bottom: 6px; }

.article-content strong { color: var(--text); }

/* === Article: table === */
.article-content table {
  width: 100%; border-collapse: collapse; margin: 16px 0 24px;
  font-size: 14px;
}

.article-content th {
  background: var(--green-bg); color: var(--green-dark);
  font-weight: 600; text-align: left; padding: 10px 14px;
  border: 1px solid var(--border);
}

.article-content td {
  padding: 10px 14px; border: 1px solid var(--border);
  color: var(--text-secondary);
}

/* === Article: blockquote === */
.article-content blockquote {
  margin: 20px 0; padding: 16px 20px;
  background: var(--green-bg); border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
}

.article-content blockquote p {
  margin-bottom: 4px; color: var(--text);
}

/* === Article: inline code === */
.article-content code {
  background: #f3f4f6; color: var(--green-dark);
  padding: 2px 6px; border-radius: 4px; font-size: 0.9em;
}

@media (max-width: 768px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; margin-bottom: 24px; }
  .article-content { padding: 24px 20px; }
}

/* === Article List === */
.article-list-item {
  display: flex; gap: 20px; padding: 20px;
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); margin-bottom: 16px;
  transition: box-shadow 0.2s;
}

.article-list-item:hover { box-shadow: var(--shadow-md); }

.article-list-item img {
  width: 160px; height: 100px; object-fit: cover;
  border-radius: 8px; flex-shrink: 0;
}

.article-list-body h3 { font-size: 18px; margin-bottom: 6px; }

.article-list-body p { font-size: 14px; color: var(--text-secondary); }

@media (max-width: 640px) {
  .article-list-item { flex-direction: column; }
  .article-list-item img { width: 100%; height: 160px; }
}

/* === Legal / Policy pages === */
.legal-content {
  max-width: 780px; margin: 0 auto;
  background: var(--white); border-radius: var(--radius);
  padding: 48px 40px; box-shadow: var(--shadow); border: 1px solid var(--border);
  line-height: 1.9; font-size: 15px;
}

.legal-content h1 { font-size: 28px; margin-bottom: 24px; text-align: center; }

.legal-content h2 {
  font-size: 19px; margin: 28px 0 10px; color: var(--text);
}

.legal-content p { margin-bottom: 12px; color: var(--text-secondary); }

/* === Footer === */
.footer {
  background: var(--text); color: rgba(255,255,255,0.7);
  padding: 48px 0 32px; margin-top: 80px;
}

.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px; margin-bottom: 32px;
}

.footer h4 {
  color: white; font-size: 15px; margin-bottom: 12px;
}

.footer a { color: rgba(255,255,255,0.6); font-size: 14px; display: block; margin-bottom: 6px; }
.footer a:hover { color: var(--green-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px; text-align: center; font-size: 13px;
}

.footer-icp {
  margin-top: 8px; font-size: 12px;
  color: rgba(255,255,255,0.5);
}
.footer-icp a {
  color: rgba(255,255,255,0.5);
}
.footer-icp a:hover {
  color: var(--green-light);
}

/* === Decorative === */
.ink-dot {
  position: absolute; width: 120px; height: 120px;
  border-radius: 50%; background: radial-gradient(circle, rgba(5,150,105,0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* === Feature two-column (features.html) === */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.feature-row.reverse .feature-img-col { order: 2; }
.feature-row.reverse .feature-text-col { order: 1; }
.feature-text-col h3 { font-size: 26px; margin-bottom: 16px; }
.feature-text-col p { font-size: 16px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 20px; }
.feature-text-col ul { list-style: none; color: var(--text-secondary); font-size: 15px; line-height: 2; }
.feature-img-col { text-align: center; }
.feature-img-col img { border-radius: 16px; box-shadow: var(--shadow-lg); max-width: 320px; margin: 0 auto; }

@media (max-width: 768px) {
  .feature-row { grid-template-columns: 1fr; gap: 24px; }
  .feature-row.reverse .feature-img-col,
  .feature-row.reverse .feature-text-col { order: 0; }
  .feature-img-col img { max-width: 240px; }
  .hero h1 { font-size: 28px; }
  .hero .subtitle { font-size: 16px; }
}

/* === Download: PC QR / Mobile badge === */
.dl-pc-only { display: block; }
.dl-mobile-only { display: none; }

.qr-code {
  width: 160px; height: 160px; margin: 12px auto;
  border-radius: 8px;
}

.qr-hint {
  font-size: 13px; color: var(--text-muted); margin-bottom: 8px;
}

.appstore-badge {
  height: 48px; margin: 8px auto 0;
}

@media (max-width: 768px) {
  .dl-pc-only { display: none; }
  .dl-mobile-only { display: block; }
}

/* === Mobile tweaks === */
@media (max-width: 480px) {
  .section { padding: 48px 0; }
  .section-title { font-size: 24px; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 24px; }
  .hero-icon { width: 72px; height: 72px; border-radius: 18px; }
  .btn-lg { padding: 14px 28px; font-size: 16px; }
  .legal-content { padding: 24px 20px; }
  .screenshot-grid img { max-width: 160px; }
}
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
