/* ==========================================================================
   大肥鱼 · DeepSeek 鲸鱼娘二创互动空间
   主题视觉：冰海晴空蓝白海浪 × 二次元萌系手账 × 极客思考链终端
   ========================================================================== */

:root {
  --bg-page: #f3f7ff;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f8fbff;
  --bg-tint: #eaf2ff;
  --bg-glass: rgba(255, 255, 255, 0.82);

  --brand-primary: #4d6bfe;
  --brand-hover: #3b58ec;
  --brand-deep: #162b63;
  --brand-cyan: #22b8f5;
  --accent-pink: #ff5b8d;
  --accent-warm: #f59e0b;
  --accent-green: #10b981;

  --text-main: #0f1d3a;
  --text-secondary: #3c4f76;
  --text-muted: #667aa0;

  --border-soft: rgba(77, 107, 254, 0.14);
  --border-strong: rgba(77, 107, 254, 0.28);

  --shadow-sm: 0 4px 16px rgba(24, 56, 136, 0.06);
  --shadow-md: 0 12px 34px rgba(32, 68, 168, 0.1);
  --shadow-lg: 0 22px 54px rgba(35, 72, 178, 0.14);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wave-fill: #eaf2ff;
  --think-bg: #f4f7fc;
  --think-border: #c5d6ff;
  --sticker-bg: #ffffff;
}

/* 深夜加班摸鱼模式 */
[data-theme="dark"] {
  --bg-page: #071022;
  --bg-surface: #101d38;
  --bg-surface-alt: #152546;
  --bg-tint: #0c172e;
  --bg-glass: rgba(13, 24, 48, 0.84);

  --brand-primary: #6685ff;
  --brand-hover: #7c98ff;
  --brand-deep: #dbe8ff;
  --brand-cyan: #38bdf8;
  --accent-pink: #ff6e9b;
  --accent-warm: #fbbf24;

  --text-main: #eef4ff;
  --text-secondary: #bdd0f2;
  --text-muted: #869ec9;

  --border-soft: rgba(124, 156, 255, 0.16);
  --border-strong: rgba(124, 156, 255, 0.34);

  --shadow-sm: 0 6px 20px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 16px 38px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.5);

  --wave-fill: #0c172e;
  --think-bg: #0b152b;
  --think-border: #2c4680;
  --sticker-bg: rgba(255, 255, 255, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: rgba(77, 107, 254, 0.1);
  color: var(--brand-primary);
  padding: 0.1em 0.42em;
  border-radius: 6px;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
}

/* ==================== 背景浮游气泡 ==================== */
.ocean-bubbles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ocean-bubble {
  position: absolute;
  bottom: -60px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.85), rgba(77, 107, 254, 0.14) 65%, rgba(56, 189, 248, 0.06));
  border: 1px solid rgba(77, 107, 254, 0.16);
  animation: riseBubble linear infinite;
}

@keyframes riseBubble {
  0% {
    transform: translateY(0) translateX(0) scale(0.85);
    opacity: 0;
  }
  15% {
    opacity: 0.65;
  }
  85% {
    opacity: 0.45;
  }
  100% {
    transform: translateY(-115vh) translateX(24px) scale(1.1);
    opacity: 0;
  }
}

/* ==================== 大肥鱼清除计划模拟模式 ==================== */
.cleaner-banner {
  position: sticky;
  top: 0;
  z-index: 120;
  background: linear-gradient(90deg, #111827, #1e293b, #312e81);
  color: #fef08a;
  border-bottom: 2px solid #facc15;
  padding: 10px 16px;
  font-size: 0.9rem;
}

.cleaner-banner-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.cleaner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #facc15;
  box-shadow: 0 0 12px #facc15;
  animation: pulseFast 1s infinite;
}

