/* ============================================================
   樱花校园模拟器 - 单页样式
   风格：简洁大气 / 樱花粉主题 / 移动端自适应
   ============================================================ */

:root {
  --pink: #f06595;
  --pink-deep: #c2255c;
  --pink-soft: #fff0f6;
  --pink-border: #fcc2d7;
  --ink: #2b2135;
  --ink-2: #6f6478;
  --bg: #ffffff;
  --bg-alt: #fff9fb;
  --radius: 18px;
  --shadow-sm: 0 4px 14px rgba(194, 37, 92, .08);
  --shadow-lg: 0 18px 50px rgba(194, 37, 92, .14);
  --nav-h: 64px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: min(1120px, 92%); margin: 0 auto; }
.container-narrow { width: min(820px, 92%); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; border-radius: 999px;
  padding: 12px 28px; font-size: 15px; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease,
              background .25s ease, color .25s ease;
  border: 1.5px solid transparent; white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: #fff; box-shadow: 0 8px 22px rgba(194, 37, 92, .3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(194, 37, 92, .38); }

.btn-outline { border-color: var(--pink); color: var(--pink-deep); background: #fff; }
.btn-outline:hover { background: var(--pink-soft); transform: translateY(-2px); }

.btn-ghost { color: var(--ink-2); background: rgba(255,255,255,.7); border-color: #eee3ea; }
.btn-ghost:hover { color: var(--pink-deep); border-color: var(--pink-border); }

.btn-lg { padding: 15px 36px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- 导航 ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease;
}
.navbar.scrolled { border-color: #fbe3ee; box-shadow: 0 6px 24px rgba(194, 37, 92, .08); }

.nav-inner { height: var(--nav-h); display: flex; align-items: center; gap: 28px; }

.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.logo-flower { font-size: 22px; }
.logo-text { background: linear-gradient(120deg, var(--pink-deep), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { font-size: 15px; color: var(--ink-2); font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--pink-deep); }

.btn-nav { padding: 9px 22px; font-size: 14px; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 64px) 0 80px;
  background:
    radial-gradient(900px 420px at 85% -10%, #ffe3ef 0%, transparent 60%),
    radial-gradient(700px 380px at -10% 30%, #fff0f6 0%, transparent 55%),
    var(--bg);
  overflow: hidden;
}

.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 48px; align-items: center;
}

.hero-badge {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em;
  color: var(--pink-deep); background: var(--pink-soft);
  border: 1px solid var(--pink-border);
  padding: 6px 16px; border-radius: 999px; margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.15; letter-spacing: .02em; font-weight: 900;
  background: linear-gradient(120deg, var(--ink) 20%, var(--pink-deep) 75%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.hero-sub { margin: 22px 0 32px; font-size: 17px; color: var(--ink-2); }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-meta { display: flex; gap: 34px; margin-top: 44px; }
.hero-meta li { display: flex; flex-direction: column; }
.hero-meta strong { font-size: 19px; color: var(--pink-deep); }
.hero-meta span { font-size: 13px; color: var(--ink-2); }

.hero-visual { position: relative; }
.hero-visual img {
  border-radius: 24px; box-shadow: var(--shadow-lg);
  transform: rotate(2deg);
  border: 6px solid #fff;
  transition: transform .5s ease;
}
.hero-visual img:hover { transform: rotate(0deg) scale(1.02); }
.hero-visual-glow {
  position: absolute; inset: auto -30px -40px auto; width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(240,101,149,.35), transparent 70%);
  filter: blur(10px); z-index: -1;
}

/* 樱花花瓣飘落 */
.petals { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.petals i {
  position: absolute; top: -24px;
  width: 14px; height: 11px;
  background: radial-gradient(ellipse at 30% 30%, #ffd6e7, #f783ac);
  border-radius: 80% 0 80% 0;
  opacity: .75;
  animation: fall linear infinite;
}
.petals i:nth-child(1) { left: 6%;  animation-duration: 9s;  animation-delay: 0s;   transform: scale(1); }
.petals i:nth-child(2) { left: 16%; animation-duration: 12s; animation-delay: 2s;   transform: scale(.7); }
.petals i:nth-child(3) { left: 28%; animation-duration: 10s; animation-delay: 4s;   transform: scale(1.2); }
.petals i:nth-child(4) { left: 40%; animation-duration: 13s; animation-delay: 1s;   transform: scale(.8); }
.petals i:nth-child(5) { left: 52%; animation-duration: 9.5s; animation-delay: 3s;  transform: scale(1.1); }
.petals i:nth-child(6) { left: 63%; animation-duration: 11s; animation-delay: 5s;   transform: scale(.65); }
.petals i:nth-child(7) { left: 72%; animation-duration: 10.5s; animation-delay: .6s; transform: scale(1); }
.petals i:nth-child(8) { left: 82%; animation-duration: 12.5s; animation-delay: 2.6s; transform: scale(.9); }
.petals i:nth-child(9) { left: 90%; animation-duration: 9.8s; animation-delay: 4.4s; transform: scale(1.15); }
.petals i:nth-child(10){ left: 96%; animation-duration: 13.5s; animation-delay: 1.8s; transform: scale(.75); }

@keyframes fall {
  0%   { translate: 0 -24px; rotate: 0deg; opacity: 0; }
  8%   { opacity: .8; }
  50%  { translate: 46px 46vh; rotate: 200deg; }
  100% { translate: -30px 96vh; rotate: 420deg; opacity: 0; }
}

/* ---------- 通用 Section ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; margin-bottom: 52px; }
.section-tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--pink); margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: .02em; }
.section-head p { margin-top: 12px; color: var(--ink-2); font-size: 16px; }

/* ---------- 轮播 ---------- */
.carousel {
  position: relative; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-lg);
  background: #fff;
}
.carousel-track { display: flex; transition: transform .55s cubic-bezier(.22, .8, .3, 1); }

.carousel-slide { position: relative; flex: 0 0 100%; }
.carousel-slide img { width: 100%; aspect-ratio: 16 / 8.5; object-fit: cover; }
.carousel-slide figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 42px 28px 20px;
  color: #fff; font-size: 16px; font-weight: 600; letter-spacing: .04em;
  background: linear-gradient(transparent, rgba(43, 33, 53, .72));
}

.carousel-btn {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 46px; height: 46px; border-radius: 50%;
  border: none; cursor: pointer; z-index: 5;
  background: rgba(255, 255, 255, .88); color: var(--pink-deep);
  font-size: 26px; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  transition: background .2s, transform .2s;
}
.carousel-btn:hover { background: #fff; transform: scale(1.08); }
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

.carousel-dots {
  position: absolute; bottom: 16px; left: 50%; translate: -50% 0;
  display: flex; gap: 8px; z-index: 5;
}
.carousel-dots button {
  width: 9px; height: 9px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .55);
  transition: width .3s ease, background .3s ease;
}
.carousel-dots button.active { width: 26px; background: #fff; }

/* ---------- 简介 ---------- */
.intro-block {
  background: #fff; border: 1px solid #fbe3ee;
  border-radius: var(--radius);
  padding: 34px 38px; margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  opacity: 0; transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.intro-block.show { opacity: 1; transform: none; }

.intro-block h3 {
  display: flex; align-items: baseline; gap: 14px;
  font-size: 21px; font-weight: 800; margin-bottom: 14px;
}
.intro-no {
  font-size: 15px; font-weight: 800; color: var(--pink);
  letter-spacing: .06em;
}
.intro-block p { color: var(--ink-2); font-size: 15.5px; text-align: justify; }

/* ---------- 下载 ---------- */
.dl-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 26px; align-items: stretch;
}

.dl-card {
  position: relative;
  background: #fff; border: 1.5px solid #f3e4ec;
  border-radius: var(--radius);
  padding: 34px 28px 30px;
  text-align: center;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.dl-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--pink-border); }

.dl-card.featured { border-color: var(--pink); box-shadow: var(--shadow-lg); }

.dl-badge {
  position: absolute; top: -13px; left: 50%; translate: -50% 0;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .1em;
  padding: 5px 18px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(194, 37, 92, .3);
}
.dl-badge-hot { background: linear-gradient(135deg, #ff922b, #e8590c); }

.dl-card h3 { font-size: 21px; font-weight: 800; margin-bottom: 6px; }
.dl-desc { font-size: 13.5px; color: var(--ink-2); margin-bottom: 20px; }

.dl-info {
  background: var(--bg-alt); border-radius: 12px;
  padding: 12px 18px; margin-bottom: 22px;
}
.dl-info li {
  display: flex; justify-content: space-between;
  font-size: 13.5px; padding: 5px 0;
}
.dl-info li + li { border-top: 1px dashed #f3d4e2; }
.dl-info span { color: var(--ink-2); }
.dl-info b { color: var(--ink); font-weight: 600; }

.dl-btn { margin-bottom: 20px; }

.dl-qr { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.dl-qr img {
  width: 128px; height: 128px;
  border: 1px solid #f3d4e2; border-radius: 12px; padding: 6px;
  background: #fff;
}
.dl-qr span { font-size: 12.5px; color: var(--ink-2); letter-spacing: .06em; }

/* ---------- 页脚 ---------- */
.footer { background: #2b2135; color: #cbbfd6; padding: 56px 0 34px; }
.footer-inner { text-align: center; }
.footer-brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 18px;
}
.footer-note { font-size: 13px; line-height: 1.9; color: #9d92aa; margin-bottom: 16px; }
.footer-copy { font-size: 12.5px; color: #6f6478; }

/* ============================================================
   响应式 - 平板
   ============================================================ */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 560px; margin: 0 auto; }
  .hero { text-align: center; padding-top: calc(var(--nav-h) + 48px); }
  .hero-actions, .hero-meta { justify-content: center; }
  .dl-grid { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
  .section { padding: 72px 0; }
}

/* ============================================================
   响应式 - 手机
   ============================================================ */
@media (max-width: 640px) {
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #fbe3ee;
    box-shadow: 0 18px 30px rgba(194,37,92,.1);
    max-height: 0; overflow: hidden;
    transition: max-height .35s ease;
  }
  .nav-links.open { max-height: 260px; }
  .nav-links a { padding: 15px 24px; border-top: 1px solid #fdf1f6; font-size: 16px; }

  .btn-nav { display: none; }

  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px;
    margin-left: auto; background: none; border: none; cursor: pointer;
    padding: 8px;
  }
  .nav-toggle span {
    width: 22px; height: 2px; border-radius: 2px;
    background: var(--pink-deep); transition: transform .3s, opacity .3s;
  }
  .nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero-meta { gap: 22px; flex-wrap: wrap; }
  .hero-actions .btn { flex: 1 1 auto; }

  .carousel-slide img { aspect-ratio: 16 / 11; }
  .carousel-btn { width: 38px; height: 38px; font-size: 20px; }
  .carousel-btn.prev { left: 10px; }
  .carousel-btn.next { right: 10px; }
  .carousel-slide figcaption { font-size: 14px; padding: 34px 18px 16px; }

  .intro-block { padding: 26px 22px; }
  .intro-block h3 { font-size: 18px; gap: 10px; }
  .intro-block p { font-size: 14.5px; }

  .dl-card { padding: 30px 22px 26px; }
}

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  .petals { display: none; }
  .intro-block { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
