/* ============================================================
   🍬 安小猪 · 液态玻璃 · 卡通版 v4 (2026-11-06)
   液态玻璃 (Liquid Glass) + 卡通描边 + 糖果动效
   ============================================================ */

:root {
  --bg: #ffffff;
  --card: rgba(255, 255, 255, .62);
  --text: #35262f;
  --muted: #9a8290;
  --primary: #ec4899;
  --primary-dark: #d6297f;
  --violet: #a855f7;
  --indigo: #6366f1;
  --mint: #34d399;
  --amber: #f59e0b;
  --primary-soft: rgba(236, 72, 153, .10);
  --border: rgba(17, 24, 39, .07);
  --radius: 26px;
  --radius-sm: 16px;
  --grad-candy: linear-gradient(100deg, #ff8ac4 0%, #ec4899 38%, #a855f7 74%, #6366f1 100%);
  --grad-soft: linear-gradient(135deg, rgba(255, 138, 196, .16), rgba(168, 85, 247, .10));
  --glass-bg: linear-gradient(150deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .42));
  --glass-edge: linear-gradient(140deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, .18) 42%, rgba(255, 255, 255, .9));
  --shadow: 0 10px 30px rgba(17, 24, 39, .06), 0 2px 6px rgba(17, 24, 39, .04);
  --shadow-hover: 0 18px 44px rgba(17, 24, 39, .12), 0 4px 10px rgba(17, 24, 39, .06);
  --shadow-hard: 0 6px 0 rgba(17, 24, 39, .04);
  --ring: 0 0 0 4px rgba(236, 72, 153, .16);
}

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

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============ 背景：纯白 + 极淡灰底 ============ */
.bg-deco { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-deco::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(90% 55% at 50% 0%, #fafafb 0%, rgba(250, 250, 251, 0) 62%),
    linear-gradient(180deg, #ffffff 0%, #fdfdfe 55%, #fbfbfc 100%);
}
.bg-blob { display: none; }   /* 白底不再需要粉色光斑 */
.blob-a { width: 46vw; height: 46vw; top: -16vw; left: -10vw; background: radial-gradient(circle, rgba(255, 179, 218, .9) 0%, rgba(255, 179, 218, .45) 38%, rgba(255, 179, 218, 0) 72%); animation: driftA 24s ease-in-out infinite alternate; }
.blob-b { width: 42vw; height: 42vw; top: 6vh; right: -14vw; background: radial-gradient(circle, rgba(220, 192, 255, .9) 0%, rgba(220, 192, 255, .45) 38%, rgba(220, 192, 255, 0) 72%); animation: driftB 29s ease-in-out infinite alternate; }
.blob-c { width: 46vw; height: 46vw; bottom: -18vw; left: 20vw; background: radial-gradient(circle, rgba(255, 211, 186, .9) 0%, rgba(255, 211, 186, .45) 38%, rgba(255, 211, 186, 0) 72%); animation: driftC 26s ease-in-out infinite alternate; }
@keyframes driftA { to { transform: translate(6vw, 5vh) scale(1.12); } }
@keyframes driftB { to { transform: translate(-5vw, 7vh) scale(.9); } }
@keyframes driftC { to { transform: translate(-4vw, -6vh) scale(1.08); } }
.bg-deco::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(17, 24, 39, .035) 1.2px, transparent 1.8px);
  background-size: 28px 28px;
}

::selection { background: rgba(236, 72, 153, .26); }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f7c3e0, #dcc2f5);
  border-radius: 99px; border: 3px solid rgba(255, 255, 255, .7);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #f094c9, #c9a4ee); }

:focus-visible { outline: 3px solid rgba(236, 72, 153, .55); outline-offset: 3px; border-radius: 8px; }

main { flex: 1; position: relative; }
.container { width: min(820px, 94%); margin: 0 auto; }

