/* ===== 基础变量 ===== */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --primary: #4f6ef7;
  --primary-hover: #3b5be0;
  --border: #e5e7eb;
  --shadow: 0 4px 16px rgba(31, 41, 55, 0.08);
}

body.dark {
  --bg: #111827;
  --surface: #1f2937;
  --text: #f9fafb;
  --text-secondary: #9ca3af;
  --primary: #6b83ff;
  --primary-hover: #8199ff;
  --border: #374151;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ===== 全局 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px;
}

/* ===== 头部 ===== */
.hero {
  text-align: center;
  padding: 32px 0 48px;
}

.avatar {
  font-size: 56px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

.highlight {
  color: var(--primary);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 28px;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.15s, background 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

/* ===== 卡片 ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.card:hover {
  transform: translateY(-4px);
}

.card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

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

/* ===== 计数器 ===== */
.counter-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
  margin-bottom: 48px;
}

.counter-box h2 {
  font-size: 22px;
  margin-bottom: 8px;
}

.counter-box p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.counter span {
  font-size: 40px;
  font-weight: 700;
  min-width: 64px;
  color: var(--primary);
}

.counter-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.counter-btn:hover {
  background: var(--primary-hover);
  transform: scale(1.08);
}

/* ===== 页脚 ===== */
.footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 16px 0;
}

/* ===== 响应式 ===== */
@media (max-width: 560px) {
  .hero h1 {
    font-size: 28px;
  }
  .container {
    padding: 32px 16px;
  }
}
