/* ══════════════════════════════════════════════════════
   Claude 桌面宠物 · 网页演示样式
   宠物视觉与桌面版一致，另加落地页/画廊/色卡样式
   ══════════════════════════════════════════════════════ */

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

:root {
  --pink: #5f7d9e;          /* 蓝灰强调色（沿用旧变量名，省得全局改） */
  --accent-deep: #46617f;
  --ink: #3f4a58;
}

html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Yuanti SC", "YuanTi SC", "Chalkboard SE", "PingFang SC",
    "Hiragino Sans GB", sans-serif;
  background:
    radial-gradient(1200px 500px at 50% -10%, #e9f0f8 0%, rgba(233, 240, 248, 0) 60%),
    linear-gradient(160deg, #f7f9fc 0%, #eef2f8 45%, #e9eef5 100%);
  text-align: center;
  padding-bottom: 60px;
}

/* ── 顶部标题 ── */
header { padding: 46px 20px 8px; }
header h1 {
  font-size: 32px;
  color: var(--accent-deep);
  letter-spacing: 1px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8);
}
.tagline { margin-top: 10px; font-size: 15px; color: #7d8ba0; }

/* ── Hero：深色「桌面」，秀发光 ── */
.hero { margin: 26px auto 8px; }
.stage {
  position: relative;
  width: 320px;
  height: 240px;
  margin: 0 auto;
  border-radius: 18px;
  background:
    radial-gradient(420px 180px at 30% 15%, rgba(150, 180, 220, 0.16), rgba(0,0,0,0) 70%),
    linear-gradient(150deg, #2a2f3d 0%, #3c465a 55%, #333b4c 100%);
  box-shadow: 0 18px 40px rgba(70, 90, 120, 0.35), inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
}
.stage::before {
  content: "";
  position: absolute;
  top: 12px; left: 14px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ff6159;
  box-shadow: 16px 0 0 #ffbd2e, 32px 0 0 #29c940;
  opacity: 0.9;
  z-index: 5;
}
.hero-caption { margin-top: 20px; }
#state-name {
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  color: var(--pink);
  background: #fff;
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(110, 140, 175, 0.28);
  min-width: 120px;
  transition: transform 0.15s;
}
.hint { margin-top: 12px; font-size: 13px; color: #8a97a9; }

/* ── 色卡 ── */
#swatches {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
.swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.15s;
}
.swatch:hover { transform: scale(1.2); }
.swatch.active { outline: 2px solid #5f7d9e; outline-offset: 2px; }

/* ══════════════════════════════════════
   宠物本体 —— 马卡龙主题变量（默认粉）
   主题类加在 #pet 上，只影响宠物、不影响页面
   ══════════════════════════════════════ */
#pet {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  --grad1: #fff6fb; --grad2: #ffe3f1; --grad3: #ffd6ef; --tail: #ffd6ef;
  --label: #e64c8b; --detail: #b06a95;
  --glow: 255,160,205; --glow2: 255,140,195; --shadow: 180,90,140;
  --halo1: 255,251,253; --halo2: 255,228,244; --halo3: 255,210,236;
  --cheek: 255,140,180; --heart: 255,120,170;
}
#pet.theme-green {
  --grad1: #f3fdf8; --grad2: #dcf7e8; --grad3: #c9f0dc; --tail: #c9f0dc;
  --label: #23a06a; --detail: #6a9a86;
  --glow: 150,225,190; --glow2: 130,215,180; --shadow: 90,160,130;
  --halo1: 251,255,253; --halo2: 224,246,235; --halo3: 210,240,225;
  --cheek: 130,215,175; --heart: 120,200,160;
}
#pet.theme-blue {
  --grad1: #f3fafe; --grad2: #dceffb; --grad3: #cbe7fa; --tail: #cbe7fa;
  --label: #2b82c0; --detail: #6a8aa8;
  --glow: 150,200,240; --glow2: 130,190,238; --shadow: 90,130,170;
  --halo1: 251,253,255; --halo2: 224,238,248; --halo3: 210,230,246;
  --cheek: 140,190,235; --heart: 120,180,225;
}
#pet.theme-purple {
  --grad1: #faf6fe; --grad2: #ece0fb; --grad3: #e2d2fa; --tail: #e2d2fa;
  --label: #8a52c0; --detail: #8a7aa8;
  --glow: 195,165,240; --glow2: 185,145,238; --shadow: 130,90,170;
  --halo1: 253,251,255; --halo2: 240,230,248; --halo3: 232,220,246;
  --cheek: 190,150,235; --heart: 175,130,225;
}
#pet.theme-yellow {
  --grad1: #fffdf2; --grad2: #fdf3cf; --grad3: #fbecc0; --tail: #fbecc0;
  --label: #c79a1a; --detail: #a8945a;
  --glow: 245,215,120; --glow2: 240,205,100; --shadow: 170,140,50;
  --halo1: 255,254,250; --halo2: 250,244,224; --halo3: 250,238,210;
  --cheek: 240,200,110; --heart: 225,190,90;
}

