/* ===== 微光 · 治愈暖风主题 ===== */
:root {
  --primary: #FDF6EC;
  --primary-dark: #F5E6D3;
  --accent: #E8D5C4;
  --accent-dark: #D4BFA8;
  --text: #5D4037;
  --text-light: #8B7355;
  --text-muted: #B8A08A;
  --card-bg: rgba(255, 248, 240, 0.82);
  --card-border: rgba(232, 213, 196, 0.4);
  --shadow: 0 8px 32px rgba(180, 150, 120, 0.12);
  --shadow-hover: 0 12px 40px rgba(180, 150, 120, 0.2);
  --glow: rgba(245, 230, 211, 0.5);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', -apple-system, sans-serif;
  /* 时间主题变量 - 会被JS动态覆盖 */
  --theme-bg: #FDF6EC;
  --theme-card-bg: rgba(255, 248, 240, 0.85);
  --theme-text: #5D4037;
  --theme-text-light: #8B7355;
  --theme-overlay: rgba(0,0,0,0);
  --theme-sun-opacity: 1;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--theme-bg);
  color: var(--theme-text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  transition: background 1.5s ease, color 1.5s ease;
}

/* ===== 时间主题背景层 ===== */
.theme-bg {
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none; overflow: hidden;
  transition: background 1.5s ease;
}
.theme-sun {
  position: fixed; bottom: 10%; right: 15%;
  width: 120px; height: 120px; z-index: -1;
  pointer-events: none; opacity: var(--theme-sun-opacity);
  transition: all 2s ease;
}
.theme-sun::before {
  content: ''; display: block; width: 100%; height: 100%;
  background: radial-gradient(circle, #FFE8B0 0%, #F5DDC0 40%, transparent 70%);
  border-radius: 50%;
  animation: sunGlow 6s ease-in-out infinite;
}
.theme-sun.dawn { bottom: 20%; right: 20%; transform: scale(0.8); }
.theme-sun.noon { bottom: 55%; right: 45%; transform: scale(1.3); }
.theme-sun.dusk { bottom: 5%; right: 10%; transform: scale(0.9); opacity: 0.6; }
.theme-sun.night { display: none; }
@keyframes sunGlow {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; }
}
/* 星星 */
.theme-stars {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; opacity: 0; transition: opacity 2s ease;
}
.theme-stars.show { opacity: 1; }
.theme-stars::before {
  content: '✦ ✦ ✦';
  position: absolute; top: 10%; left: 10%;
  font-size: 14px; color: rgba(255,248,240,0.6);
  animation: twinkle 3s ease-in-out infinite;
}
.theme-stars::after {
  content: '✦ ✦';
  position: absolute; top: 25%; right: 15%;
  font-size: 10px; color: rgba(255,248,240,0.4);
  animation: twinkle 4s ease-in-out infinite 1s;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}
/* 地平线 */
.theme-horizon {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 40%; z-index: -1; pointer-events: none;
  background: linear-gradient(transparent, rgba(245, 230, 211, 0.12));
  transition: opacity 2s ease;
}

