/* ==========================================================================
   欢迎光临 大钟‘s Blog
   高级、优雅、有质感的本地个人博客样式
   ========================================================================== */

:root {
  --bg: #EAF3FF;
  --bg-deep: #C7DCFF;
  --primary: #2563EB;
  --primary-2: #38BDF8;
  --accent: #22D3EE;
  --deep: #0B2559;
  --ink: #123B7A;
  --ice: #BAE6FD;
  --blueprint: #0A2342;
  --blueprint-2: #0E356E;
  --blueprint-line: rgba(125, 211, 252, 0.16);
  --white: #FFFFFF;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --serif: "OPPO Serif", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;

  --shadow-sm: 0 6px 18px rgba(11, 37, 89, 0.10);
  --shadow-md: 0 14px 40px rgba(11, 37, 89, 0.14), 0 4px 12px rgba(37, 99, 235, 0.10);
  --shadow-lg: 0 24px 70px rgba(11, 37, 89, 0.18), 0 8px 24px rgba(37, 99, 235, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--deep);
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.16), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(255, 255, 255, 0.88), transparent 32%),
    radial-gradient(circle at 78% 82%, rgba(56, 189, 248, 0.18), transparent 38%),
    linear-gradient(180deg, #F4F9FF 0%, var(--bg) 34%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -22vmax;
  z-index: -1;
  pointer-events: none;
  will-change: transform, opacity;
}

body::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.62), transparent 35%),
    radial-gradient(circle at 70% 70%, rgba(56, 189, 248, 0.16), transparent 34%);
  animation: bgDrift 22s var(--ease-soft) infinite alternate;
}

body::after {
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.36) 45%, transparent 70%);
  opacity: 0.6;
  mix-blend-mode: screen;
  animation: sheen 18s linear infinite;
}

@keyframes bgDrift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1);
    opacity: 0.86;
  }
  100% {
    transform: translate3d(2%, 2%, 0) scale(1.04);
    opacity: 1;
  }
}

@keyframes sheen {
  0% {
    transform: translate3d(-8%, 0, 0) rotate(8deg);
  }
  100% {
    transform: translate3d(8%, 0, 0) rotate(8deg);
  }
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   顶部标题
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 2;
  padding: clamp(54px, 10vh, 120px) 20px 18px;
  text-align: center;
}

.hero-title {
  margin: 0 auto;
  max-width: 1100px;
  font-size: clamp(2.05rem, 5.4vw, 4.9rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0.045em;
  background: linear-gradient(135deg, var(--deep) 0%, var(--primary) 42%, var(--primary-2) 72%, var(--deep) 100%);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 14px 26px rgba(37, 99, 235, 0.18));
  animation:
    titleIn 0.9s var(--ease) both,
    titleGlow 6s ease-in-out 1s infinite alternate;
}

.hero-title__line {
  display: block;
}

.hero-title__line--accent {
  letter-spacing: 0.06em;
}

.hero-subtitle {
  margin: 18px auto 0;
  max-width: 680px;
  color: rgba(11, 37, 89, 0.72);
  font-size: clamp(0.9rem, 1.4vw, 1.12rem);
  letter-spacing: 0.16em;
  animation: fadeUp 0.9s var(--ease) 0.18s both;
}

