/* ========== 大肥鱼官网 ========== */
@font-face {
  font-family: 'RuanTang';
  src: url('../assets/fonts/上首软糖体.ttf') format('truetype');
  font-display: swap;
}

:root {
  --blue: #4aa8ff;
  --blue-deep: #2f7fe0;
  --blue-ink: #2b5ea8;
  --pink: #ff9ec7;
  --pink-soft: #ffd6e8;
  --bg: #f2f9ff;
  --card: #ffffff;
  --ink: #3a4a63;
  --ink-soft: #7b8aa5;
  --radius: 28px;
  --shadow: 0 10px 30px rgba(74, 168, 255, .18);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'RuanTang', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
  line-height: 1.7;
}

/* ---------- 背景泡泡 ---------- */
.bubbles { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bubbles span {
  position: absolute; bottom: -80px;
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(74,168,255,.25));
  animation: rise linear infinite;
  opacity: .7;
}
.bubbles span:nth-child(1){ left: 6%;  animation-duration: 17s; animation-delay: 0s;   width: 30px; height: 30px; }
.bubbles span:nth-child(2){ left: 16%; animation-duration: 22s; animation-delay: 3s;   width: 18px; height: 18px; }
.bubbles span:nth-child(3){ left: 28%; animation-duration: 15s; animation-delay: 7s;   width: 38px; height: 38px; }
.bubbles span:nth-child(4){ left: 42%; animation-duration: 25s; animation-delay: 1s;   width: 22px; height: 22px; }
.bubbles span:nth-child(5){ left: 55%; animation-duration: 18s; animation-delay: 9s;   width: 28px; height: 28px; }
.bubbles span:nth-child(6){ left: 66%; animation-duration: 21s; animation-delay: 4s;   width: 16px; height: 16px; }
.bubbles span:nth-child(7){ left: 76%; animation-duration: 14s; animation-delay: 11s;  width: 34px; height: 34px; }
.bubbles span:nth-child(8){ left: 86%; animation-duration: 24s; animation-delay: 2s;   width: 20px; height: 20px; }
.bubbles span:nth-child(9){ left: 93%; animation-duration: 19s; animation-delay: 6s;   width: 26px; height: 26px; }
.bubbles span:nth-child(10){ left: 35%; animation-duration: 28s; animation-delay: 13s; width: 24px; height: 24px; }

@keyframes rise {
  0%   { transform: translateY(0) translateX(0) scale(1); }
  50%  { transform: translateY(-55vh) translateX(24px) scale(1.12); }
  100% { transform: translateY(-115vh) translateX(-18px) scale(.92); }
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 6vw 120px;
  background: linear-gradient(180deg, #d8ecff 0%, #f2f9ff 70%);
}

.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 40px; align-items: center;
  max-width: 1200px; margin: 0 auto; width: 100%;
}

.badge {
  display: inline-block;
  background: #fff; color: var(--blue-ink);
  border: 2px solid var(--pink);
  padding: 6px 18px; border-radius: 999px;
  font-size: 15px; margin-bottom: 18px;
  transform: rotate(-2deg);
  box-shadow: 0 4px 0 var(--pink-soft);
}

.hero h1 {
  font-size: clamp(64px, 10vw, 128px);
  line-height: 1.05;
  color: var(--blue-deep);
  text-shadow: 4px 4px 0 #fff, 8px 8px 0 var(--pink-soft);
  letter-spacing: .04em;
}

.slogan {
  font-size: clamp(20px, 2.6vw, 30px);
  color: var(--ink); margin-top: 22px; font-weight: 700;
}

.sub { color: var(--ink-soft); margin-top: 14px; font-size: 17px; }

.hero-btns { margin-top: 34px; display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block; text-decoration: none;
  padding: 14px 34px; border-radius: 999px;
  font-size: 18px; font-weight: 700;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s;
}
.btn:active { transform: scale(.93); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: #fff; box-shadow: 0 6px 0 var(--blue-ink);
}
.btn-primary:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 9px 0 var(--blue-ink); }
.btn-ghost {
  background: #fff; color: var(--blue-deep);
  border: 3px solid var(--blue); box-shadow: 0 6px 0 var(--blue);
}
.btn-ghost:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 9px 0 var(--blue); }

/* 舞台上的鱼 */
.hero-stage { position: relative; display: flex; flex-direction: column; align-items: center; }

.whale-wrap {
  width: min(420px, 80vw);
  aspect-ratio: 640 / 360;
  position: relative;
  cursor: pointer;
  animation: bob 3.6s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.whale-wrap::before {
  content: ''; position: absolute; inset: 6% -4%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.9), rgba(255,214,232,.35) 70%, transparent 75%);
  border-radius: 50%; z-index: -1;
}
.whale { width: 100%; height: 100%; }
.whale.squish { animation: squish .5s cubic-bezier(.34,1.56,.64,1); }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-16px) rotate(1.2deg); }
}
@keyframes squish {
  0%   { transform: scaleY(1); }
  35%  { transform: scaleY(.55) scaleX(1.12); }
  70%  { transform: scaleY(1.08) scaleX(.96); }
  100% { transform: scaleY(1); }
}