/* ===== 时间主题 body class ===== */
body.theme-dawn { --theme-bg: linear-gradient(135deg, #FFF5EE 0%, #FDF6EC 50%, #F5E6D3 100%); }
body.theme-noon { --theme-bg: linear-gradient(135deg, #FFF8F0 0%, #FDF6EC 40%, #FAF0E6 100%); }
body.theme-dusk { --theme-bg: linear-gradient(135deg, #F5E6D3 0%, #EDDDCC 50%, #E0CCB8 100%); }
body.theme-night {
  --theme-bg: linear-gradient(135deg, #2C2420 0%, #3D322C 50%, #4A3D35 100%);
  --theme-text: #E8DDD0;
  --theme-text-light: #C4B8A8;
  --theme-text-muted: #9A8E80;
  --theme-card-bg: rgba(60, 50, 42, 0.88);
  --theme-card-border: rgba(120, 100, 85, 0.3);
}
body.theme-night .card,
body.theme-night .blog-card,
body.theme-night .moment-item,
body.theme-night .music-item,
body.theme-night .comment-section,
body.theme-night .about-card,
body.theme-night .sidebar-widget {
  background: rgba(60, 50, 42, 0.88) !important;
  border-color: rgba(120, 100, 85, 0.3) !important;
}
body.theme-night .navbar {
  background: rgba(44, 36, 32, 0.92) !important;
  border-color: rgba(120, 100, 85, 0.2) !important;
}
body.theme-night .nav-link { color: #C4B8A8 !important; }
body.theme-night .nav-link:hover,
body.theme-night .nav-link.active { color: #E8DDD0 !important; background: rgba(120,100,85,0.2) !important; }
body.theme-night .btn-primary {
  background: linear-gradient(135deg, #5D4A3A, #7A6450) !important;
  color: #E8DDD0 !important;
}
body.theme-night .btn-outline {
  border-color: rgba(120, 100, 85, 0.5) !important;
  color: #C4B8A8 !important;
}
body.theme-night .site-footer { color: #8A7E70 !important; }
body.theme-night .hero-title { color: #E8DDD0 !important; }
body.theme-night .bg-glow { opacity: 0.12 !important; }
body.theme-night .bg-wave { opacity: 0.06 !important; }
body.theme-night .site-footer p { color: #8A7E70 !important; }

/* ===== 柔光背景 ===== */
.bg-glow {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 230, 211, 0.4) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: glowFloat 20s ease-in-out infinite;
}
.bg-glow-2 {
  top: 20%;
  right: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 235, 210, 0.35) 0%, transparent 70%);
  animation-delay: -7s;
  animation-duration: 25s;
}
.bg-glow-3 {
  bottom: 5%;
  left: 30%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(253, 246, 236, 0.5) 0%, transparent 70%);
  animation-delay: -14s;
  animation-duration: 18s;
}
.bg-glow-4 {
  top: 60%;
  right: 10%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(232, 213, 196, 0.25) 0%, transparent 70%);
  animation-delay: -4s;
  animation-duration: 22s;
}
.bg-glow-5 {
  top: 5%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 248, 235, 0.45) 0%, transparent 70%);
  animation-delay: -10s;
  animation-duration: 28s;
}

@keyframes glowFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(25px, -15px) scale(1.06); }
  50% { transform: translate(-15px, 20px) scale(0.95); }
  75% { transform: translate(10px, -10px) scale(1.02); }
}

/* ===== 星空粒子 Canvas ===== */
#starCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

/* ===== 底部柔光装饰波 ===== */
.bg-wave {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  background:
    radial-gradient(ellipse 120% 80px at 0% 100%, rgba(245, 230, 211, 0.3) 0%, transparent 100%),
    radial-gradient(ellipse 100% 60px at 30% 100%, rgba(232, 213, 196, 0.2) 0%, transparent 100%),
    radial-gradient(ellipse 140% 70px at 70% 100%, rgba(253, 246, 236, 0.35) 0%, transparent 100%),
    radial-gradient(ellipse 110% 50px at 100% 100%, rgba(245, 230, 211, 0.25) 0%, transparent 100%);
  pointer-events: none;
  z-index: -1;
  animation: wavePulse 8s ease-in-out infinite;
}

@keyframes wavePulse {
  0%, 100% { opacity: 0.6; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

/* ===== 页面专属背景主题 ===== */
.page-home::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 230, 211, 0.3), transparent);
  pointer-events: none;
}

/* 页面淡入浮层装饰 - 每个页面不同的装饰圆 */
.page-essay::before {
  content: ''; position: fixed; bottom: 10%; left: -5%;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 213, 196, 0.15), transparent);
  pointer-events: none; z-index: -1;
}
.page-music::before {
  content: ''; position: fixed; top: 20%; right: -8%;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 230, 211, 0.2), transparent);
  pointer-events: none; z-index: -1;
}
.page-moments::before {
  content: ''; position: fixed; top: 40%; left: -3%;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 200, 180, 0.15), transparent);
  pointer-events: none; z-index: -1;
}

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 246, 236, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition);
}
.navbar.scrolled { box-shadow: 0 2px 20px rgba(180, 150, 120, 0.1); }
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 1.2rem;
}
.nav-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  border-radius: 10px;
  font-size: 1.1rem;
  color: var(--text);
}
.nav-links {
  display: flex;
  gap: 4px;
}
.nav-link {
  padding: 8px 16px;
  text-decoration: none;
  color: var(--text-light);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(232, 213, 196, 0.3);
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--accent-dark);
  border-radius: 1px;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== 北京时间时钟（导航栏） ===== */
