/* ============================================================
   Ynote · 二次元暗黑主题 v4（粉色魔法风）
   类名与 v1/v2/v3 完全兼容（app.js 依赖），仅替换配色与装饰
   ============================================================ */

/* ============ 主题变量 ============ */
:root {
  --bg-1: #0d0618;
  --bg-2: #170b2e;
  --primary: #f472b6;          /* 魔法粉 */
  --primary-deep: #e879f9;     /* 品红紫 */
  --primary-soft: rgba(244, 114, 182, 0.16);
  --violet: #a78bfa;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --pink-soft: rgba(244, 114, 182, 0.13);
  --text: #f3e8ff;
  --text-light: #b39ddb;
  --card: rgba(26, 13, 44, 0.66);
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.55), 0 0 30px rgba(244, 114, 182, 0.10);
  --shadow-hover: 0 18px 50px rgba(0, 0, 0, 0.65), 0 0 54px rgba(167, 139, 250, 0.32);
  --radius: 24px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 100;
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
  background: #be185d;
  transform: translateY(-180%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); outline: 3px solid #22d3ee; outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
button:disabled { cursor: wait; opacity: .65; }

html[data-theme="light"] .skip-link { background: #be185d; color: #fff; }

body {
  font-family: var(--font);
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(1000px 580px at 85% -10%, rgba(244, 114, 182, 0.16), transparent 60%),
    radial-gradient(900px 540px at -10% 18%, rgba(139, 92, 246, 0.20), transparent 55%),
    radial-gradient(760px 620px at 52% 115%, rgba(34, 211, 238, 0.10), transparent 60%),
    linear-gradient(168deg, var(--bg-1), var(--bg-2) 52%, #0b0618);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.6;
}

/* 梦幻光斑（缓慢漂移的二次元 bokeh 层） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(340px 340px at 82% 10%, rgba(244, 114, 182, 0.22), transparent 65%),
    radial-gradient(400px 400px at 6% 24%, rgba(139, 92, 246, 0.20), transparent 65%),
    radial-gradient(280px 280px at 88% 52%, rgba(34, 211, 238, 0.13), transparent 65%),
    radial-gradient(360px 360px at 10% 78%, rgba(167, 139, 250, 0.16), transparent 65%),
    radial-gradient(300px 300px at 62% 96%, rgba(244, 114, 182, 0.14), transparent 65%);
  animation: bgDrift 18s ease-in-out infinite alternate;
}
@keyframes bgDrift {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.1) translate(-1.5%, 1.5%); }
}

/* 漂浮闪光星（index.html 中 .sparkles） */
.sparkles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.sparkles span {
  position: absolute;
  color: #fff;
  font-size: 15px;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.95), 0 0 22px rgba(244, 114, 182, 0.85), 0 0 40px rgba(167, 139, 250, 0.6);
  opacity: 0;
  animation: sparkleFloat 8s ease-in-out infinite;
}
.sparkles span:nth-child(1) { top: 14%; left: 7%; font-size: 19px; animation-delay: 0s; }
.sparkles span:nth-child(2) { top: 66%; left: 88%; font-size: 13px; animation-delay: 1.3s; }
.sparkles span:nth-child(3) { top: 26%; left: 93%; font-size: 16px; animation-delay: 2.6s; }
.sparkles span:nth-child(4) { top: 86%; left: 12%; font-size: 12px; animation-delay: 3.9s; }
.sparkles span:nth-child(5) { top: 18%; left: 64%; font-size: 11px; animation-delay: 5.2s; }
.sparkles span:nth-child(6) { top: 74%; left: 48%; font-size: 17px; animation-delay: 6.5s; }
@keyframes sparkleFloat {
  0%, 100% { opacity: 0; transform: translateY(18px) rotate(0deg) scale(0.5); }
  50% { opacity: 0.95; transform: translateY(-14px) rotate(40deg) scale(1.05); }
}

/* 星空粒子画布（js/stars.js） */
#starry {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

a { color: #f9a8d4; text-decoration: none; }
a:hover { color: var(--pink); }

/* ============ 滚动条美化 ============ */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(20, 10, 38, 0.7); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #f472b6, #a78bfa);
  border-radius: 6px;
  border: 2px solid rgba(13, 6, 24, 0.9);
  box-shadow: 0 0 8px rgba(244, 114, 182, 0.5);
}
::selection { background: rgba(244, 114, 182, 0.4); }

/* ============ 导航栏 ============ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 7, 28, 0.58);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  border-bottom: 1px solid rgba(244, 114, 182, 0.16);
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.5);
}
.navbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #f472b6 25%, #a78bfa 55%, #22d3ee 80%, transparent);
  filter: drop-shadow(0 0 6px rgba(244, 114, 182, 0.9));
}
.nav-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(120deg, #f9a8d4, #f472b6 35%, #a78bfa 70%, #22d3ee);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
  animation: hueShift 6s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(244, 114, 182, 0.6)) drop-shadow(0 0 28px rgba(167, 139, 250, 0.35));
}
.brand:hover {
  filter: drop-shadow(0 0 16px rgba(244, 114, 182, 0.85)) drop-shadow(0 0 38px rgba(34, 211, 238, 0.5));
}
.brand-tag {
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 1.5px;
  padding-left: 12px;
  margin-left: 2px;
  border-left: 1px solid rgba(244, 114, 182, 0.25);
  white-space: nowrap;
}
.nav-links { display: flex; gap: 6px; flex: 1; }
.nav-links a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--text-light);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.25s ease;
}
.nav-links a:hover {
  background: var(--primary-soft);
  color: #f9a8d4;
  box-shadow: 0 0 14px rgba(244, 114, 182, 0.3);
}
.nav-links a.active {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.24), rgba(167, 139, 250, 0.3));
  color: #fbcfe8;
  border: 1px solid rgba(244, 114, 182, 0.5);
  box-shadow: 0 0 18px rgba(244, 114, 182, 0.4), inset 0 0 12px rgba(244, 114, 182, 0.14);
}
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-me { display: flex; align-items: center; gap: 8px; color: var(--text); }
.nav-me:hover { color: #f9a8d4; }
.nav-name { font-size: 14px; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

/* ============ 按钮 ============ */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--font);
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.6s ease;
}
.btn:hover::after { transform: translateX(130%); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #f9a8d4, #f472b6 40%, #a78bfa);
  background-size: 170% 170%;
  box-shadow: 0 6px 22px rgba(244, 114, 182, 0.45), 0 0 26px rgba(244, 114, 182, 0.3);
}
.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 12px 34px rgba(244, 114, 182, 0.6), 0 0 44px rgba(167, 139, 250, 0.45);
  color: #fff;
}
.btn-primary:active { transform: translateY(0) scale(0.97); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: rgba(244, 114, 182, 0.08);
  color: #f9a8d4;
  border: 1px solid rgba(244, 114, 182, 0.32);
}
.btn-ghost:hover {
  background: rgba(244, 114, 182, 0.18);
  color: #fbcfe8;
  box-shadow: 0 0 16px rgba(244, 114, 182, 0.35);
}
.btn-danger {
  background: rgba(255, 110, 110, 0.12);
  color: #ff9d9d;
  border: 1px solid rgba(255, 110, 110, 0.25);
}
.btn-danger:hover {
  background: rgba(255, 110, 110, 0.22);
  box-shadow: 0 0 16px rgba(255, 110, 110, 0.35);
}
.btn-sm { padding: 5px 15px; font-size: 13px; }
.btn-lg { padding: 14px 36px; font-size: 16.5px; }
.btn-block { width: 100%; padding: 12px; font-size: 15.5px; letter-spacing: 4px; }