@keyframes pulseFast {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

.cleaner-restore-btn {
  border: 1px solid #facc15;
  background: #facc15;
  color: #111827;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.cleaner-restore-btn:hover {
  transform: scale(1.04);
}

body.cleaner-active .dafeiyu-target {
  position: relative;
  outline: 2px dashed #f59e0b;
  outline-offset: 4px;
}

body.cleaner-active .dafeiyu-target::after {
  content: "🛡️ " attr(data-cleaner-label) " · 已隔离";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 30;
  background: repeating-linear-gradient(
    -45deg,
    #111827,
    #111827 10px,
    #27272a 10px,
    #27272a 20px
  );
  color: #fde047;
  border: 1.5px solid #facc15;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: stickerPop 0.3s cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes stickerPop {
  0% { transform: scale(1.35) rotate(-5deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ==================== 顶部导航 ==================== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-avatar-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-cyan));
  box-shadow: 0 4px 12px rgba(77, 107, 254, 0.28);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: #ffffff;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text-main);
}

.brand-title small {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--brand-primary);
  margin-left: 4px;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: var(--brand-primary);
  background: rgba(77, 107, 254, 0.09);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.token-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, border-color 0.2s ease;
}

.token-pill:hover {
  transform: translateY(-1px);
  border-color: var(--brand-primary);
}

.token-pill:active {
  transform: scale(0.96);
}

.token-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.token-count {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brand-primary);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  transform: rotate(16deg);
  border-color: var(--brand-primary);
}