.bubble-speech {
  position: relative;
  background: #fff; border: 3px solid var(--blue);
  border-radius: 22px; padding: 10px 22px;
  font-size: 16px; color: var(--ink);
  margin-bottom: 26px; max-width: 320px; text-align: center;
  box-shadow: var(--shadow);
  animation: bubble-pop .35s cubic-bezier(.34,1.56,.64,1);
}
.bubble-speech::after {
  content: ''; position: absolute; bottom: -12px; left: 50%; margin-left: -8px;
  border: 8px solid transparent; border-top-color: var(--blue); border-bottom: 0;
}
@keyframes bubble-pop {
  0% { transform: scale(.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.stage-hint { margin-top: 22px; color: var(--ink-soft); font-size: 14px; letter-spacing: .1em; }

/* 波浪分隔 */
.wave { display: block; width: 100%; height: 90px; margin-top: 60px; }
.wave path { fill: #fff; }
.hero .wave { position: absolute; bottom: -1px; left: 0; }
.hero .wave path { fill: var(--bg); }

/* ---------- 通用节 ---------- */
section { position: relative; z-index: 1; padding: 90px 6vw; background: #fff; }
.features, .gallery { background: var(--bg); }
.memes { background: #fff; }

.section-title {
  text-align: center;
  font-size: clamp(30px, 4.6vw, 46px);
  color: var(--blue-deep);
}
.section-title::after {
  content: ''; display: block; margin: 12px auto 0;
  width: 88px; height: 10px; border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--pink));
}
.section-sub { text-align: center; color: var(--ink-soft); margin-top: 14px; }

/* 滚动显现 */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .6s ease, transform .6s cubic-bezier(.34,1.56,.64,1); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- 特性卡片 ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px; max-width: 1200px; margin: 50px auto 0;
}
.card {
  background: var(--card); border-radius: var(--radius);
  padding: 26px 24px 30px; text-align: center;
  box-shadow: var(--shadow);
  border: 3px solid transparent;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), border-color .25s;
}
.card:hover { transform: translateY(-10px) rotate(-1deg); border-color: var(--pink); }
.card-media {
  border-radius: 20px; overflow: hidden;
  background: linear-gradient(180deg, #e8f4ff, #fff);
  aspect-ratio: 640 / 360; margin-bottom: 18px;
}
.card-media video { width: 100%; height: 100%; object-fit: contain; }
.card h3 { color: var(--blue-deep); font-size: 22px; margin-bottom: 8px; }
.card p { color: var(--ink-soft); font-size: 15px; }

/* ---------- 表情包墙 ---------- */
.meme-wall {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 26px; max-width: 1100px; margin: 50px auto 0;
}
.meme-wall img {
  width: 180px; border-radius: 18px;
  transform: rotate(var(--r, 0deg));
  box-shadow: 0 8px 24px rgba(58,74,99,.16);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
  background: #f6fbff;
}
.meme-wall img:hover { transform: rotate(0deg) scale(1.12); z-index: 2; position: relative; }

/* ---------- 画廊 ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 22px; max-width: 1200px; margin: 50px auto 0;
}
.g-item {
  position: relative; border-radius: 22px; overflow: hidden;
  background: #fff; box-shadow: var(--shadow); cursor: pointer;
  border: 3px solid #fff;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), border-color .22s;
}
.g-item:hover { transform: translateY(-6px) scale(1.03); border-color: var(--pink); }
.g-media { aspect-ratio: 640 / 360; background: linear-gradient(180deg, #e8f4ff, #fdf6fa); position: relative; }
.g-media video, .g-media img { width: 100%; height: 100%; object-fit: contain; }
.g-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(43,94,168,.14); transition: opacity .2s;
}
.g-play::before {
  content: '▶'; font-size: 34px; color: #fff;
  background: var(--blue); width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding-left: 6px;
  box-shadow: 0 6px 18px rgba(47,127,224,.45);
}
.g-item.playing .g-play { opacity: 0; pointer-events: none; }
.g-item.playing:hover .g-play { opacity: 1; }
.g-item.playing .g-play::before { content: '❚❚'; font-size: 26px; padding-left: 0; }
.g-cap { padding: 12px 16px 16px; font-size: 15px; color: var(--ink); text-align: center; }

/* ---------- 页脚 ---------- */
.footer { position: relative; z-index: 1; background: var(--blue-deep); color: #eaf4ff; margin-top: 0; }
.wave-top { margin-top: 0; transform: rotate(180deg); }
.wave-top path { fill: var(--bg); }
.footer-inner { text-align: center; padding: 30px 6vw 60px; }
.footer-logo { font-size: 40px; text-shadow: 2px 2px 0 var(--blue-ink); }
.footer-tag { color: #bcdcff; margin-top: 6px; }
.footer-credits { list-style: none; margin: 26px 0 18px; font-size: 15px; color: #d9ecff; }
.footer-credits li { margin: 6px 0; }
.footer a { color: #fff; text-decoration: underline wavy var(--pink); }
.footer-license { font-size: 13px; color: #a9cdf3; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-text { order: 2; }
  .hero-stage { order: 1; }
  .hero-btns { justify-content: center; }
  .bubble-speech { margin-bottom: 18px; }
  .whale-wrap { width: min(340px, 86vw); }
  .meme-wall img { width: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .bubbles span, .whale-wrap, .bubble-speech { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
