/* ═══════════════════════════════════════════════════════
   六分のblog — Unified Theme
   Dark glassmorphism + cute accents
   ═══════════════════════════════════════════════════════ */

/* ─── Reset & Variables ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: rgba(20, 18, 35, 0.72);
  --bg-solid: #141223;
  --bg-sidebar: rgba(22, 20, 40, 0.88);
  --bg-card: rgba(25, 23, 45, 0.68);
  --bg-card-hover: rgba(30, 28, 52, 0.75);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --bg-glass-hover: rgba(255, 255, 255, 0.08);
  --text: #e8e4f0;
  --text-secondary: rgba(210, 200, 230, 0.7);
  --text-muted: rgba(170, 160, 200, 0.5);
  --border: rgba(180, 140, 220, 0.18);
  --border-light: rgba(180, 140, 220, 0.08);
  --accent: #b48ed4;
  --accent-pink: #e8a0c8;
  --accent-blue: #7eb8e8;
  --accent-gradient: linear-gradient(135deg, #7eb8e8 0%, #b48ed4 50%, #e8a0c8 100%);
  --accent-light: rgba(180, 142, 212, 0.15);
  --danger: #f06292;
  --success: #81c784;
  --warning: #ffd54f;
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,0.35);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.45);
  --blur: blur(24px);
  --blur-heavy: blur(40px);
  --font-body: 'HarmonyOS Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display: 'ZCOOL KuaiLe', 'HarmonyOS Sans SC', cursive;
  --font-serif: 'Noto Serif SC', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --sidebar-w: 280px;
  --glow: 0 0 24px rgba(180, 142, 212, 0.2);
}

/* ─── Animations ─── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}
@keyframes sparkle {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-y: scroll; /* Always show scrollbar to prevent layout shift */
}

/* ─── Body & Background ─── */
body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  background: var(--bg-solid);
  background-image: url('/bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='8' fill='%23b48ed4' fill-opacity='0.6'/%3E%3Ccircle cx='10' cy='10' r='3' fill='%23fff'/%3E%3C/svg%3E") 10 10, auto;
}

/* Unified background overlay — fixed, never changes between pages */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 35, 0.42);
  z-index: 0;
  pointer-events: none;
}

a { color: var(--accent-blue); text-decoration: none; transition: all 0.25s; }
a:hover { color: var(--accent-pink); }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

/* ─── Decorative Stickers ─── */
.sticker {
  position: fixed;
  pointer-events: none;
  z-index: 999;
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  animation: float 4s ease-in-out infinite;
}
.sticker-1 { top: 8%; left: calc(var(--sidebar-w) - 30px); animation-delay: 0s; font-size: 28px; }
.sticker-2 { top: 35%; left: calc(var(--sidebar-w) - 20px); animation-delay: 1.2s; font-size: 24px; }
.sticker-3 { bottom: 15%; left: calc(var(--sidebar-w) - 35px); animation-delay: 0.6s; font-size: 30px; }
.sticker-4 { top: 5%; right: 15px; animation-delay: 2s; font-size: 22px; }
.sticker-5 { bottom: 8%; right: 25px; animation-delay: 0.8s; font-size: 26px; }
.sticker-6 { top: 60%; right: 10px; animation-delay: 1.5s; font-size: 20px; }

.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 998;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-pink);
  box-shadow: 0 0 8px var(--accent-pink), 0 0 16px rgba(232,160,200,0.3);
  animation: sparkle 2s ease-in-out infinite;
}
.sparkle:nth-child(1) { top: 12%; left: calc(var(--sidebar-w) + 10px); animation-delay: 0s; }
.sparkle:nth-child(2) { top: 40%; left: calc(var(--sidebar-w) + 5px); animation-delay: 0.7s; }
.sparkle:nth-child(3) { top: 70%; left: calc(var(--sidebar-w) + 15px); animation-delay: 1.4s; background: var(--accent-blue); box-shadow: 0 0 8px var(--accent-blue); }