#bubble {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 14px 7px;
  background: linear-gradient(150deg, var(--grad1) 0%, var(--grad2) 55%, var(--grad3) 100%);
  border: 2px solid #ffffff;
  border-radius: 16px;
  box-shadow:
    0 0 15px rgba(var(--glow), 0.75),
    0 4px 12px rgba(var(--shadow), 0.25),
    inset 0 1px 3px rgba(255, 255, 255, 0.9);
  animation: sway 3s ease-in-out infinite, glow 3s ease-in-out infinite;
  z-index: 2;
}
#bubble::after {
  content: "";
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 9px solid var(--tail);
  filter: drop-shadow(0 2px 1px rgba(var(--glow2), 0.5));
  transition: border-top-color 0.6s ease;
}
#bubble-top { display: flex; align-items: center; gap: 5px; line-height: 1; }
#bubble-label {
  font-size: 12.5px; font-weight: 700; color: var(--label);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7); letter-spacing: 0.3px;
  transition: color 0.6s ease;
}
#emoji { font-size: 15px; animation: floaty 2s ease-in-out infinite; }
#bubble-detail {
  font-size: 10px; color: var(--detail); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
  transition: color 0.6s ease;
}
#bubble-detail:empty { display: none; }

#creature {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 108px; height: 58px;
  animation: bob 2.6s ease-in-out infinite;
  cursor: pointer;
}
#halo {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(var(--halo1), 0.95) 0%,
    rgba(var(--halo2), 0.7) 62%,
    rgba(var(--halo3), 0) 100%);
  filter: blur(0.4px);
  animation: glowSoft 3s ease-in-out infinite;
}
#face {
  position: relative; z-index: 1;
  font-size: 22px; font-weight: 800; color: var(--label); /* 颜文字跟随主题色 */
  font-family: "Menlo", "PingFang SC", monospace;
  letter-spacing: -1px; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95);
  transition: color 0.6s ease;
}
.cheek {
  position: absolute; z-index: 1;
  width: 13px; height: 8px; border-radius: 50%;
  background: rgba(var(--cheek), 0.55); filter: blur(1.5px); bottom: 16px;
  transition: background 0.6s ease;
}
.cheek-l { left: calc(50% - 32px); }
.cheek-r { right: calc(50% - 32px); }

.heart {
  position: absolute; z-index: 2; pointer-events: none;
  transform: translateX(-50%); opacity: 0;
  animation-name: heartFloat; animation-timing-function: ease-out;
  animation-fill-mode: forwards; will-change: transform, opacity;
  filter: drop-shadow(0 1px 2px rgba(var(--heart), 0.4));
}
@keyframes heartFloat {
  0%   { opacity: 0; transform: translate(-50%, 0)     scale(0.4) rotate(0deg); }
  20%  { opacity: 1; transform: translate(-50%, -10px) scale(1)   rotate(-8deg); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--drift, 0px)), -46px) scale(0.9) rotate(10deg); }
}

@keyframes bob { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-5px);} }
@keyframes sway { 0%,100%{transform:translateY(0) rotate(-1.5deg);} 50%{transform:translateY(-3px) rotate(1.5deg);} }
@keyframes glow {
  0%,100% { box-shadow: 0 0 15px rgba(var(--glow), 0.75), 0 4px 12px rgba(var(--shadow), 0.25), inset 0 1px 3px rgba(255,255,255,0.9); }
  50%     { box-shadow: 0 0 22px rgba(var(--glow2), 0.95), 0 4px 12px rgba(var(--shadow), 0.25), inset 0 1px 3px rgba(255,255,255,0.9); }
}
@keyframes glowSoft { 0%,100%{opacity:.9;transform:scale(1);} 50%{opacity:1;transform:scale(1.05);} }
@keyframes floaty { 0%,100%{transform:translateY(0) rotate(0);} 50%{transform:translateY(-2px) rotate(8deg);} }

