/* ========== 基础样式 ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(135deg, #fff8ec 0%, #ffe8d6 100%);
  color: #4a3c2a;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ========== 背景装饰蝴蝶 ========== */
.bg-deco {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.butterfly {
  position: absolute;
  width: 40px;
  height: 40px;
  opacity: 0.4;
  animation: float 8s ease-in-out infinite;
}

.butterfly-1 { top: 15%; left: 8%; animation-delay: 0s; }
.butterfly-2 { top: 35%; right: 10%; animation-delay: 2s; }
.butterfly-3 { bottom: 20%; left: 12%; animation-delay: 4s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(15px, -20px) rotate(5deg); }
  50% { transform: translate(-10px, -15px) rotate(-3deg); }
  75% { transform: translate(20px, -25px) rotate(7deg); }
}

/* ========== Hero 区域 ========== */
.hero {
  text-align: center;
  padding: 60px 20px 30px;
  position: relative;
  z-index: 1;
}

.hero-tomato {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 8px 16px rgba(255, 107, 107, 0.25));
  animation: bounce 3s ease-in-out infinite;
}

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

.title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #c44545;
  margin: 16px 0 4px;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #fff;
}

.subtitle {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  color: #8b6f47;
  font-style: italic;
  margin-bottom: 16px;
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: #5a4a35;
  max-width: 640px;
  margin: 0 auto;
}

/* ========== 容器 ========== */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* ========== 下载卡片 ========== */
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.dl-card {
  background: #fffaf0;
  border: 2px solid #f4d8a8;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(196, 130, 89, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dl-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.dl-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(196, 130, 89, 0.2);
}

.dl-icon {
  display: inline-flex;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #ffe8c8, #ffd9a8);
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

.dl-card--win .dl-icon { color: #0078d4; }
.dl-card--mac .dl-icon { color: #333; }

.dl-icon svg {
  width: 36px;
  height: 36px;
}

.dl-title {
  font-size: 1.6rem;
  color: #c44545;
  margin-bottom: 4px;
  font-weight: 700;
}

.dl-version {
  font-size: 0.85rem;
  color: #8b6f47;
  margin-bottom: 16px;
  font-style: italic;
}

.dl-meta {
  list-style: none;
  text-align: left;
  margin: 0 0 24px;
  padding: 0;
  font-size: 0.92rem;
  color: #5a4a35;
}

.dl-meta li {
  padding: 4px 0;
  border-bottom: 1px dashed rgba(244, 216, 168, 0.5);
}

.dl-meta li:last-child {
  border-bottom: none;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff8a65, #ff6b6b);
  color: #fff;
  text-decoration: none;
  padding: 12px 32px;
  border-radius: 32px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dl-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 107, 0.45);
}

.dl-btn:active {
  transform: translateY(0);
}

.dl-btn-icon {
  font-size: 1.2rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* ========== 游戏元素图标条 ========== */
.elements {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 32px 20px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  margin: 32px 0;
  border: 1px dashed rgba(244, 216, 168, 0.6);
}

.element {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #6b5a45;
  transition: transform 0.2s ease;
}

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

.element svg {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

/* ========== 关于游戏 ========== */
.about {
  margin: 40px 0;
  text-align: center;
}

.section-title {
  font-size: 1.5rem;
  color: #c44545;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}

.section-title::before,
.section-title::after {
  content: "🌿";
  margin: 0 12px;
  font-size: 1rem;
}

.about-text {
  font-size: 1.05rem;
  color: #5a4a35;
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.8;
}

.hl {
  background: linear-gradient(transparent 65%, #ffd166 65%);
  padding: 0 4px;
  font-weight: 600;
  color: #c44545;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.feature {
  background: #fffaf0;
  border: 1px solid #f4d8a8;
  border-radius: 12px;
  padding: 20px 16px;
  text-align: left;
  transition: transform 0.15s ease;
}

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

.feature-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.feature h3 {
  font-size: 1rem;
  color: #c44545;
  margin-bottom: 4px;
}

.feature p {
  font-size: 0.88rem;
  color: #6b5a45;
}

/* ========== 系统要求 ========== */
.requirements {
  margin: 40px 0;
  background: #fffaf0;
  border: 1px solid #f4d8a8;
  border-radius: 16px;
  padding: 28px;
}

.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.req-grid h3 {
  color: #c44545;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.req-grid ul {
  list-style: none;
  padding: 0;
}

.req-grid li {
  padding: 6px 0;
  font-size: 0.92rem;
  color: #5a4a35;
  border-bottom: 1px dashed rgba(244, 216, 168, 0.5);
}

.req-grid li:last-child {
  border-bottom: none;
}

.req-grid li::before {
  content: "✓ ";
  color: #4ec46c;
  font-weight: bold;
  margin-right: 6px;
}

/* ========== 更新日志 ========== */
.changelog {
  margin: 40px 0;
}

.version {
  background: #fffaf0;
  border: 1px solid #f4d8a8;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.version-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.version-tag {
  background: #ff8a65;
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
}

.version-date {
  color: #8b6f47;
  font-size: 0.9rem;
}

.version-label {
  background: #ffd166;
  color: #5a3e2b;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.version ul {
  list-style: none;
  padding: 0;
}

.version li {
  padding: 4px 0;
  font-size: 0.92rem;
  color: #5a4a35;
}

/* ========== Footer ========== */
.footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
  border-top: 1px dashed rgba(244, 216, 168, 0.6);
  color: #8b6f47;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

.footer p {
  margin: 4px 0;
}

.footer-meta {
  font-size: 0.8rem;
  color: #a89373;
}

/* ========== 响应式 ========== */
@media (max-width: 600px) {
  .hero {
    padding: 40px 16px 20px;
  }

  .hero-tomato {
    width: 90px;
    height: 90px;
  }

  .container {
    padding: 16px;
  }

  .dl-card {
    padding: 24px 16px;
  }

  .elements {
    gap: 12px;
    padding: 20px 12px;
  }

  .element svg {
    width: 36px;
    height: 36px;
  }

  .feature {
    padding: 16px 12px;
  }
}

/* ========== 打印样式 ========== */
@media print {
  .bg-deco, .butterfly, .dl-btn {
    display: none;
  }
}