/* ═══════════════════════════════════════════════════════
   LAYOUT: Fixed Left Sidebar + Scrollable Right Content
   ═══════════════════════════════════════════════════════ */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ─── Left Sidebar ─── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  backdrop-filter: var(--blur-heavy);
  -webkit-backdrop-filter: var(--blur-heavy);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  animation: slideInLeft 0.5s ease-out;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.sidebar-inner {
  padding: 1.5rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Profile */
.profile-section {
  text-align: center;
  margin-bottom: 1.5rem;
}
.profile-avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.profile-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: 0 0 20px rgba(180,142,212,0.2);
  transition: all 0.4s;
}
.profile-avatar:hover {
  transform: scale(1.08) rotate(3deg);
  border-color: var(--accent-pink);
  box-shadow: 0 0 30px rgba(232,160,200,0.3);
}
.profile-avatar-wrap::after {
  content: '📌';
  position: absolute;
  top: -8px;
  right: -5px;
  font-size: 18px;
  animation: bounce 2s ease-in-out infinite;
}
.profile-name {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-display);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.25rem;
}
.profile-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: var(--success);
  background: rgba(129,199,132,0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(129,199,132,0.2);
}
.profile-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: sparkle 2s ease-in-out infinite;
}
.profile-bio {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  text-align: left;
}

/* Sidebar Nav */
.sidebar-nav {
  margin-bottom: 1.5rem;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  transition: all 0.25s;
  position: relative;
  letter-spacing: 0.02em;
}
.sidebar-nav a:hover {
  color: var(--text);
  background: var(--bg-glass-hover);
  padding-left: 1rem;
}
.sidebar-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
  font-weight: 500;
}
.sidebar-nav a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--accent-gradient);
  border-radius: 2px;
}
.sidebar-nav .nav-icon {
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

/* Social Links */
.social-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.social-link {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  transition: all 0.3s;
  color: var(--text-secondary);
}
.social-link:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px) scale(1.1);
  box-shadow: var(--glow);
}

/* Music Player */
.music-player {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
}
.music-player-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.music-player-header .disc {
  display: inline-block;
  animation: spin-slow 4s linear infinite;
}
.music-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.music-cover {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}
.music-cover-placeholder {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  animation: spin-slow 6s linear infinite;
}
.music-text { overflow: hidden; flex: 1; min-width: 0; }
.music-title { font-size: 0.82rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-artist { font-size: 0.7rem; color: var(--text-muted); }
.music-progress { width: 100%; height: 3px; background: var(--bg-glass); border-radius: 2px; margin-bottom: 0.4rem; overflow: hidden; }
.music-progress-bar { height: 100%; background: var(--accent-gradient); border-radius: 2px; width: 35%; transition: width 0.3s; }
.music-controls { display: flex; justify-content: center; gap: 1rem; }
.music-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0.2rem;
}
.music-btn:hover { color: var(--accent); transform: scale(1.15); }
.music-btn.play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.music-btn.play:hover { transform: scale(1.1); box-shadow: var(--glow); }

/* Sidebar Footer */
.sidebar-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.sidebar-footer a { color: var(--text-muted); }
.sidebar-footer a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   RIGHT CONTENT — Unified panel system
   Every page renders inside .page-shell for consistency
   ═══════════════════════════════════════════════════════ */
.content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  position: relative;
}

/* Content area — NO extra background layer, uses body's fixed overlay only.
   This prevents visual inconsistency when switching pages. */

.content-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 2rem;
}

/* ─── Universal Page Shell ───
   Every page wraps content in this for consistent feel */
.page-shell {
  animation: pageIn 0.35s ease-out;
}

/* ─── Unified Panel ───
   The standard card/panel all pages use */
.panel {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s;
}
.panel:hover {
  border-color: rgba(180, 142, 212, 0.22);
}
/* Subtle top gradient bar on every panel */
.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.5;
  transition: opacity 0.3s;
}
.panel:hover::before {
  opacity: 1;
}

/* Panel variants */
.panel-compact { padding: 1.25rem 1.5rem; }
.panel-transparent {
  background: transparent;
  backdrop-filter: none;
  border: none;
  padding: 0;
}
.panel-transparent::before { display: none; }
.panel-transparent:hover { border-color: transparent; }

/* ─── Section Title ─── */
.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-display);
  margin-bottom: 1.75rem;
  letter-spacing: 0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  padding-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 36px;
  height: 2px;
  background: var(--accent-gradient);
  border-radius: 1px;
}

/* ─── Search Bar (Home) ─── */
.search-bar {
  margin-bottom: 1.75rem;
}
.search-bar form {
  display: flex;
  gap: 0.5rem;
}
.search-bar input {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.3s;
}
.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════════════════ */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 1.75rem;
  align-items: start;
}
.home-sidebar-sticky {
  position: sticky;
  top: 2.5rem;
}