@keyframes titleIn {
  from {
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes titleGlow {
  from {
    background-position: 0% 50%;
    filter: drop-shadow(0 10px 20px rgba(37, 99, 235, 0.12));
  }
  to {
    background-position: 100% 50%;
    filter: drop-shadow(0 18px 34px rgba(37, 99, 235, 0.26));
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 滚动进入视口的淡入上浮 */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}

.js .reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* --------------------------------------------------------------------------
   公共小标题
   -------------------------------------------------------------------------- */

.section-label {
  width: min(1080px, 92vw);
  margin: 0 auto 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: rgba(11, 37, 89, 0.7);
}

.section-label__en {
  font-size: 0.68rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(37, 99, 235, 0.72);
}

.section-label__cn {
  font-size: 1.05rem;
  letter-spacing: 0.16em;
}

.section-label--message {
  margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
   照片墙
   -------------------------------------------------------------------------- */

.photo-section {
  position: relative;
  z-index: 2;
  padding: clamp(34px, 6vw, 70px) 0 0;
}

.photo-frame {
  position: relative;
  overflow: hidden;
  width: min(960px, 86vw);
  margin: 0 auto;
  padding: clamp(10px, 1.4vw, 17px);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #eef5ff 45%, #dbe9ff 100%);
  box-shadow:
    0 34px 90px rgba(11, 37, 89, 0.20),
    0 12px 30px rgba(37, 99, 235, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.90),
    inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 0;
  border: 1px solid rgba(37, 99, 235, 0.10);
  border-radius: 24px;
  pointer-events: none;
}

.photo-pages {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: visible;
  border-radius: 24px;
  background: linear-gradient(135deg, #dce8ff, #c5d9ff);
  perspective: 1200px;
}

.photo-page {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(5%, 0, 0) rotateY(-10deg) scale(0.98);
  transform-origin: center;
  backface-visibility: hidden;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.photo-page.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
  animation: pageFlipIn 0.75s var(--ease) both;
}

.photo-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, 0.9vw, 12px);
  width: 100%;
  height: 100%;
}

.photo-tile {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  background: linear-gradient(135deg, #eaf3ff, #c7dcff);
  box-shadow:
    0 10px 24px rgba(11, 37, 89, 0.16),
    0 0 0 1px rgba(37, 99, 235, 0.10);
  transform: translateZ(0);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    opacity 0.3s var(--ease),
    filter 0.3s var(--ease);
}

.photo-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.3s var(--ease);
}

.photo-mosaic:hover .photo-tile:not(:hover) {
  opacity: 0.62;
  filter: saturate(0.78) brightness(0.96);
  transform: scale(0.985);
}

.photo-tile:hover {
  z-index: 10;
  transform: scale(1.16);
  background: linear-gradient(135deg, rgba(8, 28, 61, 0.94), rgba(14, 53, 110, 0.82));
  box-shadow:
    0 28px 60px rgba(11, 37, 89, 0.30),
    0 0 0 3px rgba(37, 99, 235, 0.32);
}

.photo-tile:hover img {
  object-fit: contain;
  transform: scale(1);
}

.photo-tile.is-broken {
  display: grid;
  place-items: center;
  color: rgba(11, 37, 89, 0.58);
  font-size: 0.78rem;
}

.photo-tile.is-broken::before {
  content: "图片读取失败";
}

.photo-tile.is-broken img {
  display: none;
}

/* 拼图排版：每个页面 1～6 张图片自适应 */
.photo-page--count-1 .photo-tile--1 {
  grid-area: 1 / 1 / 5 / 5;
}

.photo-page--count-2 .photo-tile--1 {
  grid-area: 1 / 1 / 5 / 3;
}

.photo-page--count-2 .photo-tile--2 {
  grid-area: 1 / 3 / 5 / 5;
}

.photo-page--count-3 .photo-tile--1 {
  grid-area: 1 / 1 / 5 / 3;
}

.photo-page--count-3 .photo-tile--2 {
  grid-area: 1 / 3 / 3 / 5;
}

.photo-page--count-3 .photo-tile--3 {
  grid-area: 3 / 3 / 5 / 5;
}

.photo-page--count-4 .photo-tile--1 {
  grid-area: 1 / 1 / 3 / 3;
}

.photo-page--count-4 .photo-tile--2 {
  grid-area: 1 / 3 / 3 / 5;
}

.photo-page--count-4 .photo-tile--3 {
  grid-area: 3 / 1 / 5 / 3;
}

.photo-page--count-4 .photo-tile--4 {
  grid-area: 3 / 3 / 5 / 5;
}

.photo-page--count-5 .photo-tile--1 {
  grid-area: 1 / 1 / 3 / 3;
}

.photo-page--count-5 .photo-tile--2 {
  grid-area: 1 / 3 / 2 / 5;
}

.photo-page--count-5 .photo-tile--3 {
  grid-area: 2 / 3 / 3 / 4;
}

.photo-page--count-5 .photo-tile--4 {
  grid-area: 2 / 4 / 3 / 5;
}

.photo-page--count-5 .photo-tile--5 {
  grid-area: 3 / 1 / 5 / 5;
}

.photo-page--count-6 .photo-tile--1 {
  grid-area: 1 / 1 / 3 / 3;
}

.photo-page--count-6 .photo-tile--2 {
  grid-area: 1 / 3 / 2 / 4;
}

.photo-page--count-6 .photo-tile--3 {
  grid-area: 1 / 4 / 2 / 5;
}

.photo-page--count-6 .photo-tile--4 {
  grid-area: 2 / 3 / 3 / 4;
}

.photo-page--count-6 .photo-tile--5 {
  grid-area: 2 / 4 / 3 / 5;
}

.photo-page--count-6 .photo-tile--6 {
  grid-area: 3 / 1 / 5 / 5;
}

.photo-pager {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 2vw, 28px);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 26px rgba(11, 37, 89, 0.14);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
}

.photo-pager:empty {
  display: none;
}

.photo-pager__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(37, 99, 235, 0.24);
  transition:
    width 0.3s var(--ease),
    transform 0.3s var(--ease),
    background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.photo-pager__dot:hover {
  transform: scale(1.28);
  background: rgba(37, 99, 235, 0.55);
}

.photo-pager__dot.is-active {
  width: 26px;
  background: linear-gradient(90deg, var(--primary-2), var(--primary));
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.55);
}

.photo-placeholder {
  position: absolute;
  inset: clamp(12px, 1.6vw, 20px);
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 32px 24px;
  text-align: center;
  color: rgba(11, 37, 89, 0.76);
  border: 1px dashed rgba(37, 99, 235, 0.32);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.92), transparent 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.54), rgba(186, 230, 253, 0.42));
  box-shadow: var(--shadow-sm);
  animation: placeholderBreath 4.5s ease-in-out infinite;
}

