*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root {
  --sakura-50: oklch(0.97 0.02 240);
  --sakura-100: oklch(0.94 0.04 240);
  --sakura-200: oklch(0.88 0.07 240);
  --sakura-300: oklch(0.80 0.10 240);
  --sakura-400: oklch(0.72 0.13 240);
  --sakura-500: oklch(0.62 0.15 240);
  --lavender: oklch(0.85 0.06 260);
  --sky: oklch(0.88 0.05 220);
  --cream: oklch(0.97 0.01 240);
  --ink: oklch(0.25 0.02 260);
  --ink-light: oklch(0.45 0.02 260);
  --ink-faint: oklch(0.60 0.02 260);
  --white: oklch(0.99 0.005 240);
  --shadow-sakura: oklch(0.80 0.10 240 / 0.25);
}

html {
  scroll-behavior: smooth;
  font-size: clamp(15px, 1.1vw, 18px);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ═══════ SAKURA FALLING PETALS ═══════ */
.petals-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

/* ═══════ TOP DECORATIVE BORDER ═══════ */
.top-border {
  height: 4px;
  background: linear-gradient(90deg,
    var(--sakura-200), var(--sakura-400), var(--lavender), var(--sky), var(--sakura-300), var(--sakura-200));
  background-size: 300% 100%;
  animation: borderFlow 8s ease-in-out infinite;
}

@keyframes borderFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ═══════ HEADER ═══════ */
.header {
  text-align: center;
  padding: clamp(3rem, 8vh, 6rem) 2rem clamp(2rem, 5vh, 4rem);
  position: relative;
  background:
    radial-gradient(ellipse 60% 50% at 20% 80%, oklch(0.92 0.06 240 / 0.4), transparent),
    radial-gradient(ellipse 50% 60% at 80% 20%, oklch(0.90 0.05 260 / 0.3), transparent),
    radial-gradient(ellipse 40% 40% at 50% 50%, oklch(0.93 0.04 240 / 0.2), transparent);
}

.header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background-image:
    radial-gradient(2px 2px at 10% 20%, var(--sakura-300) 50%, transparent 50%),
    radial-gradient(2px 2px at 30% 60%, var(--sakura-200) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 70% 30%, var(--lavender) 50%, transparent 50%),
    radial-gradient(2px 2px at 85% 70%, var(--sakura-300) 50%, transparent 50%),
    radial-gradient(1px 1px at 50% 80%, var(--sky) 50%, transparent 50%);
  opacity: 0.5;
  pointer-events: none;
}

.header a { text-decoration: none; color: inherit; }

.site-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 0.5rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 2px 8px var(--shadow-sakura));
  animation: iconFloat 4s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.site-title {
  font-family: 'Zen Maru Gothic', -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  color: var(--sakura-500);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px var(--shadow-sakura);
  margin-bottom: 0.3rem;
  font-weight: 700;
}

.site-subtitle {
  font-size: 0.95rem;
  color: var(--ink-faint);
  letter-spacing: 0.3em;
  font-weight: 300;
}

/* ═══════ NAVIGATION ═══════ */
.nav {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  background: oklch(0.97 0.01 90 / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(0.92 0.03 240 / 0.5);
}

.nav a {
  text-decoration: none;
  color: var(--ink-light);
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: all 0.3s ease;
  border: 1.5px solid transparent;
}

.nav a:hover {
  color: var(--sakura-500);
  background: var(--sakura-50);
  border-color: var(--sakura-200);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow-sakura);
}

.nav a.active {
  background: var(--sakura-100);
  color: var(--sakura-500);
  border-color: var(--sakura-300);
}

/* ═══════ PAGE TITLE BAR ═══════ */
.page-banner {
  text-align: center;
  padding: 3rem 2rem 2rem;
  position: relative;
}

.page-banner-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.6rem;
}

.page-banner h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  color: var(--ink);
  font-weight: 700;
}

.page-banner p {
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin-top: 0.4rem;
  letter-spacing: 0.1em;
}