#creature.busy { animation: bounce 0.6s ease-in-out infinite; }
@keyframes bounce { 0%,100%{transform:translateY(0) scaleY(1);} 30%{transform:translateY(-9px) scaleY(1.06);} 55%{transform:translateY(0) scaleY(0.94);} }
#creature.sleep { animation: sleepBreath 4s ease-in-out infinite; }
@keyframes sleepBreath { 0%,100%{transform:translateY(0) scale(1);} 50%{transform:translateY(-2px) scale(1.02);} }
#creature.poked { animation: poked 0.55s ease; }
@keyframes poked {
  0%{transform:scale(1) rotate(0);} 25%{transform:scale(1.18,0.85) rotate(-6deg);}
  50%{transform:scale(0.9,1.12) rotate(5deg);} 75%{transform:scale(1.08,0.95) rotate(-3deg);}
  100%{transform:scale(1) rotate(0);}
}
#creature.celebrate { animation: celebrate 0.7s ease; }
@keyframes celebrate {
  0%{transform:translateY(0) rotate(0) scale(1);} 30%{transform:translateY(-12px) rotate(-8deg) scale(1.12);}
  60%{transform:translateY(-12px) rotate(8deg) scale(1.12);} 100%{transform:translateY(0) rotate(0) scale(1);}
}