.nav-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(232, 213, 196, 0.15);
  flex-shrink: 0;
  transition: var(--transition);
}
.nav-clock:hover { background: rgba(232, 213, 196, 0.3); }
.clock-icon { font-size: 0.8rem; }
.clock-text { font-family: 'Courier New', monospace; letter-spacing: 0.3px; }
body.theme-night .nav-clock {
  background: rgba(120, 100, 85, 0.15);
  color: #C4B8A8;
}

/* ===== 后台入口（导航栏右上角） ===== */
.nav-admin {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(232, 213, 196, 0.15);
  text-decoration: none;
  flex-shrink: 0;
  transition: var(--transition);
}
.nav-admin:hover {
  background: rgba(232, 213, 196, 0.3);
  color: var(--text);
}
.nav-admin.admin-on {
  background: rgba(200, 160, 120, 0.25);
  color: var(--accent, #B8860B);
  font-weight: 600;
}
body.theme-night .nav-admin {
  background: rgba(120, 100, 85, 0.15);
  color: #C4B8A8;
}
body.theme-night .nav-admin:hover { color: #fff; }
body.theme-night .nav-admin.admin-on {
  background: rgba(200, 170, 130, 0.25);
  color: #E8D5A8;
}

/* ===== 三栏布局 ===== */
.layout-wrapper {
  display: flex;
  max-width: 1600px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}
.sidebar {
  position: sticky;
  top: 64px;
  width: 220px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  flex-shrink: 0;
  padding: 20px 10px 100px;
  z-index: 10;
}
.sidebar-left { order: 0; }
.sidebar-right { order: 2; }
.main-content {
  flex: 1;
  min-width: 0;
  padding: 80px 20px 100px;
  order: 1;
  max-width: 900px;
  margin: 0 auto;
}
.sidebar-inner { display: flex; flex-direction: column; gap: 14px; }
.sidebar-widget {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px;
  transition: var(--transition);
}
.widget-title { font-size: 0.8rem; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.sidebar-list { display: flex; flex-direction: column; gap: 5px; }
.sidebar-list-item {
  font-size: 0.76rem; color: var(--text-light);
  padding: 3px 0; line-height: 1.5;
  border-bottom: 1px solid rgba(232,213,196,0.15);
}
.sidebar-btn {
  display: block; width: 100%;
  padding: 7px 12px; margin-bottom: 5px;
  border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-light);
  font-family: var(--font); font-size: 0.78rem;
  cursor: pointer; text-align: center; transition: var(--transition);
}
.sidebar-btn:hover { background: var(--accent); color: var(--text); }
.sidebar-clock-card { text-align: center; }

/* ===== 拖拽上传区域 ===== */
.drop-zone {
  border: 2px dashed var(--accent-dark);
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: rgba(232,213,196,0.08);
  position: relative;
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--text-light);
  background: rgba(232,213,196,0.15);
}
.drop-zone input[type="file"] { position:absolute; inset:0; opacity:0; cursor:pointer; }
.drop-icon { font-size:2rem; margin-bottom:8px; display:block; }
.upload-progress { margin-top:12px; display:none; }
.upload-progress.show { display:block; }
.progress-track { height:6px; background:var(--card-border); border-radius:3px; overflow:hidden; }
.progress-track .bar { height:100%; background:linear-gradient(90deg,var(--accent-dark),var(--text-light)); border-radius:3px; width:0%; transition:width 0.3s; }
.upload-status { font-size:0.8rem; color:var(--text-light); margin-top:6px; }
.clock-display { line-height: 1.5; }
.clock-date { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.clock-time { font-size: 1.5rem; font-weight: 700; color: var(--text); font-family: 'Courier New', monospace; letter-spacing: 2px; }
.clock-weekday { font-size: 0.78rem; color: var(--text-light); margin-top: 3px; }
.quote-text { font-size: 0.82rem; color: var(--text-light); line-height: 1.6; font-style: italic; }
.mini-stars { text-align: center; font-size: 1.1rem; color: var(--accent-dark); letter-spacing: 6px; animation: twinkle 4s ease-in-out infinite; }
.sidebar::-webkit-scrollbar { width: 0; }
.sidebar { scrollbar-width: none; }

/* 移动端隐藏侧边栏 */
@media (max-width: 1024px) {
  .sidebar { display: none !important; }
  .main-content { max-width: 100%; padding-left: 16px; padding-right: 16px; }
}
/* 平板显示左侧边栏 */
@media (min-width: 1025px) and (max-width: 1366px) {
  .sidebar { width: 180px; }
  .sidebar-right { display: none; }
}
/* 导航栏时钟在移动端 */
@media (max-width: 768px) {
  .nav-clock { display: none; }
}

#pageContainer {
  animation: pageIn 0.5s ease-out;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== 页面加载器 ===== */
.page-loader {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  color: var(--text-light);
}
.loader-star {
  font-size: 2rem;
  animation: spin 1s ease-in-out infinite;
  color: var(--accent-dark);
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== 卡片通用 ===== */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-hover); }

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '✦';
  color: var(--accent-dark);
  font-size: 1.2rem;
}