.photo-placeholder[hidden] {
  display: none;
}

.photo-placeholder__icon {
  font-size: 2rem;
  color: rgba(37, 99, 235, 0.48);
}

.photo-placeholder p {
  margin: 0;
  font-size: 1.08rem;
  letter-spacing: 0.1em;
}

.photo-placeholder small {
  color: rgba(11, 37, 89, 0.62);
  font-size: 0.84rem;
}

.photo-placeholder code {
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

@keyframes pageFlipIn {
  from {
    opacity: 0;
    transform: translate3d(6%, 0, 0) rotateY(-12deg) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotateY(0) scale(1);
  }
}

@keyframes placeholderBreath {
  0%,
  100% {
    box-shadow: var(--shadow-sm);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 18px 48px rgba(11, 37, 89, 0.16);
    transform: translateY(-3px);
  }
}

/* --------------------------------------------------------------------------
   留言墙 / 蓝图绘图板
   -------------------------------------------------------------------------- */

.message-section {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(48px, 8vw, 100px) clamp(20px, 12vw, 170px) clamp(70px, 11vw, 140px);
}

.parchment {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: min(960px, 100%);
  aspect-ratio: 4 / 3;
  border: 2px solid rgba(125, 211, 252, 0.58);
  border-radius: 22px;
  background:
    linear-gradient(rgba(125, 211, 252, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.15) 1px, transparent 1px),
    linear-gradient(rgba(125, 211, 252, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.07) 1px, transparent 1px),
    radial-gradient(ellipse at 18% 12%, rgba(125, 211, 252, 0.22), transparent 44%),
    linear-gradient(135deg, #0B2A5B 0%, #113A78 48%, #081C3D 100%);
  background-size: 32px 32px, 32px 32px, 8px 8px, 8px 8px, 100% 100%, 100% 100%;
  box-shadow:
    0 30px 80px rgba(11, 37, 89, 0.28),
    0 10px 24px rgba(11, 37, 89, 0.20),
    inset 0 0 0 1px rgba(186, 230, 253, 0.16),
    inset 0 0 80px rgba(56, 189, 248, 0.12);
  animation: blueprintGrid 26s linear infinite;
}

.parchment > * {
  position: relative;
  z-index: 2;
}

.parchment::before,
.parchment::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.parchment::before {
  inset: 12px;
  z-index: 1;
  border: 1px solid rgba(186, 230, 253, 0.34);
  border-radius: 14px;
  opacity: 0.34;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 14px 14px, rgba(186, 230, 253, 0.80) 0 2px, transparent 3px),
    radial-gradient(circle at calc(100% - 14px) 14px, rgba(186, 230, 253, 0.80) 0 2px, transparent 3px),
    radial-gradient(circle at 14px calc(100% - 14px), rgba(186, 230, 253, 0.80) 0 2px, transparent 3px),
    radial-gradient(circle at calc(100% - 14px) calc(100% - 14px), rgba(186, 230, 253, 0.80) 0 2px, transparent 3px),
    linear-gradient(90deg, transparent 49.7%, rgba(125, 211, 252, 0.75) 49.7%, rgba(125, 211, 252, 0.75) 50.3%, transparent 50.3%),
    linear-gradient(0deg, transparent 49.7%, rgba(125, 211, 252, 0.75) 49.7%, rgba(125, 211, 252, 0.75) 50.3%, transparent 50.3%);
  background-repeat: no-repeat;
}

.parchment::after {
  inset: 0;
  z-index: 1;
  opacity: 0.10;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='200'%20height='200'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='.82'%20numOctaves='3'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23n)'%20opacity='.45'/%3E%3C/svg%3E");
  background-size: 190px 190px;
  animation: noiseShift 18s steps(6) infinite;
}

