:root {
  --bg-1: #e8f5e9;
  --bg-2: #e3f2fd;
  --card: #ffffff;
  --ink: #2c3e50;
  --muted: #5f7486;
  --accent: #43a047;
  --accent-2: #1e88e5;
  --shadow: 0 8px 24px rgba(31, 60, 90, 0.10);
}

* { box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  -webkit-text-size-adjust: 100%;
}

/* ===== 顶部 ===== */
.hero {
  text-align: center;
  padding: 56px 20px 28px;
}
.hero-badge {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12));
}
.hero h1 {
  font-size: 30px;
  margin: 0 0 10px;
  letter-spacing: 1px;
}
.hero-sub {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ===== 卡片网格：从一开始就是流式响应式 ===== */
.grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 20px 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(31, 60, 90, 0.16);
}
.icon {
  font-size: 50px;
  margin-bottom: 14px;
}
.card h2 {
  font-size: 20px;
  margin: 0 0 10px;
}
.card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 20px;
  flex: 1;
}

/* ===== 按钮 ===== */
.actions {
  display: flex;
  gap: 12px;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center;
}
.btn {
  flex: 1 1 120px;
  min-width: 120px;
  padding: 12px 16px;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: opacity .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: var(--accent);
  color: #fff;
}
.btn.primary:hover { opacity: 0.92; }
.btn.ghost {
  background: #f0f4f8;
  color: var(--ink);
}
.btn.ghost:hover { background: #e6edf3; }
.btn.copied {
  background: #e8f5e9;
  color: var(--accent);
}
.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: #b0bec5;
}

/* ===== 页脚 ===== */
footer {
  text-align: center;
  padding: 32px 20px 40px;
  color: var(--muted);
  font-size: 13px;
}
.visitor {
  margin-top: 8px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}
.visitor #visitor-count {
  color: var(--accent-2);
  font-size: 16px;
}

/* ===== 敬请期待卡片 ===== */
.card.coming-soon {
  border: 2px dashed #c5d8e8;
  background: linear-gradient(135deg, #f7fbff 0%, #eef6ff 100%);
}
.card.coming-soon .icon {
  opacity: .92;
}

/* ===== 关注公众号 ===== */
.follow {
  max-width: 560px;
  margin: 4px auto 0;
  padding: 28px 24px 8px;
  text-align: center;
}
.follow-title {
  font-size: 19px;
  margin: 0 0 8px;
}
.follow-sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 20px;
}
.qr-wrap {
  display: inline-block;
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.qr {
  display: block;
  width: 200px;
  height: 200px;
  border-radius: 10px;
}
.follow-tip {
  color: var(--muted);
  font-size: 13px;
  margin: 16px 0 0;
}

/* ===== 小屏手机（≤480px）===== */
@media (max-width: 480px) {
  .hero { padding: 40px 16px 20px; }
  .hero h1 { font-size: 25px; }
  .hero-sub { font-size: 14px; }
  .grid {
    padding: 18px 16px 8px;
    gap: 16px;
    grid-template-columns: 1fr;
  }
  .card { padding: 24px 20px; }
  .btn { flex: 1 1 100%; min-width: 100%; }
  .follow { padding: 20px 16px 4px; }
  .qr { width: 160px; height: 160px; }
}

/* ===== 平板（481–768px）保持双列由 auto-fill 自动处理 ===== */
@media (min-width: 481px) and (max-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