/* ============ 液态玻璃通用件 ============ */
.glass, .card, .comment, .comment-form, .stat-pill, .search, .back, .chip {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  border: 1.5px solid rgba(17, 24, 39, .07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(255, 255, 255, .35),
    var(--shadow);
}
/* 列表卡片数量多，实时毛玻璃逐帧采样背景开销大；用高不透明度渐变保持玻璃观感 */
.card, .comment {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: #ffffff;
}
/* 玻璃折射高光边 */
.glass::before, .card::before, .comment::before, .comment-form::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
  background: var(--glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none; z-index: 3;
}

/* ============ 头部 ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .78));
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  backdrop-filter: blur(26px) saturate(190%);
  border-bottom: 1.5px solid rgba(255, 255, 255, .8);
  box-shadow: 0 6px 22px rgba(17, 24, 39, .05);
}
.site-header::after {
  content: ""; display: block; height: 3px;
  background: linear-gradient(90deg, transparent, #ff8ac4 15%, #ec4899 36%, #a855f7 62%, #6366f1 84%, transparent);
  opacity: .5;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-title { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  display: block;
  object-fit: cover; object-position: center 42%;
  border: 2px solid rgba(255, 255, 255, .95);
  background: #fce7f3;
  box-shadow: 0 6px 16px rgba(17, 24, 39, .12);
  animation: logoTilt 6s ease-in-out infinite;
}
@keyframes logoTilt { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(6deg) scale(1.06); } }
.logo-text {
  font-size: 18px; font-weight: 900; letter-spacing: .4px;
  background: linear-gradient(92deg, #ec4899 20%, #a855f7 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #ec4899;
}
.logo-badge {
  font-size: 10.5px; font-weight: 900; letter-spacing: 1.2px; color: #fff;
  background: var(--grad-candy); border-radius: 999px; padding: 3px 11px;
  border: 1.5px solid rgba(255, 255, 255, .9);
  box-shadow: 0 3px 0 rgba(214, 41, 127, .4), 0 6px 14px rgba(236, 72, 153, .3);
  transform: rotate(-4deg);
}
.site-nav { display: flex; gap: 14px; align-items: center; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 700; transition: color .15s; }
.site-nav a:hover { color: var(--primary); }
.header-search {
  border: 1.5px solid rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-radius: 999px; width: 42px; height: 42px;
  font-size: 16px; cursor: pointer; line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 4px 12px rgba(236, 72, 153, .1);
  transition: all .18s ease;
}
.header-search:hover { background: #fff; transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 18px rgba(236, 72, 153, .18); }

/* ============ Hero ============ */
.hero { text-align: center; padding: 44px 0 14px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 800; color: #c02670;
  background: rgba(255, 255, 255, .68);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, .95);
  border-radius: 999px; padding: 6px 17px; margin-bottom: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 6px 16px rgba(236, 72, 153, .1);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .5); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