/* ============ 卡片（二次元魔法边框） ============ */
.card {
  background:
    linear-gradient(165deg, rgba(34, 18, 56, 0.82), rgba(18, 10, 36, 0.82)) padding-box,
    linear-gradient(135deg, rgba(244, 114, 182, 0.55), rgba(167, 139, 250, 0.55) 40%, rgba(34, 211, 238, 0.45) 80%, rgba(244, 114, 182, 0.55)) border-box;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.32s ease, transform 0.32s ease;
}
/* 卡片顶部彩虹流光条 */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #f472b6, #a78bfa 30%, #22d3ee 60%, #f472b6);
  background-size: 240% 100%;
  animation: rainbowMove 7s linear infinite;
  opacity: 0.65;
  filter: drop-shadow(0 0 7px rgba(244, 114, 182, 0.9));
  transition: opacity 0.3s;
}
@keyframes rainbowMove {
  from { background-position: 0% 0; }
  to { background-position: 240% 0; }
}
.card-wrap { animation: fadeUp 0.5s ease both; }
.post-card:hover, .post-detail:hover, .auth-card:hover, .write-card:hover, .user-card:hover, .comments:hover, .diary-head:hover {
  box-shadow: var(--shadow-hover);
}
.post-card:hover::before, .post-detail:hover::before, .auth-card:hover::before,
.write-card:hover::before, .user-card:hover::before, .comments:hover::before, .diary-head:hover::before {
  opacity: 1;
}

/* ============ 主容器 / 视图切换 ============ */
.main {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  min-height: calc(100vh - 140px);
}
.view { display: none; }
.view.active { display: block; }
.anim-in { animation: viewIn 0.42s ease both; }

