/* ============================================================
   Sherry 博客前台样式
   主题：CSS 变量 + 深浅双主题 + 移动端适配
   ============================================================ */

/* ---------- 变量 ---------- */
:root {
    --bg: #f3f5fb;
    --bg-soft: #e9edf7;
    --card: rgba(255, 255, 255, 0.66);
    --card-solid: #ffffff;
    --card-border: rgba(255, 255, 255, 0.6);
    --text: #2a3040;
    --text-soft: #4c5468;
    --muted: #77809a;
    --primary: #6a5cff;
    --primary-2: #3f8cff;
    --accent: #ff6b9d;
    --border: rgba(120, 132, 175, 0.16);
    --shadow: 0 8px 32px rgba(60, 70, 120, 0.12);
    --shadow-hover: 0 18px 48px rgba(60, 70, 120, 0.2);
    --header-bg: rgba(255, 255, 255, 0.6);
    --input-bg: rgba(255, 255, 255, 0.5);
    --code-bg: #171d33;
    --code-head-bg: #1f2743;
    --inline-code-bg: rgba(106, 92, 255, 0.1);
    --inline-code-color: #5646d6;
    --scroll-thumb: #c3cadf;
    --veil: linear-gradient(180deg, rgba(240, 243, 250, 0.72) 0%, rgba(238, 241, 249, 0.8) 55%, rgba(240, 243, 250, 0.88) 100%);
    --glass-blur: blur(18px) saturate(160%);
}

[data-theme="dark"] {
    --bg: #0d1020;
    --bg-soft: #11152a;
    --card: rgba(19, 24, 46, 0.6);
    --card-solid: #151a31;
    --card-border: rgba(255, 255, 255, 0.09);
    --text: #e6eaf8;
    --text-soft: #b6bdd6;
    --muted: #818aa8;
    --primary: #8b7dff;
    --primary-2: #5aa2ff;
    --accent: #ff7fae;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 18px 46px rgba(0, 0, 0, 0.55);
    --header-bg: rgba(12, 15, 30, 0.55);
    --input-bg: rgba(255, 255, 255, 0.06);
    --inline-code-bg: rgba(139, 125, 255, 0.14);
    --inline-code-color: #b4aaff;
    --scroll-thumb: #333c5e;
    --veil: linear-gradient(180deg, rgba(9, 12, 26, 0.68) 0%, rgba(9, 12, 26, 0.74) 55%, rgba(9, 12, 26, 0.82) 100%);
}

/* 不支持 backdrop-filter 的浏览器：提高遮罩与卡片不透明度兜底 */
@supports not (backdrop-filter: blur(1px)) {
    :root { --card: rgba(255, 255, 255, 0.94); --header-bg: rgba(255, 255, 255, 0.96); --veil: linear-gradient(180deg, rgba(243,245,251,0.96), rgba(243,245,251,0.98)); }
    [data-theme="dark"] { --card: rgba(19, 24, 46, 0.96); --header-bg: rgba(12, 15, 30, 0.96); --veil: linear-gradient(180deg, rgba(9,12,26,0.94), rgba(9,12,26,0.97)); }
}

/* ---------- 背景舞台：幻灯片 + 遮罩 + 粒子特效 ---------- */
.bg-stage {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--bg);
}
.bg-slide {
    position: absolute;
    inset: -30px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1.6s ease;
    will-change: opacity, transform;
}
.bg-slide.active {
    opacity: 1;
    animation: kenburns 22s ease-in-out infinite alternate;
}
@keyframes kenburns {
    from { transform: scale(1.03) translate(0, 0); }
    to { transform: scale(1.13) translate(-1.6%, -1.2%); }
}
.bg-veil {
    position: absolute;
    inset: 0;
    background: var(--veil);
}
.bg-fx {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .bg-slide.active { animation: none; }
}

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

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 15.5px;
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