.hero h1 {
  font-size: clamp(26px, 6vw, 38px);
  letter-spacing: .8px; margin-top: 4px;
  font-weight: 900;
  background: linear-gradient(92deg, #ff5fa8 8%, #ec4899 32%, #a855f7 66%, #6366f1 96%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #ec4899;
}
@keyframes shimmer { to { background-position: 200% center; } }
.hero-sub { color: var(--muted); font-size: 13.5px; margin: 12px 0 8px; letter-spacing: .3px; font-weight: 600; }

.search {
  width: min(470px, 100%);
  padding: 14px 24px;
  font-size: 14.5px; font-family: inherit; font-weight: 600;
  border-radius: 999px;
  outline: none; color: var(--text);
  transition: border-color .2s, box-shadow .2s, transform .2s, background .2s;
}
.search::placeholder { color: #c9aebf; font-weight: 600; }
.search:focus {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(236, 72, 153, .5);
  box-shadow: inset 0 1px 0 #fff, var(--ring), 0 12px 26px rgba(236, 72, 153, .14);
  transform: translateY(-2px);
}

/* ============ 统计胶囊 ============ */
.stat-row { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin: 20px 0 6px; }
.stat-pill {
  border-radius: 999px; padding: 8px 17px;
  font-size: 12.5px; font-weight: 700; color: #866a7c;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease;
}
.stat-pill:hover { transform: translateY(-3px) rotate(-.6deg); box-shadow: inset 0 1px 0 #fff, 0 12px 24px rgba(236, 72, 153, .16); }
.stat-pill.green { color: #0d9668; }

/* ============ 分类筛选 ============ */
.join-row { margin: 16px 0 2px; text-align: center; }
.join-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 26px; border-radius: 999px;
  background: var(--grad-candy); color: #fff;
  font-size: 14.5px; font-weight: 800; text-decoration: none;
  box-shadow: 0 8px 22px rgba(236, 72, 153, .28);
  transition: transform .15s;
}
.join-btn:active { transform: scale(.97); }

.chips { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 20px; }
.chip {
  color: #8a7080; font-weight: 700;
  padding: 7px 17px; border-radius: 999px;
  font-size: 12.5px; font-family: inherit;
  cursor: pointer;
  transition: all .18s cubic-bezier(.2, .7, .3, 1);
}
.chip:hover { color: var(--primary); transform: translateY(-2px) rotate(-1deg); box-shadow: inset 0 1px 0 #fff, var(--shadow-hover); }
.chip.active {
  background: var(--grad-candy);
  background-size: 160% auto;
  border-color: rgba(255, 255, 255, .9);
  color: #fff;
  box-shadow: 0 4px 0 rgba(214, 41, 127, .45), 0 8px 20px rgba(236, 72, 153, .35), inset 0 2px 0 rgba(255, 255, 255, .4);
}

/* ============ 卡片 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(246px, 1fr));
  gap: 18px;
  padding: 20px 0 56px;
}
.card {
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .24s cubic-bezier(.2, .8, .3, 1.1), box-shadow .24s ease, border-color .24s ease;
  animation: cardIn .5s cubic-bezier(.2, .7, .3, 1) both;
}
/* 卡片数量多，去掉每张卡片的 mask 描边层（本身已有 1.5px 白边），减少合成开销 */
.card::before { display: none; }
.card:nth-child(2) { animation-delay: .05s; } .card:nth-child(3) { animation-delay: .1s; }
.card:nth-child(4) { animation-delay: .15s; } .card:nth-child(5) { animation-delay: .2s; }
.card:nth-child(6) { animation-delay: .25s; } .card:nth-child(7) { animation-delay: .3s; }
.card:nth-child(8) { animation-delay: .35s; }
.card:nth-child(n+9) { animation: none; }
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
/* 卡通厚底 */
.card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), var(--shadow-hard), var(--shadow); }
.card::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -75%; width: 45%; z-index: 1;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: skewX(-18deg);
  transition: left .62s cubic-bezier(.3, .8, .4, 1);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-7px) rotate(-.7deg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 10px 0 rgba(236, 72, 153, .10), var(--shadow-hover);
}
.card:hover::after { left: 130%; }
.card:active { transform: translateY(-2px) scale(.99); }
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 10px; margin-right: 7px;
  font-size: 15px; vertical-align: -8px;
  background: var(--grad-soft);
  border: 1px solid rgba(255, 255, 255, .8);
}
.card-media { position: relative; display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #ffe6f3, #f0e4ff); overflow: hidden; text-decoration: none; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s cubic-bezier(.2, .8, .3, 1); }
/* 无配图帖子的渐变图标封面 */
.card-media-empty {
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(255, 255, 255, .95) 0%, rgba(255, 255, 255, 0) 48%),
    linear-gradient(135deg, #fbfbfc 0%, #f4f5f7 55%, #eef1f5 100%);
}
.card-media-empty .cme-icon {
  font-size: 40px; line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(17, 24, 39, .12));
  transform: rotate(-5deg);
  transition: transform .4s cubic-bezier(.2, .8, .3, 1);
}
.card:hover .card-media-empty .cme-icon { transform: rotate(4deg) scale(1.12); }
.card:hover .card-media img { transform: scale(1.08) rotate(.6deg); }
.card-cat {
  position: absolute; top: 11px; left: 11px;
  background: rgba(236, 72, 153, .88);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff; font-size: 11px; font-weight: 800; padding: 3px 12px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, .7);
  box-shadow: 0 3px 0 rgba(214, 41, 127, .35), 0 6px 14px rgba(236, 72, 153, .3);
  transform: rotate(-2deg);
}
.card-body { padding: 15px 17px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-size: 15.5px; line-height: 1.45; font-weight: 800; }
.card-title a { color: var(--text); text-decoration: none; transition: color .15s; }
.card-title a:hover { color: var(--primary); }
.card-desc {
  color: var(--muted); font-size: 13px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  white-space: pre-line;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 11px; color: var(--primary); background: var(--primary-soft); padding: 2px 10px; border-radius: 999px; font-weight: 700; }