/* ═══════ MAIN LAYOUT ═══════ */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

.main-wide {
  max-width: 900px;
  grid-template-columns: 1fr;
}

@media (max-width: 800px) {
  .main {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
  .header { padding: 2.5rem 1.5rem 2rem; }
  .main { padding: 0 1.2rem 3rem; }
  .post-cover-placeholder { height: 160px; }
}

/* ═══════ BLOG CARDS ═══════ */
.posts {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-card {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 1px 3px oklch(0.7 0.05 240 / 0.08),
    0 8px 30px oklch(0.7 0.05 240 / 0.06);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  opacity: 0;
  transform: translateY(30px);
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }
.post-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes cardIn {
  to { opacity: 1; transform: translateY(0); }
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 40px oklch(0.7 0.05 240 / 0.12),
    0 2px 8px oklch(0.7 0.05 240 / 0.08);
}

.post-cover-placeholder {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.post-cover-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 3px at 20% 30%, oklch(1 0 0 / 0.3) 50%, transparent 50%),
    radial-gradient(circle 2px at 60% 20%, oklch(1 0 0 / 0.2) 50%, transparent 50%),
    radial-gradient(circle 2.5px at 80% 60%, oklch(1 0 0 / 0.25) 50%, transparent 50%),
    radial-gradient(circle 1.5px at 40% 70%, oklch(1 0 0 / 0.2) 50%, transparent 50%);
  pointer-events: none;
}

.sakura { background: linear-gradient(135deg, oklch(0.94 0.05 240), oklch(0.90 0.08 240), oklch(0.88 0.06 260)); }
.starry { background: linear-gradient(135deg, oklch(0.30 0.06 270), oklch(0.25 0.08 240), oklch(0.35 0.05 260)); }
.mint { background: linear-gradient(135deg, oklch(0.92 0.06 160), oklch(0.88 0.08 180), oklch(0.90 0.05 200)); }
.peach { background: linear-gradient(135deg, oklch(0.92 0.06 50), oklch(0.90 0.08 30), oklch(0.88 0.06 240)); }
.ocean { background: linear-gradient(135deg, oklch(0.88 0.06 240), oklch(0.85 0.08 260), oklch(0.82 0.06 280)); }
.sunset { background: linear-gradient(135deg, oklch(0.88 0.10 50), oklch(0.85 0.12 30), oklch(0.82 0.08 240)); }
.lavender-bg { background: linear-gradient(135deg, oklch(0.90 0.06 260), oklch(0.87 0.08 320), oklch(0.85 0.06 280)); }
.matcha { background: linear-gradient(135deg, oklch(0.90 0.06 140), oklch(0.87 0.08 150), oklch(0.85 0.05 130)); }

.post-body {
  padding: 1.5rem 1.8rem 1.8rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.post-tag {
  background: var(--sakura-100);
  color: var(--sakura-500);
  padding: 0.15rem 0.6rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.post-tag.anime { background: oklch(0.90 0.06 260); color: oklch(0.55 0.12 260); }
.post-tag.game { background: oklch(0.90 0.06 240); color: oklch(0.50 0.10 240); }
.post-tag.life { background: oklch(0.90 0.06 160); color: oklch(0.50 0.10 160); }
.post-tag.code { background: oklch(0.90 0.04 90); color: oklch(0.50 0.08 90); }
.post-tag.review { background: oklch(0.90 0.06 240); color: oklch(0.55 0.12 240); }

.post-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.6rem;
  line-height: 1.5;
  transition: color 0.3s;
}

.post-card:hover .post-title { color: var(--sakura-500); }

.post-excerpt {
  font-size: 0.88rem;
  color: var(--ink-light);
  line-height: 1.9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid oklch(0.92 0.03 240);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.post-footer span {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ═══════ SIDEBAR ═══════ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  position: sticky;
  top: 4rem;
}

.widget {
  background: var(--white);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow:
    0 1px 3px oklch(0.7 0.05 240 / 0.06),
    0 6px 20px oklch(0.7 0.05 240 / 0.04);
  opacity: 0;
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.3s;
}

.widget-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--sakura-500);
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--sakura-200), transparent);
}