/* ══════ 状态画廊 ══════ */
.gallery { margin: 54px auto 10px; max-width: 820px; padding: 0 18px; }
.gallery h2, .install h2 { font-size: 20px; color: var(--accent-deep); margin-bottom: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.card {
  background: #fff; border-radius: 16px; padding: 16px 10px 12px;
  box-shadow: 0 6px 16px rgba(120, 145, 180, 0.18); border: 1.5px solid #e4ebf3;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(110, 140, 180, 0.28); }
.card .cface { font-family: "Menlo", monospace; font-size: 18px; font-weight: 800; color: #6b4a7a; white-space: nowrap; }
.card .clabel { margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--pink); }
.card .cemoji { font-size: 15px; }

/* ══════ 安装区 ══════ */
.install { margin: 54px auto 0; max-width: 640px; padding: 0 18px; }
.install pre {
  text-align: left; background: #2a2f3d; color: #d6dee8;
  padding: 18px 20px; border-radius: 14px; font-size: 13px; line-height: 1.9;
  overflow-x: auto; box-shadow: 0 10px 26px rgba(50, 60, 80, 0.3);
}
.install pre .c { color: #8a95ab; }
.btn {
  display: inline-block; margin-top: 22px; padding: 12px 28px;
  background: var(--pink); color: #fff; font-size: 15px; font-weight: 700;
  border-radius: 999px; text-decoration: none;
  box-shadow: 0 8px 20px rgba(70, 97, 127, 0.38);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-2px); background: var(--accent-deep); box-shadow: 0 12px 26px rgba(70, 97, 127, 0.5); }

footer { margin-top: 50px; font-size: 13px; color: #93a0b2; }
footer a { color: var(--pink); text-decoration: none; }

/* ══════════════════════════════════════
   页面装饰：浮动光晕 + 闪烁星星 + 花边
   ══════════════════════════════════════ */
body { position: relative; overflow-x: hidden; }
header, section, footer { position: relative; z-index: 1; }

/* 背景柔光球（aurora） */
.bg-decor { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%;
  filter: blur(55px); opacity: 0.5;
  animation: floatBlob 18s ease-in-out infinite;
}
.blob.b1 { width: 320px; height: 320px; top: -70px; left: -80px; background: #cfe0f5; }
.blob.b2 { width: 280px; height: 280px; top: 18%; right: -90px; background: #ded6f3; animation-delay: -4s; }
.blob.b3 { width: 300px; height: 300px; bottom: 10%; left: -70px; background: #d3efe2; animation-delay: -8s; }
.blob.b4 { width: 240px; height: 240px; bottom: -60px; right: 6%; background: #f3e6da; opacity: 0.42; animation-delay: -12s; }
@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(22px, -26px) scale(1.08); }
  66%      { transform: translate(-16px, 18px) scale(0.95); }
}

/* 闪烁小星星 */
.sparkle {
  position: absolute;
  color: #b8c8dc;
  font-size: 14px;
  text-shadow: 0 0 6px rgba(180, 200, 225, 0.7);
  animation: twinkle 3.6s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.12; transform: scale(0.7); }
  50%      { opacity: 0.9;  transform: scale(1.1); }
}
.s1 { top: 14%; left: 11%; animation-delay: 0s; }
.s2 { top: 21%; right: 15%; font-size: 11px; animation-delay: .8s; }
.s3 { top: 39%; left: 7%; font-size: 18px; animation-delay: 1.6s; }
.s4 { top: 55%; right: 9%; animation-delay: .4s; }
.s5 { top: 69%; left: 15%; font-size: 12px; animation-delay: 2.2s; }
.s6 { top: 31%; left: 46%; font-size: 10px; animation-delay: 1.2s; }
.s7 { top: 79%; right: 21%; font-size: 16px; animation-delay: .6s; }
.s8 { top: 9%; right: 38%; font-size: 12px; animation-delay: 1.9s; }

/* 小太阳：柔光圆盘 + 一圈缓缓转的短光芒 */
.sun {
  position: absolute;
  top: 10%; right: 9%;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 40%, #fff4da, #ffe3ad);
  box-shadow: 0 0 16px 5px rgba(255, 216, 150, 0.5);
  animation: breathe 5s ease-in-out infinite;
}
.sun::before {
  content: "";
  position: absolute; inset: -9px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 205, 130, 0.55) 0deg 4deg, transparent 4deg 30deg);
  -webkit-mask: radial-gradient(circle, transparent 56%, #000 58%, #000 70%, transparent 72%);
          mask: radial-gradient(circle, transparent 56%, #000 58%, #000 70%, transparent 72%);
  animation: spin 46s linear infinite;
}

/* 小月亮：box-shadow 做月牙，不依赖背景色 */
.moon {
  position: absolute;
  top: 22%; left: 8%;
  width: 26px; height: 26px;
  border-radius: 50%;
  box-shadow: inset -8px -4px 0 0 #d9e1f2, 0 0 14px 3px rgba(198, 210, 236, 0.42);
  animation: breathe 6.5s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.5;  transform: scale(1); }
  50%      { opacity: 0.85; transform: scale(1.06); }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 特性小胶囊 */
.chips {
  margin-top: 18px;
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.chip {
  font-size: 12px; color: #5a6b80;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #dbe4ee;
  border-radius: 999px;
  padding: 5px 12px;
  box-shadow: 0 2px 6px rgba(120, 145, 180, 0.12);
  backdrop-filter: blur(4px);
  transition: transform 0.15s, box-shadow 0.15s;
}
.chip:hover { transform: translateY(-2px); box-shadow: 0 5px 12px rgba(110, 140, 180, 0.22); }

/* 标题小花边 */
.gallery h2, .install h2 { position: relative; }
.gallery h2::after, .install h2::after {
  content: "";
  display: block;
  width: 46px; height: 3px;
  margin: 12px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #a9c2dd, #c9bfe4);
}

/* 舞台外描一圈柔白边，像个屏幕 */
.stage { border: 1px solid rgba(255, 255, 255, 0.6); }

/* 卡片顶部渐隐高光 */
.card { position: relative; overflow: hidden; }
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #a9c2dd, #cbbfe6, #b6dcc9);
  opacity: 0; transition: opacity 0.2s;
}
.card:hover::before { opacity: 1; }

/* 页脚小花边 */
.footer-flourish {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: 0 auto 14px; color: #b3c0d0; font-size: 14px;
}
.footer-flourish::before, .footer-flourish::after {
  content: ""; width: 70px; height: 1px;
}
.footer-flourish::before { background: linear-gradient(90deg, transparent, #cdd8e6); }
.footer-flourish::after  { background: linear-gradient(90deg, #cdd8e6, transparent); }