.card-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 6px; padding-top: 9px; border-top: 1.5px dashed rgba(236, 72, 153, .16); }
.card-foot time { font-size: 11.5px; color: #bda7b8; font-weight: 600; }
.card-link {
  font-size: 12.5px; color: var(--primary); font-weight: 900; text-decoration: none;
  white-space: nowrap; transition: letter-spacing .2s, color .15s, transform .15s;
}
.card-link:hover { color: var(--primary-dark); letter-spacing: .6px; transform: translateX(2px); }
.card-top {
  display: inline-block; font-size: 10.5px; font-weight: 900; color: #b45309;
  background: #fef3c7; border: 1.5px solid #fcd34d;
  border-radius: 999px; padding: 1px 9px; margin-right: 5px; vertical-align: 2px;
}
.card-views { color: #bda7b8; font-size: 11.5px; margin-left: auto; font-weight: 600; }

.empty { text-align: center; color: var(--muted); padding: 60px 0 80px; font-size: 15px; font-weight: 700; }
.empty a { color: var(--primary); }

/* ============ 详情页 ============ */
.post { max-width: 720px; padding: 32px 0 68px; }
.back {
  display: inline-flex; align-items: center; gap: 6px;
  color: #7d6373; text-decoration: none; font-size: 13px; font-weight: 800;
  border-radius: 999px; padding: 8px 17px;
  transition: all .18s ease;
}
.back:hover { color: var(--primary); transform: translateX(-4px); box-shadow: inset 0 1px 0 #fff, var(--shadow-hover); }
.post-head { margin: 22px 0 8px; }
.post-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; font-weight: 600; margin-bottom: 13px; }
.chip-static {
  background: var(--grad-candy); color: #fff;
  padding: 3px 13px; border-radius: 999px; font-size: 12px; font-weight: 900;
  border: 1.5px solid rgba(255, 255, 255, .8);
  box-shadow: 0 3px 0 rgba(214, 41, 127, .35), 0 6px 14px rgba(236, 72, 153, .28);
  transform: rotate(-1.5deg);
}
.post h1 { font-size: clamp(23px, 4.6vw, 32px); line-height: 1.32; letter-spacing: .3px; font-weight: 900; }
.post-summary { color: var(--muted); margin-top: 13px; font-size: 14.5px; font-weight: 600; white-space: pre-line; }
.post-views { color: #bda7b8; font-size: 12px; font-weight: 600; }
.post-cover {
  display: block;
  max-width: 100%; max-height: 40vh; width: auto; height: auto;
  border-radius: var(--radius); margin: 18px auto 8px;
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: inset 0 1px 0 #fff, var(--shadow-hard), var(--shadow-hover);
  cursor: zoom-in;
}
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--grad-candy); background-size: 170% auto;
  color: #fff; padding: 13px 32px; border-radius: 999px;
  text-decoration: none; font-weight: 900; font-size: 14px;
  margin: 16px 0 8px;
  border: 1.5px solid rgba(255, 255, 255, .55);
  box-shadow: 0 5px 0 rgba(214, 41, 127, .5), 0 12px 26px rgba(236, 72, 153, .34), inset 0 2px 0 rgba(255, 255, 255, .4);
  transition: transform .18s ease, box-shadow .18s ease, background-position .4s ease;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(214, 41, 127, .45), 0 16px 32px rgba(236, 72, 153, .42), inset 0 2px 0 rgba(255, 255, 255, .4); background-position: right center; }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(214, 41, 127, .5), 0 6px 14px rgba(236, 72, 153, .3); }