.parchment-glow {
  position: absolute;
  inset: -8%;
  z-index: 0;
  pointer-events: none;
  filter: blur(34px);
  opacity: 0.58;
  background: radial-gradient(ellipse at 50% 55%, rgba(56, 189, 248, 0.40), rgba(37, 99, 235, 0.14) 44%, transparent 72%);
  animation: parchmentPulse 6.5s ease-in-out infinite;
}

@keyframes blueprintGrid {
  0% {
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
  }
  100% {
    background-position: 32px 32px, 32px 32px, 8px 8px, 8px 8px, 0 0, 0 0;
  }
}

@keyframes noiseShift {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 120px 80px;
  }
}

@keyframes parchmentPulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.98);
  }
  50% {
    opacity: 0.76;
    transform: scale(1.03);
  }
}

/* 弹幕层 */
.danmaku-layer {
  position: absolute;
  left: clamp(18px, 3vw, 42px);
  right: clamp(18px, 3vw, 42px);
  top: clamp(18px, 3vw, 40px);
  bottom: clamp(96px, 12vw, 124px);
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
  --wall-width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
}

.danmaku-item {
  position: absolute;
  left: 100%;
  top: 0;
  max-width: none;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: clamp(1rem, 1.85vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.045em;
  color: #E0F2FE;
  background: linear-gradient(90deg, rgba(125, 211, 252, 0), rgba(125, 211, 252, 0.14), rgba(125, 211, 252, 0));
  text-shadow:
    0 1px 8px rgba(2, 12, 32, 0.72),
    0 0 16px rgba(56, 189, 248, 0.34);
  will-change: transform;
  animation: danmakuScroll var(--dur, 11s) linear var(--delay, 0s) 1 both;
}

@keyframes danmakuScroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(calc(-100% - var(--wall-width, 100%)), 0, 0);
  }
}

.danmaku-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(186, 230, 253, 0.72);
  font-size: clamp(0.9rem, 1.6vw, 1.08rem);
  letter-spacing: 0.14em;
  text-align: center;
  opacity: 1;
  text-shadow: 0 1px 10px rgba(2, 12, 32, 0.55);
  transition: opacity 0.3s var(--ease);
}

.danmaku-empty.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* 留言输入 */
.form-status {
  position: absolute;
  left: clamp(18px, 3vw, 42px);
  right: clamp(18px, 3vw, 42px);
  bottom: clamp(84px, 10vw, 104px);
  z-index: 5;
  margin: 0;
  min-height: 1.3em;
  color: #BAE6FD;
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  text-shadow: 0 1px 10px rgba(2, 12, 32, 0.72);
}

.form-status.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.form-status.is-error {
  color: #FCA5A5;
}

.form-status.is-success {
  color: #86EFAC;
}

.message-form {
  position: absolute;
  left: clamp(18px, 3vw, 42px);
  right: clamp(18px, 3vw, 42px);
  bottom: clamp(18px, 3vw, 34px);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: clamp(9px, 1.4vw, 14px);
}

.input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
}

.message-input {
  width: 100%;
  height: clamp(48px, 5vw, 58px);
  padding: 0 clamp(74px, 9vw, 100px) 0 clamp(16px, 2vw, 22px);
  border: 1px solid rgba(125, 211, 252, 0.54);
  border-radius: 12px;
  outline: none;
  color: #F0F9FF;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(8, 28, 61, 0.78), rgba(10, 35, 66, 0.58));
  box-shadow:
    inset 0 2px 10px rgba(2, 12, 32, 0.44),
    0 6px 22px rgba(2, 12, 32, 0.22);
  transition:
    box-shadow 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.3s var(--ease),
    background 0.3s var(--ease);
}

