:root {
  --blue: #8FCFE3;
  --blue-deep: #5FB5D1;
  --blue-pale: #EAF7FB;
  --brown: #A9745A;
  --pink: #F2A4B8;
  --mint: #8FD9BB;
  --lavender: #B6A3DE;
  --ink: #3B3A39;
  --muted: #9a9a98;
  --paper: #FFFDF9;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(95, 181, 209, 0.18);
  --font-heading: 'Mochiy Pop One', 'Noto Sans SC', sans-serif;
  --font-body: 'Quicksand', 'Noto Sans SC', sans-serif;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar { display: none; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, var(--blue-pale) 0%, var(--paper) 45%, var(--paper) 100%);
  overflow-x: hidden;
  position: relative;
}

/* ---------- 大图虚化背景 ---------- */
.bg-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('../assets/images/bg.jpg');
  background-size: cover;
  background-position: center;
  filter: blur(10px) brightness(0.96) saturate(112%);
  transform: scale(1.08);
}
.bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(234, 247, 251, 0.78), rgba(255, 253, 249, 0.88));
}

/* ---------- 虚化度滑杆 ---------- */
.blur-slider {
  position: fixed;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
}

.blur-slider-track {
  position: relative;
  width: 38px;
  height: 180px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0px) saturate(100%);
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  border: 1px solid rgba(255, 255, 255, 0);
  box-shadow: 0 8px 24px rgba(95, 181, 209, 0);
  cursor: pointer;
  touch-action: none;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
.blur-slider:hover .blur-slider-track,
.blur-slider.dragging .blur-slider-track {
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 24px rgba(95, 181, 209, 0.22), inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

.blur-slider-fill {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--pink), var(--blue));
  opacity: 0;
  transition: opacity 0.4s ease;
}
.blur-slider:hover .blur-slider-fill,
.blur-slider.dragging .blur-slider-fill {
  opacity: 0.6;
}

.blur-slider-handle {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 30px;
  height: 30px;
  margin-left: -15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 16px rgba(95, 181, 209, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--blue-deep);
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: box-shadow 0.2s ease;
  animation: handle-pulse 2.4s ease-in-out infinite;
}
.blur-slider:hover .blur-slider-handle,
.blur-slider.dragging .blur-slider-handle {
  animation: none;
  cursor: grabbing;
  box-shadow: 0 4px 10px rgba(95, 181, 209, 0.45);
}
@keyframes handle-pulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(95, 181, 209, 0.35), inset 0 1px 2px rgba(255, 255, 255, 0.9); }
  50% { box-shadow: 0 6px 24px rgba(95, 181, 209, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.9); }
}

@media (max-width: 600px) {
  .blur-slider { left: 8px; }
  .blur-slider-track { height: 130px; width: 32px; }
  .blur-slider-handle { width: 26px; height: 26px; margin-left: -13px; }
}

/* ---------- 全屏飘浮挂件 ---------- */
.float-sprite {
  position: fixed;
  left: 0;
  top: 0;
  width: 110px;
  z-index: 15;
  cursor: grab;
  touch-action: none;
  user-select: none;
  filter: drop-shadow(0 10px 18px rgba(95, 181, 209, 0.3));
  will-change: transform;
}
.float-sprite.dragging { cursor: grabbing; }

.float-sprite-img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-user-drag: none;
  pointer-events: none;
}
.float-sprite-img.bounce {
  animation: pop-bounce 0.45s ease;
}
@keyframes pop-bounce {
  0% { transform: scale(1, 1); }
  25% { transform: scale(1.28, 0.74); }
  50% { transform: scale(0.78, 1.26); }
  75% { transform: scale(1.08, 0.94); }
  100% { transform: scale(1, 1); }
}

@media (max-width: 600px) {
  .float-sprite { width: 80px; }
}

/* ---------- 飘落樱花 ---------- */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -10%;
  border-radius: 50% 0 50% 50%;
  background: radial-gradient(circle at 30% 30%, #fff, var(--pink) 75%);
  opacity: 0.75;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes fall {
  0%   { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(var(--drift, 40px), 110vh) rotate(360deg); }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 60px 8vw 80px;
  min-height: 86vh;
  max-width: 1280px;
  margin: 0 auto;
  z-index: 2;
}

.hero-text { max-width: 520px; z-index: 3; position: relative; }

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.25;
  margin: 0;
}

.letter-wrap {
  display: inline-block;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
  animation: float 3.6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.08s);
}
.letter-wrap.dragging { animation: none; cursor: grabbing; }

.letter {
  display: inline-block;
  transition: transform 0.3s ease;
}
.letter-wrap:hover .letter { transform: scale(1.25) rotate(-6deg); }
.letter-wrap.poked .letter { animation: squish 0.45s ease; }
.letter.accent-dot { color: var(--pink); }

.hero-art {
  position: relative;
  width: min(40vw, 420px);
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  cursor: grab;
  animation: float 5s ease-in-out infinite;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}
.hero-art.dragging {
  animation: none;
  cursor: grabbing;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  pointer-events: none;
}

#heroImg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 20px 30px rgba(95, 181, 209, 0.3));
  transition: transform 0.35s ease, filter 0.35s ease;
}

.hero-art:hover #heroImg {
  transform: scale(1.06) rotate(-1deg);
  filter: drop-shadow(0 26px 38px rgba(95, 181, 209, 0.42)) brightness(1.05);
}

.hero-art.poked #heroImg { animation: squish 0.5s ease; }

.hero-reflection {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 1;
  transform: scaleY(-1);
  transition: transform 0.35s ease, opacity 0.35s ease;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent 65%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent 65%);
  filter: blur(1.5px);
}