/* Post Cards */
.posts-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.post-card {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  animation: fadeInUp 0.5s ease-out both;
}
.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}
.post-card:hover {
  border-color: rgba(180, 142, 212, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(0,0,0,0.3), var(--glow);
}
.post-card:hover::before { opacity: 1; }
.post-cover { display: block; overflow: hidden; }
.post-cover img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.post-card:hover .post-cover img { transform: scale(1.06); }
.post-body { padding: 1.25rem 1.5rem; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.post-category a {
  color: var(--accent-pink);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
}
.post-category a:hover { color: var(--accent); }
.post-title {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--accent); }
.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-footer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.post-views {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.tag {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: 3px;
  font-size: 0.68rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.tag:hover { background: var(--accent-light); border-color: var(--accent); color: var(--accent); }

/* Category sidebar */
.cat-panel {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease-out 0.15s both;
}
.cat-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.4;
}
.cat-panel h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-display);
}
.cat-list { display: flex; flex-direction: column; gap: 0.1rem; }
.cat-item {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s;
}
.cat-item:hover { color: var(--accent); padding-left: 0.4rem; }
.cat-item:last-child { border-bottom: none; }
.cat-item .count { color: var(--text-muted); font-size: 0.72rem; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

/* ═══════════════════════════════════════════════════════
   POST DETAIL
   ═══════════════════════════════════════════════════════ */
.post-full {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease-out;
}
.post-full::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.5;
}
.post-header { margin-bottom: 2rem; }
.post-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0.5rem 0;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.post-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.6rem; }
.post-cover-full { width: 100%; border-radius: var(--radius); margin-bottom: 1.5rem; }

/* Prose (Article Content) */
.prose {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
}
.prose h1 { font-size: 1.5rem; margin: 2rem 0 0.75rem; font-weight: 700; }
.prose h2 { font-size: 1.3rem; margin: 1.75rem 0 0.6rem; font-weight: 600; }
.prose h3 { font-size: 1.1rem; margin: 1.25rem 0 0.5rem; font-weight: 600; }
.prose p { margin-bottom: 1.15rem; }
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.5rem 1.15rem;
  margin: 1.25rem 0;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--bg-glass);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.prose pre {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem;
  overflow-x: auto;
  margin: 1.25rem 0;
  font-size: 0.83rem;
  line-height: 1.5;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--bg-glass);
  padding: 0.12em 0.3em;
  border-radius: 3px;
  color: var(--accent);
}
.prose pre code { background: none; padding: 0; color: var(--text); }
.prose img { border-radius: var(--radius); margin: 1.25rem 0; }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1.15rem; }
.prose li { margin-bottom: 0.2rem; }
.prose a { color: var(--accent-blue); border-bottom: 1px solid var(--border); }
.prose a:hover { border-bottom-color: var(--accent); color: var(--accent-pink); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 1.75rem 0; }

/* Author Card */
.post-article-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.author-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.author-card strong { display: block; margin-bottom: 0.15rem; font-size: 0.9rem; }
.author-card p { color: var(--text-secondary); font-size: 0.8rem; margin: 0; }

/* ═══════════════════════════════════════════════════════
   ARCHIVE PAGE
   ═══════════════════════════════════════════════════════ */
.archive-page {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  position: relative;
  overflow: hidden;
}
.archive-page::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.5;
}
.archive-count { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.85rem; }
.archive-year h2 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.archive-year ul { list-style: none; }
.archive-year li {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.2s;
}
.archive-year li:hover { padding-left: 0.4rem; }
.archive-year li:last-child { border-bottom: none; }
.archive-year time { color: var(--text-muted); font-size: 0.78rem; flex-shrink: 0; }
.archive-year a { color: var(--text-secondary); font-size: 0.9rem; }
.archive-year a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   GALLERY PAGE
   ═══════════════════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}
.gallery-item {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.35s;
  animation: fadeInUp 0.5s ease-out both;
  position: relative;
}
.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:hover {
  transform: translateY(-4px);
  border-color: rgba(180,142,212,0.3);
  box-shadow: 0 10px 36px rgba(0,0,0,0.3), var(--glow);
}
.gallery-item::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-img-wrap {
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-glass);
}
.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.gallery-item:hover .gallery-img-wrap img { transform: scale(1.08); }
.gallery-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--accent-gradient);
  opacity: 0.15;
}
.gallery-info { padding: 0.85rem 1rem; }
.gallery-info h3 { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--text); }
.gallery-info p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery-link { position: absolute; inset: 0; z-index: 1; }