/* ==================== HERO 主视觉 + 互动桌宠 ==================== */
.hero-section {
  position: relative;
  z-index: 1;
  padding-top: 44px;
  background:
    radial-gradient(640px 420px at 14% 12%, rgba(77, 107, 254, 0.14), transparent 70%),
    radial-gradient(580px 460px at 88% 18%, rgba(56, 189, 248, 0.16), transparent 70%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 44px;
  align-items: center;
  padding-bottom: 52px;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  font-size: 0.84rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(2.35rem, 4.4vw, 3.65rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.hero-title-highlight {
  display: inline-block;
  background: linear-gradient(115deg, var(--brand-primary) 10%, var(--brand-cyan) 75%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 0 0 22px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 540px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.chip {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}

.chip-blue { background: rgba(77, 107, 254, 0.11); color: var(--brand-primary); border-color: rgba(77, 107, 254, 0.2); }
.chip-cyan { background: rgba(34, 184, 245, 0.12); color: #0284c7; border-color: rgba(34, 184, 245, 0.22); }
.chip-warm { background: rgba(245, 158, 11, 0.12); color: #b45309; border-color: rgba(245, 158, 11, 0.24); }
.chip-pink { background: rgba(255, 91, 141, 0.12); color: #db2777; border-color: rgba(255, 91, 141, 0.24); }
.chip-slate { background: rgba(100, 116, 139, 0.12); color: var(--text-secondary); border-color: var(--border-soft); }

[data-theme="dark"] .chip-cyan { color: #7dd3fc; }
[data-theme="dark"] .chip-warm { color: #fcd34d; }
[data-theme="dark"] .chip-pink { color: #fda4af; }

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.96rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), #3355f6);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(77, 107, 254, 0.34);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(77, 107, 254, 0.44);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.hero-mini-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 20px;
  border-top: 1px dashed var(--border-strong);
}

.mini-fact {
  display: flex;
  flex-direction: column;
}

.mini-fact-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.mini-fact-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==================== 右栏：大肥鱼互动舞台 ==================== */
.pet-stage-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  padding: 18px;
}

.stage-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.chrome-dots {
  display: flex;
  gap: 6px;
}

.chrome-dots .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.chrome-dots .red { background: #ff5f57; }
.chrome-dots .yellow { background: #febc2e; }
.chrome-dots .green { background: #28c840; }

.chrome-path {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mood-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: rgba(77, 107, 254, 0.12);
  color: var(--brand-primary);
  flex-shrink: 0;
}

.speech-bubble {
  position: relative;
  background: var(--bg-tint);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 12px 16px;
  font-size: 0.92rem;
  color: var(--text-main);
  min-height: 62px;
  margin-bottom: 14px;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: var(--bg-tint);
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.speech-tag {
  font-weight: 800;
  color: var(--brand-primary);
}

.pet-canvas {
  position: relative;
  border-radius: 20px;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #eff6ff 58%, #dceaff 100%);
  border: 1.5px solid rgba(77, 107, 254, 0.16);
  height: 332px;
  padding: 10px 14px 36px;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-bottom: 14px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

[data-theme="dark"] .pet-canvas {
  background: radial-gradient(circle at 50% 44%, rgba(77, 107, 254, 0.28) 0%, rgba(28, 52, 108, 0.52) 52%, #0c1833 100%);
  border-color: rgba(124, 156, 255, 0.32);
  box-shadow: inset 0 0 40px rgba(56, 189, 248, 0.16);
}

.pet-canvas.fx-angry {
  border-color: rgba(244, 63, 94, 0.55);
  box-shadow: inset 0 0 42px rgba(244, 63, 94, 0.16);
}

.pet-canvas.fx-feed {
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: inset 0 0 42px rgba(251, 191, 36, 0.16);
}

.pet-canvas.fx-work {
  border-color: rgba(77, 107, 254, 0.55);
  box-shadow: inset 0 0 42px rgba(56, 189, 248, 0.2);
}

.pet-canvas.fx-slack {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: inset 0 0 42px rgba(14, 165, 233, 0.16);
}

.pet-fx-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.fx-badge-icon {
  position: absolute;
  font-size: 1.65rem;
  font-weight: 900;
  user-select: none;
  animation: fxFloat 1.6s ease-in-out infinite;
}

.fx-badge-icon.pos-tl { top: 20px; left: 22px; }
.fx-badge-icon.pos-tr { top: 46px; right: 22px; animation-delay: 0.35s; }
.fx-badge-icon.pos-bl { bottom: 44px; left: 26px; animation-delay: 0.65s; font-size: 1.25rem; }

@keyframes fxFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.92; }
  50% { transform: translateY(-7px) scale(1.14); opacity: 1; }
}

.pet-halo {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(77, 107, 254, 0.18), transparent 70%);
  animation: haloBreathe 4s ease-in-out infinite;
}

@keyframes haloBreathe {
  0%, 100% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

.pet-float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
}

.float-pop {
  position: absolute;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--brand-primary);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.95);
  animation: floatUpPop 1.15s ease-out forwards;
  white-space: nowrap;
}

.float-pop.pink { color: #e11d48; }
.float-pop.warm { color: #d97706; }

@keyframes floatUpPop {
  0% { transform: translate(-50%, 0) scale(0.7); opacity: 0; }
  20% { transform: translate(-50%, -14px) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -68px) scale(0.95); opacity: 0; }
}

.pet-avatar-btn {
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  height: 264px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pet-image {
  max-height: 262px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(34, 68, 168, 0.2));
  transition: transform 0.25s cubic-bezier(0.22, 1.4, 0.36, 1), opacity 0.18s ease, filter 0.25s ease;
  animation: gentleBob 3.6s ease-in-out infinite;
  user-select: none;
  -webkit-user-drag: none;
}

[data-theme="dark"] .pet-image {
  filter: drop-shadow(0 10px 22px rgba(96, 165, 250, 0.34));
}

.pet-canvas.fx-angry .pet-image {
  filter: drop-shadow(0 10px 20px rgba(244, 63, 94, 0.32)) saturate(1.08);
}

@keyframes gentleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.pet-image.jelly-bounce {
  animation: jellyBounce 0.55s cubic-bezier(0.22, 1.4, 0.36, 1);
}

@keyframes jellyBounce {
  0% { transform: scale(1, 1); }
  25% { transform: scale(1.12, 0.88); }
  50% { transform: scale(0.92, 1.09); }
  75% { transform: scale(1.04, 0.96); }
  100% { transform: scale(1, 1); }
}

.pet-image.angry-shake {
  animation: angryShake 0.45s ease-in-out;
}

@keyframes angryShake {
  0%, 100% { transform: translateX(0) rotate(0); }
  20% { transform: translateX(-8px) rotate(-3deg); }
  40% { transform: translateX(8px) rotate(3deg); }
  60% { transform: translateX(-6px) rotate(-2deg); }
  80% { transform: translateX(6px) rotate(2deg); }
}

.reset-pose-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  border: 1px solid rgba(77, 107, 254, 0.28);
  background: rgba(255, 255, 255, 0.92);
  color: #1e3a8a;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.canvas-hint {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font-size: 0.72rem;
  font-weight: 600;
  color: #3c5385;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(77, 107, 254, 0.16);
  padding: 2px 11px;
  border-radius: var(--radius-pill);
  pointer-events: none;
  white-space: nowrap;
}

/* 互动按钮网格 */
.pet-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: var(--bg-surface-alt);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
  background: var(--bg-tint);
}

.action-btn:active {
  transform: scale(0.95);
}

.act-emoji { font-size: 1.25rem; }
.act-title { font-size: 0.82rem; font-weight: 700; }
.act-sub { font-size: 0.68rem; color: var(--text-muted); }

/* 舞台内置思考链框 */
.stage-think-box {
  background: var(--think-bg);
  border: 1px solid var(--think-border);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 14px;
  font-size: 0.82rem;
}

.stage-think-box summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
  list-style: none;
}

.stage-think-box summary::-webkit-details-marker {
  display: none;
}

.think-spinner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-primary);
  flex-shrink: 0;
}

.think-spinner.spinning {
  background: transparent;
  border: 2px solid var(--brand-primary);
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
}

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

.stage-think-content {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--brand-primary);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* 状态条 */
.pet-meters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.meter-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.meter-head strong {
  font-family: var(--font-mono);
  color: var(--text-main);
}

.meter-track {
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-tint);
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.fill-blue { background: linear-gradient(90deg, #4d6bfe, #60a5fa); }
.fill-cyan { background: linear-gradient(90deg, #06b6d4, #38bdf8); }
.fill-pink { background: linear-gradient(90deg, #f43f5e, #fb7185); }

/* 海浪分割线 */
.wave-divider {
  line-height: 0;
  overflow: hidden;
}

.wave-divider svg {
  width: 100%;
  height: 54px;
  display: block;
}

.wave-divider path {
  fill: var(--wave-fill);
  transition: fill 0.3s ease;
}

/* ==================== 通用 Section 样式 ==================== */
.section {
  position: relative;
  z-index: 1;
  padding: 76px 0;
}

.section-tinted {
  background: var(--bg-tint);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 46px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brand-primary);
  background: rgba(77, 107, 254, 0.1);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.015em;
}

.section-subtitle {
  margin: 0;
  font-size: 0.98rem;
  color: var(--text-secondary);
}

/* ==================== SECTION 2: 前世今生 & 外貌设定 ==================== */
.lore-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
  margin-bottom: 24px;
}

.incident-card,
.timeline-card,
.anatomy-card,
.glossary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.incident-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-primary);
  background: rgba(77, 107, 254, 0.1);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.incident-visual {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.incident-img-box {
  background: var(--sticker-bg);
  border: 1.5px solid var(--border-strong);
  border-radius: 18px;
  padding: 12px;
  text-align: center;
}

.incident-img-box img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  margin-bottom: 8px;
}

.img-caption {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  color: #4b5d82;
}

.incident-chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.86rem;
}

.chat-msg p {
  margin: 4px 0 0;
}

.chat-role {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.82;
}

.user-msg {
  background: rgba(77, 107, 254, 0.1);
  border: 1px solid rgba(77, 107, 254, 0.18);
}

.think-msg {
  background: var(--think-bg);
  border-left: 3px solid var(--brand-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.ai-msg {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-soft);
}

/* 编年史列表 */
.lore-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lore-timeline li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.step-num {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-cyan));
  color: #ffffff;
  font-family: var(--font-mono);
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(77, 107, 254, 0.25);
}

.lore-timeline h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: var(--text-main);
}

.lore-timeline p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* 外貌拆解 + 词典 */
.anatomy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
}

.card-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin-bottom: 16px;
}

.card-head-row h3 {
  margin: 0;
  font-size: 1.1rem;
}

.hint-pill {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--brand-primary);
  background: rgba(77, 107, 254, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

.trait-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.trait-btn {
  border: 1px solid var(--border-soft);
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
}

.trait-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.trait-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(77, 107, 254, 0.28);
}

.trait-detail-panel {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-tint);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 18px;
}

.trait-detail-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  font-size: 1.55rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.trait-detail-panel h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--text-main);
}