.message-input::placeholder {
  color: rgba(186, 230, 253, 0.58);
  letter-spacing: 0.06em;
}

.message-input:focus {
  border-color: var(--primary-2);
  background: linear-gradient(135deg, rgba(8, 28, 61, 0.92), rgba(14, 53, 110, 0.76));
  box-shadow:
    0 0 0 4px rgba(56, 189, 248, 0.16),
    0 10px 30px rgba(2, 12, 32, 0.34),
    inset 0 2px 10px rgba(2, 12, 32, 0.46);
  transform: scale(1.01);
}

.char-counter {
  position: absolute;
  right: clamp(16px, 2vw, 22px);
  top: 50%;
  transform: translateY(-50%);
  color: rgba(186, 230, 253, 0.74);
  font-size: 0.80rem;
  letter-spacing: 0.08em;
  pointer-events: none;
  transition: color 0.3s var(--ease);
}

.char-counter.is-limit {
  color: #FCA5A5;
}

.submit-btn {
  position: relative;
  flex: 0 0 auto;
  height: clamp(48px, 5vw, 58px);
  padding: 0 clamp(16px, 2.2vw, 28px);
  overflow: hidden;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  color: var(--white);
  font-weight: 800;
  letter-spacing: 0.10em;
  background: linear-gradient(135deg, #22D3EE 0%, var(--primary) 52%, #1D4ED8 100%);
  background-size: 180% 180%;
  box-shadow:
    0 12px 28px rgba(37, 99, 235, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    filter 0.3s var(--ease),
    background-position 0.3s var(--ease);
}

.submit-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, 0.38) 48%, transparent 70%);
  transform: translate3d(-120%, 0, 0);
  transition: transform 0.5s var(--ease);
}