/* 背景装饰光斑 */
body::before {
    content: "";
    position: fixed;
    top: -180px; right: -120px;
    width: 460px; height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(106, 92, 255, 0.14), transparent 65%);
    pointer-events: none;
    z-index: 0;
}
body::after {
    content: "";
    position: fixed;
    bottom: -160px; left: -140px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(63, 140, 255, 0.12), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

img { max-width: 100%; }

::selection { background: rgba(106, 92, 255, 0.28); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 6px; }

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

main.container { min-height: calc(100vh - 260px); padding-top: 28px; padding-bottom: 56px; }

/* ---------- 顶部导航 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(22px) saturate(170%);
    -webkit-backdrop-filter: blur(22px) saturate(170%);
    border-bottom: 1px solid var(--card-border);
    transition: box-shadow 0.25s;
}
.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
    display: flex;
    align-items: center;
    gap: 22px;
    height: 62px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    white-space: nowrap;
}
.logo:hover { color: var(--text); }
.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(106, 92, 255, 0.35);
}
.logo-mark i { font-size: 19px; line-height: 1; }
.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
}
.logo-text { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.main-nav > a {
    padding: 7px 13px;
    border-radius: 9px;
    color: var(--text-soft);
    font-size: 14.5px;
    transition: all 0.2s;
}
.main-nav > a:hover { color: var(--primary); background: rgba(106, 92, 255, 0.08); }
.main-nav > a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 3px 10px rgba(106, 92, 255, 0.3);
}

.nav-search {
    display: flex;
    align-items: center;
    margin-left: 8px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 9px;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}
.nav-search:focus-within { border-color: var(--primary); background: var(--card-solid); }
.nav-search input {
    border: none;
    outline: none;
    background: transparent;
    padding: 6px 10px;
    width: 120px;
    font-size: 13.5px;
    color: var(--text);
}
.nav-search button {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px 9px;
    font-size: 15px;
    color: var(--muted);
}
.nav-search button:hover { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    cursor: pointer;
    font-size: 15px;
    color: var(--text-soft);
    transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.icon-btn i { font-size: 18px; line-height: 1; }
.theme-toggle i { transition: transform 0.4s ease; }
.theme-toggle:hover i { transform: rotate(30deg); }

/* 汉堡按钮（移动端显示） */
.nav-toggle { display: none; flex-direction: column; gap: 4px; }
.nav-toggle span {
    display: block;
    width: 16px; height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Flash 提示 ---------- */
.flash-msg {
    position: fixed;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    padding: 11px 22px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: var(--shadow-hover);
    animation: flashIn 0.35s ease, flashOut 0.4s ease 3.6s forwards;
    max-width: min(90vw, 460px);
    text-align: center;
}
.flash-ok { background: rgba(16, 185, 129, 0.92); color: #fff; }
.flash-error { background: rgba(239, 68, 68, 0.92); color: #fff; }
.flash-msg { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
@keyframes flashIn { from { opacity: 0; transform: translate(-50%, -12px); } }
@keyframes flashOut { to { opacity: 0; visibility: hidden; } }

/* ---------- Hero ---------- */
.hero { position: relative; margin-bottom: 30px; z-index: 1; }

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    gap: 20px;
    z-index: 1;
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

/* 左半：名片 */
.hero-card.profile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 30px 34px;
}
.profile-top { display: flex; align-items: center; gap: 20px; min-width: 0; }
.profile-txt { flex: 1; min-width: 0; }
.profile-txt .hero-sub {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.profile-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* 右半：音乐播放器 */
.player-card { display: flex; }
.music-player {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 20px 22px 16px;
}
.music-player { position: relative; }
.mp-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
.mp-badge {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #b9aaff;
    border: 1px solid rgba(139, 125, 255, 0.45);
    background: rgba(139, 125, 255, 0.1);
    padding: 3px 10px;
    border-radius: 6px;
}
[data-theme="light"] .mp-badge { color: #6a5cd6; border-color: rgba(106, 92, 214, 0.35); background: rgba(106, 92, 214, 0.08); }
.mp-head-right { display: flex; align-items: center; gap: 9px; }
.mp-count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mp-list-btn {
    width: 27px; height: 27px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text-soft);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.mp-list-btn:hover, .mp-list-btn.active { border-color: var(--primary); color: var(--primary); }
.mp-body { display: flex; align-items: center; gap: 17px; }
.mp-disc {
    position: relative;
    flex-shrink: 0;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    overflow: hidden;
    animation: disc-spin 9s linear infinite;
    animation-play-state: paused;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28), 0 0 0 4px var(--card-border);
}
.mp-disc.playing { animation-play-state: running; }
.mp-disc img { width: 100%; height: 100%; object-fit: cover; }
.mp-disc::after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--card-solid);
    box-shadow: inset 0 0 0 3px var(--accent);
}
@keyframes disc-spin { to { transform: rotate(360deg); } }
.mp-ctrl { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-song { flex: 1; min-width: 0; }
.mp-song b {
    display: block;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;
}
.mp-song span { font-size: 12.5px; color: var(--muted); }
.mp-line {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 16px 0 14px;
    font-size: 11px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.mp-progress {
    flex: 1;
    height: 5px;
    border-radius: 999px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    cursor: pointer;
    overflow: hidden;
}
.mp-progress:hover { height: 7px; }
.mp-progress i {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.12s linear;
}
.mp-buttons { display: flex; align-items: center; justify-content: center; gap: 17px; margin-top: 2px; }
.mp-buttons button {
    width: 35px; height: 35px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text-soft);
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.mp-buttons button:hover { border-color: var(--primary); color: var(--primary); transform: scale(1.08); }
.mp-buttons .mp-play {
    width: 46px; height: 46px;
    border: none;
    background: linear-gradient(135deg, #8b7dff, #6a5cff);
    color: #fff;
    font-size: 15px;
    box-shadow: 0 6px 18px rgba(122, 108, 255, 0.5);
}
.mp-buttons .mp-play:hover { color: #fff; transform: scale(1.09); box-shadow: 0 8px 24px rgba(122, 108, 255, 0.6); }
.mp-list {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 20;
    list-style: none;
    margin: 0;
    padding: 9px;
    border-radius: 13px;
    background: var(--card-solid);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-hover);
    max-height: 168px;
    overflow-y: auto;
    animation: mpListIn 0.2s ease;
}
@keyframes mpListIn { from { opacity: 0; transform: translateY(8px); } }
.mp-list li {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 5px 9px;
    border-radius: 8px;
    font-size: 12.8px;
    color: var(--text-soft);
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: background 0.15s;
}
.mp-list li i { font-style: normal; color: var(--muted); flex-shrink: 0; }
.mp-list li em { font-style: normal; color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.mp-list li:hover { background: var(--input-bg); }
.mp-list li.current { color: var(--primary); background: rgba(106, 92, 255, 0.09); font-weight: 600; }
.mp-list li.current i { color: var(--primary); }
.mp-empty {
    text-align: center;
    color: var(--text-soft);
    padding: 30px 12px;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 2;
}
.mp-empty span { font-size: 12px; font-weight: 400; color: var(--muted); }

.hero-blobs i {
    position: absolute;
    border-radius: 50%;
    filter: blur(52px);
    opacity: 0.5;
    animation: blobFloat 9s ease-in-out infinite alternate;
}
.hero-blobs .b1 { width: 240px; height: 240px; background: rgba(106, 92, 255, 0.35); top: -80px; right: 6%; }
.hero-blobs .b2 { width: 200px; height: 200px; background: rgba(63, 140, 255, 0.3); bottom: -90px; right: 26%; animation-delay: -3s; }
.hero-blobs .b3 { width: 150px; height: 150px; background: rgba(255, 107, 157, 0.28); top: -30px; left: 30%; animation-delay: -6s; }
@keyframes blobFloat {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(26px, -20px) scale(1.12); }
}

.hero-avatar { position: relative; flex-shrink: 0; z-index: 1; }
.hero-avatar img,
.hero-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px; height: 84px;
    border-radius: 24%;
    object-fit: cover;
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 2px rgba(139, 125, 255, 0.35), 0 0 18px rgba(106, 92, 255, 0.5), 0 10px 26px rgba(106, 92, 255, 0.35);
}

.hero-info { position: relative; z-index: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.hero-title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, "Times New Roman", serif;
}

.hero-sub { color: var(--text-soft); margin: 7px 0 18px; font-size: 15px; }

.hero-stats { display: flex; align-items: center; gap: 18px; }
.hero-stats .stat { text-align: center; min-width: 34px; }
.hero-stats b {
    display: block;
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-stats .stat:nth-child(5n+1) b { background-image: linear-gradient(135deg, #ff7fae, #ff9ec3); }
.hero-stats .stat:nth-child(5n+2) b { background-image: linear-gradient(135deg, #a78bff, #c4b0ff); }
.hero-stats .stat:nth-child(5n+3) b { background-image: linear-gradient(135deg, #ff8a9d, #ffb3c0); }
.hero-stats .stat:nth-child(5n+4) b { background-image: linear-gradient(135deg, #6fb6ff, #9cd0ff); }
.hero-stats .stat:nth-child(5n+5) b { background-image: linear-gradient(135deg, #ffc36b, #ffd89c); }
.hero-stats span { font-size: 11.5px; color: var(--muted); }
.profile-social { display: flex; align-items: center; gap: 9px; }
.profile-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 37px; height: 37px;
    border-radius: 50%;
    color: var(--text-soft);
    background: var(--input-bg);
    border: 1px solid var(--border);
    transition: all 0.22s;
}
.profile-social a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(106, 92, 255, 0.35);
}

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 11px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(106, 92, 255, 0.32);
    transition: all 0.22s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(106, 92, 255, 0.42); color: #fff; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: 11px;
    border: 1.5px solid var(--border);
    color: var(--text-soft);
    font-size: 14px;
    font-weight: 600;
    background: var(--input-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.22s;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ---------- 布局 ---------- */
.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 296px;
    gap: 28px;
    align-items: start;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 18px;
}
.section-head h2 { font-size: 19px; font-weight: 700; }
.section-head h2 i { color: var(--primary); margin-right: 3px; vertical-align: -2px; }
.section-sub { color: var(--muted); font-size: 13px; }

/* ---------- 通用卡片（磨砂玻璃） ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
}

/* ---------- 文章卡片 ---------- */
.post-list { display: flex; flex-direction: column; gap: 18px; }

.post-card { padding: 22px 26px; overflow: hidden; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

/* 卡片封面图 */
.post-card-cover {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 8;
    margin-bottom: 15px;
    background: var(--bg-soft);
}
.post-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}
.post-card:hover .post-card-cover img { transform: scale(1.045); }

.post-card-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 10px;
}

.cat-badge {
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(106, 92, 255, 0.1);
    border: 1px solid rgba(106, 92, 255, 0.18);
    transition: all 0.2s;
}
.cat-badge:hover { background: var(--primary); color: #fff; }

.top-badge {
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #e8590c;
    background: rgba(255, 128, 40, 0.12);
    border: 1px solid rgba(255, 128, 40, 0.25);
}

.post-date { margin-left: auto; color: var(--muted); font-size: 12.5px; }

.post-card-title { font-size: 18.5px; font-weight: 700; line-height: 1.45; margin-bottom: 9px; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--primary); }

.post-card-summary {
    color: var(--text-soft);
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed var(--border);
    padding-top: 13px;
}
.foot-meta { display: flex; gap: 16px; color: var(--muted); font-size: 13px; }
.read-more { font-size: 13.5px; font-weight: 600; }

/* ---------- 空状态 ---------- */
.empty-card { padding: 54px 20px; text-align: center; color: var(--muted); }
.empty-emoji { font-size: 42px; margin-bottom: 10px; }

/* ---------- 侧边栏 ---------- */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 84px; }

.side-card {
    padding: 20px 22px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.side-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.side-title i { color: var(--primary); margin-right: 4px; vertical-align: -2px; }

/* 个人卡片 */
.profile-card { text-align: center; overflow: hidden; position: relative; }
.profile-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 74px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2) 55%, var(--accent));
}
.profile-avatar {
    position: relative;
    width: 74px; height: 74px;
    margin: 34px auto 12px;
    border-radius: 50%;
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px var(--card), 0 0 0 5px rgba(106, 92, 255, 0.55);
}
.profile-avatar img {
    position: absolute;
    inset: 3px;
    width: calc(100% - 6px);
    height: calc(100% - 6px);
    border-radius: 50%;
    object-fit: cover;
}
.avatar-fallback {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.profile-avatar img:not([src=""]) + .avatar-fallback,
.profile-avatar img + .avatar-fallback { display: none; }

.profile-name { font-size: 17px; font-weight: 700; }
.profile-sub { color: var(--muted); font-size: 12.8px; margin: 5px 0 15px; }

.profile-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    margin-bottom: 13px;
}
.profile-stats div { border-right: 1px solid var(--border); }
.profile-stats div:last-child { border-right: none; }
.profile-stats b { display: block; font-size: 15.5px; font-weight: 800; color: var(--primary); }
.profile-stats span { font-size: 11.5px; color: var(--muted); }

.profile-social { display: flex; justify-content: center; gap: 12px; }
.profile-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    color: var(--text-soft);
    background: var(--input-bg);
    transition: all 0.22s;
}
.profile-social a:hover { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); transform: translateY(-2px); }

/* 侧栏分类 */
.side-cats { list-style: none; }
.side-cats li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 2px;
    border-bottom: 1px dashed var(--border);
}
.side-cats li:last-child { border-bottom: none; }
.side-cats a { color: var(--text-soft); font-size: 13.8px; }
.side-cats a:hover { color: var(--primary); }
.side-cats .count {
    font-size: 11.5px;
    color: var(--muted);
    background: var(--input-bg);
    border-radius: 999px;
    padding: 1px 9px;
}

/* 侧栏标签 */
.side-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--text-soft);
    background: var(--input-bg);
    border: 1px solid var(--border);
    transition: all 0.2s;
}
.tag-pill i { font-style: normal; color: var(--muted); font-size: 11px; }
.tag-pill:hover { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; transform: translateY(-1px); }
.tag-pill:hover i { color: rgba(255, 255, 255, 0.8); }

/* 侧栏最新文章 */
.side-recent { list-style: none; }
.side-recent li { padding: 7px 2px; border-bottom: 1px dashed var(--border); }
.side-recent li:last-child { border-bottom: none; }
.side-recent a {
    display: block;
    color: var(--text-soft);
    font-size: 13.5px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.side-recent a:hover { color: var(--primary); }
.side-recent time { font-size: 11.5px; color: var(--muted); }

/* ---------- 页头（内页标题） ---------- */
.page-head { text-align: center; margin-bottom: 28px; }
.page-head h1 { font-size: 25px; font-weight: 800; margin-bottom: 7px; }
.page-head h1 i {
    font-size: 23px;
    margin-right: 4px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-head p { color: var(--muted); font-size: 13.8px; }

/* ---------- 搜索条 ---------- */
.search-bar {
    display: flex;
    gap: 12px;
    padding: 14px;
    margin-bottom: 20px;
}
.search-bar input {
    flex: 1;
    border: 1px solid var(--border);
    background: var(--input-bg);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14.5px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--primary); }

/* ---------- 分页 ---------- */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 30px;
}
.page-btn {
    min-width: 36px;
    padding: 7px 13px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-soft);
    font-size: 13.5px;
    transition: all 0.2s;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.current {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(106, 92, 255, 0.3);
}
.page-dots { align-self: center; color: var(--muted); }

/* ---------- 面包屑 ---------- */
.breadcrumb {
    max-width: 900px;
    margin: 0 auto 16px;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb em { font-style: normal; color: var(--text-soft); }

/* ---------- 文章页 ---------- */
.post-full { max-width: 900px; margin: 0 auto; padding: 36px 44px 30px; }

.post-title { font-size: 26px; font-weight: 800; line-height: 1.4; margin: 12px 0 13px; }

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 20px;
    color: var(--muted);
    font-size: 13px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.post-lead {
    margin-top: 18px;
    padding: 13px 18px;
    border-left: 3px solid var(--primary);
    border-radius: 0 10px 10px 0;
    background: var(--input-bg);
    color: var(--text-soft);
    font-size: 14px;
}

.post-cover {
    margin-top: 22px;
    border-radius: 14px;
    overflow: hidden;
    max-height: 460px;
    box-shadow: var(--shadow);
    background: var(--bg-soft);
}
.post-cover img {
    display: block;
    width: 100%;
    max-height: 460px;
    object-fit: cover;
}

.post-content { margin-top: 8px; }

.post-tags { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); }

.post-share-line { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* 上下篇 */
.post-adjacent {
    max-width: 900px;
    margin: 18px auto 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.adj-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 16px 20px;
}
.adj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.adj-card.next { text-align: right; }
.adj-label { font-size: 12px; color: var(--muted); }
.adj-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.adj-card:hover .adj-title { color: var(--primary); }
.adj-card.is-empty { visibility: hidden; }

/* 相关推荐 */
.related { max-width: 900px; margin: 30px auto 0; }
.related-title { font-size: 18px; font-weight: 700; margin-bottom: 15px; }
.related-title i { color: var(--primary); margin-right: 4px; vertical-align: -2px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.related-card { display: flex; flex-direction: column; gap: 8px; padding: 17px 20px; }
.related-card.has-thumb { flex-direction: row; align-items: center; gap: 14px; }
.related-thumb {
    flex-shrink: 0;
    width: 86px;
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-soft);
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.related-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.related-post-title {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-card:hover .related-post-title { color: var(--primary); }
.related-card time { font-size: 12px; color: var(--muted); }

/* ---------- Markdown 正文排版 ---------- */
.markdown-body { font-size: 15.5px; line-height: 1.85; color: var(--text); word-break: break-word; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
    font-weight: 700;
    margin: 30px 0 15px;
    line-height: 1.4;
}
.markdown-body h1 { font-size: 23px; }
.markdown-body h2 { font-size: 20px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.markdown-body h3 { font-size: 17px; }
.markdown-body h3::before { content: "✦ "; color: var(--primary); }
.markdown-body h4 { font-size: 15.5px; }
.markdown-body p { margin: 13px 0; }
.markdown-body a { border-bottom: 1px dashed var(--primary); }
.markdown-body ul, .markdown-body ol { padding-left: 26px; margin: 13px 0; }
.markdown-body li { margin: 5px 0; }
.markdown-body li::marker { color: var(--primary); font-weight: 600; }
.markdown-body blockquote {
    margin: 16px 0;
    padding: 12px 20px;
    border-left: 4px solid var(--accent);
    background: rgba(255, 107, 157, 0.06);
    border-radius: 0 10px 10px 0;
    color: var(--text-soft);
}
.markdown-body blockquote p { margin: 4px 0; }
.markdown-body code:not([class^="language-"]) {
    background: var(--inline-code-bg);
    color: var(--inline-code-color);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.88em;
    font-family: "JetBrains Mono", "Fira Code", Consolas, Monaco, monospace;
}
.markdown-body hr { border: none; border-top: 1px dashed var(--border); margin: 26px 0; }
.markdown-body img { border-radius: 12px; margin: 8px 0; box-shadow: var(--shadow); }
.markdown-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
    display: block;
    overflow-x: auto;
}
.markdown-body th, .markdown-body td {
    border: 1px solid var(--border);
    padding: 9px 14px;
    text-align: left;
}
.markdown-body th { background: var(--input-bg); font-weight: 600; }
.markdown-body tr:nth-child(2n) td { background: rgba(148, 163, 204, 0.05); }

/* ---------- 代码块 ---------- */
.markdown-body pre {
    position: relative;
    margin: 18px 0;
    border-radius: 13px;
    background: var(--code-bg);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}
.code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: var(--code-head-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.code-lang {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7f8bb5;
    font-family: "JetBrains Mono", Consolas, monospace;
}
.code-lang::before { content: "◈ "; color: #5c6b9e; }
.code-copy {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: transparent;
    color: #9aa6cf;
    font-size: 12px;
    padding: 3px 12px;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.code-copy:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.07); }
.code-copy.copied { color: #4ade80; border-color: rgba(74, 222, 128, 0.5); }

.markdown-body pre code {
    display: block;
    padding: 16px 18px;
    overflow-x: auto;
    background: transparent;
    color: #d6deeb;
    font-family: "JetBrains Mono", "Fira Code", Consolas, Monaco, "Courier New", monospace;
    font-size: 13.5px;
    line-height: 1.75;
    tab-size: 4;
}

/* Prism 语法高亮配色（深色代码底，两种主题通用） */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: #637099; font-style: italic; }
.token.punctuation { color: #8da1c9; }
.token.namespace { opacity: 0.75; }
.token.property, .token.tag, .token.constant, .token.symbol, .token.deleted { color: #f78ea3; }
.token.boolean, .token.number { color: #f2976c; }
.token.selector, .token.attr-name, .token.string, .token.char, .token.builtin, .token.inserted { color: #a8d08a; }
.token.operator, .token.entity, .token.url, .language-css .token.string, .style .token.string { color: #7bd3d0; }
.token.atrule, .token.attr-value, .token.keyword { color: #c792ea; }
.token.function, .token.class-name { color: #82aaff; }
.token.regex, .token.important, .token.variable { color: #ffcb6b; }
.token.important, .token.bold { font-weight: 700; }
.token.italic { font-style: italic; }

/* ---------- 评论 ---------- */
.comments { max-width: 900px; margin: 30px auto 0; padding: 26px 30px; }
.comments-title { font-size: 18px; font-weight: 700; margin-bottom: 18px; }
.comments-title i { color: var(--primary); margin-right: 4px; vertical-align: -2px; }
.comments-title em { font-style: normal; color: var(--primary); font-size: 14px; margin-left: 4px; }

.comment-list, .comment-children { list-style: none; }
.comment-item { padding: 13px 0; border-bottom: 1px dashed var(--border); }
.comment-item:last-child { border-bottom: none; }
.comment-children { margin: 12px 0 0 46px; padding-left: 14px; border-left: 2px solid var(--border); }
.comment-children .comment-item { border-bottom: none; padding: 9px 0; }

.comment-main { display: flex; gap: 13px; }
.comment-avatar {
    flex-shrink: 0;
    width: 38px; height: 38px;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: baseline; gap: 11px; }
.comment-name { font-weight: 600; font-size: 14px; color: var(--text); }
.comment-head time { font-size: 12px; color: var(--muted); }
.comment-text { margin: 6px 0; font-size: 14.2px; color: var(--text-soft); white-space: pre-wrap; word-break: break-word; }
.comment-reply-btn {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    cursor: pointer;
    padding: 0;
}
.comment-reply-btn:hover { color: var(--primary); }
.comments-empty { text-align: center; color: var(--muted); padding: 18px 0 6px; }
.comments-closed { text-align: center; color: var(--muted); padding-top: 14px; border-top: 1px dashed var(--border); }

.comment-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.comment-form-head {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 10px;
}
.comment-form-head button { border: none; background: transparent; color: var(--accent); cursor: pointer; font-size: 12.5px; }
.comment-form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-bottom: 11px; }
.comment-form input, .comment-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13.8px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--primary); }
.comment-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.comment-tip { font-size: 12.3px; color: var(--muted); }

/* ---------- 归档 ---------- */
.archive { max-width: 900px; margin: 0 auto; padding: 30px 36px; }
.archive-year { margin-bottom: 10px; }
.year-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 9px;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.year-badge em { font-style: normal; font-size: 12.5px; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.archive-list { list-style: none; border-left: 2px solid var(--border); margin-left: 7px; }
.archive-list li {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 8px 0 8px 24px;
}
.archive-list li::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--card-solid);
    border: 2.5px solid var(--primary);
    transition: all 0.2s;
}
.archive-list li:hover::before { background: var(--primary); box-shadow: 0 0 0 4px rgba(106, 92, 255, 0.18); }
.archive-list time { flex-shrink: 0; font-size: 12.8px; color: var(--muted); font-family: Consolas, monospace; }
.archive-list a { color: var(--text-soft); font-size: 14.5px; }
.archive-list a:hover { color: var(--primary); }

/* ---------- 分类汇总 ---------- */
.cate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 17px;
    max-width: 900px;
    margin: 0 auto;
}
.cate-card { display: flex; align-items: center; gap: 18px; padding: 22px 26px; }
.cate-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cate-icon {
    flex-shrink: 0;
    width: 54px; height: 54px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: var(--input-bg);
    color: var(--primary);
}
.cate-icon i { font-size: 27px; }
.cate-info { min-width: 0; }
.cate-info h3 { font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.cate-info .count { font-size: 12px; color: var(--primary); background: rgba(106, 92, 255, 0.1); padding: 2px 10px; border-radius: 999px; font-weight: 600; }
.cate-info p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 标签云 ---------- */
.tag-cloud {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 34px;
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    align-items: center;
}
.cloud-tag {
    padding: 6px 16px;
    border-radius: 999px;
    color: var(--text-soft);
    background: var(--input-bg);
    border: 1px solid var(--border);
    font-weight: 600;
    transition: all 0.2s;
}
.cloud-tag i { font-style: normal; font-size: 11.5px; color: var(--muted); margin-left: 4px; }
.cloud-tag:hover { color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); border-color: transparent; transform: translateY(-2px); }
.cloud-tag:hover i { color: rgba(255, 255, 255, 0.85); }

/* ---------- 友链 ---------- */
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 17px;
    max-width: 900px;
    margin: 0 auto;
}
.link-card { display: flex; align-items: center; gap: 16px; padding: 19px 24px; }
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.link-avatar {
    flex-shrink: 0;
    width: 46px; height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
}
.link-info { min-width: 0; }
.link-info b { font-size: 15px; color: var(--text); }
.link-card:hover .link-info b { color: var(--primary); }
.link-info p { font-size: 12.8px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 关于 ---------- */
.about-card { max-width: 900px; margin: 0 auto; padding: 34px 40px; }

/* ---------- 404 ---------- */
.notfound { max-width: 560px; margin: 40px auto; padding: 60px 30px; text-align: center; }
.notfound-code {
    font-size: 88px;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.notfound-msg { font-size: 18px; font-weight: 700; margin: 18px 0 6px; }
.notfound-tip { color: var(--muted); font-size: 13.8px; margin-bottom: 24px; }
.notfound-actions { display: flex; justify-content: center; gap: 13px; }

/* ---------- 页脚 ---------- */
.site-footer {
    border-top: 1px solid var(--card-border);
    background: var(--card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 26px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.footer-love { color: var(--text-soft); font-size: 14px; margin-bottom: 6px; }
.footer-meta { color: var(--muted); font-size: 12.8px; }
.footer-icp { line-height: 1.9; }
.footer-icp a { margin: 0 4px; }
.footer-meta .uptime { color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.footer-meta a { color: var(--muted); }
.footer-meta a:hover { color: var(--primary); }
.footer-meta .dot { margin: 0 7px; opacity: 0.5; }

/* ---------- 左侧悬浮导航栏（桌面端，贴边隐藏） ---------- */
.side-dock-wrap {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 90;
}
/* 扩大鼠标感应区（贴近左缘即触发） */
.side-dock-wrap::before {
    content: "";
    position: absolute;
    left: 0;
    top: -160px;
    bottom: -160px;
    width: 36px;
}
.side-dock {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate3d(-110%, -50%, 0);
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--card-border);
    border-left: none;
    border-radius: 0 16px 16px 0;
    box-shadow: var(--shadow-hover);
    white-space: nowrap;
    opacity: 0;
    will-change: transform, opacity;
    transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
    pointer-events: none;
}
[data-theme="dark"] .side-dock { background: rgba(24, 29, 52, 0.97); }
.side-dock-wrap:hover .side-dock,
.side-dock-wrap.open .side-dock,
.side-dock-wrap:focus-within .side-dock {
    transform: translate3d(0, -50%, 0);
    opacity: 1;
    pointer-events: auto;
}
.dock-item {
    display: block;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.dock-item:hover { background: rgba(106, 92, 255, 0.12); color: var(--primary); }
.side-dock-handle {
    position: relative;
    z-index: 1;
    width: 9px;
    padding: 24px 0;
    border: none;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
    opacity: 0.55;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
}
.side-dock-wrap:hover .side-dock-handle { opacity: 1; }
.side-dock-handle i {
    display: block;
    width: 3px;
    height: 26px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.88);
}
/* 欢迎卡片（点击 dock 欢迎图标弹出） */
.welcome-card {
    position: fixed;
    left: 74px;
    top: 50%;
    transform: translateY(-50%) scale(0.92);
    z-index: 91;
    width: 230px;
    padding: 18px 20px;
    border-radius: 14px;
    background: var(--card-solid);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-hover);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
    cursor: default;
}
.welcome-card.show {
    opacity: 1;
    transform: translateY(-50%) scale(1);
    pointer-events: auto;
}
.wc-hello { font-size: 14px; font-weight: 700; margin-bottom: 9px; }
.wc-heart { font-style: normal; color: #ff7fae; }
.wc-date, .wc-week { font-size: 13.5px; color: var(--text-soft); margin-bottom: 6px; }
.wc-fortune {
    margin-top: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    color: var(--text-soft);
    border-bottom: 1px dashed var(--border);
    padding-bottom: 6px;
    transition: color 0.2s;
    user-select: none;
}
.wc-fortune:hover { color: var(--primary); }
.wc-fortune.drawn { cursor: default; border-bottom: none; padding-bottom: 0; }
/* 运势等级配色 */
.wc-r0 { color: #ff5c8a; }   /* 大吉 · 红粉 */
.wc-r1 { color: #ff9d5c; }   /* 中吉 · 橙 */
.wc-r2 { color: #4cc38a; }   /* 小吉 · 绿 */
.wc-r3 { color: #5aa2ff; }   /* 吉 · 蓝 */
.wc-r4 { color: #ff7fae; }   /* 末吉 · 粉（参考图） */
.wc-r5 { color: #9aa3bd; }   /* 凶 · 灰 */

@media (max-width: 860px) {
    .side-dock-wrap { display: none; }
    .welcome-card { display: none; }
}

/* ---------- 回到顶部 ---------- */
.back-top {
    position: fixed;
    right: 26px;
    bottom: 30px;
    width: 44px; height: 44px;
    border-radius: 13px;
    border: 1px solid var(--card-border);
    background: var(--card);
    color: var(--primary);
    font-size: 19px;
    cursor: pointer;
    box-shadow: var(--shadow);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.28s;
    z-index: 90;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; transform: translateY(-3px); }

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 1024px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .post-full { padding: 28px 26px; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-card.profile { padding: 30px 24px 26px; }
}

@media (max-width: 768px) {
    body { font-size: 15px; }

    .header-inner { gap: 12px; }
    .logo-text { font-size: 16px; }

    /* 移动端导航抽屉 */
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: absolute;
        top: 62px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 18px 16px;
        background: var(--header-bg);
        backdrop-filter: blur(24px) saturate(170%);
        -webkit-backdrop-filter: blur(24px) saturate(170%);
        border-bottom: 1px solid var(--card-border);
        box-shadow: var(--shadow-hover);
        display: none;
    }
    .main-nav.open { display: flex; }
    .main-nav > a { padding: 11px 14px; font-size: 15px; }
    .nav-search { margin: 8px 0 0; }
    .nav-search input { width: 100%; flex: 1; }

    .hero-card.profile { padding: 24px 18px; gap: 18px; }
    .profile-top { gap: 14px; }
    .hero-avatar img, .hero-avatar-fallback { width: 66px; height: 66px; }
    .hero-title { font-size: 20px; }
    .hero-stats { gap: 12px; }
    .profile-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
    /* 手机端隐藏音乐卡片（仅桌面端展示） */
    .player-card, .player-card * { display: none !important; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 22px; }
    .hero-sub { font-size: 14px; }
    .hero-stats { justify-content: center; gap: 8px 24px; }
    .hero-actions { justify-content: center; }

    .post-card { padding: 18px 18px; }
    .post-card-title { font-size: 16.5px; }
    .post-title { font-size: 21px; }

    .post-adjacent { grid-template-columns: 1fr; }
    .adj-card.is-empty { display: none; }
    .adj-card.next { text-align: left; }
    .related-grid { grid-template-columns: 1fr; }
    .cate-grid { grid-template-columns: 1fr; }
    .links-grid { grid-template-columns: 1fr; }

    .comment-form-row { grid-template-columns: 1fr; gap: 9px; }
    .comment-form-foot { flex-direction: column-reverse; align-items: stretch; }
    .comment-form-foot .btn-primary { justify-content: center; }
    .comment-children { margin-left: 20px; }

    .post-full, .comments, .archive { padding: 22px 18px; }
    .about-card { padding: 24px 20px; }
    .archive { padding: 22px 18px; }
    .archive-list li { gap: 10px; flex-wrap: wrap; }

    .flash-msg { width: max-content; max-width: 88vw; }
}

@media (max-width: 400px) {
    .hero-stats { gap: 8px 18px; }
    .hero-stats b { font-size: 18px; }
    .logo-text { max-width: 130px; }
}