.trait-detail-panel p {
  margin: 0;
  font-size: 0.89rem;
  color: var(--text-secondary);
}

.glossary-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.glossary-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-soft);
}

.glossary-item dt {
  margin: 0;
}

.glossary-item dd {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.term-badge {
  display: inline-block;
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 10px;
  background: rgba(77, 107, 254, 0.12);
  color: var(--brand-primary);
}

/* ==================== SECTION 3: 思考链模拟器 + 梗鲸语录库 ==================== */
.think-lab-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-md);
  margin-bottom: 48px;
}

.think-lab-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.think-lab-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.think-lab-title h3 {
  margin: 0 0 3px;
  font-size: 1.18rem;
}

.think-lab-title p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.mini-round-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: contain;
  background: var(--bg-tint);
  border: 2px solid var(--brand-primary);
  padding: 2px;
  flex-shrink: 0;
}

.model-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--brand-primary);
  background: rgba(77, 107, 254, 0.1);
  border: 1px solid rgba(77, 107, 254, 0.22);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}

.prompt-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.preset-chip {
  border: 1px solid var(--border-soft);
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
}

.preset-chip:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
}

.think-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.think-input {
  flex: 1;
  min-width: 0;
  padding: 13px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface-alt);
  color: var(--text-main);
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.think-input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(77, 107, 254, 0.14);
}