/* Profile Widget */
.profile-widget { text-align: center; }

.avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--sakura-200), var(--lavender));
  box-shadow: 0 4px 20px var(--shadow-sakura);
  border: 3px solid var(--white);
  outline: 2px solid var(--sakura-200);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-family: 'Noto Serif SC', serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.3rem;
}

.profile-bio {
  font-size: 0.8rem;
  color: var(--ink-faint);
  line-height: 1.7;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid oklch(0.92 0.03 240);
}

.stat { text-align: center; }

.stat-num {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1.2rem;
  color: var(--sakura-500);
}

.stat-label {
  font-size: 0.68rem;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}

/* Tags Widget */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-cloud a {
  text-decoration: none;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  background: var(--sakura-50);
  color: var(--ink-light);
  border: 1px solid oklch(0.92 0.04 240);
  transition: all 0.25s;
}

.tag-cloud a:hover {
  background: var(--sakura-200);
  color: var(--sakura-500);
  border-color: var(--sakura-300);
  transform: translateY(-1px);
}

/* Music Widget */
.now-playing {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.music-cover {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sakura-300), var(--lavender));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--shadow-sakura); }
  50% { box-shadow: 0 0 0 6px oklch(0.80 0.10 240 / 0.1); }
}

.music-info { min-width: 0; }

.music-title {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-artist {
  font-size: 0.72rem;
  color: var(--ink-faint);
}

.music-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
  margin-left: auto;
}

.music-bars span {
  width: 3px;
  background: var(--sakura-400);
  border-radius: 2px;
  animation: barDance 1.2s ease-in-out infinite;
}

.music-bars span:nth-child(1) { height: 60%; animation-delay: 0s; }
.music-bars span:nth-child(2) { height: 100%; animation-delay: 0.15s; }
.music-bars span:nth-child(3) { height: 40%; animation-delay: 0.3s; }
.music-bars span:nth-child(4) { height: 80%; animation-delay: 0.45s; }

@keyframes barDance {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.4); }
}

/* ═══════ MUSIC PLAYER ═══════ */
.music-player {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.music-progress-bar {
  height: 4px;
  background: oklch(0.90 0.03 240);
  border-radius: 100px;
  overflow: hidden;
  cursor: pointer;
}

.music-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sakura-300), var(--sakura-500));
  border-radius: 100px;
  transition: width 0.1s linear;
}

.music-time {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--ink-faint);
  margin-top: 0.3rem;
  margin-bottom: 0.6rem;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.music-ctrl-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid oklch(0.90 0.03 240);
  background: transparent;
  color: var(--ink-light);
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.music-ctrl-btn:hover {
  border-color: var(--sakura-400);
  color: var(--sakura-500);
  background: var(--sakura-50);
}

.music-play-btn {
  width: 38px;
  height: 38px;
  font-size: 0.85rem;
  border-color: var(--sakura-400);
  color: var(--sakura-500);
  background: var(--sakura-50);
}

.music-play-btn:hover {
  background: var(--sakura-100);
  transform: scale(1.08);
}

.music-volume-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.music-volume-icon {
  font-size: 0.75rem;
  opacity: 0.6;
}

.music-volume {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: oklch(0.90 0.03 240);
  border-radius: 100px;
  outline: none;
  cursor: pointer;
}

.music-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sakura-400);
  cursor: pointer;
  box-shadow: 0 1px 4px var(--shadow-sakura);
}

.music-volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sakura-400);
  cursor: pointer;
  border: none;
}

/* Dark mode music player */
.dark .music-ctrl-btn {
  border-color: oklch(0.35 0.03 240);
  color: var(--ink-faint);
}

.dark .music-ctrl-btn:hover {
  border-color: var(--sakura-400);
  color: var(--sakura-400);
  background: oklch(0.25 0.04 240);
}

.dark .music-progress-bar {
  background: oklch(0.30 0.03 240);
}

