/* ===== 彩虹物语官网样式 ===== */
:root {
  --c-pink: #ff5f9e;
  --c-orange: #ff8a3d;
  --c-yellow: #ffc93d;
  --c-green: #4cd97b;
  --c-blue: #3fa9f5;
  --c-purple: #9b5de5;
  --c-dark: #2b2350;
  --c-text: #4a4460;
  --rainbow: linear-gradient(90deg, #ff5f9e, #ff8a3d, #ffc93d, #4cd97b, #3fa9f5, #9b5de5);
  --shadow-card: 0 12px 32px rgba(80, 60, 160, 0.16);
  --radius: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--c-text);
  background: #fdf8ff;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

.section { padding: 88px 24px; max-width: 1180px; margin: 0 auto; }

.section-title {
  font-family: "ZCOOL KuaiLe", "Noto Sans SC", sans-serif;
  font-size: clamp(30px, 5vw, 44px);
  text-align: center;
  color: var(--c-dark);
  position: relative;
  display: block;
  width: fit-content;
  margin: 0 auto;
  padding-bottom: 14px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 76px;
  height: 6px;
  border-radius: 3px;
  background: var(--rainbow);
}

.section-sub {
  text-align: center;
  margin: 14px 0 44px;
  font-size: 16px;
  color: #8a84a5;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 14px 38px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
  cursor: pointer;
}
.btn-primary {
  background: linear-gradient(135deg, var(--c-pink), var(--c-orange));
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 95, 158, 0.45);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 32px rgba(255, 95, 158, 0.55); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  color: var(--c-dark);
  border: 2px solid rgba(43, 35, 80, 0.15);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--c-pink); color: var(--c-pink); }
.btn-big { padding: 16px 52px; font-size: 19px; }

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(80, 60, 160, 0.12);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 24px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  transition: color 0.3s;
}
.nav-logo img { width: 42px; height: 42px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.nav-logo-text { position: relative; display: inline-block; }
.logo-badge {
  position: absolute;
  top: -12px;
  right: -52px;
  font-style: normal;
  font-family: "Noto Sans SC", sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #ff3d68, #ff8a3d);
  padding: 4px 7px;
  border-radius: 8px 8px 8px 2px;
  box-shadow: 0 3px 8px rgba(255, 61, 104, 0.5);
  white-space: nowrap;
  animation: badgePulse 2s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  text-decoration: none;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--c-yellow); }