.think-submit-btn {
  flex-shrink: 0;
  padding-inline: 22px;
}

.think-output-area {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sim-user-bubble {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--brand-primary), #3d5af1);
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 18px 18px 4px 18px;
  font-size: 0.92rem;
  max-width: 85%;
}

.sim-tag {
  font-weight: 700;
  opacity: 0.9;
}

.sim-think-block {
  background: var(--think-bg);
  border: 1px solid var(--think-border);
  border-radius: 14px;
  padding: 12px 16px;
}

.sim-think-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  list-style: none;
}

.sim-think-summary::-webkit-details-marker {
  display: none;
}

.sim-think-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(77, 107, 254, 0.14);
  color: var(--brand-primary);
  font-size: 0.74rem;
}

.sim-think-body {
  margin-top: 10px;
  padding-left: 12px;
  border-left: 2.5px solid var(--brand-primary);
  font-family: var(--font-mono);
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.sim-answer-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 16px;
}

.sim-answer-avatar {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  object-fit: contain;
  background: var(--bg-tint);
  border: 1.5px solid var(--border-strong);
  padding: 2px;
  flex-shrink: 0;
}

.sim-answer-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 5px;
}

.sim-answer-head strong {
  white-space: nowrap;
}

.sim-answer-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: rgba(77, 107, 254, 0.11);
  color: var(--brand-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.sim-answer-content p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-main);
}

/* 梗鲸语录墙 */
.quotes-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.quotes-header-row h3 {
  margin: 0 0 4px;
  font-size: 1.3rem;
}

.quotes-header-row p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.quote-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  border: 1px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.filter-btn.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.quote-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quote-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.quote-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.quote-cat-tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(77, 107, 254, 0.11);
  color: var(--brand-primary);
}

.quote-copy-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.quote-sticker-wrap {
  height: 156px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.92), rgba(235, 243, 255, 0.65));
  border: 1px solid rgba(77, 107, 254, 0.12);
  display: grid;
  place-items: center;
  padding: 8px;
}

[data-theme="dark"] .quote-sticker-wrap {
  background: radial-gradient(circle at 50% 45%, rgba(226, 238, 255, 0.16), rgba(15, 29, 58, 0.55));
}

.quote-sticker-wrap img {
  max-height: 140px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(30, 58, 138, 0.14));
}

.quote-text {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.55;
  color: var(--text-main);
}

.quote-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px dashed var(--border-soft);
  padding-top: 10px;
}

/* ==================== SECTION 4: 仿微信 AI 朋友圈 ==================== */
.moments-shell {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.moments-cover-bg {
  position: relative;
  height: 210px;
  padding: 18px 24px;
  background: linear-gradient(135deg, #1b3687 0%, #3d5ff5 52%, #29b4f2 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.cover-waves {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.16), transparent 45%),
    radial-gradient(circle at 82% 20%, rgba(255, 255, 255, 0.2), transparent 40%);
  pointer-events: none;
}

.cover-top-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.moments-app-label {
  font-weight: 700;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.new-post-btn {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background-color 0.2s ease, transform 0.15s ease;
}

.new-post-btn:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.cover-quote {
  position: relative;
  z-index: 2;
  font-size: 1.05rem;
  font-weight: 600;
  opacity: 0.94;
  padding-bottom: 18px;
}

.moments-profile-row {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 14px;
  padding: 0 24px 16px;
  margin-top: -38px;
  border-bottom: 1px solid var(--border-soft);
}

.moments-profile-text {
  text-align: right;
  padding-bottom: 4px;
}

.moments-profile-text strong {
  display: block;
  font-size: 1.04rem;
  color: var(--text-main);
}

.moments-profile-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.moments-profile-text em {
  font-style: normal;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand-primary);
}

.moments-profile-avatar {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid var(--bg-surface);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.moments-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.moments-feed {
  padding: 8px 24px 24px;
}

.moment-post {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-soft);
}

.moment-post:last-child {
  border-bottom: none;
}

.moment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: #ffffff;
  border: 1px solid var(--border-strong);
}

.moment-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.moment-author {
  font-weight: 800;
  color: var(--brand-primary);
  font-size: 0.96rem;
}

.moment-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(77, 107, 254, 0.1);
  color: var(--brand-primary);
}