.dark .music-volume {
  background: oklch(0.30 0.03 240);
}

/* ═══════ ABOUT PAGE SPECIAL ═══════ */
.about-section {
  background: var(--white);
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  box-shadow:
    0 1px 3px oklch(0.7 0.05 240 / 0.08),
    0 8px 30px oklch(0.7 0.05 240 / 0.06);
  opacity: 0;
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.about-section:nth-child(1) { animation-delay: 0.1s; }
.about-section:nth-child(2) { animation-delay: 0.2s; }
.about-section:nth-child(3) { animation-delay: 0.3s; }
.about-section:nth-child(4) { animation-delay: 0.4s; }

.about-section h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-section p {
  color: var(--ink-light);
  font-size: 0.9rem;
  line-height: 2;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.about-stat {
  text-align: center;
  padding: 1.5rem;
  background: var(--sakura-50);
  border-radius: 14px;
}

.about-stat .emoji { font-size: 2rem; margin-bottom: 0.5rem; }

.about-stat .num {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 1.8rem;
  color: var(--sakura-500);
}

.about-stat .label {
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-top: 0.2rem;
}

.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--sakura-200), var(--lavender), var(--sky));
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.75rem;
  top: 0.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sakura-400);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 3px var(--sakura-200);
}

.timeline-item .year {
  font-family: 'Zen Maru Gothic', sans-serif;
  font-size: 0.85rem;
  color: var(--sakura-500);
  margin-bottom: 0.2rem;
}

.timeline-item .desc {
  font-size: 0.85rem;
  color: var(--ink-light);
}

.skill-bars {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.skill-item label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--ink-light);
  margin-bottom: 0.3rem;
}

.skill-bar {
  height: 8px;
  background: var(--sakura-50);
  border-radius: 100px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--sakura-300), var(--sakura-500));
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
  width: 0;
}

.skill-bar-fill.animated { /* set by JS */ }

/* ═══════ DETAIL ARTICLE (番剧/游戏内页) ═══════ */
.article-detail {
  background: var(--white);
  border-radius: 20px;
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow:
    0 1px 3px oklch(0.7 0.05 240 / 0.08),
    0 8px 30px oklch(0.7 0.05 240 / 0.06);
  opacity: 0;
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: 0.1s;
}

.article-detail h1 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.6rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.article-detail .article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid oklch(0.92 0.03 240);
  flex-wrap: wrap;
}

.article-detail h2 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.25rem;
  margin: 2rem 0 0.8rem;
  color: var(--ink);
}

.article-detail h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.6rem;
  color: var(--ink);
}

.article-detail p {
  font-size: 0.9rem;
  color: var(--ink-light);
  line-height: 2;
  margin-bottom: 1rem;
}

.article-detail ul, .article-detail ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--ink-light);
  font-size: 0.9rem;
}

.article-detail li { margin-bottom: 0.4rem; line-height: 1.8; }

.article-detail blockquote {
  border-left: 3px solid var(--sakura-300);
  background: var(--sakura-50);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 12px 12px 0;
  font-size: 0.88rem;
  color: var(--ink-light);
  font-style: italic;
}

.article-detail code {
  font-family: 'JetBrains Mono', Consolas, 'Courier New', monospace;
  font-size: 0.85em;
  background: oklch(0.96 0.02 240);
  color: oklch(0.45 0.12 320);
  padding: 0.15em 0.4em;
  border-radius: 6px;
}

.article-detail pre {
  background: oklch(0.16 0.02 260);
  color: oklch(0.92 0.02 240);
  padding: 1rem 1.2rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.7;
  margin: 1.2rem 0;
}

.article-detail pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

.article-detail table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.85rem;
  color: var(--ink-light);
}

.article-detail th, .article-detail td {
  border: 1px solid oklch(0.90 0.03 240);
  padding: 0.55rem 0.8rem;
  text-align: left;
}

.article-detail th {
  background: var(--sakura-50);
  font-weight: 600;
  color: var(--ink);
}