@keyframes viewIn {
  from { opacity: 0; transform: translateY(16px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============ 首页 Hero（仿 Plume 风格） ============ */
.plume-hero {
  margin: 14px 0 30px;
  padding: 40px 36px;
  border-radius: 26px;
  background:
    radial-gradient(560px 340px at 84% 16%, rgba(244, 114, 182, 0.16), transparent 62%),
    radial-gradient(520px 300px at 6% 92%, rgba(167, 139, 250, 0.15), transparent 60%),
    linear-gradient(155deg, rgba(244, 114, 182, 0.09), rgba(167, 139, 250, 0.07) 48%, rgba(34, 211, 238, 0.05));
  border: 1px solid rgba(244, 114, 182, 0.16);
  box-shadow: 0 18px 48px rgba(10, 5, 30, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}
.plume-hero-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  max-width: 1020px;
  margin: 0 auto;
}
/* 左：文字区 */
.plume-main {
  flex: 1 1 460px;
  min-width: 0;
  text-align: left;
}
.plume-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
}
.plume-name {
  font-size: 54px;
  font-weight: 800;
  letter-spacing: 6px;
  background: linear-gradient(120deg, #f9a8d4, #f472b6 30%, #c084fc 60%, #67e8f9);
  background-size: 250% 250%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hueShift 7s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(244, 114, 182, 0.45));
}
.plume-text {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-light);
}
.plume-tagline {
  margin-top: 14px;
  font-size: 18px;
  color: #f9a8d4;
  min-height: 30px;
  font-weight: 500;
  text-shadow: 0 0 14px rgba(244, 114, 182, 0.5);
}
.plume-actions {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
/* 按钮（Plume medium 胶囊风格） */
.btn-p {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  line-height: 40px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.btn-p-brand {
  color: #fff;
  background: linear-gradient(120deg, #f472b6, #c084fc);
  box-shadow: 0 6px 20px rgba(244, 114, 182, 0.4);
}
.btn-p-brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(244, 114, 182, 0.5);
  filter: brightness(1.07);
}
.btn-p-alt {
  color: var(--text);
  background: rgba(167, 139, 250, 0.14);
  border-color: rgba(167, 139, 250, 0.28);
}
.btn-p-alt:hover {
  transform: translateY(-2px);
  background: rgba(167, 139, 250, 0.22);
  box-shadow: 0 6px 18px rgba(167, 139, 250, 0.28);
}
/* 右：宠物图（Plume image-container 风格） */
.plume-img {
  position: relative;
  width: 320px;
  flex-shrink: 0;
  pointer-events: none;
}
.plume-img-bg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(244, 114, 182, 0.30), rgba(167, 139, 250, 0.14) 55%, transparent);
  filter: blur(38px);
  animation: imgBgPulse 4s ease-in-out infinite;
}
@keyframes imgBgPulse {
  0%, 100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
}
.plume-mascot {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  animation: mascotFloat 3s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
}
@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.plume-img:hover .plume-mascot {
  transform: rotate(-7deg) scale(1.06);
}
/* 通用漂浮（登录/注册页 emoji 等共用） */
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(4deg); }
}
@keyframes hueShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.caret {
  display: inline-block;
  width: 2.5px;
  height: 20px;
  background: var(--pink);
  vertical-align: -3px;
  margin-left: 3px;
  animation: blink 0.9s step-end infinite;
  border-radius: 2px;
  box-shadow: 0 0 10px var(--pink);
}
@keyframes blink { 50% { opacity: 0; } }

/* ============ 首页特性卡（仿 Plume feature 风格） ============ */
.plume-features { margin-top: 4px; }
.plume-features-inner {
  display: flex;
  flex-wrap: wrap;
  margin: -8px;
}
.p-feature {
  width: calc(50% - 16px);
  margin: 8px;
  padding: 20px 22px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(244, 114, 182, 0.14);
  border-radius: 12px;
  color: inherit;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, background-color 0.28s ease;
}
.p-feature:hover {
  transform: translateY(-3px);
  border-color: rgba(244, 114, 182, 0.4);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 28px rgba(10, 5, 30, 0.4), 0 0 22px rgba(244, 114, 182, 0.15);
}
.p-icon { display: block; font-size: 30px; line-height: 1; }
.p-title { margin: 12px 0 6px; font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: 1px; }
.p-details { margin: 0; font-size: 14px; color: var(--text-light); line-height: 1.7; }

/* ============ 日志流 ============ */
.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 30px 0 18px;
}
.feed-head h2 {
  font-size: 19px;
  color: #fbcfe8;
  position: relative;
  padding-left: 16px;
  text-shadow: 0 0 12px rgba(244, 114, 182, 0.4);
}
.feed-head h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 5px; height: 20px;
  border-radius: 4px;
  background: linear-gradient(180deg, #f472b6, #a78bfa);
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.9);
}
.feed-list { display: flex; flex-direction: column; gap: 18px; }

.post-card { padding: 20px 22px; }
.post-meta { display: flex; align-items: center; gap: 11px; }
.post-meta-info { display: flex; flex-direction: column; line-height: 1.3; }
.post-author { font-weight: 600; color: var(--text); font-size: 14.5px; }
.post-author:hover { color: #f9a8d4; text-shadow: 0 0 10px rgba(244, 114, 182, 0.55); }
.post-date { font-size: 12.5px; color: var(--text-light); }
.ip-loc {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: #8f7fb8;
  white-space: nowrap;
  opacity: 0.75;
}
/* 日志正文右下角 IP */
.detail-foot {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
/* 评论右下角 IP */
.comment-foot {
  margin-top: 5px;
  display: flex;
  justify-content: flex-end;
}
.post-body { display: block; margin-top: 13px; color: inherit; }
.post-body:hover .post-title {
  background: linear-gradient(120deg, #f472b6, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(244, 114, 182, 0.55));
}
.post-title { font-size: 18px; font-weight: 700; transition: all 0.25s; }
.post-excerpt { margin-top: 7px; color: var(--text-light); font-size: 14px; line-height: 1.7; }
.post-foot { margin-top: 13px; display: flex; align-items: center; justify-content: flex-end; }
.post-comments {
  font-size: 13px;
  color: #f9a8d4;
  background: rgba(244, 114, 182, 0.1);
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244, 114, 182, 0.2);
}

.badge {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.3);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.25);
}

.feed-more { text-align: center; margin-top: 24px; }
.feed-end { color: var(--text-light); font-size: 13px; }
.loading, .empty {
  text-align: center;
  padding: 48px 10px;
  color: var(--text-light);
  font-size: 14.5px;
}
.empty a { font-weight: 600; }
.muted { color: var(--text-light); }

/* ============ 头像 ============ */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 14px rgba(244, 114, 182, 0.35);
  flex-shrink: 0;
}
.avatar-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.32);
  box-shadow: 0 0 14px rgba(244, 114, 182, 0.35);
  flex-shrink: 0;
}