/* ===== 按钮通用 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  color: var(--text);
  box-shadow: 0 2px 12px rgba(232, 213, 196, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(232, 213, 196, 0.5);
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--text-light);
}
.btn-outline:hover {
  background: var(--accent);
  color: var(--text);
}
.btn-sm { padding: 6px 16px; font-size: 0.8rem; }
.btn-like { padding: 6px 16px; }
.btn-like.liked { background: rgba(232, 120, 120, 0.15); color: #E87878; border-color: #E87878; }

/* ===== Toast 通知 ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-hover);
  font-size: 0.9rem;
  color: var(--text);
  animation: toastIn 0.3s ease-out;
  max-width: 360px;
}
.toast.error { border-color: rgba(232, 120, 120, 0.4); }
.toast.success { border-color: rgba(120, 200, 150, 0.4); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== 回到顶部 ===== */
.back-top {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  color: var(--text-light);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  z-index: 900;
}
.back-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-top:hover { background: var(--accent); color: var(--text); }

/* ===== 响应式导航 ===== */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(253, 246, 236, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--card-border);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle { display: flex; }
  .nav-link { padding: 12px 16px; }
  .card { padding: 20px; }
  .section-title { font-size: 1.3rem; }
  .main-content { padding-top: 72px; padding-left: 16px; padding-right: 16px; }
}

/* ===== 页面通用布局 ===== */
.page-wrapper {
  position: relative;
  min-height: 60vh;
  padding-bottom: 20px;
}

/* 首页标题区域 */
.page-header {
  text-align: center;
  padding: 16px 0 32px;
}
.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.page-header p {
  color: var(--text-light);
  font-size: 1rem;
}
.page-header .header-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ===== 首页 ===== */
.hero-section {
  text-align: center;
  padding: 50px 20px 40px;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.8;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}
.home-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}
.home-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.home-card-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
  display: block;
}
.home-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.home-card p { color: var(--text-light); font-size: 0.85rem; line-height: 1.6; }
.home-card-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--card-border);
}
.home-card-item:last-child { border-bottom: none; }
.home-card-item .item-title {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}
.home-card-item .item-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}
@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .home-grid { grid-template-columns: 1fr; }
}

/* ===== 博客/文章 ===== */
.blog-list { display: flex; flex-direction: column; gap: 20px; }
.blog-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}
.blog-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.blog-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  text-decoration: none;
  display: block;
}
.blog-card-title:hover { color: var(--text-light); }
.blog-card-summary {
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 16px;
}
.blog-card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.blog-card-meta span { display: flex; align-items: center; gap: 4px; }
.blog-tag {
  display: inline-block;
  padding: 2px 12px;
  background: rgba(232, 213, 196, 0.3);
  border-radius: 20px;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* 文章详情页 */
.article-detail { max-width: 800px; margin: 0 auto; }
.article-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.4;
}
.article-meta {
  display: flex;
  gap: 20px;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.article-content {
  font-size: 1rem;
  line-height: 2;
  color: var(--text);
}
.article-content p { margin-bottom: 1.5em; }
.article-content img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin: 24px 0;
}
.article-content h2, .article-content h3 {
  margin-top: 2em;
  margin-bottom: 1em;
}
.article-content blockquote {
  border-left: 3px solid var(--accent-dark);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(232, 213, 196, 0.15);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-light);
}