/* ═══════════════════════════════════════════════════════
   GUESTBOOK PAGE
   ═══════════════════════════════════════════════════════ */
.guestbook-page {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.guestbook-form-wrap {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease-out;
}
.guestbook-form-wrap::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.5;
}
.guestbook-form-wrap h3 {
  font-size: 1rem;
  font-family: var(--font-display);
  margin-bottom: 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.guestbook-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.guestbook-form input,
.guestbook-form textarea {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  background: var(--bg-glass);
  color: var(--text);
  outline: none;
  transition: all 0.25s;
}
.guestbook-form input:focus,
.guestbook-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}
.guestbook-form input::placeholder,
.guestbook-form textarea::placeholder { color: var(--text-muted); }
.guestbook-form textarea { resize: vertical; min-height: 80px; }
.guestbook-form .form-row { display: flex; gap: 0.75rem; }
.guestbook-form .form-row input { flex: 1; }

.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.guestbook-item {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  animation: fadeInUp 0.4s ease-out both;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.guestbook-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.3;
}
.guestbook-item:hover {
  border-color: rgba(180,142,212,0.2);
}
.guestbook-item-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}
.guestbook-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.guestbook-nick { font-weight: 600; font-size: 0.88rem; color: var(--text); }
.guestbook-time { font-size: 0.72rem; color: var(--text-muted); margin-left: auto; }
.guestbook-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  padding-left: calc(32px + 0.6rem);
}
.guestbook-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2.5rem;
  font-size: 0.88rem;
}
.guestbook-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════
   ABOUT / CUSTOM PAGE
   ═══════════════════════════════════════════════════════ */
.page-content {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
.page-content::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0.5;
}
.page-content h1 { font-size: 1.5rem; margin-bottom: 1.25rem; }

/* ═══════════════════════════════════════════════════════
   404
   ═══════════════════════════════════════════════════════ */
.page-404 { text-align: center; padding: 4rem 0; }
.page-404 h1 {
  font-size: 4rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-404 p { color: var(--text-muted); margin: 0.75rem 0 1.5rem; }

/* ═══════════════════════════════════════════════════════
   LOGIN
   ═══════════════════════════════════════════════════════ */
.login-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease-out;
}
.login-form {
  background: var(--bg-card);
  backdrop-filter: var(--blur-heavy);
  -webkit-backdrop-filter: var(--blur-heavy);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: fadeInUp 0.5s ease-out;
  overflow: hidden;
}
.login-form::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-gradient);
}
.login-form h1 {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}
.login-form input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
  background: var(--bg-glass);
  color: var(--text);
  outline: none;
  transition: all 0.3s;
}
.login-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.login-form input::placeholder { color: var(--text-muted); }
.login-hint { text-align: center; font-size: 0.72rem; color: var(--text-muted); margin-top: 0.75rem; }

/* ═══════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-glass);
  color: var(--text);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}
.btn:hover { background: var(--bg-glass-hover); border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 500;
}
.btn-primary:hover { background: #a07cc4; color: #fff; box-shadow: var(--glow); }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.78rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { color: var(--danger); background: none; border: none; cursor: pointer; font-size: 0.78rem; padding: 0; }
.btn-danger:hover { opacity: 0.7; }

/* ═══════════════════════════════════════════════════════
   ADMIN LAYOUT
   ═══════════════════════════════════════════════════════ */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 5rem);
}
.admin-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
}
.admin-top-bar h1 { font-size: 1.1rem; font-family: var(--font-display); }
.admin-top-bar .nav-links { display: flex; gap: 1rem; }
.admin-top-bar .nav-links a { font-size: 0.82rem; color: var(--text-secondary); }
.admin-top-bar .nav-links a:hover { color: var(--accent); }