.submit-btn:hover {
  transform: translateY(-2px) scale(1.03);
  background-position: 100% 50%;
  filter: brightness(1.06);
  box-shadow:
    0 18px 38px rgba(37, 99, 235, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.submit-btn:hover::after {
  transform: translate3d(120%, 0, 0);
}

.submit-btn:active {
  transform: translateY(0) scale(0.98);
}

.submit-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

/* --------------------------------------------------------------------------
   底部
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 2;
  padding: 20px 20px 66px;
  text-align: center;
  color: rgba(11, 37, 89, 0.78);
}

.daily-quote {
  min-height: 1.8em;
  margin: 0 auto 10px;
  max-width: 780px;
  font-size: clamp(0.96rem, 1.5vw, 1.15rem);
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, rgba(11, 37, 89, 0.92), rgba(37, 99, 235, 0.78));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.daily-quote.is-changing {
  opacity: 0;
  transform: translate3d(0, 8px, 0);
}

.copyright {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(11, 37, 89, 0.52);
}

/* --------------------------------------------------------------------------
   左侧“找到我”
   -------------------------------------------------------------------------- */

.find-me {
  position: fixed;
  left: 18px;
  top: 50%;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 16px 14px;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(160deg, #3B82F6 0%, var(--primary) 42%, var(--deep) 100%);
  box-shadow:
    0 16px 40px rgba(11, 37, 89, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-50%);
  animation: fadeIn 0.9s var(--ease) 0.25s both;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.find-me:hover {
  transform: translateY(-50%) scale(1.035);
  box-shadow:
    0 24px 52px rgba(11, 37, 89, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.find-me__title {
  margin-bottom: 4px;
  font-size: 0.80rem;
  letter-spacing: 0.16em;
  text-align: center;
  opacity: 0.92;
}

.find-me__link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 14px;
  color: var(--white);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 6px 16px rgba(11, 37, 89, 0.12);
  transition:
    transform 0.3s var(--ease),
    background 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.find-me__link:hover {
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.30), rgba(125, 211, 252, 0.18));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 26px rgba(11, 37, 89, 0.20);
}

.find-me__text {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   背景音乐按钮
   -------------------------------------------------------------------------- */

.music-toggle {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--white);
  background: linear-gradient(135deg, #3B82F6, var(--primary) 45%, var(--deep));
  box-shadow:
    0 12px 30px rgba(11, 37, 89, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  animation: fadeIn 0.9s var(--ease) 0.45s both;
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    filter 0.3s var(--ease);
}

.music-toggle::before {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 50%;
  opacity: 0.66;
  animation: musicRing 3s linear infinite;
}

.music-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  position: relative;
  z-index: 1;
}

.music-toggle .icon-pause {
  display: none;
}

.music-toggle.is-playing .icon-play {
  display: none;
}

.music-toggle.is-playing .icon-pause {
  display: block;
}

.music-toggle:hover {
  transform: translateY(-3px) scale(1.06);
  filter: brightness(1.06);
  box-shadow:
    0 18px 40px rgba(11, 37, 89, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.music-toggle:active {
  transform: scale(0.94);
}

@keyframes musicRing {
  to {
    transform: rotate(360deg);
  }
}

/* --------------------------------------------------------------------------
   Live2D 看板娘
   -------------------------------------------------------------------------- */

.live2d-widget {
  position: fixed;
  right: clamp(-16px, -0.9vw, 0px);
  bottom: 0;
  z-index: 50;
  width: clamp(230px, 32vw, 400px);
  height: clamp(300px, 50vh, 520px);
  pointer-events: none;
  filter: drop-shadow(0 22px 32px rgba(11, 37, 89, 0.22));
  animation: live2dIn 1s var(--ease) 0.25s both;
}

@keyframes live2dIn {
  from {
    opacity: 0;
    transform: translate3d(0, 34px, 0) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.live2d-widget canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.live2d-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 24px 24px 0 0;
  color: rgba(11, 37, 89, 0.68);
  font-size: 0.78rem;
  line-height: 1.7;
  letter-spacing: 0.08em;
  text-align: center;
  background: radial-gradient(circle at 50% 70%, rgba(37, 99, 235, 0.12), transparent 62%);
  opacity: 0.74;
}

.live2d-fallback span {
  padding: 8px 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .message-section {
    padding-left: clamp(20px, 5vw, 60px);
    padding-right: clamp(20px, 5vw, 60px);
  }

  .find-me {
    left: 10px;
  }

  .live2d-widget {
    opacity: 0.92;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding-top: clamp(44px, 9vh, 80px);
  }

  .hero-subtitle {
    letter-spacing: 0.10em;
  }

  .photo-frame {
    width: 90vw;
    padding: 8px;
    border-radius: 22px;
  }

  .photo-frame::before {
    inset: 5px;
    border-radius: 17px;
  }

  .photo-pages {
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }

  .photo-tile {
    border-width: 2px;
    border-radius: 10px;
  }

  .photo-pager {
    bottom: 12px;
    padding: 5px 9px;
    gap: 6px;
  }

  .photo-pager__dot {
    width: 7px;
    height: 7px;
  }

  .photo-pager__dot.is-active {
    width: 20px;
  }

  .photo-placeholder {
    border-radius: 16px;
  }

  .parchment {
    border-radius: 20px;
  }

  .danmaku-item {
    font-size: clamp(0.92rem, 4.2vw, 1.12rem);
  }

  .message-form {
    gap: 8px;
  }

  .submit-btn {
    padding: 0 14px;
    letter-spacing: 0.04em;
  }

  .char-counter {
    font-size: 0.72rem;
  }

  .find-me {
    left: 7px;
    gap: 6px;
    padding: 8px 6px;
    border-radius: 15px;
  }

  .find-me__title {
    writing-mode: vertical-rl;
    margin: 0 auto 2px;
    font-size: 0.70rem;
    letter-spacing: 0.10em;
  }

  .find-me__link {
    min-width: 56px;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.84rem;
    letter-spacing: 0.02em;
  }

  .music-toggle {
    left: 12px;
    bottom: 12px;
    width: 52px;
    height: 52px;
  }

  .live2d-widget {
    right: -4px;
    width: clamp(170px, 50vw, 250px);
    height: clamp(230px, 36vh, 330px);
  }

  .site-footer {
    padding-bottom: 92px;
  }
}

@media (max-width: 430px) {
  .message-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  .message-input {
    padding-left: 14px;
    padding-right: 62px;
  }

  .submit-btn {
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .form-status {
    bottom: 82px;
  }
}

