:root {
  --bg: #fff8f0;
  --ink: #3b3a55;
  --muted: #8b88a3;
  --pink: #ff7eb9;
  --yellow: #ffd166;
  --blue: #6ec6ff;
  --green: #6fe3b4;
  --purple: #b48cff;
  --orange: #ffa26b;
  --card: #ffffff;
  --shadow: 0 12px 30px rgba(90, 80, 140, 0.12);
  --radius: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, .logo-text, .section-tag, .hero-badge {
  font-family: "ZCOOL KuaiLe", "Noto Sans SC", sans-serif;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 按钮 ---------- */
.btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn-small {
  padding: 8px 18px;
  font-size: 14px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.08);
}

.btn-primary {
  padding: 14px 30px;
  font-size: 16px;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  color: #fff;
  box-shadow: 0 8px 20px rgba(255, 126, 185, 0.4);
}

.btn-ghost {
  padding: 14px 30px;
  font-size: 16px;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 240, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 2px dashed rgba(180, 140, 255, 0.25);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.logo-icon {
  font-size: 28px;
}

.logo-text {
  font-size: 24px;
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 3px;
  border-radius: 3px;
  background: var(--pink);
  transition: width 0.25s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ---------- 英雄区 ---------- */
.hero {
  position: relative;
  padding: 80px 0 90px;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(110, 198, 255, 0.18), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(255, 126, 185, 0.16), transparent 45%),
    radial-gradient(circle at 60% 90%, rgba(111, 227, 180, 0.18), transparent 45%);
}

.hero-clouds {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 10% 30%, #fff 22px, transparent 23px),
    radial-gradient(circle at 20% 22%, #fff 30px, transparent 31px),
    radial-gradient(circle at 30% 34%, #fff 18px, transparent 19px),
    radial-gradient(circle at 80% 25%, #fff 26px, transparent 27px),
    radial-gradient(circle at 92% 18%, #fff 20px, transparent 21px),
    radial-gradient(circle at 85% 38%, #fff 16px, transparent 17px);
  opacity: 0.7;
}

.hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text {
  flex: 1 1 50%;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--yellow);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 18px;
}

.hero-text h1 {
  font-size: 52px;
  line-height: 1.25;
  color: var(--ink);
}

.hero-text h1 em {
  font-style: normal;
  color: var(--pink);
}

.hero-text p {
  margin: 20px 0 28px;
  font-size: 18px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat strong {
  font-size: 30px;
  color: var(--ink);
  font-family: "ZCOOL KuaiLe", sans-serif;
}

.stat span {
  color: var(--muted);
  font-size: 14px;
}

/* 盒子视觉 */
.hero-visual {
  flex: 1 1 40%;
  display: flex;
  justify-content: center;
}

.box-stage {
  position: relative;
  width: 340px;
  height: 340px;
}

.box {
  position: absolute;
  width: 220px;
  height: 160px;
  border-radius: 18px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.box-back {
  background: var(--purple);
  transform: translate(-50%, -50%) rotate(-8deg);
  opacity: 0.9;
}

.box-front {
  background: linear-gradient(160deg, var(--yellow), var(--orange));
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bob 4s ease-in-out infinite;
}

.box-lid {
  position: absolute;
  top: -26px;
  left: 0;
  width: 100%;
  height: 40px;
  background: var(--pink);
  border-radius: 12px 12px 4px 4px;
  animation: lid-open 4s ease-in-out infinite;
  transform-origin: left center;
}

.box-face {
  font-size: 64px;
}

.float-item {
  position: absolute;
  font-size: 34px;
  animation: float 5s ease-in-out infinite;
}

.fi-1 { top: 10px; left: 30px; animation-delay: 0s; }
.fi-2 { top: 30px; right: 20px; animation-delay: 0.8s; }
.fi-3 { bottom: 20px; left: 10px; animation-delay: 1.6s; }
.fi-4 { bottom: 10px; right: 40px; animation-delay: 2.4s; }
.fi-5 { top: 50%; left: 0; animation-delay: 3.2s; }

@keyframes bob {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-14px); }
}

@keyframes lid-open {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-18deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

/* ---------- 通用 section ---------- */
.section {
  padding: 90px 0;
}

.section-head {
  text-align: center;
  margin-bottom: 50px;
}

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 126, 185, 0.14);
  color: var(--pink);
  font-size: 15px;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: 38px;
  color: var(--ink);
}

.section-head p {
  color: var(--muted);
  margin-top: 10px;
}

/* ---------- 游戏卡片 ---------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.game-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.game-card:hover {
  transform: translateY(-10px) rotate(-1deg);
  box-shadow: 0 20px 40px rgba(90, 80, 140, 0.2);
}

.game-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  margin-bottom: 18px;
}

.cover-1 { background: linear-gradient(135deg, #ffe0ee, #ffc4dd); }
.cover-2 { background: linear-gradient(135deg, #fff3d1, #ffe4a3); }
.cover-3 { background: linear-gradient(135deg, #dff1ff, #bfe3ff); }
.cover-4 { background: linear-gradient(135deg, #dffaed, #bdf0dc); }
.cover-5 { background: linear-gradient(135deg, #efe6ff, #dcc9ff); }
.cover-6 { background: linear-gradient(135deg, #ffe7d6, #ffd1b3); }

.game-card h3 {
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 8px;
}

.game-card p {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 18px;
}

.card-play {
  border: none;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 700;
  font-family: inherit;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.card-play:hover {
  transform: scale(1.06);
}

/* ---------- 特色区 ---------- */
.features {
  background: #fff;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- 活动区 ---------- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-item {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.news-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--blue);
  color: #fff;
  border-radius: 16px;
  padding: 10px 16px;
  min-width: 72px;
}

.news-date strong {
  font-size: 26px;
  font-family: "ZCOOL KuaiLe", sans-serif;
  line-height: 1;
}

.news-date span {
  font-size: 13px;
  opacity: 0.9;
}

.news-body {
  flex: 1;
}

.news-body h3 {
  font-size: 19px;
  color: var(--ink);
  margin-bottom: 4px;
}

.news-body p {
  color: var(--muted);
  font-size: 15px;
}

/* ---------- 下载区 ---------- */
.download {
  background: linear-gradient(135deg, #fff0f7, #f0f4ff);
}

.download-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.download-text h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.download-text p {
  color: var(--muted);
  font-size: 17px;
  margin-bottom: 24px;
}

.download-btns {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.qr-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.qr-placeholder {
  width: 160px;
  height: 160px;
  border: 3px dashed var(--purple);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.qr-emoji {
  font-size: 48px;
}

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--ink);
  color: #cfcde0;
  padding: 50px 0 30px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  font-family: "ZCOOL KuaiLe", sans-serif;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: #cfcde0;
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--yellow);
}

.footer-copy {
  font-size: 13px;
  opacity: 0.7;
}

/* ---------- 彩纸特效 ---------- */
.confetti {
  position: absolute;
  pointer-events: none;
  z-index: 60;
  animation: confetti-fly 0.9s ease-out forwards;
}

@keyframes confetti-fly {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--dx, 0px), var(--dy, -140px)) rotate(360deg);
    opacity: 0;
  }
}

/* ---------- 提示框 ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 滚动浮现动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-actions,
  .hero-stats {
    justify-content: center;
  }

  .game-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-item {
    flex-wrap: wrap;
  }

  .download-inner {
    flex-direction: column;
    text-align: center;
  }

  .download-btns {
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .nav-links {
    display: none;
  }

  .hero-text h1 {
    font-size: 38px;
  }

  .game-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }
}