.admin-sidebar-nav {
  width: 180px;
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  flex-shrink: 0;
  background: rgba(20, 18, 35, 0.45);
  backdrop-filter: var(--blur);
}
.admin-sidebar-nav nav { display: flex; flex-direction: column; }
.admin-sidebar-nav a {
  display: block;
  padding: 0.55rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
  transition: all 0.25s;
  border-left: 2px solid transparent;
}
.admin-sidebar-nav a:hover { color: var(--text); background: var(--bg-glass); }
.admin-sidebar-nav a.active { color: var(--accent); background: var(--accent-light); border-left-color: var(--accent); font-weight: 500; }
.admin-main-content { flex: 1; padding: 1.5rem 2rem; max-width: 100%; }

/* Admin Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.4s ease-out both;
  transition: all 0.3s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent-gradient); }
.stat-num {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.15rem; text-transform: uppercase; letter-spacing: 0.05em; }

.admin-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.admin-actions h2 { font-size: 1rem; }

/* Admin Table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.admin-table th {
  text-align: left;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-glass);
}
.admin-table td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.admin-table td a { color: var(--text); }
.admin-table td a:hover { color: var(--accent); }
.admin-table .actions { display: flex; gap: 0.6rem; align-items: center; }
.badge {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 500;
}
.badge-published { background: rgba(129,199,132,0.15); color: var(--success); border: 1px solid rgba(129,199,132,0.3); }
.badge-draft { background: rgba(255,213,79,0.15); color: var(--warning); border: 1px solid rgba(255,213,79,0.3); }

/* ═══════════════════════════════════════════════════════
   EDITOR
   ═══════════════════════════════════════════════════════ */
.editor-page { max-width: 860px; }
.editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.editor-header h1 { font-size: 1.1rem; }
.editor-actions { display: flex; gap: 0.6rem; }
.editor-title {
  width: 100%;
  font-size: 1.35rem;
  font-weight: 600;
  border: none;
  border-bottom: 2px solid var(--border);
  padding: 0.65rem 0;
  margin-bottom: 1.25rem;
  outline: none;
  background: transparent;
  color: var(--text);
  transition: border-color 0.3s;
}
.editor-title:focus { border-bottom-color: var(--accent); }
.editor-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.editor-meta-row input,
.editor-form textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  outline: none;
  background: var(--bg-glass);
  color: var(--text);
  transition: all 0.25s;
}
.editor-meta-row input:focus,
.editor-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
.editor-meta-row input::placeholder,
.editor-form textarea::placeholder { color: var(--text-muted); }
.editor-form textarea { resize: vertical; margin-bottom: 0.85rem; }
.editor-toolbar {
  display: flex;
  gap: 0.1rem;
  padding: 0.4rem;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.editor-toolbar button {
  padding: 0.3rem 0.55rem;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 2px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.editor-toolbar button:hover { background: var(--bg-glass-hover); color: var(--accent); }
.editor-content-wrap textarea,
.editor-content-wrap #post-preview {
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 1.15rem;
  min-height: 360px;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  line-height: 1.7;
}
.editor-content-wrap textarea {
  width: 100%;
  border-radius: var(--radius-sm);
  resize: vertical;
  background: var(--bg-glass);
  color: var(--text);
}
#post-preview { background: var(--bg-card); overflow-y: auto; max-height: 560px; }

/* ═══════════════════════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════════════════════ */
.settings-page { max-width: 600px; }
.settings-page h1 { font-size: 1.1rem; margin-bottom: 1.5rem; }
.settings-form { display: flex; flex-direction: column; gap: 1.1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 500; }
.form-group input, .form-group textarea {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  outline: none;
  background: var(--bg-glass);
  color: var(--text);
  transition: all 0.25s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
.form-group input::placeholder { color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.form-actions { margin-top: 0.4rem; }

.empty { text-align: center; color: var(--text-muted); padding: 2.5rem; font-size: 0.88rem; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .content::before { left: 0; }
  .content-inner { padding: 1.25rem; }
  .home-layout { grid-template-columns: 1fr; }
  .home-sidebar-sticky { position: static; }
  .admin-layout { margin-left: 0; }
  .admin-sidebar-nav { display: none; }
  .sticker, .sparkle { display: none; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .mobile-nav-toggle {
    display: flex !important;
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 200;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text);
  }
  .sidebar.mobile-open {
    display: flex;
    width: 280px;
    z-index: 150;
    animation: slideInLeft 0.3s ease-out;
  }
}
@media (min-width: 901px) {
  .mobile-nav-toggle { display: none !important; }
}