.article-detail tr:nth-child(even) td {
  background: oklch(0.985 0.005 240);
}

.article-detail .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--sakura-400);
  text-decoration: none;
  font-size: 0.85rem;
  margin-bottom: 2rem;
  transition: color 0.3s;
}

.article-detail .back-link:hover { color: var(--sakura-500); }

/* Anime rating */
.rating-stars {
  color: oklch(0.75 0.15 80);
  font-size: 1.1rem;
  letter-spacing: 0.1em;
}

/* ═══════ FOOTER ═══════ */
.footer {
  text-align: center;
  padding: 3rem 2rem 2rem;
  color: var(--ink-faint);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  position: relative;
}

.footer-beian {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}
.footer-beian a { color: var(--ink-faint); text-decoration: none; }
.footer-beian a:hover { color: var(--sakura-500); }

.site-stats {
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.site-stats b { color: var(--sakura-500); font-weight: 600; }
.stats-sep { margin: 0 0.4rem; opacity: 0.5; }

.footer::before {
  content: '✿ ❀ ✿ ❀ ✿';
  display: block;
  margin-bottom: 1rem;
  letter-spacing: 0.5em;
  color: var(--sakura-300);
  font-size: 0.7rem;
}

.footer a {
  color: var(--sakura-400);
  text-decoration: none;
}

.footer a:hover {
  color: var(--sakura-500);
  text-decoration: underline;
}

/* ═══════ SCROLL TO TOP ═══════ */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--sakura-200);
  color: var(--sakura-500);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--shadow-sakura);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  z-index: 100;
}

.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.scroll-top:hover {
  background: var(--sakura-100);
  transform: translateY(-3px);
  box-shadow: 0 6px 24px var(--shadow-sakura);
}

/* ═══════ DARK MODE ═══════ */
body.dark {
  --cream: oklch(0.18 0.02 260);
  --white: oklch(0.22 0.02 260);
  --ink: oklch(0.88 0.02 240);
  --ink-light: oklch(0.75 0.02 240);
  --ink-faint: oklch(0.60 0.02 240);
  --shadow-sakura: oklch(0.40 0.08 240 / 0.3);
}