/* ============ 登录 / 注册 ============ */
.auth-wrap { display: flex; justify-content: center; padding: 34px 0; }
.auth-card {
  width: 100%;
  max-width: 410px;
  padding: 38px 32px 28px;
  text-align: center;
  border-radius: 26px;
}
.auth-emoji { font-size: 40px; animation: floaty 3.6s ease-in-out infinite; display: inline-block; }
.auth-card h2 { margin-top: 10px; color: #fbcfe8; font-size: 24px; letter-spacing: 3px; text-shadow: 0 0 14px rgba(244, 114, 182, 0.45); }
.auth-sub { color: var(--text-light); font-size: 13.5px; margin-top: 6px; }
.form { margin-top: 22px; text-align: left; }
.form label {
  display: block;
  font-size: 13.5px;
  color: var(--text-light);
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.form input, .form textarea {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px 15px;
  border: 1.5px solid rgba(244, 114, 182, 0.28);
  border-radius: 13px;
  font-size: 14.5px;
  font-family: var(--font);
  color: var(--text);
  background: rgba(16, 8, 34, 0.72);
  transition: all 0.25s ease;
  outline: none;
}
.form input::placeholder, .form textarea::placeholder { color: #7d68a6; }
.form input:hover, .form textarea:hover { border-color: rgba(244, 114, 182, 0.55); }
.form input:focus, .form textarea:focus {
  border-color: #f472b6;
  background: rgba(22, 11, 46, 0.9);
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.16), 0 0 22px rgba(244, 114, 182, 0.3);
}
.form textarea { resize: vertical; line-height: 1.7; }
.form .btn { margin-top: 8px; }

/* 写日志：底部按钮组（取消 + 发布） */
.btn-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  margin-top: 8px;
}
.btn-row .btn { margin-top: 0; }
.check-line {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}
.check-line input { width: auto; margin: 0; accent-color: #f472b6; }
.auth-switch { margin-top: 20px; font-size: 13.5px; color: var(--text-light); }

/* ============ 写日志 ============ */
.write-wrap { display: flex; justify-content: center; padding: 18px 0; }
.write-card {
  width: 100%;
  max-width: 660px;
  padding: 30px 32px;
  border-radius: 26px;
}
.write-card h2 {
  color: #fbcfe8;
  margin-bottom: 20px;
  font-size: 22px;
  letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(244, 114, 182, 0.45);
}

/* ============ 私密日记 ============ */
.diary-head {
  padding: 28px 30px;
  text-align: center;
  background: linear-gradient(135deg, rgba(34, 18, 56, 0.85), rgba(26, 12, 46, 0.85) 55%, rgba(45, 16, 52, 0.85));
}
.diary-head h2 { color: #e9d5ff; font-size: 23px; letter-spacing: 2px; text-shadow: 0 0 16px rgba(167, 139, 250, 0.55); }
.diary-head p { color: var(--text-light); font-size: 14px; margin: 10px 0 18px; }

/* ============ 日志详情 ============ */
.post-wrap { display: flex; flex-direction: column; gap: 20px; }
.post-detail { padding: 28px 32px; border-radius: 26px; }
.detail-title { margin-top: 18px; font-size: 26px; color: var(--text); line-height: 1.45; }
.detail-content {
  margin-top: 18px;
  font-size: 15.5px;
  line-height: 1.95;
  white-space: normal;
  word-break: break-word;
  color: #e9d9ff;
}

/* 日志内图片 */
.post-img {
  display: block;
  max-width: 100%;
  max-height: 480px;
  margin: 14px auto;
  border-radius: 14px;
  border: 1px solid rgba(244, 114, 182, 0.25);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

/* 写日志：图片工具条 */
.img-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.img-toolbar .btn { margin-top: 0; white-space: nowrap; flex-shrink: 0; }
.img-hint { font-size: 12.5px; color: var(--text-light); }

/* 私密日记：解锁 / 设置密码门 */
.diary-gate {
  max-width: 440px;
  margin: 24px auto;
  padding: 30px 32px;
  text-align: center;
  border-radius: 26px;
}
.gate-emoji { font-size: 42px; margin-bottom: 10px; }
.diary-gate h3 { color: #fbcfe8; margin-bottom: 8px; font-size: 19px; }
.diary-gate .form { text-align: left; margin-top: 16px; }
.gate-hint {
  margin-top: 12px;
  font-size: 13px;
  color: #fda4af;
  min-height: 18px;
}

.comments { padding: 24px 28px; }
.comments h3 { color: #fbcfe8; font-size: 17.5px; }
.comments-count { color: var(--text-light); font-weight: 400; font-size: 14px; }
.comment-list { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.comment { display: flex; gap: 11px; }
.comment-head { display: flex; align-items: baseline; gap: 8px; }
.comment-text { margin-top: 3px; font-size: 14.5px; word-break: break-word; }
/* 评论内图片：比正文图片小 */
.comment-text .post-img {
  max-height: 220px;
  margin: 8px 0;
  border-radius: 10px;
}
.comment-form {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed rgba(244, 114, 182, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
}
.comment-form input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid rgba(244, 114, 182, 0.28);
  border-radius: 999px;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  background: rgba(16, 8, 34, 0.72);
  color: var(--text);
  transition: all 0.25s ease;
}
.comment-form input::placeholder { color: #7d68a6; }
.comment-form input:focus {
  border-color: #f472b6;
  background: rgba(22, 11, 46, 0.9);
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.16), 0 0 22px rgba(244, 114, 182, 0.3);
}
.comment-login-hint { margin-top: 16px; font-size: 13.5px; color: var(--text-light); }

/* ============ 用户主页 ============ */
.user-wrap { display: flex; flex-direction: column; gap: 22px; }
.user-card {
  padding: 34px 30px;
  text-align: center;
  border-radius: 28px;
}
.user-avatar-box {
  display: inline-block;
  padding: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f472b6, #a78bfa, #22d3ee);
  background-size: 200% 200%;
  animation: hueShift 6s ease-in-out infinite;
  box-shadow: 0 0 32px rgba(244, 114, 182, 0.5);
}
.user-avatar-box .avatar,
.user-avatar-box .avatar-ph { border: 3px solid rgba(255, 255, 255, 0.88); }
.user-card h2 { margin-top: 14px; color: #fbcfe8; font-size: 24px; letter-spacing: 1px; text-shadow: 0 0 14px rgba(244, 114, 182, 0.45); }
.user-bio { margin-top: 8px; color: var(--text-light); font-size: 14.5px; }
.user-join { margin-top: 6px; font-size: 13px; color: var(--text-light); }
.user-actions { margin-top: 18px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.bio-form {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}
/* 修复：display:flex 会覆盖 hidden 属性，必须显式声明 hidden 时隐藏 */
.bio-form[hidden] { display: none; }
.bio-form textarea {
  width: 320px;
  max-width: 70vw;
  padding: 9px 13px;
  border: 1.5px solid rgba(244, 114, 182, 0.28);
  border-radius: 13px;
  font-family: var(--font);
  font-size: 13.5px;
  outline: none;
  resize: vertical;
  background: rgba(16, 8, 34, 0.72);
  color: var(--text);
  transition: all 0.25s ease;
}
.bio-form textarea:focus { border-color: #f472b6; background: rgba(22, 11, 46, 0.9); box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.16); }
/* 修改用户名输入框：与签名 textarea 同风格 */
.bio-form input {
  width: 320px;
  max-width: 70vw;
  padding: 9px 13px;
  border: 1.5px solid rgba(244, 114, 182, 0.28);
  border-radius: 13px;
  font-family: var(--font);
  font-size: 13.5px;
  outline: none;
  background: rgba(16, 8, 34, 0.72);
  color: var(--text);
  transition: all 0.25s ease;
}
.bio-form input:focus { border-color: #f472b6; background: rgba(22, 11, 46, 0.9); box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.16); }

/* ============ Toast ============ */
.toast-wrap {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: rgba(22, 11, 46, 0.88);
  backdrop-filter: blur(12px);
  color: #fbcfe8;
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 24px rgba(244, 114, 182, 0.35);
  border: 1px solid rgba(244, 114, 182, 0.4);
  opacity: 0;
  transform: translateY(16px) scale(0.94);
  transition: all 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 86vw;
}
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast.warn {
  background: rgba(38, 8, 20, 0.9);
  color: #ffb4b4;
  border-color: rgba(255, 110, 110, 0.4);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 22px rgba(255, 110, 110, 0.3);
}

/* ============ 头像裁剪弹窗 ============ */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 4, 22, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-mask.show { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid rgba(244, 114, 182, 0.35);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 24px;
  width: min(430px, 92vw);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.crop-title { text-align: center; margin-bottom: 4px; font-size: 18px; }
.crop-hint { text-align: center; font-size: 12.5px; color: var(--text-light); margin-bottom: 16px; }
.crop-stage { display: flex; justify-content: center; margin-bottom: 16px; }
.crop-frame {
  position: relative;
  width: min(300px, 72vw);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background:
    repeating-conic-gradient(rgba(255, 255, 255, 0.05) 0% 25%, transparent 0% 50%) 50% / 22px 22px;
  box-shadow:
    inset 0 0 0 2px rgba(244, 114, 182, 0.55),
    0 0 0 7px rgba(244, 114, 182, 0.12);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.crop-frame:active { cursor: grabbing; }
.crop-frame img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  transform-origin: 0 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.crop-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.crop-tools input[type="range"] { flex: 1; accent-color: var(--pink); }
.crop-zoom-label { min-width: 44px; text-align: right; font-size: 13px; color: var(--text-light); }

/* ============ 页脚 ============ */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 22px;
  color: var(--text-light);
  font-size: 13px;
  letter-spacing: 1px;
}
.footer span {
  background: linear-gradient(120deg, #f472b6, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.92;
  filter: drop-shadow(0 0 10px rgba(244, 114, 182, 0.45));
}
.beian-link {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--text-light);
  opacity: 0.75;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.beian-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ============ 响应式 ============ */
/* 中窄屏：宠物从右缘回到文档流，居中排在文字下方 */
/* 中屏：hero 收窄、图片缩小 */
@media (max-width: 1020px) {
  .plume-hero { padding: 44px 30px; }
  .plume-hero-inner { gap: 32px; }
  .plume-img { width: 280px; }
}
/* 窄屏：单列堆叠，图片置顶居中（同 Plume mobile） */
@media (max-width: 960px) {
  .plume-hero { padding: 40px 26px; }
  .plume-hero-inner { flex-direction: column; gap: 30px; }
  .plume-main { text-align: center; }
  .plume-heading { align-items: center; }
  .plume-actions { justify-content: center; }
  .plume-img { order: -1; width: 280px; }
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(13, 7, 28, 0.95);
    backdrop-filter: blur(14px);
    padding: 12px 16px;
    border-bottom: 1px solid rgba(244, 114, 182, 0.2);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  }
  .nav-links.open { display: flex; }
  .nav-name { display: none; }
  .brand-tag { display: none; }
  .plume-hero { padding: 30px 18px; border-radius: 20px; margin: 8px 0 24px; }
  .plume-name { font-size: 40px; letter-spacing: 4px; }
  .plume-text { font-size: 15px; letter-spacing: 1px; }
  .plume-tagline { font-size: 16px; }
  .plume-img { width: 200px; }
  .btn-p { line-height: 38px; padding: 0 18px; }
  .p-feature { width: calc(100% - 16px); }
  .plume-img:hover .plume-mascot { transform: rotate(-5deg) scale(1.05); }
  .post-detail { padding: 22px 18px; }
  .comments { padding: 20px 16px; }
  .detail-title { font-size: 21px; }
}

/* 减弱动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* 触屏设备不需要 hover 扫光，减少重绘和误触感 */
@media (hover: none), (pointer: coarse) {
  .card::after, .p-feature::after, .btn::after { display: none; }
  .post-img:hover { transform: none; box-shadow: none; }
}

/* ============ 动态增强（beauty，js/effects.js 驱动） ============ */

/* 滚动进度条 */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px; width: 0;
  z-index: 60;
  pointer-events: none;
  background: linear-gradient(90deg, #f472b6, #a78bfa, #22d3ee);
  box-shadow: 0 0 10px rgba(244, 114, 182, 0.85), 0 0 22px rgba(167, 139, 250, 0.5);
}

/* 导航栏滚动态 */
.navbar { transition: background 0.3s ease, box-shadow 0.3s ease; }
.navbar.scrolled {
  background: rgba(13, 7, 28, 0.86);
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.6), 0 0 26px rgba(244, 114, 182, 0.14);
}

/* 导航链接下划线流光 */
.nav-links a { position: relative; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #f472b6, #a78bfa);
  box-shadow: 0 0 8px rgba(244, 114, 182, 0.8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* 卡片：3D 倾斜基座 + 悬浮扫光 */
.card { transform-style: preserve-3d; }
.card::after, .p-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 32%, rgba(255, 255, 255, 0.07) 50%, transparent 68%);
  transform: translateX(-130%);
  transition: transform 0.8s ease;
  pointer-events: none;
}
.post-card:hover::after, .p-feature:hover::after, .auth-card:hover::after,
.write-card:hover::after, .user-card:hover::after, .post-detail:hover::after,
.comments:hover::after, .diary-head:hover::after, .diary-gate:hover::after {
  transform: translateX(130%);
}

/* 卡片悬浮上浮更灵动 */
.post-card, .p-feature, .auth-card, .write-card, .user-card, .post-detail, .comments, .diary-head, .diary-gate {
  transition: box-shadow 0.32s ease, transform 0.18s ease-out;
}
.diary-gate:hover { box-shadow: var(--shadow-hover); }

/* 特性卡图标弹跳 */
.p-feature .p-icon { display: inline-block; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.p-feature:hover .p-icon { transform: translateY(-7px) scale(1.18) rotate(-4deg); }

/* 特性卡过渡补齐（边框/背景平滑，避免被上面共享规则覆盖） */
.p-feature { transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease, background-color 0.28s ease; }

/* 日志图片悬浮微放大 */
.post-img { transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease; }
.post-img:hover { transform: scale(1.03); box-shadow: 0 8px 34px rgba(0, 0, 0, 0.45), 0 0 26px rgba(244, 114, 182, 0.4); }

/* 加载文字流光 */
.loading {
  color: transparent;
  background: linear-gradient(90deg, rgba(244, 114, 182, 0.35) 25%, rgba(244, 114, 182, 0.9) 50%, rgba(244, 114, 182, 0.35) 75%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: loadingShimmer 1.4s linear infinite;
}
@keyframes loadingShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* 评论头像悬浮微光 */
.comment:hover .avatar { box-shadow: 0 0 18px rgba(244, 114, 182, 0.6); }

/* 回到顶部 */
.scroll-top {
  position: fixed;
  right: 22px; bottom: 24px;
  z-index: 80;
  width: 46px; height: 46px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(244, 114, 182, 0.5);
  background: rgba(22, 11, 46, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f9a8d4;
  font-size: 20px;
  font-family: var(--font);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px) scale(0.8);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5), 0 0 18px rgba(244, 114, 182, 0.3);
}
.scroll-top.show { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top:hover {
  background: rgba(244, 114, 182, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 26px rgba(244, 114, 182, 0.5);
}

/* 键盘焦点环 */
:focus-visible { outline: 2px solid #f472b6; outline-offset: 2px; border-radius: 8px; }

/* ============================================================
   白天 / 夜间模式切换（theme）
   通过 html[data-theme="light"] 覆盖配色，默认暗色不动
   ============================================================ */

/* 主题切换时的平滑过渡（背景渐变无法插值，主要柔化文字/边框颜色） */
html[data-theme] body { transition: color 0.35s ease; }
html[data-theme] .navbar { transition: background 0.35s ease, box-shadow 0.35s ease; }

/* ---------- 切换按钮（滑块 + 日月图标） ---------- */
.theme-toggle {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 32px;
  border: 1px solid rgba(244, 114, 182, 0.4);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.16), rgba(167, 139, 250, 0.22));
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.theme-toggle:hover { border-color: rgba(244, 114, 182, 0.7); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.25), 0 0 14px rgba(244, 114, 182, 0.35); }
.theme-toggle .tt-icon {
  font-size: 15px;
  line-height: 1;
  z-index: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.theme-toggle .tt-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f9a8d4, #a78bfa);
  box-shadow: 0 2px 8px rgba(244, 114, 182, 0.6), 0 0 14px rgba(167, 139, 250, 0.4);
  transform: translateX(35px); /* 默认深色：滑块在右（月亮侧） */
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.theme-toggle .tt-sun { opacity: 0.45; }
.theme-toggle .tt-moon { opacity: 1; }
html[data-theme="light"] .theme-toggle .tt-knob { transform: translateX(0); }
html[data-theme="light"] .theme-toggle .tt-sun { opacity: 1; }
html[data-theme="light"] .theme-toggle .tt-moon { opacity: 0.45; }
html[data-theme="light"] .theme-toggle {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.12), rgba(139, 92, 246, 0.16));
  box-shadow: inset 0 2px 6px rgba(120, 90, 160, 0.16);
}

/* ---------- 白天模式主题变量 ---------- */
html[data-theme="light"] {
  --bg-1: #faf6fe;
  --bg-2: #f3e9fb;
  --primary: #ec4899;
  --primary-deep: #a855f7;
  --primary-soft: rgba(236, 72, 153, 0.12);
  --violet: #8b5cf6;
  --cyan: #0891b2;
  --pink: #ec4899;
  --pink-soft: rgba(236, 72, 153, 0.10);
  --text: #37284e;
  --text-light: #7c6a9c;
  --card: rgba(255, 255, 255, 0.82);
  --shadow: 0 10px 34px rgba(148, 110, 190, 0.18), 0 0 30px rgba(236, 72, 153, 0.06);
  --shadow-hover: 0 18px 50px rgba(148, 110, 190, 0.26), 0 0 54px rgba(139, 92, 246, 0.16);
}

/* 背景与装饰层（亮色柔和版） */
html[data-theme="light"] body {
  background:
    radial-gradient(1000px 580px at 85% -10%, rgba(236, 72, 153, 0.10), transparent 60%),
    radial-gradient(900px 540px at -10% 18%, rgba(139, 92, 246, 0.12), transparent 55%),
    radial-gradient(760px 620px at 52% 115%, rgba(8, 145, 178, 0.08), transparent 60%),
    linear-gradient(168deg, var(--bg-1), var(--bg-2) 52%, #f7f1fb);
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(340px 340px at 82% 10%, rgba(236, 72, 153, 0.12), transparent 65%),
    radial-gradient(400px 400px at 6% 24%, rgba(139, 92, 246, 0.12), transparent 65%),
    radial-gradient(280px 280px at 88% 52%, rgba(8, 145, 178, 0.08), transparent 65%),
    radial-gradient(360px 360px at 10% 78%, rgba(168, 85, 247, 0.10), transparent 65%),
    radial-gradient(300px 300px at 62% 96%, rgba(236, 72, 153, 0.08), transparent 65%);
}
html[data-theme="light"] #starry { opacity: 0.55; }
html[data-theme="light"] .sparkles { opacity: 0.55; }

/* 导航栏 */
html[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(236, 72, 153, 0.16);
  box-shadow: 0 4px 28px rgba(120, 90, 160, 0.12);
}
html[data-theme="light"] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 32px rgba(120, 90, 160, 0.16), 0 0 26px rgba(236, 72, 153, 0.08);
}

/* 链接与品牌 */
html[data-theme="light"] a { color: #db2777; }
html[data-theme="light"] a:hover { color: #ec4899; }
html[data-theme="light"] .brand {
  background-image: linear-gradient(120deg, #ec4899, #db2777 35%, #8b5cf6 70%, #0891b2);
  filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.3)) drop-shadow(0 0 20px rgba(139, 92, 246, 0.2));
}
html[data-theme="light"] .nav-links a:hover { color: #db2777; }
html[data-theme="light"] .nav-links a.active {
  color: #be185d;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.14), rgba(139, 92, 246, 0.16));
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.16), inset 0 0 10px rgba(236, 72, 153, 0.08);
}
html[data-theme="light"] .nav-me:hover { color: #db2777; }

/* 卡片 */
html[data-theme="light"] .card {
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(250, 244, 255, 0.9)) padding-box,
    linear-gradient(135deg, rgba(236, 72, 153, 0.5), rgba(139, 92, 246, 0.5) 40%, rgba(8, 145, 178, 0.4) 80%, rgba(236, 72, 153, 0.5)) border-box;
}

/* 按钮 */
html[data-theme="light"] .btn-ghost {
  color: #db2777;
  background: rgba(236, 72, 153, 0.06);
  border-color: rgba(236, 72, 153, 0.3);
}
html[data-theme="light"] .btn-ghost:hover {
  background: rgba(236, 72, 153, 0.12);
  color: #be185d;
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.22);
}
html[data-theme="light"] .btn-danger {
  color: #dc2626;
  background: rgba(255, 110, 110, 0.10);
  border-color: rgba(255, 110, 110, 0.3);
}
html[data-theme="light"] .btn-p-alt {
  color: var(--text);
  background: rgba(139, 92, 246, 0.10);
  border-color: rgba(139, 92, 246, 0.3);
}
html[data-theme="light"] .btn-p-alt:hover {
  background: rgba(139, 92, 246, 0.18);
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.2);
}

/* 首页 Hero */
html[data-theme="light"] .plume-hero {
  background:
    radial-gradient(560px 340px at 84% 16%, rgba(236, 72, 153, 0.10), transparent 62%),
    radial-gradient(520px 300px at 6% 92%, rgba(139, 92, 246, 0.10), transparent 60%),
    linear-gradient(155deg, rgba(236, 72, 153, 0.06), rgba(139, 92, 246, 0.05) 48%, rgba(8, 145, 178, 0.04));
  border-color: rgba(236, 72, 153, 0.2);
  box-shadow: 0 18px 48px rgba(148, 110, 190, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
html[data-theme="light"] .plume-name {
  background-image: linear-gradient(120deg, #ec4899, #db2777 30%, #8b5cf6 60%, #0891b2);
  filter: drop-shadow(0 0 12px rgba(236, 72, 153, 0.28));
}
html[data-theme="light"] .plume-tagline { color: #db2777; text-shadow: 0 0 12px rgba(236, 72, 153, 0.25); }

/* 特性卡 */
html[data-theme="light"] .p-feature {
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(236, 72, 153, 0.18);
}
html[data-theme="light"] .p-feature:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(236, 72, 153, 0.4);
  box-shadow: 0 10px 28px rgba(148, 110, 190, 0.2), 0 0 22px rgba(236, 72, 153, 0.12);
}

/* 标题（原暗色下的浅粉 #fbcfe8 / #e9d5ff 统一转深色） */
html[data-theme="light"] .feed-head h2,
html[data-theme="light"] .auth-card h2,
html[data-theme="light"] .write-card h2,
html[data-theme="light"] .diary-head h2,
html[data-theme="light"] .diary-gate h3,
html[data-theme="light"] .comments h3,
html[data-theme="light"] .user-card h2 {
  color: #be185d;
  text-shadow: 0 0 12px rgba(236, 72, 153, 0.2);
}

/* 日志流细节 */
html[data-theme="light"] .post-author:hover { color: #db2777; text-shadow: none; }
html[data-theme="light"] .post-comments {
  color: #db2777;
  background: rgba(236, 72, 153, 0.08);
  border-color: rgba(236, 72, 153, 0.22);
}
html[data-theme="light"] .badge {
  color: #0e7490;
  background: rgba(8, 145, 178, 0.10);
  border-color: rgba(8, 145, 178, 0.3);
  box-shadow: 0 0 12px rgba(8, 145, 178, 0.2);
}
html[data-theme="light"] .ip-loc { color: #9a86b8; }

/* 头像描边 */
html[data-theme="light"] .avatar,
html[data-theme="light"] .avatar-ph {
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.3);
}
html[data-theme="light"] .user-avatar-box { box-shadow: 0 0 32px rgba(236, 72, 153, 0.35); }

/* 表单输入框 */
html[data-theme="light"] .form input,
html[data-theme="light"] .form textarea,
html[data-theme="light"] .comment-form input,
html[data-theme="light"] .bio-form textarea,
html[data-theme="light"] .bio-form input {
  background: rgba(255, 255, 255, 0.9);
  color: #37284e;
  border-color: rgba(236, 72, 153, 0.3);
}
html[data-theme="light"] .form input::placeholder,
html[data-theme="light"] .form textarea::placeholder,
html[data-theme="light"] .comment-form input::placeholder { color: #b3a3cc; }
html[data-theme="light"] .form input:focus,
html[data-theme="light"] .form textarea:focus,
html[data-theme="light"] .comment-form input:focus,
html[data-theme="light"] .bio-form textarea:focus,
html[data-theme="light"] .bio-form input:focus {
  background: #fff;
  border-color: #ec4899;
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.14), 0 0 20px rgba(236, 72, 153, 0.22);
}

/* 详情正文 */
html[data-theme="light"] .detail-content { color: #433158; }

/* 私密日记头部 */
html[data-theme="light"] .diary-head {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(250, 240, 255, 0.85) 55%, rgba(255, 246, 250, 0.85));
}
html[data-theme="light"] .gate-hint { color: #e11d48; }

/* Toast */
html[data-theme="light"] .toast {
  background: rgba(255, 255, 255, 0.94);
  color: #7a2e63;
  border-color: rgba(236, 72, 153, 0.35);
  box-shadow: 0 10px 28px rgba(148, 110, 190, 0.25), 0 0 24px rgba(236, 72, 153, 0.18);
}
html[data-theme="light"] .toast.warn {
  background: rgba(255, 240, 240, 0.96);
  color: #c0392b;
  border-color: rgba(255, 110, 110, 0.4);
  box-shadow: 0 10px 28px rgba(148, 110, 190, 0.2), 0 0 22px rgba(255, 110, 110, 0.2);
}

/* 回到顶部 */
html[data-theme="light"] .scroll-top {
  background: rgba(255, 255, 255, 0.9);
  color: #db2777;
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 8px 26px rgba(148, 110, 190, 0.25), 0 0 18px rgba(236, 72, 153, 0.2);
}
html[data-theme="light"] .scroll-top:hover {
  background: rgba(236, 72, 153, 0.12);
  box-shadow: 0 10px 30px rgba(148, 110, 190, 0.3), 0 0 26px rgba(236, 72, 153, 0.3);
}

/* 弹窗遮罩 */
html[data-theme="light"] .modal-mask { background: rgba(70, 40, 100, 0.4); }

/* 滚动条 */
html[data-theme="light"] ::-webkit-scrollbar-track { background: rgba(230, 218, 240, 0.6); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { border-color: rgba(250, 246, 254, 0.9); }

/* 窄屏：切换按钮更紧凑，避免与登录按钮挤占空间 */
@media (max-width: 640px) {
  .nav-inner { gap: 10px; }
  .theme-toggle { width: 48px; height: 28px; padding: 0 5px; }
  .theme-toggle .tt-icon { font-size: 12px; }
  .theme-toggle .tt-knob { width: 20px; height: 20px; top: 3px; transform: translateX(23px); }
  html[data-theme="light"] .theme-toggle .tt-knob { transform: translateX(0); }
}