.post-content { color: #3f3040; margin-top: 8px; font-size: 14.8px; }
.post-content p { margin: 14px 0; }
.post-content img { max-width: 100%; max-height: 60vh; width: auto; height: auto; border-radius: 16px; border: 2px solid rgba(255, 255, 255, .9); box-shadow: var(--shadow); }
.post-content a, .link-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 11px; margin: 1px 2px; border-radius: 999px;
  background: rgba(236, 72, 153, .09);
  border: 1px solid rgba(236, 72, 153, .28);
  color: var(--primary); text-decoration: none; font-weight: 700; font-size: 13px;
  line-height: 1.5; vertical-align: baseline;
}
.post-content a:hover, .link-pill:hover { background: rgba(236, 72, 153, .16); border-color: var(--primary); }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 { margin: 28px 0 11px; letter-spacing: .3px; font-weight: 900; }
.post-content h2 { padding-left: 14px; border-left: 5px solid var(--primary); border-radius: 3px; }
.post-content h3 { color: #a82e73; }
.post-content ul, .post-content ol { padding-left: 22px; margin: 12px 0; }
.post-content li { margin: 6px 0; }
.post-content li::marker { color: var(--primary); font-weight: 900; }
.post-content blockquote {
  border-left: 5px solid var(--primary);
  background: linear-gradient(135deg, rgba(236, 72, 153, .08), rgba(168, 85, 247, .07));
  padding: 12px 17px; border-radius: 0 16px 16px 0; margin: 16px 0;
  color: #6d5566; font-weight: 600;
}
.post-content code { background: rgba(251, 238, 246, .9); color: #b03080; padding: 2px 8px; border-radius: 7px; font-size: .9em; font-family: "Cascadia Code", Consolas, "JetBrains Mono", monospace; font-weight: 600; }
.post-content pre {
  background: linear-gradient(160deg, #2d2233, #241d2c);
  color: #f4e6f1; padding: 18px 20px; border-radius: 18px;
  overflow-x: auto; margin: 16px 0;
  border: 1.5px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 26px rgba(45, 34, 51, .3);
}
.post-content pre code { background: none; padding: 0; color: inherit; font-size: 13px; }

/* ============ 评论区 ============ */
.post-comments { margin-top: 38px; }
.post-comments h2 { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; font-weight: 900; }
.comment {
  border-radius: var(--radius-sm);
  padding: 14px 18px; margin-bottom: 11px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.comment:hover { transform: translateX(4px) rotate(-.3deg); box-shadow: inset 0 1px 0 #fff, var(--shadow-hover); }
.comment-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.comment-head b { color: var(--primary); font-size: 13.5px; font-weight: 900; }
.comment-head time { color: #bda7b8; font-size: 12px; font-weight: 600; }
.comment-body { font-size: 14px; line-height: 1.75; color: #46363f; }
.comment-body a { color: var(--primary); }

/* ---- 评论表单 ---- */
.comment-form { border-radius: 20px; padding: 15px 17px; margin-top: 16px; }
.comment-form .cf-row { display: flex; gap: 9px; margin-bottom: 10px; }
.comment-form input {
  flex: 1; border: 1.5px solid rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .8);
  border-radius: 999px;
  padding: 10px 17px; font-size: 14px; font-family: inherit; font-weight: 600;
  outline: none; color: var(--text); min-width: 0;
  box-shadow: inset 0 1px 0 #fff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.comment-form input:focus { background: #fff; border-color: rgba(236, 72, 153, .5); box-shadow: inset 0 1px 0 #fff, var(--ring); }
.comment-form .cf-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.comment-form textarea {
  width: 100%; box-sizing: border-box; min-height: 84px; resize: vertical;
  border: 1.5px solid rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .8);
  border-radius: 16px;
  padding: 12px 15px; font-size: 14px; font-family: inherit; line-height: 1.65; font-weight: 600;
  outline: none; color: var(--text);
  box-shadow: inset 0 1px 0 #fff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.comment-form textarea:focus { background: #fff; border-color: rgba(236, 72, 153, .5); box-shadow: inset 0 1px 0 #fff, var(--ring); }
.comment-form .cf-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.comment-form .cf-tip { font-size: 12.5px; color: var(--muted); flex: 1; min-height: 16px; font-weight: 700; }
.comment-form .cf-btn {
  background: var(--grad-candy); color: #fff; border: 1.5px solid rgba(255, 255, 255, .55);
  border-radius: 999px; padding: 10px 24px; font-size: 13.5px; font-weight: 900;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  box-shadow: 0 4px 0 rgba(214, 41, 127, .5), 0 10px 22px rgba(236, 72, 153, .32), inset 0 2px 0 rgba(255, 255, 255, .4);
  transition: transform .18s, box-shadow .18s;
}
.comment-form .cf-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 rgba(214, 41, 127, .45), 0 14px 28px rgba(236, 72, 153, .4), inset 0 2px 0 rgba(255, 255, 255, .4); }
.comment-form .cf-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(214, 41, 127, .5), 0 6px 14px rgba(236, 72, 153, .3); }
.comment-form .cf-btn:disabled { opacity: .65; cursor: wait; transform: none; }

/* ---- 评论配图：选图按钮 / 预览 / 大图 ---- */
.comment-form .cf-pick {
  border: 1.5px solid rgba(255, 255, 255, .95);
  background: linear-gradient(150deg, rgba(255, 255, 255, .95), rgba(255, 243, 250, .8));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  width: 42px; height: 42px; flex: none;
  border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer;
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 rgba(236, 72, 153, .14), 0 8px 18px rgba(236, 72, 153, .12);
  transition: transform .16s ease, box-shadow .16s ease;
}
.comment-form .cf-pick:hover { transform: translateY(-2px) rotate(-6deg); box-shadow: inset 0 1px 0 #fff, 0 6px 0 rgba(236, 72, 153, .16), 0 12px 24px rgba(236, 72, 153, .18); }
.comment-form .cf-pick:active { transform: translateY(1px) scale(.94); }

.comment-form .cf-photo { position: relative; margin: 4px 0 10px; display: inline-block; }
.comment-form .cf-photo[hidden] { display: none; }
.comment-form .cf-photo img {
  max-width: 150px; max-height: 150px; border-radius: 14px; display: block;
  border: 2px solid rgba(255, 255, 255, .95);
  box-shadow: 0 6px 0 rgba(236, 72, 153, .1), 0 10px 22px rgba(236, 72, 153, .16);
}
.comment-form .cf-photo-del {
  position: absolute; top: -8px; right: -8px;
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid rgba(255, 255, 255, .95);
  background: linear-gradient(150deg, #ff8aa8, #ec4899); color: #fff;
  font-size: 12px; font-weight: 900; line-height: 1; font-family: inherit;
  box-shadow: 0 3px 0 rgba(214, 41, 127, .4), 0 6px 14px rgba(236, 72, 153, .3);
}
.comment-form .cf-photo-del:active { transform: scale(.9); }

.comment-img {
  max-width: 100%; max-height: 40vh; width: auto; height: auto; border-radius: 14px; margin-top: 9px; display: block;
  border: 2px solid rgba(255, 255, 255, .9);
  box-shadow: 0 6px 0 rgba(236, 72, 153, .08), 0 10px 22px rgba(236, 72, 153, .14);
  cursor: zoom-in;
}
.post-content img { cursor: zoom-in; }

/* ---- 图片灯箱 ---- */
.img-lightbox {
  position: fixed; inset: 0; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(40, 28, 38, .82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  cursor: zoom-out;
  animation: lbIn .22s ease both;
}
.img-lightbox[hidden] { display: none !important; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.img-lightbox img {
  max-width: 100%; max-height: 100%;
  border-radius: 18px;
  border: 2px solid rgba(255, 255, 255, .35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  animation: lbZoom .26s cubic-bezier(.2, .8, .3, 1.1) both;
}
@keyframes lbZoom { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.empty-tip { color: var(--muted); font-size: 13px; padding: 12px 0; font-weight: 600; }

.page-title { padding-top: 30px; }

/* ============ 页脚 ============ */
.site-footer {
  position: relative;
  border-top: 1.5px solid rgba(255, 255, 255, .85);
  padding: 26px 0 28px; text-align: center;
  color: #b79fb2; font-size: 12.5px; font-weight: 700;
  background: linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .92));
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.site-footer::before {
  content: ""; position: absolute; top: -2px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 3px; border-radius: 99px;
  background: var(--grad-candy);
  box-shadow: 0 0 12px rgba(236, 72, 153, .4);
}
.site-footer .heart { display: inline-block; animation: heartbeat 1.6s ease-in-out infinite; }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.3); } 24% { transform: scale(1); } 36% { transform: scale(1.2); } 48% { transform: scale(1); } }

/* ============ 下拉刷新 / 返回顶部 ============ */
.pull-tip {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(53, 38, 47, .92); color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 9px 20px; border-radius: 999px; z-index: 999;
  opacity: 0; transition: opacity .2s; pointer-events: none;
  border: 1.5px solid rgba(255, 255, 255, .25);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}
.back-top {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .7);
  cursor: pointer; z-index: 90; font-family: inherit;
  background: var(--grad-candy); color: #fff; font-size: 20px; font-weight: 900; line-height: 1;
  box-shadow: 0 5px 0 rgba(214, 41, 127, .5), 0 12px 26px rgba(236, 72, 153, .45), inset 0 2px 0 rgba(255, 255, 255, .45);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.85);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, box-shadow .2s ease;
}
.back-top.show { opacity: 1; visibility: visible; transform: none; }
.back-top:active { transform: scale(.92); box-shadow: 0 2px 0 rgba(214, 41, 127, .5), 0 6px 14px rgba(236, 72, 153, .35); }

/* ============ 触屏增强：把电脑端的 hover 效果搬到点按上 ============ */
@media (hover: none) {
  .card:active {
    transform: scale(.972) rotate(-.5deg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 3px 0 rgba(236, 72, 153, .12), 0 8px 18px rgba(236, 72, 153, .16);
  }
  .card:active::after { left: 135%; }        /* 点按触发光泽扫过 */
  .card:active .card-media img { transform: scale(1.05); }
  .chip:active { transform: scale(.94); }
  .stat-pill:active { transform: scale(.95); }
  .btn:active, .comment-form .cf-btn:active { transform: translateY(2px); }
  .back:active { transform: translateX(-2px) scale(.97); }
  .comment:active { transform: scale(.985); }
  .header-search:active { transform: scale(.94); }
  .back-top:active { transform: scale(.9); }
}

/* ============ 手机端：贴近电脑端的玻璃与卡通质感 ============ */
@media (max-width: 560px) {
  /* 卡片给一条常驻糖果顶条（无 hover 也要有存在感） */
  .card {
    border-radius: 28px;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 1),
      inset 0 5px 0 -2px rgba(17, 24, 39, .05),
      0 6px 0 rgba(17, 24, 39, .04),
      0 14px 30px rgba(17, 24, 39, .06);
  }
  /* 玻璃底更"奶"，让磨砂质感在宽卡片上看得出来 */
  .card, .comment, .comment-form, .stat-pill, .search, .chip, .back {
    background: linear-gradient(155deg, rgba(255, 255, 255, .84), rgba(255, 243, 250, .62));
    -webkit-backdrop-filter: blur(18px) saturate(190%);
    backdrop-filter: blur(18px) saturate(190%);
  }
  /* 标题更大更有卡通感 */
  .hero h1 { font-size: clamp(28px, 7.6vw, 34px); letter-spacing: 1px; }
  .hero-sub { font-size: 13px; }
  /* 卡片文字放大，触控区域更舒服 */
  .card-body { gap: 9px; }
  .card-title { font-size: 16.5px; }
  .card-desc { font-size: 13.5px; }
  .card-foot { padding-top: 11px; }
  .card-link { font-size: 14px; }
  .card-cat { font-size: 11.5px; padding: 3px 13px; }
  /* 分类胶囊更大更好点 */
  .chip { padding: 10px 19px; font-size: 13px; }
  .chip.active {
    box-shadow: 0 4px 0 rgba(214, 41, 127, .5), 0 10px 22px rgba(236, 72, 153, .4), inset 0 2px 0 rgba(255, 255, 255, .45);
  }
  /* 详情页正文与按钮 */
  .post-cover { border-radius: 26px; }
  .btn { padding: 14px 30px; font-size: 15px; }
  .comment { border-radius: 20px; }
  .comment-form { border-radius: 22px; }
  /* 页脚也走玻璃 */
  .site-footer {
    background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .72));
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    backdrop-filter: blur(18px) saturate(180%);
  }
  /* 返回顶部按钮更大 */
  .back-top { width: 52px; height: 52px; font-size: 22px; right: 16px; }
}

/* 平板 / 大屏手机：两列更饱满 */
@media (min-width: 561px) and (max-width: 760px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
  .card-title { font-size: 15.5px; }
}

/* ============ 动效偏好 ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============ 手机端 ============ */
@media (max-width: 560px) {
  .header-inner { height: 58px; }
  .logo-mark { width: 34px; height: 34px; border-radius: 50%; }
  .logo-text { font-size: 16px; }

  .hero { padding: 28px 0 8px; }
  .hero-badge { margin-bottom: 14px; font-size: 11.5px; padding: 5px 14px; }
  .hero-sub { font-size: 12.5px; margin-bottom: 12px; }
  .search { padding: 14px 19px; font-size: 16px; }

  .stat-pill { padding: 8px 15px; font-size: 12px; }
  .chips { gap: 8px; margin-top: 16px; }
  .chip { padding: 9px 18px; font-size: 13px; }

  .grid { grid-template-columns: 1fr; gap: 14px; padding: 16px 0 44px; }
  .card-body { padding: 14px 16px 13px; }
  .card-title { font-size: 16px; }
  .card-desc { font-size: 13.5px; }
  .card-link { font-size: 13.5px; padding: 4px 0; }

  .post { padding: 22px 0 48px; }
  .post h1 { font-size: clamp(21px, 5.8vw, 25px); }
  .post-content { font-size: 15px; }
  .post-content pre { padding: 14px 15px; font-size: 12.5px; }
  .btn { width: 100%; justify-content: center; box-sizing: border-box; text-align: center; }
  .comment-form input { font-size: 16px; padding: 12px 17px; }
  .comment-form textarea { font-size: 16px; }

  .site-footer { padding: 20px 0 22px; }
  .logo-badge { display: none; }
}

/* ============ 卡片栅格：手机 1 列 / 平板 2 列 / 桌面自适应 ============ */
.grid { grid-template-columns: repeat(auto-fill, minmax(246px, 1fr)); gap: 16px; }

@media (min-width: 561px) and (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

/* 手机：单列大卡片，标题和摘要完整可读 */
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; gap: 12px; padding: 16px 0 40px; }
  .card { border-radius: 20px; }
  .card:hover { transform: none; }
  .card-media { aspect-ratio: 16 / 6.4; }
  .card-media-empty { aspect-ratio: auto; height: 84px; }
  .card-body { padding: 13px 16px 14px; gap: 6px; }
  .card-title {
    font-size: 16px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .card-desc {
    font-size: 13px; line-height: 1.6; color: #7c6b74;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .card-foot { padding-top: 8px; gap: 8px; }
  .card-foot time { display: inline; font-size: 11.5px; }
  .card-views { font-size: 11.5px; }
  .card-link { font-size: 13px; }
  .card-cat { font-size: 11px; padding: 3px 10px; top: 8px; left: 8px; }
  .card-icon { display: none; }
}


/* ---- 悬浮音乐播放器 ---- */
.music-widget { position: fixed; left: 16px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 130; }
.music-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255,255,255,.95);
  background: var(--grad-candy); background-size: 170% auto;
  box-shadow: 0 8px 18px rgba(236,72,153,.34), inset 0 1px 0 rgba(255,255,255,.6);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 22px; line-height: 1; transition: transform .2s ease, box-shadow .2s ease;
  animation: musicPulse 2.4s ease-in-out infinite;
}
.music-btn:hover { transform: scale(1.06); }
.music-btn.is-open { animation: none; }
@keyframes musicPulse {
  0%, 100% { box-shadow: 0 8px 18px rgba(236,72,153,.34), inset 0 1px 0 rgba(255,255,255,.6); }
  50% { box-shadow: 0 8px 26px rgba(168,85,247,.45), inset 0 1px 0 rgba(255,255,255,.6); }
}
.music-panel {
  position: absolute; left: 0; bottom: 60px;
  width: min(340px, calc(100vw - 32px));
  padding: 10px 10px 6px; border-radius: 20px;
  background: rgba(255,255,255,.97);
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 16px 40px rgba(120,60,110,.26);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.music-panel[hidden] { display: none; }
.music-close {
  position: absolute; top: -10px; right: -10px; width: 26px; height: 26px;
  border-radius: 50%; border: 2px solid #fff; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 900; cursor: pointer; line-height: 1;
  box-shadow: 0 4px 10px rgba(236,72,153,.35);
}
.music-audio { display: none; }
.music-now { display: flex; align-items: center; gap: 10px; margin: 2px 2px 9px; }
.music-cover { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: 0 0 auto; box-shadow: 0 4px 10px rgba(120,60,110,.18); }
.music-meta { min-width: 0; }
.music-title { font-size: 14px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-artist { font-size: 12px; color: var(--muted); margin-top: 1px; }
.music-bar { position: relative; height: 4px; border-radius: 4px; background: rgba(236,72,153,.16); margin: 6px 3px 10px; cursor: pointer; }
.music-played { position: absolute; left: 0; top: 0; height: 100%; width: 0; border-radius: 4px; background: var(--grad-candy); }
.music-played i { position: absolute; right: -4px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); }
.music-row { display: flex; align-items: center; gap: 10px; padding: 0 3px 4px; }
.music-toggle {
  width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer; flex: 0 0 auto;
  background: var(--grad-candy); color: #fff; font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(236,72,153,.3);
}
.music-time { font-size: 12px; color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .music-widget { left: 12px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .music-btn { width: 44px; height: 44px; font-size: 20px; }
  .music-panel { bottom: 56px; }
}


.dl-row { display:flex; justify-content:center; margin:14px 0 4px; }
.download-pill {
  display:inline-flex; align-items:center; gap:6px; padding:10px 20px;
  border-radius:999px; font-size:14px; font-weight:800; text-decoration:none;
  color:#fff; background:linear-gradient(135deg,#ec4899,#a855f7);
  box-shadow:0 8px 20px rgba(236,72,153,.28);
}
.download-pill:active { transform:scale(.96); }

/* ============ 手机端流畅度：去掉实时模糊与逐卡扫光 ============ */
@media (max-width: 560px) {
  /* 实时毛玻璃需要每帧采样背景，滚动时最耗 GPU；改为高不透明度渐变，观感接近 */
  .card, .comment, .comment-form, .stat-pill, .search, .chip, .back,
  .site-header, .site-footer {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .card, .comment, .comment-form, .stat-pill, .search, .chip, .back {
    background: #ffffff;
  }
  .site-header { background: rgba(255, 255, 255, .97); }
  .site-footer { background: rgba(255, 255, 255, .94); }
  .card-cat { -webkit-backdrop-filter: none; backdrop-filter: none; background: #ec4899; }
  /* 扫光伪元素让每张卡片多一层合成，触屏上没有 hover，直接关掉 */
  .card::after { display: none; }
  .bg-blob { opacity: .42; }
}


/* ============ 樱花飘落：少量花瓣，纯 CSS 合成动画 ============ */
.sakura { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sakura .petal {
  position: absolute; top: -12vh; display: block;
  animation-name: petalFall; animation-timing-function: linear; animation-iteration-count: infinite;
  will-change: transform;
}
.sakura .petal i {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(135deg, #ffe6f0 0%, #ffc9de 70%, #ffb7d3 100%);
  border-radius: 100% 0 100% 0;
  box-shadow: 0 1px 3px rgba(255, 150, 190, .18);
  animation-name: petalSway; animation-timing-function: ease-in-out;
  animation-iteration-count: infinite; animation-direction: alternate;
  will-change: transform;
}
@keyframes petalFall {
  0% { transform: translate3d(0, -10vh, 0); }
  100% { transform: translate3d(0, 118vh, 0); }
}
@keyframes petalSway {
  0% { transform: translateX(-16px) rotate(-28deg); }
  100% { transform: translateX(16px) rotate(150deg); }
}
@media (max-width: 560px) {
  .sakura .petal:nth-child(n+7) { display: none; }   /* 手机上少飘几片 */
}
@media (prefers-reduced-motion: reduce) {
  .sakura { display: none; }
}