body,
body .nav,
body .scroll-top,
body .post-card,
body .widget,
body .about-section,
body .article-detail {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.dark .nav {
  background: oklch(0.20 0.02 260 / 0.9);
  border-bottom-color: oklch(0.30 0.02 260 / 0.5);
}

.dark .header {
  background:
    radial-gradient(ellipse 60% 50% at 20% 80%, oklch(0.25 0.06 240 / 0.4), transparent),
    radial-gradient(ellipse 50% 60% at 80% 20%, oklch(0.23 0.05 260 / 0.3), transparent),
    radial-gradient(ellipse 40% 40% at 50% 50%, oklch(0.24 0.04 240 / 0.2), transparent);
}

.dark .post-card {
  box-shadow:
    0 1px 3px oklch(0.10 0.02 260 / 0.3),
    0 8px 30px oklch(0.10 0.02 260 / 0.2);
}

.dark .post-card:hover {
  box-shadow:
    0 12px 40px oklch(0.10 0.02 260 / 0.4),
    0 2px 8px oklch(0.10 0.02 260 / 0.3);
}

.dark .widget {
  box-shadow:
    0 1px 3px oklch(0.10 0.02 260 / 0.2),
    0 6px 20px oklch(0.10 0.02 260 / 0.15);
}

.dark .scroll-top {
  background: oklch(0.22 0.02 260);
  border-color: oklch(0.35 0.04 240);
}

.dark .scroll-top:hover {
  background: oklch(0.28 0.03 260);
}

.dark .nav a:hover {
  background: oklch(0.28 0.04 240);
}

.dark .nav a.active {
  background: oklch(0.30 0.06 240);
  border-color: oklch(0.45 0.10 240);
}

.dark .tag-cloud a {
  background: oklch(0.25 0.02 260);
  border-color: oklch(0.32 0.03 240);
}

.dark .tag-cloud a:hover {
  background: oklch(0.35 0.06 240);
}

.dark .about-section {
  box-shadow:
    0 1px 3px oklch(0.10 0.02 260 / 0.3),
    0 8px 30px oklch(0.10 0.02 260 / 0.2);
}

.dark .about-stat {
  background: oklch(0.25 0.03 260);
}

.dark .article-detail {
  box-shadow:
    0 1px 3px oklch(0.10 0.02 260 / 0.3),
    0 8px 30px oklch(0.10 0.02 260 / 0.2);
}

.dark .article-detail blockquote {
  background: oklch(0.25 0.03 260);
}

.dark .article-detail code {
  background: oklch(0.28 0.03 260);
  color: oklch(0.85 0.08 320);
}

.dark .article-detail pre {
  background: oklch(0.12 0.02 260);
  color: oklch(0.90 0.02 240);
}

.dark .article-detail th {
  background: oklch(0.25 0.03 260);
  color: var(--ink);
}

.dark .article-detail th, .dark .article-detail td {
  border-color: oklch(0.30 0.02 260 / 0.6);
}

.dark .article-detail tr:nth-child(even) td {
  background: oklch(0.20 0.02 260 / 0.4);
}

.dark .comment-card {
  background: oklch(0.25 0.02 260);
}

.dark .comment-input-area textarea {
  background: oklch(0.25 0.02 260);
  border-color: oklch(0.35 0.03 240);
  color: oklch(0.88 0.02 240);
}

/* ═══════ DARK MODE TOGGLE BUTTON ═══════ */
.dark-toggle {
  background: none;
  border: 1.5px solid oklch(0.92 0.03 240);
  border-radius: 100px;
  padding: 0.35rem 0.7rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--ink-light);
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.dark-toggle:hover {
  background: var(--sakura-50);
  border-color: var(--sakura-200);
  transform: translateY(-2px);
}

.dark .dark-toggle {
  border-color: oklch(0.35 0.03 240);
}

.dark .dark-toggle:hover {
  background: oklch(0.28 0.04 240);
}

/* ═══════ THEME COLOR SWITCHER ═══════ */
.theme-switcher {
  position: fixed;
  bottom: 5rem;
  left: 2rem;
  z-index: 100;
}

.theme-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--sakura-200);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--shadow-sakura);
  transition: all 0.3s ease;
}

.theme-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px var(--shadow-sakura);
}

.theme-popup {
  position: absolute;
  bottom: 52px;
  left: 0;
  background: var(--white);
  border-radius: 16px;
  padding: 0.8rem;
  box-shadow: 0 8px 32px oklch(0.5 0.05 260 / 0.2);
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 140px;
  border: 1px solid oklch(0.92 0.03 240);
}

.theme-popup.open {
  display: flex;
  animation: popupIn 0.25s ease;
}

@keyframes popupIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border: none;
  background: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--ink-light);
  transition: all 0.2s;
  font-family: inherit;
}

.theme-option:hover {
  background: var(--sakura-50);
  color: var(--ink);
}

.theme-option.active {
  background: var(--sakura-100);
  color: var(--sakura-500);
  font-weight: 600;
}

.dark .theme-popup {
  border-color: oklch(0.32 0.03 240);
}

.dark .theme-option:hover {
  background: oklch(0.28 0.04 240);
}

.dark .theme-option.active {
  background: oklch(0.30 0.06 240);
}

/* ═══════ ARTICLE DETAIL PAGE ═══════ */
.article-cover-placeholder {
  width: 100%;
  height: 300px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, oklch(0.94 0.05 240), oklch(0.90 0.08 240), oklch(0.88 0.06 260));
  position: relative;
  overflow: hidden;
}

.article-cover-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 3px at 20% 30%, oklch(1 0 0 / 0.3) 50%, transparent 50%),
    radial-gradient(circle 2px at 60% 20%, oklch(1 0 0 / 0.2) 50%, transparent 50%),
    radial-gradient(circle 2.5px at 80% 60%, oklch(1 0 0 / 0.25) 50%, transparent 50%);
  pointer-events: none;
}