.moment-text {
  margin: 0 0 12px;
  font-size: 0.94rem;
  color: var(--text-main);
  line-height: 1.65;
}

/* 朋友圈九宫格/混合配图 */
.moment-media-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  max-width: 560px;
}

.moment-media-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 390px;
}

.media-img-card {
  aspect-ratio: 1;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.94), rgba(234, 242, 255, 0.72));
  border: 1px solid var(--border-soft);
  padding: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

[data-theme="dark"] .media-img-card {
  background: radial-gradient(circle at 50% 45%, rgba(226, 238, 255, 0.16), rgba(15, 29, 58, 0.55));
}

.media-img-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-terminal-card {
  aspect-ratio: 1;
  border-radius: 14px;
  background: #0b1220;
  color: #cbd5e1;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #1e293b;
}

.term-head {
  color: #38bdf8;
  font-weight: 700;
}

.term-ok {
  color: #34d399;
}

.media-poster-card {
  aspect-ratio: 1;
  border-radius: 14px;
  background: linear-gradient(145deg, #4d6bfe, #1d4ed8);
  color: #ffffff;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.poster-kicker {
  font-size: 0.68rem;
  opacity: 0.86;
  letter-spacing: 0.06em;
}

.poster-big {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

.poster-sub {
  font-size: 0.74rem;
  opacity: 0.92;
}

.moment-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.moment-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.moment-act-btn {
  border: 1px solid var(--border-soft);
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.moment-act-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.moment-act-btn.liked {
  background: rgba(255, 91, 141, 0.12);
  border-color: rgba(255, 91, 141, 0.35);
  color: #e11d48;
}

/* 点赞与评论区 */
.moment-social-box {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  overflow: hidden;
}

.moment-likes-bar {
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--brand-primary);
  font-weight: 600;
  border-bottom: 1px solid var(--border-soft);
}

.moment-comments-list {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
}

.comment-line {
  line-height: 1.5;
  color: var(--text-secondary);
}

.comment-user {
  font-weight: 700;
  color: var(--brand-primary);
}

.comment-form {
  display: flex;
  gap: 8px;
  padding: 8px 12px 10px;
  border-top: 1px dashed var(--border-soft);
}

.comment-input {
  flex: 1;
  min-width: 0;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
}

.comment-input:focus {
  border-color: var(--brand-primary);
}

.comment-send-btn {
  border: none;
  background: var(--brand-primary);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

/* ==================== SECTION 5: 生态图谱 ==================== */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.eco-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.eco-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.eco-card-special {
  border-color: rgba(255, 91, 141, 0.34);
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(255, 91, 141, 0.05) 100%);
}

.eco-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.eco-blue { background: rgba(77, 107, 254, 0.12); }
.eco-cyan { background: rgba(34, 184, 245, 0.14); }
.eco-indigo { background: rgba(99, 102, 241, 0.14); }
.eco-pink { background: rgba(255, 91, 141, 0.14); }

.eco-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.eco-card h3 {
  margin: 0;
  font-size: 1.06rem;
}

.eco-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  flex: 1;
}

.cleaner-trigger-btn {
  margin-top: 8px;
  width: 100%;
  border: 1.5px solid #f59e0b;
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 9px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
}

[data-theme="dark"] .cleaner-trigger-btn {
  color: #fcd34d;
}

.cleaner-trigger-btn:hover {
  background: #f59e0b;
  color: #111827;
}

/* ==================== FOOTER ==================== */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-surface);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border-strong);
}