/* ===== 评论区 ===== */
.comment-section {
  margin-top: 40px;
  padding: 28px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}
.comment-section h3 { font-size: 1.1rem; margin-bottom: 20px; }
.comment-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.comment-form-row { display: flex; gap: 12px; }
.comment-form input, .comment-form textarea {
  padding: 10px 16px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.5);
  color: var(--text);
  outline: none;
  transition: var(--transition);
}
.comment-form input:focus, .comment-form textarea:focus {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(232, 213, 196, 0.2);
}
.comment-form input { flex: 1; }
.comment-form textarea { min-height: 80px; resize: vertical; }
.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--card-border);
}
.comment-item:last-child { border-bottom: none; }
.comment-nickname {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}
.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 12px;
}
.comment-content {
  margin: 8px 0;
  font-size: 0.9rem;
  line-height: 1.6;
}
.comment-reply-btn {
  font-size: 0.8rem;
  color: var(--text-light);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
}
.comment-reply-btn:hover { color: var(--text); }
.comment-replies {
  margin-left: 24px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
}
.comment-badge {
  font-size: 0.7rem;
  padding: 1px 8px;
  background: var(--accent);
  border-radius: 10px;
  margin-left: 8px;
}

/* ===== 朋友圈时间线 ===== */
.moments-timeline { position: relative; }
.moments-timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.moment-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 28px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 24px 24px 60px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.moment-item:hover { box-shadow: var(--shadow-hover); }
.moment-item::before {
  content: '✦';
  position: absolute;
  left: 16px;
  top: 28px;
  color: var(--accent-dark);
  font-size: 1rem;
  background: var(--primary);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 1;
}
.moment-content { font-size: 0.95rem; line-height: 1.8; margin-bottom: 12px; }
.moment-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.moment-images img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.moment-images img:hover { transform: scale(1.03); }
.moment-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  align-items: center;
}
.moment-location { display: flex; align-items: center; gap: 4px; }
.moment-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ===== 相册 ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  transition: var(--transition);
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-hover); }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.3));
  color: #fff;
  opacity: 0;
  transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h4 { font-size: 0.9rem; margin-bottom: 4px; }
.gallery-overlay p { font-size: 0.8rem; opacity: 0.8; }

/* ===== 音乐库 ===== */
.music-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.music-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}
.music-item:hover, .music-item.active {
  background: rgba(232, 213, 196, 0.3);
  border-color: var(--accent-dark);
}
.music-cover {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.music-info { flex: 1; min-width: 0; }
.music-title { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-artist { color: var(--text-light); font-size: 0.8rem; }
.music-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.music-play-btn:hover { transform: scale(1.1); }

/* ===== 全局悬浮播放器 ===== */
.music-player {
  position: fixed;
  bottom: 20px;
  right: 80px;
  z-index: 999;
}
.player-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text);
  transition: var(--transition);
  margin-left: auto;
}
.player-toggle:hover { transform: scale(1.05); }
.player-toggle.playing { animation: pulseGlow 2s ease-in-out infinite; }
@keyframes pulseGlow {
  0%, 100% { box-shadow: var(--shadow-hover); }
  50% { box-shadow: 0 0 30px rgba(232, 213, 196, 0.5); }
}
.player-panel {
  position: absolute;
  bottom: 60px;
  right: -20px;
  width: 320px;
  background: rgba(253, 246, 236, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-hover);
  display: none;
  animation: panelIn 0.3s ease-out;
}
.player-panel.open { display: block; }
@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.player-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.player-cover {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.player-meta { flex: 1; min-width: 0; }
.player-title { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-artist { color: var(--text-light); font-size: 0.8rem; }
.player-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}
.player-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
  padding: 4px 8px;
  border-radius: 8px;
  transition: var(--transition);
  font-family: var(--font);
}
.player-btn:hover { background: rgba(232, 213, 196, 0.3); }
.player-btn-play {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.player-btn-sm { font-size: 0.85rem; padding: 4px 6px; }
.player-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.player-time { font-size: 0.7rem; color: var(--text-muted); min-width: 36px; }
.progress-bar, .volume-bar {
  flex: 1;
  height: 4px;
  background: rgba(232, 213, 196, 0.4);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}
.progress-fill, .volume-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--text-light));
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}
.player-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.vol-icon { font-size: 0.8rem; }
.player-mode {
  display: flex;
  justify-content: center;
  gap: 8px;
}
@media (max-width: 768px) {
  .music-player { right: 16px; bottom: 16px; }
  .player-panel { right: 0; width: 290px; }
}