/* ═══════ RELATED POSTS ═══════ */
.related-posts {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid oklch(0.92 0.03 240);
}

.related-posts h3 {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  color: var(--ink);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.related-card {
  display: block;
  text-decoration: none;
  padding: 1.2rem;
  border-radius: 14px;
  background: var(--sakura-50);
  border: 1px solid oklch(0.92 0.04 240);
  transition: all 0.3s ease;
}

.related-card:hover {
  background: var(--sakura-100);
  border-color: var(--sakura-300);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow-sakura);
}

.related-card .rc-tag {
  font-size: 0.7rem;
  color: var(--sakura-500);
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.related-card .rc-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 0.3rem;
}

.related-card .rc-meta {
  font-size: 0.72rem;
  color: var(--ink-faint);
}

/* ═══════ COMMENT SECTION ═══════ */
.comment-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid oklch(0.92 0.03 240);
}

.comment-header {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.comment-input-area {
  margin-bottom: 2rem;
}

.comment-input-area textarea {
  width: 100%;
  min-height: 100px;
  border: 1.5px solid oklch(0.90 0.03 240);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
  background: var(--sakura-50);
  color: var(--ink);
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
  line-height: 1.8;
}

.comment-input-area textarea:focus {
  border-color: var(--sakura-300);
  box-shadow: 0 0 0 3px oklch(0.80 0.10 240 / 0.15);
}

.comment-input-area textarea::placeholder {
  color: var(--ink-faint);
}

.comment-submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.8rem;
}

.comment-submit-btn {
  background: linear-gradient(135deg, var(--sakura-400), var(--sakura-500));
  color: var(--white);
  border: none;
  padding: 0.55rem 1.8rem;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 16px oklch(0.62 0.15 240 / 0.25);
}

.comment-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px oklch(0.62 0.15 240 / 0.35);
}

.comment-submit-btn:active {
  transform: translateY(0);
}

.dark .comment-submit-btn {
  color: oklch(0.15 0.02 260);
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-card {
  background: var(--sakura-50);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  transition: background-color 0.4s ease;
}

.comment-card.new-comment {
  animation: commentSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes commentSlideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.comment-top {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sakura-200), var(--lavender));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.comment-user {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
}

.comment-date {
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-left: auto;
}

.comment-text {
  font-size: 0.85rem;
  color: var(--ink-light);
  line-height: 1.8;
  padding-left: calc(36px + 0.7rem);
}

/* ═══════ VIEW & LIKE COUNTER ANIMATION ═══════ */
.post-views, .post-likes {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.post-likes {
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  user-select: none;
}

.post-likes:hover {
  color: var(--sakura-500);
}

.post-likes.liked {
  color: var(--sakura-500);
}

.post-likes.like-pulse {
  animation: likePulse 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.article-like {
  font-family: inherit;
  font-size: 0.82rem;
  background: none;
  border: 1px solid var(--sakura-300, #f3b8d0);
  color: var(--ink-light);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
  user-select: none;
}
.article-like:hover { color: var(--sakura-500); border-color: var(--sakura-500); }
.article-like.liked {
  color: var(--sakura-500);
  border-color: var(--sakura-500);
  background: rgba(255, 105, 180, 0.08);
}
.article-like.like-pulse { animation: likePulse 0.4s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes likePulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.4); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.like-bounce {
  animation: likeBounce 0.3s ease;
}

@keyframes likeBounce {
  0% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

/* ═══════ ANIMATIONS ═══════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Steam 在线状态（个人简介下方） */
.steam-status { margin-top: 0.35rem; font-size: 0.8rem; line-height: 1.6; }
.steam-state { color: var(--ink-faint); }
.steam-logo { width: 1em; height: 1em; vertical-align: -0.125em; display: inline-block; }
.steam-state-online { color: #3aa76d; font-weight: 600; }
.steam-state-offline { color: #94a3b8; }
.steam-playing { color: #4f46e5; font-weight: 600; }