.hero-art:hover .hero-reflection {
  transform: scaleY(-1) scale(1.06);
  opacity: 0.55;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes squish {
  0% { transform: scale(1, 1); }
  30% { transform: scale(0.9, 1.12); }
  55% { transform: scale(1.1, 0.9); }
  75% { transform: scale(0.96, 1.04); }
  100% { transform: scale(1, 1); }
}

.hero-placeholder-hint {
  display: none;
  position: absolute;
  inset: 0;
  border: 2px dashed var(--blue-deep);
  border-radius: var(--radius);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--blue-deep);
  padding: 20px;
}
.hero-placeholder-hint p { margin: 0; font-size: 0.85rem; }
.hero-placeholder-hint code {
  background: var(--blue-pale);
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 0.85rem;
}
.hero-art.no-img img { display: none; }
.hero-art.no-img .hero-placeholder-hint { display: flex; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  z-index: 0;
}
.blob-a { width: 260px; height: 260px; background: var(--pink); top: -60px; left: -40px; }
.blob-b { width: 320px; height: 320px; background: var(--blue); bottom: -100px; right: 0; }

/* ---------- 导航面板 ---------- */
.links-section {
  margin: 20px auto 100px;
  max-width: 1040px;
  padding: 56px 6vw 64px;
  border-radius: 36px;
  background: rgba(255, 255, 255, 0);
  backdrop-filter: blur(0px) saturate(100%);
  -webkit-backdrop-filter: blur(0px) saturate(100%);
  border: 2px solid rgba(255, 255, 255, 0);
  box-shadow: 0 24px 60px rgba(59, 58, 57, 0);
  position: relative;
  z-index: 2;
  overflow: hidden;
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}
.links-section:hover {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: 0 24px 60px rgba(59, 58, 57, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.blob-c { width: 220px; height: 220px; background: var(--lavender); top: 10%; right: -60px; }
.blob-d { width: 260px; height: 260px; background: var(--mint); bottom: -40px; left: -60px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* ---------- 必应搜索框 ---------- */
.search-box {
  position: relative;
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 6px 6px 6px 22px;
  box-shadow: 0 6px 24px rgba(59, 58, 57, 0.08);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  animation: search-drift 6s ease-in-out infinite;
}
.search-box:hover,
.search-box:focus-within {
  border-color: var(--blue-deep);
  box-shadow: 0 12px 28px rgba(59, 58, 57, 0.14);
  background: rgba(255, 255, 255, 0.55);
}
.search-box:focus-within { animation-play-state: paused; }

.search-box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  background-size: 260% 100%;
  background-position: 130% 0;
  animation: search-shimmer 5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes search-drift {
  0%   { transform: translate(0, 0) rotate(0deg); }
  25%  { transform: translate(3px, -5px) rotate(0.4deg); }
  50%  { transform: translate(0, -8px) rotate(0deg); }
  75%  { transform: translate(-3px, -4px) rotate(-0.4deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
@keyframes search-shimmer {
  0%, 100% { background-position: 130% 0; }
  50% { background-position: -30% 0; }
}

.search-input {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  padding: 10px 0;
}

.search-submit {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--lavender), var(--pink));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(95, 181, 209, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.search-submit::before {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--blue), var(--pink), var(--lavender), var(--mint), var(--blue));
  filter: blur(6px);
  opacity: 0.6;
  animation: search-submit-spin 5s linear infinite;
}
@keyframes search-submit-spin {
  to { transform: rotate(360deg); }
}
.search-submit:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 22px rgba(95, 181, 209, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.7);
}
.search-submit:active { transform: scale(0.9); }

.link-card {
  --card-accent: var(--blue-deep);
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 6px 24px rgba(59, 58, 57, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.55);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s, background 0.25s;
  opacity: 0;
  transform: translateY(16px);
}
.link-card.in-view { opacity: 1; transform: translateY(0); transition: opacity 0.6s ease, transform 0.6s ease; }
.link-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 34px rgba(59, 58, 57, 0.16);
  border-color: var(--card-accent);
  background: rgba(255, 255, 255, 0.55);
}
.link-card:active {
  transform: scale(0.97) translateY(-2px);
  transition: transform 0.12s ease;
}
.link-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}
.link-card:hover::after { left: 150%; }

.badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  color: #fff;
  background: var(--card-accent);
  transition: transform 0.3s ease;
}
.link-card:hover .badge { transform: rotate(-8deg) scale(1.12); }
.link-card:active .badge { transform: rotate(-4deg) scale(0.95); }

.domain { font-weight: 700; font-size: 1.05rem; flex: 1; }
.tld { font-weight: 500; color: var(--muted); font-size: 0.85rem; margin-left: 2px; }
.arrow { font-size: 1.2rem; color: var(--card-accent); transition: transform 0.25s; }
.link-card:hover .arrow { transform: translateX(4px); }
.link-card:active .arrow { transform: translateX(8px); }

.link-card[data-accent="blue"]     { --card-accent: var(--blue-deep); }
.link-card[data-accent="brown"]    { --card-accent: var(--brown); }
.link-card[data-accent="pink"]     { --card-accent: var(--pink); }
.link-card[data-accent="mint"]     { --card-accent: var(--mint); }
.link-card[data-accent="lavender"] { --card-accent: var(--lavender); }

/* ---------- 页脚 ---------- */
.site-footer {
  text-align: center;
  padding: 60px 24px 24px;
  color: var(--muted);
  font-size: 0.85rem;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.site-footer.in-view { opacity: 1; transform: translateY(0); }
.site-footer p { margin: 4px 0; }
.site-footer a { color: var(--blue-deep); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 40px;
    min-height: auto;
  }
  .hero-text { max-width: 100%; }
  .hero-art { width: 60vw; max-width: 280px; margin-bottom: 10px; }
}