/* ===== 留言弹幕 ===== */
.message-board {
  position: relative;
  min-height: 400px;
  overflow: hidden;
  border-radius: var(--radius);
}
.danmaku-container {
  position: relative;
  height: 400px;
  background: rgba(253, 246, 236, 0.5);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.danmaku-item {
  position: absolute;
  white-space: nowrap;
  font-size: 0.9rem;
  animation: danmakuScroll linear forwards;
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(255,255,255,0.8);
}
@keyframes danmakuScroll {
  from { transform: translateX(100%); }
  to { transform: translateX(-100%); }
}
.message-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}
.message-form input, .message-form textarea {
  padding: 10px 16px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  background: rgba(255,255,255,0.5);
  color: var(--text);
  outline: none;
  transition: var(--transition);
}
.message-form input:focus, .message-form textarea:focus {
  border-color: var(--accent-dark);
}
.message-form input[type="text"] { flex: 1; min-width: 120px; }
.message-form textarea { flex: 2; min-width: 200px; min-height: 44px; resize: vertical; }

/* ===== 关于页 ===== */
.about-section { max-width: 700px; margin: 0 auto; }
.about-card {
  text-align: center;
  padding: 48px 32px;
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.about-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 20px;
  box-shadow: 0 8px 30px rgba(232, 213, 196, 0.3);
}
.about-name { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.about-bio { color: var(--text-light); line-height: 1.8; max-width: 500px; margin: 0 auto; }
.about-detail {
  padding: 28px;
  margin-bottom: 16px;
}
.about-detail h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.about-detail ul { list-style: none; }
.about-detail li {
  padding: 8px 0;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 10px;
}
.about-detail li::before {
  content: '✦';
  color: var(--accent-dark);
  font-size: 0.8rem;
}

/* ===== 页脚 ===== */
.site-footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.site-footer .footer-icon { font-size: 1.2rem; margin-bottom: 8px; display: block; }

/* ===== 加载更多 ===== */
.load-more {
  text-align: center;
  padding: 32px 0;
}

/* ===== 分类筛选 ===== */
.category-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.category-filter .cat-btn {
  padding: 6px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--card-border);
  background: transparent;
  color: var(--text-light);
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}
.category-filter .cat-btn:hover, .category-filter .cat-btn.active {
  background: var(--accent);
  border-color: var(--accent-dark);
  color: var(--text);
}

/* ===== 无限滚动 ===== */
.infinite-scroll-trigger {
  height: 1px;
  visibility: hidden;
}

/* ===== 音频律动:背景柔光蒙版层(新增,JS 动态创建于 body 末尾) ===== */
#vizGlow {
  position: fixed;
  inset: 0;
  z-index: -1;                  /* 与星光同层(背景之上、内容之下) */
  pointer-events: none;         /* 不拦截任何点击 */
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 236, 205, 0.9), transparent 62%);
  opacity: 0;                   /* 透明度由 JS 帧动画控制 */
  mix-blend-mode: screen;       /* 屏幕混合:柔和提亮,不遮黑 */
  will-change: opacity;
}
/* 夜间主题降低蒙版亮度上限,与昼夜背景和谐共存 */
body.theme-night #vizGlow {
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 208, 150, 0.65), transparent 62%);
}