.navbar.scrolled .nav-logo { color: var(--c-dark); text-shadow: none; }
.navbar.scrolled .nav-links a { color: var(--c-dark); text-shadow: none; }
.navbar.scrolled .nav-links a:hover { color: var(--c-pink); }
.nav-cta {
  background: linear-gradient(135deg, var(--c-pink), var(--c-orange));
  color: #fff !important;
  padding: 9px 22px;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(255, 95, 158, 0.4);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 26px; height: 3px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  transition: transform 0.3s, opacity 0.3s, background 0.3s;
}
.navbar.scrolled .nav-toggle span { background: var(--c-dark); box-shadow: none; }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== 英雄区 ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 90px;
}
.hero-carousel { position: absolute; inset: 0; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  animation: heroZoom 7s ease-out forwards;
}
@keyframes heroZoom {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}
.hero-dots {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 10px;
  z-index: 3;
}
.hero-dots button {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}
.hero-dots button.active { background: #fff; transform: scale(1.25); }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,8,45,0.55) 0%, rgba(15,8,45,0.35) 40%, rgba(15,8,45,0.78) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  border-radius: 28px;
  padding: 36px 44px;
  box-shadow: 0 20px 60px rgba(20, 10, 60, 0.35);
}
.hero-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.hero-icon {
  width: 92px; height: 92px;
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  border: 3px solid rgba(255,255,255,0.8);
}
.hero-title {
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: clamp(40px, 7vw, 64px);
  color: #fff;
  text-shadow: 0 4px 18px rgba(0,0,0,0.4);
  line-height: 1.1;
  text-align: left;
}
.hero-sub {
  color: #ffe58a;
  font-weight: 700;
  font-size: clamp(15px, 2.6vw, 20px);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  text-align: left;
}
.hero-tagline {
  margin: 22px 0 14px;
  color: #fff;
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.hero-tagline strong {
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 1.5em;
  background: linear-gradient(180deg, #fff6b7, #ffd23d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}
.meta-tag {
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.tag-launch { background: rgba(255, 201, 61, 0.3); border-color: #ffd23d; color: #fff3c4; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.rainbow-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 8px;
  background: var(--rainbow);
  z-index: 3;
}

/* ===== 福利区 ===== */
.welfare { text-align: center; }
.welfare-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.welfare-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 34px 20px 30px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.welfare-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--rainbow);
}
.welfare-card:hover { transform: translateY(-8px); box-shadow: 0 20px 44px rgba(80, 60, 160, 0.24); }
.welfare-num {
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: 40px;
  background: linear-gradient(135deg, var(--c-pink), var(--c-orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.welfare-card h3 { font-size: 19px; color: var(--c-dark); margin-bottom: 10px; }
.welfare-card p { font-size: 14px; color: #8a84a5; line-height: 1.7; }
.welfare-banner {
  margin-top: 44px;
  display: inline-block;
  padding: 16px 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff3d6, #ffe0ec);
  border: 2px dashed var(--c-orange);
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: clamp(16px, 2.6vw, 22px);
  color: var(--c-orange);
}
.wb-icon { color: var(--c-yellow); margin: 0 8px; }

/* ===== 游戏简介 ===== */
.about { max-width: none; background: linear-gradient(180deg, #fdf8ff, #eef6ff); }
.about-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.about-desc { font-size: 17px; line-height: 2; margin-top: 18px; }
.about-features { list-style: none; margin-top: 26px; display: grid; gap: 14px; }
.about-features li {
  font-size: 16px;
  font-weight: 500;
  color: var(--c-dark);
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.7);
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(80, 60, 160, 0.08);
}
.dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.d1 { background: var(--c-pink); }
.d2 { background: var(--c-yellow); }
.d3 { background: var(--c-green); }
.d4 { background: var(--c-purple); }
.about-media img {
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(80, 60, 160, 0.28);
  border: 6px solid #fff;
  transform: rotate(1.5deg);
  transition: transform 0.4s;
}
.about-media img:hover { transform: rotate(0deg) scale(1.02); }

/* ===== 截图画廊 ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery-item {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  cursor: zoom-in;
  position: relative;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.5s;
}
.gallery-item::after {
  content: "点击放大";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(43, 35, 80, 0.45);
  color: #fff;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item:hover img { transform: scale(1.08); }

/* ===== 原画横滚 ===== */
.artwork { max-width: none; padding-left: 0; padding-right: 0; background: linear-gradient(180deg, #eef6ff, #fdf8ff); }
.art-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 30px max(24px, calc((100vw - 1180px) / 2)) 40px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.art-scroll::-webkit-scrollbar { height: 8px; }
.art-scroll::-webkit-scrollbar-track { background: #eee7fa; border-radius: 4px; }
.art-scroll::-webkit-scrollbar-thumb { background: linear-gradient(90deg, var(--c-pink), var(--c-purple)); border-radius: 4px; }
.art-scroll img {
  flex: 0 0 clamp(240px, 32vw, 400px);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  scroll-snap-align: center;
  transition: transform 0.3s;
}
.art-scroll img:hover { transform: translateY(-8px); }

/* ===== 视频区 ===== */
.video-wrap {
  max-width: 880px;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(80, 60, 160, 0.3);
  border: 6px solid #fff;
}
.video-wrap video { width: 100%; display: block; background: #000; }

/* ===== 下载区 ===== */
.download {
  max-width: none;
  background: linear-gradient(135deg, #3b2a6e, #6a3fa0 55%, #c14b8a);
  text-align: center;
  color: #fff;
}
.download-inner { max-width: 720px; margin: 0 auto; }
.download-icon {
  width: 110px; height: 110px;
  border-radius: 26px;
  margin: 0 auto 22px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
  border: 4px solid rgba(255,255,255,0.7);
  animation: float 3.2s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.download h2 {
  font-family: "ZCOOL KuaiLe", sans-serif;
  font-size: clamp(28px, 5vw, 40px);
  margin-bottom: 12px;
}
.download-info { color: #d9c8ff; font-size: 15px; margin-bottom: 8px; }
.download-slogan { font-size: 18px; margin-bottom: 32px; color: #ffe9f3; }
.download .btn-ghost { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.5); }
.download .btn-ghost:hover { border-color: #fff; color: #fff; }

/* ===== 页脚 ===== */
.footer {
  background: var(--c-dark);
  color: #b3abd4;
  text-align: center;
  padding: 36px 24px;
  font-size: 14px;
  line-height: 1.9;
}
.footer-note { font-size: 12px; color: #7d76a0; max-width: 640px; margin: 10px auto 0; }
.friend-links {
  max-width: 860px;
  margin: 0 auto 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 6px;
}
.fl-title { color: #b3abd4; font-weight: 700; margin-right: 4px; }
.friend-links a {
  color: #9d95c4;
  text-decoration: none;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.friend-links a:hover {
  color: #fff;
  border-color: var(--c-pink);
  background: rgba(255, 95, 158, 0.18);
}

/* ===== 灯箱 ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 8, 40, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.lightbox.show { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 84vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  font-size: 26px;
  width: 52px; height: 52px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(255,95,158,0.6); }
.lb-close { top: 26px; right: 26px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ===== 滚动显现动画 ===== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== 下载二维码 ===== */
.dl-hover-wrap { position: relative; display: inline-block; }
.qr-pop {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #fff;
  border-radius: 16px;
  padding: 14px 14px 10px;
  box-shadow: 0 16px 44px rgba(20, 10, 60, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  z-index: 10;
  pointer-events: none;
}
.qr-pop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 9px solid transparent;
  border-top-color: #fff;
}
@media (hover: hover) and (pointer: fine) {
  .dl-hover-wrap:hover .qr-pop {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}
.qr-pop-box { width: 140px; height: 140px; display: block; }
.qr-pop-box img, .qr-pop-box canvas { width: 140px !important; height: 140px !important; display: block; }
.qr-pop-text { font-size: 13px; font-weight: 700; color: var(--c-dark); white-space: nowrap; }
.download-qr {
  margin-top: 34px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  padding: 20px 26px 16px;
  backdrop-filter: blur(8px);
}
.download-qr-box {
  width: 150px;
  height: 150px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
}
.download-qr-box img, .download-qr-box canvas { width: 134px !important; height: 134px !important; display: block; }
.download-qr p { color: #ffe9f3; font-size: 14px; font-weight: 500; }

/* ===== 返回顶部 ===== */
.back-to-top {
  position: fixed;
  right: 26px;
  bottom: 30px;
  z-index: 150;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--c-pink), var(--c-orange));
  box-shadow: 0 10px 26px rgba(255, 95, 158, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, box-shadow 0.3s;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(255, 95, 158, 0.65);
}

/* ===== 响应式 ===== */
@media (max-width: 960px) {
  .welfare-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 36px; }
  .about-text { text-align: center; }
  .about-features li { text-align: left; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .section { padding: 64px 18px; }
  .nav-links {
    position: fixed;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    padding: 20px 0 28px;
    gap: 20px;
    box-shadow: 0 14px 30px rgba(80, 60, 160, 0.18);
    transform: translateY(-130%);
    transition: transform 0.35s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { color: var(--c-dark); text-shadow: none; }
  .nav-links a:hover { color: var(--c-pink); }
  .nav-links .nav-cta { color: #fff !important; }
  .nav-toggle { display: flex; }
  .hero { padding: 100px 14px 70px; }
  .hero-content { padding: 26px 20px; }
  .hero-icon { width: 68px; height: 68px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .welfare-grid { grid-template-columns: 1fr; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