.footer-brand strong {
  display: block;
  font-size: 0.94rem;
}

.footer-brand p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  padding-right: 76px;
}

.back-top-link {
  color: var(--brand-primary);
  font-weight: 700;
}

/* ==================== 右下角迷你桌宠悬浮球 ==================== */
.floating-pet-dock {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.floating-bubble {
  max-width: 220px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  border-radius: 16px 16px 4px 16px;
  padding: 9px 13px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(6px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.floating-pet-dock:hover .floating-bubble,
.floating-bubble.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.floating-menu {
  width: 205px;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.floating-menu[hidden] {
  display: none;
}

.floating-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}

.floating-menu-head button {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.floating-menu-btn {
  text-align: left;
  border: 1px solid var(--border-soft);
  background: var(--bg-surface-alt);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.floating-menu-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.floating-pet-orb {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 3px;
  border: 2.5px solid var(--brand-primary);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(77, 107, 254, 0.34);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.22, 1.4, 0.36, 1);
}

.floating-pet-orb:hover {
  transform: scale(1.08) rotate(-4deg);
}

.floating-pet-orb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.orb-online-dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2.5px solid #ffffff;
}

/* ==================== 全局 Toast ==================== */
.toast-container {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #0f1d3a;
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 26px rgba(15, 29, 58, 0.3);
  border: 1px solid rgba(125, 162, 255, 0.35);
  animation: toastIn 0.24s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 1040px) {
  .hero-grid,
  .lore-top-grid,
  .anatomy-grid {
    grid-template-columns: 1fr;
  }

  .quotes-grid,
  .eco-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .container {
    width: calc(100% - 24px);
  }

  .nav-inner {
    min-height: 60px;
    gap: 8px;
  }

  .brand-logo {
    gap: 8px;
    min-width: 0;
  }

  .brand-avatar-ring {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 1rem;
  }

  .brand-title small,
  .brand-sub {
    display: none;
  }

  .nav-actions {
    gap: 6px;
    flex-shrink: 0;
  }

  .token-pill {
    padding: 6px 10px;
    gap: 5px;
  }

  .token-count {
    font-size: 0.84rem;
  }

  .theme-toggle {
    width: 36px;
    height: 36px;
    font-size: 0.96rem;
  }

  .hero-section {
    padding-top: 24px;
  }

  .hero-grid {
    gap: 28px;
    padding-bottom: 36px;
  }

  .hero-mini-facts {
    gap: 10px;
  }

  .mini-fact-val {
    font-size: 1.05rem;
  }

  .mini-fact-label {
    font-size: 0.72rem;
  }

  .pet-stage-card {
    padding: 14px;
  }

  .pet-canvas {
    height: 296px;
  }

  .pet-avatar-btn {
    height: 230px;
  }

  .pet-image {
    max-height: 224px;
  }

  .pet-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pet-meters {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .section {
    padding: 52px 0;
  }

  .incident-card,
  .timeline-card,
  .anatomy-card,
  .glossary-card,
  .think-lab-card {
    padding: 18px 16px;
  }

  .incident-visual {
    grid-template-columns: 1fr;
  }

  .quotes-grid,
  .eco-grid {
    grid-template-columns: 1fr;
  }

  .think-form {
    flex-direction: column;
  }

  .sim-answer-box {
    padding: 12px;
    gap: 10px;
  }

  .sim-answer-avatar {
    width: 44px;
    height: 44px;
  }

  .token-label {
    display: none;
  }

  .moments-cover-bg {
    height: 185px;
    padding: 14px 16px;
  }

  .cover-top-bar {
    flex-wrap: wrap;
  }

  .moments-profile-row {
    padding: 0 16px 14px;
  }

  .moments-profile-avatar {
    width: 64px;
    height: 64px;
  }

  .moments-feed {
    padding: 6px 14px 18px;
  }

  .moment-post {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  .moment-avatar {
    width: 40px;
    height: 40px;
  }

  .moment-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .footer-meta {
    padding-right: 0;
    flex-wrap: wrap;
    gap: 10px;
  }

  .floating-pet-dock {
    right: 14px;
    bottom: 14px;
  }

  .floating-pet-orb {
    width: 50px;
    height: 50px;
  }

  .floating-bubble {
    display: none;
  }
}
