/* ========== CSS Variables ========== */
/* v4 视觉升级 —— 向子比主题现代清爽风靠拢
 * 基调：干净浅灰白底 + 鲜亮琥珀主色 + 靛蓝次强调 + 多彩标签
 * 层次：更柔和精致的阴影、更大的圆角、更通透的玻璃质感 */
:root {
    --bg-body: #f4f5f7;
    --bg-card: rgba(255, 255, 255, 0.88);
    --bg-card-solid: #ffffff;
    --bg-aside: rgba(255, 255, 255, 0.9);
    --bg-footer: rgba(255, 255, 255, 0.78);
    --bg-input: rgba(247, 248, 250, 0.8);
    --bg-hover: rgba(244, 245, 247, 0.7);
    --bg-code: rgba(248, 249, 251, 0.8);
    --bg-tag: rgba(245, 158, 11, 0.08);
    --bg-tab-active: rgba(255, 255, 255, 0.95);
    --bg-overlay: rgba(30, 41, 59, 0.4);

    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-blur: blur(24px) saturate(180%);
    --glass-blur-light: blur(14px) saturate(160%);
    --glass-blur-heavy: blur(32px) saturate(180%);

    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --text-tertiary: #cbd5e1;
    --text-white: #ffffff;
    --text-nav: #475569;
    --text-nav-hover: #f59e0b;
    --text-nav-active: #f59e0b;

    /* 主强调色：鲜亮琥珀 */
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-light: rgba(245, 158, 11, 0.1);
    --accent-dark: #b45309;
    --accent-glow: rgba(245, 158, 11, 0.28);
    /* 次强调色：靛蓝（链接、交互态） */
    --accent-2: #6366f1;
    --accent-2-hover: #4f46e5;
    --accent-2-light: rgba(99, 102, 241, 0.1);
    /* 多彩标签色板 */
    --tag-blue: #3b82f6;
    --tag-green: #10b981;
    --tag-purple: #8b5cf6;
    --tag-pink: #ec4899;
    --tag-cyan: #06b6d4;
    --tag-red: #ef4444;

    --border-color: #e8eaed;
    --border-light: #f1f3f5;
    --border-input: #dde1e6;
    --glass-border-color: rgba(148, 163, 184, 0.25);

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.08), 0 4px 10px rgba(15, 23, 42, 0.05);
    --shadow-card: 0 2px 8px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
    --shadow-elevated: 0 20px 48px rgba(15, 23, 42, 0.12), 0 8px 16px rgba(15, 23, 42, 0.06);
    --shadow-glass: 0 8px 32px rgba(15, 23, 42, 0.06);
    --shadow-accent: 0 8px 24px rgba(245, 158, 11, 0.25);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-round: 50%;
    --card-radius: 20px;

    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;

    --aside-width: 220px;
    --sidebar-width: 300px;
    --mobile-header-height: 52px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-spring: 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== Dark Mode Variables ========== */
body.dark-mode {
    --bg-body: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.72);
    --bg-card-solid: #1e293b;
    --bg-aside: rgba(30, 41, 59, 0.85);
    --bg-footer: rgba(15, 23, 42, 0.8);
    --bg-input: rgba(51, 65, 85, 0.7);
    --bg-hover: rgba(51, 65, 85, 0.6);
    --bg-code: rgba(51, 65, 85, 0.7);
    --bg-tag: rgba(245, 158, 11, 0.12);
    --bg-tab-active: rgba(30, 41, 59, 0.9);
    --bg-overlay: rgba(0, 0, 0, 0.7);

    --glass-bg: rgba(30, 41, 59, 0.78);
    --glass-border: rgba(148, 163, 184, 0.12);
    --glass-border-color: rgba(148, 163, 184, 0.1);

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    --text-tertiary: #94a3b8;
    --text-nav: #cbd5e1;
    --text-nav-hover: #fbbf24;
    --text-nav-active: #fbbf24;

    --border-color: #334155;
    --border-light: #1e293b;
    --border-input: #475569;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.4);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-elevated: 0 20px 48px rgba(0, 0, 0, 0.5);
    --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-accent: 0 8px 24px rgba(251, 191, 36, 0.2);

    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --accent-light: rgba(251, 191, 36, 0.12);
    --accent-dark: #d97706;
    --accent-glow: rgba(251, 191, 36, 0.25);
    --accent-2: #818cf8;
    --accent-2-hover: #6366f1;
    --accent-2-light: rgba(129, 140, 248, 0.12);
}

/* ========== CSS Reset / Normalize ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-family);
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-body);
    background-image: 
        radial-gradient(ellipse at 20% 50%, rgba(200, 132, 60, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(180, 160, 140, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(200, 180, 150, 0.04) 0%, transparent 50%);
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: 0.01em;
}

article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section {
    display: block;
}

ul, ol {
    list-style: none;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast), border-color var(--transition-fast);
    outline: none;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
    vertical-align: middle;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
    margin-bottom: 1em;
}

input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    outline: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

code, kbd, pre, samp {
    font-family: var(--font-mono);
}

::selection {
    background-color: var(--accent);
    color: #fff;
}

::-moz-selection {
    background-color: var(--accent);
    color: #fff;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #c4b8aa;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #a89a88;
}

body.dark-mode::-webkit-scrollbar-thumb {
    background-color: #4d453e;
}

body.dark-mode::-webkit-scrollbar-thumb:hover {
    background-color: #6b5e4f;
}

/* ========== Keyframe Animations ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
    50% { box-shadow: 0 0 0 12px transparent; }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== Scroll Animation Classes ==========
 * 刷新累积上移 bug 的最终修复方案（保留刷新位置恢复）：
 *
 * 关键原则：视口内的元素从始至终不发生 transform 跳变。
 *
 * 时序（刷新时）：
 *   1. CSS 加载 → .animate-on-scroll 默认 opacity:1 / transform:none（全部正常显示）
 *   2. 浏览器恢复滚动位置（此时视口内元素已正常显示，无跳变）
 *   3. DOMContentLoaded → JS 给视口内元素加 .is-visible（仍正常显示）
 *   4. 下一帧 body.js-ready 生效 → 仅视口外未激活元素才隐藏偏移
 *
 * 因视口内在第 2 步就已是最终显示态，scroll restoration 恢复的
 * 位置精确，不再被动画跳变“记小”，累积偏移从根上消除。
 * 代价：首屏卡片不再有入场动画（直接显示），这对 LCP 反而更友好；
 * 入场动画保留给视口外、滚动后进入的卡片。
 */
.animate-on-scroll {
    opacity: 1;
    transform: none;
}

/* 仅 JS ready 后，对未进入视口的元素应用隐藏偏移 */
.js-ready .animate-on-scroll:not(.is-visible) {
    opacity: 0;
    transform: translateY(30px);
}

.js-ready .animate-on-scroll {
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.js-ready .animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.animate-delay-1 { transition-delay: 0.08s; }
.animate-on-scroll.animate-delay-2 { transition-delay: 0.16s; }
.animate-on-scroll.animate-delay-3 { transition-delay: 0.24s; }
.animate-on-scroll.animate-delay-4 { transition-delay: 0.32s; }
.animate-on-scroll.animate-delay-5 { transition-delay: 0.4s; }

/* ========== Layout Container ========== */
.app-container {
    display: flex;
    min-height: 100vh;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

/* ========== Mobile Header ========== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mobile-header-height);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

body.dark-mode .mobile-header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
}

.mobile-menu-btn,
.mobile-dark-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.mobile-menu-btn:hover,
.mobile-dark-btn:hover {
    background: var(--bg-hover);
    transform: scale(1.05);
}

.mobile-menu-btn:active,
.mobile-dark-btn:active {
    transform: scale(0.95);
}

.mobile-logo {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
    display: flex;
    align-items: center;
    letter-spacing: -0.01em;
}

.mobile-logo img {
    height: 30px;
    width: auto;
}

/* ========== Left Aside (Sidebar Navigation) ========== */
.app-aside {
    width: var(--aside-width);
    min-width: var(--aside-width);
    background: var(--bg-aside);
    border-right: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 900;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-aside::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, var(--accent-light), transparent 70%);
    pointer-events: none;
    opacity: 0.6;
}

body.dark-mode .app-aside::before {
    opacity: 0.3;
}

.aside-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    z-index: 899;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.aside-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* Aside Close Button */
.aside-close-btn {
    display: none;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-muted);
    border-radius: var(--radius-round);
    background: var(--bg-hover);
    z-index: 10;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.aside-close-btn:hover {
    color: var(--text-primary);
    background: var(--border-light);
    transform: rotate(90deg);
}

/* Aside User Section */
.aside-user {
    text-align: center;
    padding: 32px 20px 22px;
    border-bottom: 1px solid var(--border-light);
    position: relative;
}

.aside-avatar-link {
    display: inline-block;
    margin-bottom: 12px;
    position: relative;
}

.aside-avatar-link::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: var(--radius-round);
    background: conic-gradient(var(--accent), var(--accent-hover), var(--accent), var(--accent-hover));
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.aside-avatar-link:hover::after {
    opacity: 1;
    animation: spin-slow 3s linear infinite;
}

.aside-avatar {
    display: block;
    width: 76px;
    height: 76px;
    margin: 0 auto;
}

.aside-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-round);
    border: 3px solid var(--bg-aside);
    box-shadow: 0 2px 12px rgba(40, 30, 20, 0.1);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.aside-avatar img:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 20px rgba(40, 30, 20, 0.15);
}

.aside-user-name {
    display: block;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.aside-user-bio {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aside-greeting {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.aside-greeting p {
    margin-bottom: 8px;
}

.time-progress {
    width: 100%;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.time-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 2px;
    transition: width 1s ease;
    min-width: 2px;
    position: relative;
}

.time-progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 8px;
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    opacity: 0.6;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Aside Navigation */
.aside-nav {
    flex: 1;
    padding: 8px 0;
    overflow-y: auto;
}

.nav-list {
    padding: 0;
}

.nav-list li {
    position: relative;
    margin: 2px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    color: var(--text-nav);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-md);
}

.nav-item:hover {
    color: var(--text-nav-hover);
    background: var(--bg-hover);
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
    transition: transform var(--transition-fast);
}

.nav-item:hover .nav-icon {
    transform: scale(1.1);
}

.nav-text {
    flex: 1;
}

.nav-arrow {
    font-size: 14px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-has-sub.active .nav-arrow {
    transform: rotate(180deg);
}

/* Sub Navigation */
.nav-sub-list {
    display: none;
    padding: 2px 0;
}

.nav-has-sub.active .nav-sub-list {
    display: block;
    animation: slideDown 0.3s ease;
}

.nav-sub-list li {
    margin: 0 8px;
}

.nav-sub-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px 9px 48px;
    font-size: 13px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-sub-list li a i {
    font-size: 15px;
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.nav-sub-list li a:hover {
    color: var(--accent);
    background: var(--bg-hover);
}

.nav-sub-list li a:hover i {
    color: var(--accent);
}

/* Aside Footer */
.aside-footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 14px 16px;
    border-top: 1px solid var(--border-light);
}

.aside-footer-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.aside-footer-btn:hover {
    color: var(--accent);
    background: var(--bg-hover);
    transform: translateY(-2px);
}

/* ========== Main Content Area ========== */
.app-main {
    flex: 1;
    margin-left: var(--aside-width);
    padding: 28px 32px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow-x: hidden;
}

.main-container {
    display: flex;
    flex: 1;
    gap: 28px;
    max-width: 100%;
    overflow: hidden;
    align-items: flex-start;
}

.content-wrapper {
    flex: 1;
    min-width: 0;
}

/* ========== Post Card ========== */
.post-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
    /* 修复刷新累积上移：禁用滚动锚定（scroll anchoring），防止上方卡片
       在图片懒加载/动画归位时高度变化，浏览器自动调整滚动位置与入场
       动画冲突，造成刷新位置漂移累积 */
    overflow-anchor: none;
}

/* 卡片基础样式 - 参考typecho handsome的panel风格，保留毛玻璃质感 */
.post-card {
    background: var(--bg-card-solid);
    border-radius: var(--card-radius, var(--radius-lg));
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(40, 30, 20, 0.06), 0 0 0 1px rgba(40, 30, 20, 0.04);
    transition: box-shadow 0.35s ease, transform 0.35s ease;
    position: relative;
}

.post-card:hover {
    box-shadow: 0 8px 28px rgba(40, 30, 20, 0.1), 0 0 0 1px rgba(200, 132, 60, 0.12);
    transform: translateY(-3px);
}

/* 全卡可点击覆盖层 */
.post-card-full-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    text-decoration: none;
}

/* 提升交互元素层级 */
.post-card-body a,
.post-card-picture-inner a,
.post-card-meta a,
.post-card-title a,
.post-tags a,
.post-card-img a,
.post-card-img-small a {
    position: relative;
    z-index: 10;
}

/* ========== 卡片元信息通用样式 ========== */
.post-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    line-height: 1.8;
    min-height: 22px;
}

.post-card-meta a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
    font-weight: 500;
}

.post-card-meta a:hover {
    color: var(--accent);
}

.meta-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    background: var(--text-light);
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.5;
}

.pull-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-views,
.meta-comments {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.meta-views i,
.meta-comments i {
    font-size: 14px;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.post-card:hover .meta-views i,
.post-card:hover .meta-comments i {
    opacity: 1;
}

.top-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.top-badge::before {
    content: '\f25b';
    font-family: 'remixicon';
    font-size: 11px;
}

.edit-link {
    color: var(--text-muted);
    font-size: 12px;
    transition: color var(--transition-fast);
}

.edit-link:hover {
    color: var(--accent);
}

/* 卡片标题 - 更贴近typecho handsome的简洁标题风格 */
.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.post-card-title a {
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.post-card-title a:hover {
    color: var(--accent);
}

/* 卡片摘要 */
.post-card-desc {
    font-size: 13.5px;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 卡片底部元信息行 - 参考typecho的post-item-foot */
.post-card-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.post-card-foot .foot-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-card-foot .foot-item i {
    font-size: 14px;
    opacity: 0.65;
}

.post-card-foot .foot-author {
    margin-right: auto;
}

.post-card-foot .foot-author a {
    color: var(--text-muted);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.post-card-foot .foot-author a:hover {
    color: var(--accent);
}

/* 标签 */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.label.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    padding: 3px 10px;
    background: var(--bg-tag);
    color: var(--accent-dark);
    border-radius: 12px;
    transition: all 0.2s ease;
    font-weight: 500;
    border: 1px solid transparent;
    cursor: pointer;
}

.label.badge::before {
    content: '#';
    font-size: 12px;
    opacity: 0.45;
    font-weight: 400;
}

.label.badge:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
}

.label.badge:hover::before {
    opacity: 1;
    color: #fff;
}

/* ================================================================
 * Large Card Style (大图卡片) - 参考typecho panel-large
 * 封面图在上方，内容在下方，整体更紧凑
 * ================================================================ */
.post-card-large {
    background: var(--bg-card-solid);
}

.post-card-img {
    width: 100%;
    height: 0;
    padding-bottom: 24%;
    position: relative;
    overflow: hidden;
    background: var(--bg-hover);
}

.post-card-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.08) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.post-card-large:hover .post-card-img::after {
    opacity: 1;
}

.post-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.post-card-large:hover .post-card-img img {
    transform: scale(1.04);
}

/* 大图卡片分类徽章 */
.post-card-img .img-category-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.3s ease;
}

.post-card-large:hover .post-card-img .img-category-badge {
    opacity: 1;
    transform: translateY(0);
}

/* 大图卡片内容区 */
.post-card-body {
    padding: 16px 22px 18px;
    position: relative;
}

.post-card-large .post-card-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.post-card-large:hover .post-card-body::after {
    transform: scaleX(1);
    opacity: 1;
}

/* ================================================================
 * Small Card Style (小图卡片) - 参考typecho panel-small
 * 桌面端：左侧小图 + 右侧内容横向排列
 * 手机端：自动转为上图下文的纵向布局，避免图片被挤压变形
 * ================================================================ */
.post-card-small {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--bg-card-solid);
}

.post-card-img-small {
    width: 220px;
    min-width: 220px;
    padding: 14px;
    box-sizing: border-box;
    background: var(--bg-hover);
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    /* 图片自带 aspect-ratio + border-radius，容器不需要 overflow:hidden */
}

.post-card-img-small img {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    position: relative;
    top: auto;
    left: auto;
    border-radius: 12px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.post-card-small:hover .post-card-img-small img {
    transform: scale(1.06);
}

.post-card-small .post-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 22px;
    min-width: 0;
    min-height: 140px;
}

.post-card-small .post-card-title {
    font-size: 1.1rem;
}

.post-card-small .post-card-desc {
    -webkit-line-clamp: 2;
}

/* ================================================================
 * Picture Card Style (全图卡片) - 参考typecho panel-picture
 * 封面图作为背景，文字叠加在图片上
 * ================================================================ */
.post-card-picture {
    min-height: 260px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
    border-radius: var(--card-radius, var(--radius-lg));
}

/* 底部渐变遮罩 */
.post-card-picture::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to top,
        rgba(15, 10, 5, 0.85) 0%,
        rgba(15, 10, 5, 0.45) 35%,
        rgba(15, 10, 5, 0.15) 60%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
    border-radius: var(--card-radius, var(--radius-lg));
    transition: background 0.4s ease;
}

.post-card-picture:hover::after {
    background: linear-gradient(
        to top,
        rgba(15, 10, 5, 0.9) 0%,
        rgba(15, 10, 5, 0.55) 35%,
        rgba(15, 10, 5, 0.2) 60%,
        transparent 100%
    );
}

.post-card-picture:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(40, 30, 20, 0.18);
}

/* 光泽扫过效果 */
.post-card-picture .picture-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 40%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 60%,
        transparent 100%
    );
    z-index: 2;
    pointer-events: none;
    transition: transform 0.6s ease;
    transform: skewX(-12deg);
}

.post-card-picture:hover .picture-shimmer {
    transform: skewX(-12deg) translateX(300%);
}

/* 全图卡片分类徽章 */
.post-card-picture .picture-category-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 10px;
    font-weight: 600;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.post-card-picture:hover .picture-category-badge {
    background: rgba(200, 132, 60, 0.7);
    border-color: rgba(200, 132, 60, 0.4);
}

/* 全图卡片内容区 */
.post-card-picture-inner {
    position: relative;
    z-index: 2;
    padding: 48px 24px 24px;
    width: 100%;
    color: #fff;
}

.post-card-picture-inner .post-card-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.post-card-picture-inner .post-card-meta a {
    color: rgba(255, 255, 255, 0.7);
    transition: color var(--transition-fast);
}

.post-card-picture-inner .post-card-meta a:hover {
    color: #fff;
}

.post-card-picture-inner .meta-dot {
    background: rgba(255, 255, 255, 0.3);
}

.post-card-picture-inner .post-card-title {
    font-size: 1.35rem;
    font-weight: 800;
}

.post-card-picture-inner .post-card-title a {
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
    transition: color var(--transition-fast);
}

.post-card-picture-inner .post-card-title a:hover {
    color: var(--accent);
}

.post-card-picture-inner .post-card-desc {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13.5px;
    -webkit-line-clamp: 2;
}

.post-card-picture-inner .post-tags .label.badge {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 10px;
}

.post-card-picture-inner .post-tags .label.badge::before {
    color: rgba(255, 255, 255, 0.45);
}

.post-card-picture-inner .post-tags .label.badge:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.post-card-picture-inner .post-tags .label.badge:hover::before {
    color: #fff;
}

.post-card-picture-inner .top-badge {
    background: var(--accent);
    color: #fff;
}

/* 全图卡片底部元信息 */
.post-card-picture-inner .post-card-foot {
    border-top-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
}

.post-card-picture-inner .post-card-foot .foot-author a {
    color: rgba(255, 255, 255, 0.6);
}

.post-card-picture-inner .post-card-foot .foot-author a:hover {
    color: #fff;
}

/* ================================================================
 * No Pic Card Style (无图卡片) - 参考typecho panel-no-pic
 * 纯文字卡片，简洁干净
 * ================================================================ */
.post-card-no_pic {
    border-radius: var(--card-radius, var(--radius-lg));
    background: var(--bg-card-solid);
    position: relative;
    overflow: hidden;
}

.post-card-no_pic .post-card-body {
    padding: 18px 24px;
    position: relative;
    min-height: 100px;
}

.post-card-no_pic .post-card-title {
    font-size: 1.15rem;
}

.post-card-no_pic .post-card-desc {
    -webkit-line-clamp: 2;
}

/* ========== Empty State ========== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    background: var(--bg-card-solid);
    border-radius: var(--card-radius, var(--radius-lg));
    box-shadow: 0 1px 4px rgba(40, 30, 20, 0.06), 0 0 0 1px rgba(40, 30, 20, 0.04);
    position: relative;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-light) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.empty-icon {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.25;
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.empty-text {
    font-size: 17px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* ========== Single Post (Article Detail) ========== */
.single-post {
    background: var(--bg-card-solid);
    border-radius: var(--card-radius, var(--radius-lg));
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(40, 30, 20, 0.06), 0 0 0 1px rgba(40, 30, 20, 0.04);
    border: none;
    max-width: 100%;
}

.post-cover {
    width: 100%;
    max-height: 420px;
    overflow: hidden;
    background: var(--bg-hover);
    position: relative;
}

.post-cover img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.post-body {
    padding: 32px 36px;
    overflow: hidden;
    max-width: 100%;
}

.post-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.post-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 14px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.post-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.post-meta-bar a {
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.post-meta-bar a:hover {
    color: var(--accent);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.meta-item i {
    font-size: 14px;
}

.meta-dot {
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.4;
    vertical-align: middle;
}

/* ========== Post Content Typography ========== */
.post-content {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text-primary);
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* ========== 修复文章正文全角括号与汉字重叠 ========== */
.post-content,
.post-content p,
.post-content li,
.post-content blockquote,
.post-content td,
.post-content th,
.post-content .post-text {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    letter-spacing: 0.015em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.post-content code,
.post-content pre,
.post-content pre code {
    letter-spacing: 0;
    font-family: var(--font-mono);
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 1.8em;
    margin-bottom: 0.7em;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-primary);
}

.post-content h1 {
    font-size: 1.7rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.35em;
}

.post-content h2 {
    font-size: 1.4rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.3em;
}

.post-content h3 { font-size: 1.25rem; }
.post-content h4 { font-size: 1.1rem; }
.post-content h5 { font-size: 1rem; }
.post-content h6 { font-size: 0.9rem; color: var(--text-secondary); }

.post-content p {
    margin-bottom: 1.2em;
}

.post-content a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 3px;
    transition: text-decoration-color var(--transition-fast);
}

.post-content a:hover {
    text-decoration-color: var(--accent);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: block;
    margin: 1.5em auto;
    box-shadow: var(--shadow-sm);
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.2em;
    padding-left: 2em;
}

.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }

.post-content li {
    margin-bottom: 0.35em;
    line-height: 1.75;
}

.post-content blockquote {
    margin: 1.5em 0;
    padding: 16px 24px;
    border-left: 4px solid var(--accent);
    background: var(--bg-hover);
    color: var(--text-secondary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content code {
    padding: 2px 6px;
    background: var(--bg-code);
    border-radius: 4px;
    font-size: 0.88em;
    color: #c17e4c;
    word-break: break-word;
    font-family: 'Menlo', 'Consolas', 'Monaco', monospace;
}

body.dark-mode .post-content code {
    color: #e0a860;
}

.post-content pre {
    margin: 1.5em 0;
    padding: 20px 24px;
    background: var(--bg-code);
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.7;
    border: 1px solid var(--border-light);
    max-width: 100%;
    box-sizing: border-box;
}

.post-content pre code {
    padding: 0;
    background: none;
    color: var(--text-primary);
    font-size: inherit;
    border-radius: 0;
}

.post-content table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid var(--border-color);
    max-width: 100%;
    table-layout: auto;
}

.post-content table th,
.post-content table td {
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    text-align: left;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.post-content table th {
    background: var(--bg-hover);
    font-weight: 600;
    font-size: 13px;
}

.post-content table tr:nth-child(even) {
    background: var(--bg-hover);
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 2em 0;
}

.post-content > *:first-child { margin-top: 0; }
.post-content > *:last-child { margin-bottom: 0; }

/* 文章内嵌入的音频/视频 */
.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em auto;
}

.post-content a {
    word-break: break-all;
    overflow-wrap: anywhere;
}

.post-content video,
.post-content audio {
    max-width: 100%;
    margin: 1.5em auto;
    display: block;
}

.post-content iframe {
    max-width: 100%;
    letter-spacing: 0.08em;
    word-spacing: 0.1em;
}

/* ========== Post Tags Section ========== */
.post-tags-section {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
}

.tags-label {
    color: var(--text-secondary);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 28px;
    font-weight: 500;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ========== Post Neighbor (Prev/Next) ========== */
.post-neighbor {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}

.post-neighbor a {
    color: var(--text-secondary);
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all var(--transition-fast);
    padding: 8px 14px;
    background: var(--bg-hover);
    border-radius: var(--radius-md);
    font-weight: 500;
}

.post-neighbor a:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.post-neighbor .prev:before { content: "\2190 "; }
.post-neighbor .next:after { content: " \2192"; }

/* ========== Related Posts ========== */
.related-posts {
    margin-top: 28px;
    padding-top: 0;
}

.related-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.related-item {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.related-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.related-link {
    display: block;
    padding: 14px 18px;
    color: var(--text-primary);
}

.related-post-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.related-meta {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
}

.related-item:hover .related-post-title {
    color: var(--accent);
}

/* ========== Comments Section ========== */
.comments-section {
    background: var(--bg-card-solid);
    border-radius: var(--card-radius, var(--radius-lg));
    padding: 28px 36px;
    margin-top: 22px;
    box-shadow: 0 1px 4px rgba(40, 30, 20, 0.06), 0 0 0 1px rgba(40, 30, 20, 0.04);
    border: none;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

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

.comments-header-left i {
    font-size: 20px;
    color: var(--accent);
}

.comments-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.comments-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    border-radius: 11px;
}

/* Comment Empty */
.comment-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.comment-empty i {
    font-size: 40px;
    opacity: 0.3;
    display: block;
    margin-bottom: 12px;
}

.comment-empty p {
    font-size: 14px;
    margin: 0;
}

/* 评论项 - 参考emlog默认主题浮动布局 */
.comment-item {
    margin: 14px 0;
    padding: 0;
    overflow: visible;
}

/* 头像 - 左浮动 */
.comment-avatar {
    float: left;
    margin: 4px 10px 0 0;
}

.comment-avatar img {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-round);
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.comment-is-author .comment-avatar img {
    border-color: var(--accent);
}

/* 评论信息气泡 */
.comment-infos {
    background: var(--bg-hover);
    padding: 14px 16px 12px;
    border-radius: var(--radius-md);
    margin-left: 52px;
    border: 1px solid var(--border-light);
    position: relative;
    line-height: 1.7;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.comment-item:hover > .comment-infos {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.comment-is-author > .comment-infos {
    border-color: var(--accent);
    background: var(--accent-light);
}

.comment-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.comment-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.comment-author-badge {
    display: inline-block;
    font-size: 10px;
    padding: 1px 8px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    font-weight: 600;
    line-height: 18px;
}

.comment-home-link {
    color: var(--text-muted);
    font-size: 13px;
    transition: color var(--transition-fast);
}

.comment-home-link:hover {
    color: var(--accent);
}

.comment-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

.comment-content {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.comment-content p {
    margin-bottom: 0.5em;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.comment-reply {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.comment-reply a {
    color: var(--text-muted);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 12px;
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.comment-reply a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
}

/* 子评论缩进 - 参考emlog默认主题 */
.comment-children {
    margin: 10px 0 4px 28px;
    clear: both;
    border: none;
    padding: 0;
}

/* Comment Pagination */
.comment-pagination {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

/* Comment Closed */
.comment-closed {
    text-align: center;
    padding: 32px 20px;
    color: var(--text-muted);
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.comment-closed i {
    font-size: 18px;
}

/* ========== Comment Form ========== */
.comment-form {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.comment-form-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 18px;
    overflow: hidden;
}

.comment-form-avatar img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-round);
    object-fit: cover;
}

.comment-form-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comment-form-fields {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-input {
    flex: 1;
    min-width: 140px;
    padding: 10px 16px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input-sm {
    min-width: 80px;
    max-width: 120px;
    padding: 8px 10px;
    font-size: 13px;
}

.comment-form-textarea-wrap {
    position: relative;
}

.form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-textarea::placeholder {
    color: var(--text-tertiary);
}

/* ========== 修复输入框占位符括号文字重叠 ========== */
/* 1. 重置输入框基础字体与字距，从根源避免渲染异常 */
.form-input,
.form-textarea {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    letter-spacing: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. 针对各浏览器占位符统一修复 */
.form-input::-webkit-input-placeholder,
.form-textarea::-webkit-input-placeholder {
    font-family: inherit;
    letter-spacing: 0.01em;
    color: var(--text-tertiary);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

.form-input::-moz-placeholder,
.form-textarea::-moz-placeholder {
    font-family: inherit;
    letter-spacing: 0.01em;
    color: var(--text-tertiary);
    opacity: 1;
    -moz-osx-font-smoothing: grayscale;
}

.form-input:-ms-input-placeholder,
.form-textarea:-ms-input-placeholder {
    font-family: inherit;
    letter-spacing: 0.01em;
    color: var(--text-tertiary);
}

.form-input::placeholder,
.form-textarea::placeholder {
    font-family: inherit;
    letter-spacing: 0.01em;
    color: var(--text-tertiary);
}

.comment-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.reply-to-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.reply-to-info i {
    color: var(--accent);
}

.cancel-reply-link {
    color: var(--text-muted);
    font-size: 16px;
    transition: color var(--transition-fast);
}

.cancel-reply-link:hover {
    color: var(--accent);
}

.comment-form-submit-area {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.captcha-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.captcha-group .captcha {
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1.5px solid var(--border-input);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.captcha-group .captcha:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.captcha-group .captcha_input {
    width: 100px;
    padding: 10px 14px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    letter-spacing: 2px;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.captcha-group .captcha_input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.captcha-group .captcha_input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0;
}

.captcha-display {
    display: inline-flex;
    align-items: center;
    height: 36px;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit i {
    font-size: 16px;
}

/* 深色模式评论区 */
body.dark-mode .comment-infos {
    border-color: #3a3530;
}

body.dark-mode .comment-item:hover > .comment-infos {
    border-color: #e0a860;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.dark-mode .comment-is-author > .comment-infos {
    border-color: #e0a860;
    background: rgba(224, 168, 96, 0.08);
}

body.dark-mode .comment-avatar img {
    border-color: #3a3530;
}

body.dark-mode .comment-is-author .comment-avatar img {
    border-color: #e0a860;
}

body.dark-mode .comment-reply a {
    border-color: #3a3530;
}

body.dark-mode .form-input,
body.dark-mode .form-textarea {
    background: #1e1c1a;
    border-color: #3a3530;
    color: #e8e0d8;
}

body.dark-mode .form-input:focus,
body.dark-mode .form-textarea:focus {
    border-color: #e0a860;
    box-shadow: 0 0 0 3px rgba(224, 168, 96, 0.15);
}

body.dark-mode .captcha-group .captcha {
    border-color: #3a3530;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

body.dark-mode .captcha-group .captcha_input {
    background: #1e1c1a;
    border-color: #3a3530;
    color: #e8e0d8;
}

body.dark-mode .captcha-group .captcha_input:focus {
    border-color: #e0a860;
    box-shadow: 0 0 0 3px rgba(224, 168, 96, 0.15);
}

body.dark-mode .comment-form-avatar {
    background: #2d2a26;
}

/* ========== Pagination ========== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    padding: 36px 0 12px;
}

.pagination-wrapper .pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-wrapper .pagination a,
.pagination-wrapper .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
    text-decoration: none;
    font-weight: 500;
}

.pagination-wrapper .pagination a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-1px);
}

.pagination-wrapper .pagination span.current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 700;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.pagination-wrapper .pagination span.disabled {
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.4;
}

/* ========== Handsome Pagination ========== */
.handsome-pagination {
    display: flex;
    justify-content: center;
}

.pagination-list {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.page-item {
    display: inline-flex;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--glass-border);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
}

.page-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.page-item.active .page-link {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 700;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.page-item.disabled .page-link {
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.4;
    pointer-events: none;
}

.page-link.page-prev,
.page-link.page-next {
    font-size: 20px;
    padding: 0 12px;
}

.page-link.page-ellipsis {
    border: none;
    background: transparent;
    box-shadow: none;
    cursor: default;
    min-width: 32px;
    padding: 0 8px;
}

.page-link.page-ellipsis:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
    color: var(--text-secondary);
}

/* ========== Load More Button ========== */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    padding: 32px 0 16px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 36px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1.5px solid var(--accent);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
    outline: none;
}

.load-more-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.load-more-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.load-more-btn:hover i {
    transform: translateY(2px);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.load-more-end {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 28px;
    font-size: 13px;
    color: var(--text-light);
    background: transparent;
    border-radius: 50px;
    letter-spacing: 0.02em;
}

.load-more-end i {
    font-size: 16px;
    color: var(--accent);
}

/* ========== Comment Pagination ========== */
.comment-pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0 8px;
}

.comment-pagination a,
.comment-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    margin: 0 2px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 50px;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.comment-pagination a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-light);
    transform: translateY(-1px);
}

.comment-pagination span {
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.comment-pagination em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 34px;
    font-style: normal;
    color: var(--text-light);
    font-size: 13px;
}

/* ========== Right Sidebar ========== */
.app-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    flex-shrink: 0;
    position: relative;
}

.sidebar-toggle {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-light);
    -webkit-backdrop-filter: var(--glass-blur-light);
    border: 1px solid var(--glass-border);
    z-index: 10;
}

.sidebar-toggle:hover {
    color: var(--accent);
}

.sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: sticky;
    top: 80px;
}

/* Sidebar Widget */
.sidebar-widget {
    background: var(--bg-card-solid);
    border-radius: var(--card-radius, var(--radius-lg));
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(40, 30, 20, 0.06), 0 0 0 1px rgba(40, 30, 20, 0.04);
    padding: 20px 22px;
    border: none;
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.sidebar-widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.widget-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--accent);
    font-size: 18px;
}

/* Widget Tabs */
.widget-tabs {
    padding: 0;
}

.tabs-header {
    display: flex;
    position: relative;
    border-bottom: 2px solid var(--border-light);
    background: var(--bg-hover);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tab-btn {
    flex: 1;
    padding: 11px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    cursor: pointer;
    transition: color var(--transition-fast);
    position: relative;
    z-index: 1;
}

.tab-btn:hover {
    color: var(--accent);
}

.tab-btn.active {
    color: var(--accent);
}

.tab-slider {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    background: var(--accent);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    border-radius: 1px;
}

.tabs-content {
    padding: 16px 18px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

/* Sidebar List */
.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-list li {
    padding: 9px 0;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sidebar-list li a {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    transition: all var(--transition-fast);
}

.sidebar-list li a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.list-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-meta {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

.list-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 14px 0;
}

/* Comment List in Sidebar */
.comment-list .comment-item {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    align-items: flex-start;
}

.comment-list .comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-round);
    overflow: hidden;
    flex-shrink: 0;
}

.comment-list .comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-list .comment-info {
    flex: 1;
    min-width: 0;
}

.comment-list .comment-author {
    display: block;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 3px;
}

.comment-list .comment-excerpt {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.comment-list .comment-date {
    font-size: 11px;
    color: var(--text-muted);
}

/* Blog Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.info-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.info-label i {
    font-size: 16px;
    color: var(--accent);
}

.info-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 14px;
}

/* Tag Cloud */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-item {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    background: var(--bg-input);
    color: var(--text-secondary);
    border-radius: 20px;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.tag-item:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* ========== Emlog System Widgets ========== */
.widget-emlog {
    padding: 20px 22px;
}

.emlog-widgets-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.emlog-widget-item {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.emlog-widget-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.emlog-widget-item ul li {
    padding: 7px 0;
    border-bottom: 1px solid var(--border-light);
}

.emlog-widget-item ul li:last-child {
    border-bottom: none;
}

.emlog-widget-item a {
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.emlog-widget-item a:hover {
    color: var(--accent);
    padding-left: 4px;
}

/* ========== Desktop Header Navigation ========== */
.desktop-header {
    display: none;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 850;
    width: 100%;
    transition: background var(--transition-normal), box-shadow var(--transition-normal);
}

.desktop-header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-md);
}

body.dark-mode .desktop-header {
    background: rgba(37, 35, 32, 0.82);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

body.dark-mode .desktop-header.scrolled {
    background: rgba(37, 35, 32, 0.92);
}

.desktop-header-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 36px;
    height: 60px;
    gap: 20px;
}

.desktop-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    padding: 8px 0;
    margin-right: 4px;
    letter-spacing: -0.02em;
    transition: color var(--transition-fast);
}

.desktop-header-brand i {
    font-size: 26px;
    color: var(--accent);
    transition: transform var(--transition-bounce);
}

.desktop-header-brand:hover {
    color: var(--accent);
}

.desktop-header-brand:hover i {
    transform: rotate(-10deg) scale(1.1);
}

.desktop-header-spacer {
    flex: 1;
}

.desktop-header-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    justify-content: flex-end;
    overflow: visible;
    padding: 0;
}

.desktop-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.desktop-nav-item::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 24px;
    height: 2.5px;
    background: var(--accent);
    border-radius: 2px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-nav-item:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.desktop-nav-item i {
    font-size: 17px;
    transition: transform var(--transition-fast);
}

.desktop-nav-item:hover {
    color: var(--accent);
    background: var(--bg-hover);
}

.desktop-nav-item:hover i {
    transform: translateY(-1px);
}

/* 桌面端导航下拉菜单 */
.desktop-nav-dropdown {
    position: relative;
    flex-shrink: 0;
}

.desktop-nav-arrow {
    font-size: 14px !important;
    margin-left: -2px;
    transition: transform 0.25s ease;
}

.desktop-nav-dropdown:hover .desktop-nav-arrow {
    transform: rotate(180deg);
}

.desktop-nav-submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    min-width: 160px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
}

.desktop-nav-dropdown:hover .desktop-nav-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.desktop-nav-subitem {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.desktop-nav-subitem i {
    font-size: 15px;
    color: var(--text-tertiary);
    transition: color var(--transition-fast);
}

.desktop-nav-subitem:hover {
    color: var(--accent);
    background: var(--bg-hover);
}

.desktop-nav-subitem:hover i {
    color: var(--accent);
}

.desktop-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-left: 16px;
    border-left: 1px solid var(--border-light);
    margin-left: 4px;
}

.desktop-action-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}

.desktop-action-btn:hover {
    color: var(--accent);
    background: var(--bg-hover);
    transform: scale(1.08);
}

.desktop-action-btn:active {
    transform: scale(0.95);
}

/* ========== Search Modal ========== */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.search-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-modal {
    width: 90%;
    max-width: 640px;
    background: var(--bg-card);
    border-radius: 16px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transform: translateY(-20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-modal-overlay.active .search-modal {
    transform: translateY(0) scale(1);
}

.search-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.search-modal-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-hover);
    border-radius: 10px;
    padding: 0 14px;
    height: 44px;
    transition: box-shadow 0.2s ease;
}

.search-modal-input-wrap:focus-within {
    box-shadow: 0 0 0 2px var(--accent);
}

.search-modal-icon {
    font-size: 18px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.search-modal-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--text-primary);
    height: 100%;
    font-family: inherit;
}

/* 隐藏浏览器自带的搜索框清除按钮 */
.search-modal-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}
.search-modal-input::-moz-search-clear-button {
    display: none;
}

.search-modal-input::placeholder {
    color: var(--text-tertiary);
}

.search-modal-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: var(--border-light);
    border-radius: 50%;
    color: var(--text-tertiary);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
}

.search-modal-clear.visible {
    display: flex;
}

.search-modal-clear:hover {
    background: var(--accent);
    color: #fff;
}

.search-modal-close-btn {
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    padding: 8px 4px;
    white-space: nowrap;
    font-family: inherit;
    transition: color 0.15s;
}

.search-modal-close-btn:hover {
    color: var(--accent);
}

.search-modal-body {
    padding: 24px 20px;
    min-height: 120px;
    max-height: 400px;
    overflow-y: auto;
}

.search-modal-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 0;
    color: var(--text-tertiary);
}

.search-modal-hint i {
    font-size: 36px;
    opacity: 0.4;
}

.search-modal-hint p {
    font-size: 14px;
    margin: 0;
}

.search-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 0;
    color: var(--text-tertiary);
    font-size: 14px;
}

.search-modal-loading i {
    font-size: 20px;
    animation: searchSpin 1s linear infinite;
}

@keyframes searchSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.search-modal-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-modal-results li {
    margin-bottom: 2px;
}

.search-modal-results a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
}

.search-modal-results a:hover {
    background: var(--bg-hover);
}

.search-modal-results .result-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 8px;
    font-size: 16px;
    flex-shrink: 0;
}

.search-modal-results .result-info {
    flex: 1;
    min-width: 0;
}

.search-modal-results .result-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-modal-results .result-excerpt {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.4;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-modal-empty {
    text-align: center;
    padding: 32px 0;
    color: var(--text-tertiary);
    font-size: 14px;
}

.search-modal-empty i {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.4;
}

/* 深色模式搜索弹窗 */
body.dark-mode .search-modal {
    background: #2a2725;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

body.dark-mode .search-modal-input-wrap {
    background: #1e1c1a;
}

body.dark-mode .search-modal-input {
    color: #e8e0d8;
}

body.dark-mode .search-modal-results a:hover {
    background: #353230;
}

body.dark-mode .search-modal-clear {
    background: #3a3530;
    color: #b8aa98;
}

/* ========== Footer ========== */
.app-footer {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-top: 1px solid var(--glass-border);
    padding: 22px 0;
    margin-top: auto;
    margin-left: var(--aside-width);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-inner a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--transition-fast);
}

.footer-inner a:hover {
    color: var(--accent);
}

.footer-left,
.footer-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ========== Back to Top ========== */
/* ========== Floating Actions ========== */
.floating-actions {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 800;
}

.floating-action-btn {
    width: 46px;
    height: 46px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-round);
    box-shadow: var(--shadow-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-action-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px) scale(1.05);
}

.floating-action-btn:active {
    transform: translateY(0) scale(0.95);
}

.back-to-top {
    width: 46px;
    height: 46px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-round);
    box-shadow: var(--shadow-glass);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.8);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px) scale(1.05);
}

.back-to-top:active {
    transform: translateY(0) scale(0.95);
}

/* 深色模式浮动按钮 */
body.dark-mode .floating-action-btn {
    background: rgba(37, 35, 32, 0.9);
    border-color: rgba(255, 255, 255, 0.08);
    color: #b8aa98;
}

body.dark-mode .floating-action-btn:hover {
    color: #e0a860;
    border-color: #e0a860;
}

/* 深色模式切换按钮图标 —— 白天显示太阳，黑夜显示月亮 */
#floatingDarkBtn {
    position: relative;
    overflow: hidden;
}

#floatingDarkBtn .theme-icon-sun,
#floatingDarkBtn .theme-icon-moon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

/* 白天模式：太阳可见，月亮旋出 */
#floatingDarkBtn .theme-icon-sun {
    opacity: 1;
}

#floatingDarkBtn .theme-icon-moon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0.6);
}

/* 深色模式：月亮可见，太阳旋出 */
body.dark-mode #floatingDarkBtn .theme-icon-sun {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0.6);
}

body.dark-mode #floatingDarkBtn .theme-icon-moon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

/* ========== 404 Page ========== */
.page-404 {
    text-align: center;
    padding: 80px 20px;
}

.page-404-icon {
    font-size: 90px;
    color: var(--accent);
    margin-bottom: 24px;
    opacity: 0.7;
    animation: float 3s ease-in-out infinite;
}

.page-404 h1 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 800;
}

.page-404 p {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 16px;
}

.page-404 .btn-home {
    display: inline-block;
    padding: 12px 30px;
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.page-404 .btn-home:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 132, 60, 0.35);
}

/* Page content */
.page-content {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    box-shadow: var(--shadow-glass);
    border: 1px solid var(--glass-border);
}

.page-content .post-content {
    font-size: 16px;
}

/* ========== Dark Mode Fine-tuning ========== */
body.dark-mode .desktop-header {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    border-bottom-color: rgba(255,255,255,0.06);
}

body.dark-mode .desktop-header.scrolled {
    background: rgba(37, 35, 32, 0.92);
}

body.dark-mode .desktop-header-brand { color: #e8e0d8; }
body.dark-mode .desktop-header-brand i { color: #e0a860; }
body.dark-mode .desktop-header-brand:hover { color: #e0a860; }
body.dark-mode .desktop-header-actions { border-left-color: #3a3530; }
body.dark-mode .desktop-nav-item { color: #b8aa98; }
body.dark-mode .desktop-nav-item:hover { color: #e0a860; background: #2d2a26; }
body.dark-mode .desktop-nav-submenu { background: #2a2722; border-color: #3d3830; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
body.dark-mode .desktop-nav-subitem { color: #b8aa98; }
body.dark-mode .desktop-nav-subitem i { color: #8a7e70; }
body.dark-mode .desktop-nav-subitem:hover { color: #e0a860; background: #2d2a26; }
body.dark-mode .desktop-nav-subitem:hover i { color: #e0a860; }
body.dark-mode .desktop-action-btn { color: #b8aa98; }
body.dark-mode .desktop-action-btn:hover { color: #e0a860; background: #2d2a26; }

body.dark-mode .page-link {
    background: var(--glass-bg);
    border-color: rgba(255,255,255,0.06);
    color: #b8aa98;
}

body.dark-mode .page-link:hover {
    color: #e0a860;
    border-color: #e0a860;
    background: rgba(224, 168, 96, 0.12);
}

body.dark-mode .page-item.active .page-link {
    background: #c8843c;
    border-color: #c8843c;
    color: #fff;
}

body.dark-mode .page-item.disabled .page-link { color: #5d5246; }
body.dark-mode .page-link.page-ellipsis { background: transparent; color: #7d7164; }

/* Dark mode - Load More Button */
body.dark-mode .load-more-btn {
    color: #e0a860;
    border-color: #e0a860;
    background: rgba(224, 168, 96, 0.08);
}
body.dark-mode .load-more-btn:hover {
    background: #e0a860;
    color: #1a1816;
}
body.dark-mode .load-more-end { color: #7d7164; }
body.dark-mode .load-more-end i { color: #e0a860; }

/* Dark mode - Comment Pagination */
body.dark-mode .comment-pagination a {
    background: #2a2722;
    border-color: #3d3830;
    color: #b8aa98;
}
body.dark-mode .comment-pagination a:hover {
    color: #e0a860;
    border-color: #e0a860;
    background: rgba(224, 168, 96, 0.12);
}
body.dark-mode .comment-pagination span {
    background: #c8843c;
    border-color: #c8843c;
    color: #fff;
}
body.dark-mode .comment-pagination em {
    color: #7d7164;
}

/* Dark mode widget styles */
body.dark-mode .widget-emlog .widget-title { color: #e8e0d8; border-bottom-color: #3a3530; }
body.dark-mode .widget-link-item { border-bottom-color: #3a3530; }
body.dark-mode .widget-link-item a { color: #b8aa98; }
body.dark-mode .widget-sort-item > a { color: #b8aa98; }
body.dark-mode .widget-sort-sub-item a { color: #7d7164; }
body.dark-mode .tag-cloud-item { color: #b8aa98; }
body.dark-mode .tag-cloud-item:hover { background: rgba(224, 168, 96, 0.15); }
body.dark-mode .widget-comment-item { border-bottom-color: #3a3530; }
body.dark-mode .widget-comment-avatar { border-color: #3a3530; }
body.dark-mode .widget-comment-text { color: #b8aa98; }
body.dark-mode .widget-post-item { border-bottom-color: #3a3530; }
body.dark-mode .widget-post-item a { color: #b8aa98; }
body.dark-mode .widget-search-input { background: #2d2a26; border-color: #3a3530; color: #e8e0d8; }
body.dark-mode .widget-archive-select { background: #2d2a26; border-color: #3a3530; color: #e8e0d8; }
body.dark-mode .widget-twitter-item { border-bottom-color: #3a3530; }
body.dark-mode .widget-twitter-content { color: #b8aa98; }
body.dark-mode .widget-blogger-description { color: #7d7164; }
body.dark-mode .widget-custom-content { color: #b8aa98; }
body.dark-mode .widget-empty { color: #7d7164; }

/* Dark mode card hover */
body.dark-mode .post-card:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(200, 132, 60, 0.2);
}

body.dark-mode .single-post {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

body.dark-mode .comments-section {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Side Twitter List dark mode */
body.dark-mode .side-twitter-item { border-bottom-color: #302b27; }
body.dark-mode .side-twitter-author { color: #e8e0d8; }
body.dark-mode .side-twitter-time { color: #7d7164; }
body.dark-mode .side-twitter-content { color: #b8aa98; }

body.dark-mode .post-content code { color: #e0a860; }
body.dark-mode .post-content pre code { color: #e8e0d8; }

/* ========== Side Twitter List (侧边栏微语列表) ========== */
.side-twitter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-twitter-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
}

.side-twitter-item:last-child { border-bottom: none; padding-bottom: 0; }
.side-twitter-item:first-child { padding-top: 0; }

.side-twitter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.side-twitter-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.side-twitter-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.side-twitter-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
}

.side-twitter-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
    word-break: break-word;
}

/* ========== Emlog Sidebar Widget Styles ========== */
.widget-emlog { margin-bottom: 0; }

.widget-emlog .widget-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-emlog .widget-title i { color: var(--accent); font-size: 18px; }
.emlog-widgets-content { font-size: 14px; }

.widget-empty {
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    padding: 14px 0;
    margin: 0;
}

/* Link Widget */
.widget-link-list { list-style: none; padding: 0; margin: 0; }

.widget-link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border-light);
}

.widget-link-item:last-child { border-bottom: none; }
.widget-link-item .link-icon { border-radius: 4px; flex-shrink: 0; }

.widget-link-item a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color var(--transition-fast);
}

.widget-link-item a:hover { color: var(--accent); }

/* Sort Widget */
.widget-sort-list { list-style: none; padding: 0; margin: 0; }

.widget-sort-item { padding: 5px 0; }

.widget-sort-item > a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.widget-sort-item > a:hover { color: var(--accent); }
.sort-count { color: var(--text-muted); font-size: 12px; }

.widget-sort-sub-list { list-style: none; padding-left: 18px; margin: 0; }

.widget-sort-sub-item a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    transition: all var(--transition-fast);
}

.widget-sort-sub-item a:hover { color: var(--accent); }

/* Tag Cloud Widget */
.widget-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    line-height: 1.6;
}

.tag-cloud-item {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.tag-cloud-item:hover {
    color: var(--accent);
    background: var(--accent-light);
}

/* Comment Widget */
.widget-comment-list { list-style: none; padding: 0; margin: 0; }

.widget-comment-item {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border-light);
}

.widget-comment-item:last-child { border-bottom: none; }
.widget-comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-round);
    flex-shrink: 0;
    border: 2px solid var(--border-light);
    object-fit: cover;
    display: block;
}

.widget-comment-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 3px 8px;
}

.widget-comment-author { font-size: 12px; font-weight: 600; color: var(--text-primary); }
.widget-comment-time { font-size: 11px; color: var(--text-muted); }

.widget-comment-text {
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    line-height: 1.5;
    transition: color var(--transition-fast);
}

.widget-comment-text:hover { color: var(--accent); }

/* Post List Widget */
.widget-post-list { list-style: none; padding: 0; margin: 0; }

.widget-post-item {
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-light);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.widget-post-item:last-child { border-bottom: none; }

.widget-post-item a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    flex: 1;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.widget-post-item a:hover { color: var(--accent); }

.widget-post-cover {
    width: 52px;
    height: 38px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

/* Search Widget */
.widget-search-form { display: flex; gap: 0; }

.widget-search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--border-input);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 14px;
    outline: none;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: border-color var(--transition-fast);
}

.widget-search-input:focus { border-color: var(--accent); }

.widget-search-btn {
    padding: 10px 14px;
    border: 1.5px solid var(--accent);
    background: var(--accent);
    color: #fff;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    font-size: 16px;
    transition: background var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-search-btn:hover { background: var(--accent-hover); }

/* Archive Widget */
.widget-archive-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
}

.widget-archive-select:focus { border-color: var(--accent); }

/* Twitter/Microblog Widget */
.widget-twitter-list { list-style: none; padding: 0; margin: 0; }

.widget-twitter-item {
    padding: 9px 0;
    border-bottom: 1px dashed var(--border-light);
}

.widget-twitter-item:last-child { border-bottom: none; }

.widget-twitter-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 5px;
}

.widget-twitter-time { font-size: 11px; color: var(--text-muted); }

/* Blogger Info Widget */
.widget-blogger-info {
    text-align: center;
    padding: 10px 0;
}

.widget-blogger-avatar {
    border-radius: var(--radius-round);
    border: 3px solid var(--border-light);
    margin-bottom: 10px;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.widget-blogger-avatar:hover {
    border-color: var(--accent);
    transform: rotate(-3deg) scale(1.05);
}

.widget-blogger-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.widget-blogger-description {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Custom Widget */
.widget-custom-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.65;
    word-break: break-word;
}

.widget-custom-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

/* Calendar Widget */
.widget-emlog #calendar { font-size: 13px; }

.widget-emlog #calendar table { width: 100%; border-collapse: collapse; }

.widget-emlog #calendar th,
.widget-emlog #calendar td { text-align: center; padding: 5px; }

.widget-emlog #calendar .day a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
}

/* ========== Responsive Design ========== */

/* Desktop + Tablet: 769px+ */
@media (min-width: 769px) {
    .app-aside { display: none; }
    .aside-overlay { display: none !important; }
    .aside-close-btn { display: none !important; }
    .desktop-header { display: block; }
    .app-main { margin-left: 0; }
    .app-footer { margin-left: 0; }
    .mobile-header { display: none; }
}

/* Tablet: 769px - 1024px */
@media (max-width: 1024px) {
    :root { --sidebar-width: 270px; }

    .app-main { margin-left: 0; padding: 20px; }

    .main-container { flex-direction: column; gap: 20px; }

    .app-sidebar { width: 100%; min-width: 0; flex-shrink: 1; }

    /* 平板端隐藏右侧边栏（跟随手机端设置） */
    body.sidebar-hide-mobile .app-sidebar { display: none; }

    .sidebar-inner {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        position: static;
    }

    .widget-tabs { grid-column: 1 / -1; }
    .sidebar-toggle { display: none; }

    .footer-inner { flex-direction: column; text-align: center; }

    .post-card-body { padding: 20px 24px; }
    .post-body { padding: 24px 28px; }
    .app-footer { margin-left: 0; }
}

/* Mobile: up to 768px */
@media (max-width: 768px) {
    :root {
        --aside-width: 280px;
        --sidebar-width: 100%;
    }

    .app-container { padding-top: var(--mobile-header-height); max-width: 100%; }
    .mobile-header { display: flex; }
    .desktop-header { display: none; }

    .app-aside {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 950;
        width: var(--aside-width);
        box-shadow: none;
        display: flex;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .show-aside .app-aside {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(0, 0, 0, 0.2);
    }

    .show-aside .aside-overlay { opacity: 1; visibility: visible; display: block; }
    .aside-close-btn { display: flex; }

    .aside-user { padding: 60px 24px 24px; }
    .aside-avatar { width: 68px; height: 68px; }
    .aside-user-name { font-size: 17px; }
    .aside-greeting { margin-top: 14px; }

    .nav-item { padding: 13px 20px; font-size: 15px; }
    .nav-sub-list li a { padding: 10px 20px 10px 52px; font-size: 14px; }

    .aside-footer { padding: 16px 24px; gap: 10px; }
    .aside-footer-btn { width: 38px; height: 38px; font-size: 19px; }

    .app-main { margin-left: 0; padding: 14px; }
    .main-container { flex-direction: column; gap: 14px; overflow: hidden; }
    .content-wrapper { width: 100%; max-width: 100%; overflow: hidden; }

    .app-sidebar { width: 100%; min-width: 0; flex-shrink: 1; }

    /* 手机端隐藏右侧边栏 */
    body.sidebar-hide-mobile .app-sidebar { display: none; }

    .sidebar-inner { display: flex; flex-direction: column; gap: 14px; position: static; }
    .sidebar-toggle { display: none; }
    .app-footer { margin-left: 0; }

    .footer-inner { flex-direction: column; text-align: center; gap: 8px; }

    .post-card-body { padding: 14px 18px; }
    .post-card-title { font-size: 1.1rem; }
    .post-card-meta { font-size: 12px; }
    .post-card-img { padding-bottom: 32%; }
    /* 手机端小图卡片：保持左图右文横向布局，图片缩小但保持包裹样式 */
    .post-card-img-small { width: 140px; min-width: 140px; padding: 10px; }
    .post-card-img-small img { border-radius: 10px; }
    .post-card-small .post-card-body { padding: 12px 14px; min-height: 100px; }
    .post-card-small .post-card-title { font-size: 0.95rem; }
    .post-card-picture { min-height: 200px; }
    .post-card-picture-inner { padding: 24px 18px 18px; }
    .post-card-picture-inner .post-card-title { font-size: 1.1rem; }
    .picture-category-badge { top: 12px; right: 12px; font-size: 10px; padding: 4px 10px; }
    .img-category-badge { bottom: 10px; left: 10px; font-size: 10px; padding: 4px 10px; }
    .post-card-no_pic .post-card-title { font-size: 1.05rem; }
    .post-card-no_pic .post-card-body { padding: 14px 18px; min-height: 80px; }
    .post-card-foot { gap: 10px; font-size: 11px; }

    .post-body { padding: 18px 20px; }
    .post-title { font-size: 1.4rem; }
    .post-meta-bar { font-size: 12px; gap: 5px; }

    .comments-section { padding: 18px 20px; }
    .comment-children { margin-left: 12px; padding-left: 8px; }
    .comment-avatar img { width: 32px; height: 32px; }
    .comment-avatar { margin-right: 6px; }
    .comment-infos { margin-left: 38px; padding: 10px 12px; }
    .comment-form-fields { flex-direction: column; gap: 10px; }
    .comment-form-footer { flex-direction: column; align-items: stretch; gap: 10px; }
    .comment-form-submit-area {
        margin-left: 0;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 10px;
    }
    .captcha-group { flex: 1 1 auto; justify-content: flex-start; min-width: 0; }
    .btn-submit { white-space: nowrap; flex-shrink: 0; }

    .related-grid { grid-template-columns: 1fr; }

    .form-row { flex-direction: column; gap: 0; }

    .single-post .post-cover { max-height: 240px; }
    .single-post .post-cover img { max-height: 240px; }

    .post-neighbor { flex-direction: column; gap: 10px; }
    .post-neighbor a { max-width: 100%; }

    .floating-actions { bottom: 20px; right: 20px; gap: 8px; }
    .floating-action-btn, .back-to-top { width: 40px; height: 40px; font-size: 20px; }

    .pagination-wrapper .pagination a,
    .pagination-wrapper .pagination span {
        min-width: 34px; height: 34px; font-size: 13px; padding: 0 8px;
    }
}

/* Small Mobile: up to 480px */
@media (max-width: 480px) {
    :root { --aside-width: 85%; }

    .app-main { padding: 10px; }
    .main-container { gap: 12px; }

    .post-card-body { padding: 12px 16px; }
    .post-card-title { font-size: 1rem; }
    .post-card-desc { font-size: 13px; -webkit-line-clamp: 2; }
    .post-card-img { padding-bottom: 30%; }
    /* 小屏手机端小图卡片：保持左图右文，图片更小但保持包裹样式 */
    .post-card-img-small { width: 118px; min-width: 118px; padding: 8px; }
    .post-card-img-small img { border-radius: 8px; }
    .post-card-small .post-card-body { padding: 10px 12px; min-height: 80px; }
    .post-card-small .post-card-title { font-size: 0.9rem; }
    .post-card-picture { min-height: 160px; }
    .post-card-picture-inner { padding: 20px 16px 14px; }
    .post-card-picture-inner .post-card-title { font-size: 1rem; }
    .post-card-meta { font-size: 11px; }
    .picture-category-badge { top: 10px; right: 10px; font-size: 9px; padding: 3px 8px; }
    .img-category-badge { bottom: 8px; left: 8px; font-size: 9px; padding: 3px 8px; }
    .post-card-no_pic .post-card-title { font-size: 0.95rem; }
    .post-card-no_pic .post-card-body { padding: 12px 16px; min-height: 70px; }
    .post-card-foot { gap: 8px; font-size: 10px; flex-wrap: wrap; }
    .pull-right { gap: 8px; }

    .post-body { padding: 16px; }
    .post-title { font-size: 1.2rem; }
    .post-content { font-size: 15px; }

    .comments-section { padding: 16px; }
    .comments-title { font-size: 1.1rem; }
    .sidebar-inner { gap: 12px; }
    .sidebar-widget { padding: 14px 16px; }
}

/* ========== Print Styles ========== */
@media print {
    *, *::before, *::after {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body { font-size: 12pt; line-height: 1.6; }

    .app-aside, .app-sidebar, .mobile-header, .aside-overlay,
    .back-to-top, .app-footer, .comments-section, .post-neighbor,
    .post-tags-section, .sidebar-toggle, .desktop-header { display: none !important; }

    .app-container { display: block; max-width: 100%; padding-top: 0; }
    .app-main { margin-left: 0; padding: 0; }
    .main-container { display: block; gap: 0; }
    .content-wrapper { width: 100%; }

    .post-card, .single-post {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .post-card-img { max-height: 200px; overflow: hidden; }

    a { text-decoration: underline; }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    .post-content pre, .post-content code {
        border: 1px solid #ccc;
        background: #f5f5f5 !important;
    }
}

/* ================================================================
 * v4 视觉升级（参考子比主题现代博客风）
 * 追加层：卡片现代化、悬停动效、多彩标签、页面转场、微交互
 * 通过更高特异性覆盖上方对应规则，不改原有结构
 * ================================================================ */

/* ---------- 卡片基础升级 ---------- */
/* 注意：不用 background 简写（会覆盖 picture 样式的 background-image），
 * 只设 background-color，picture 卡片的背景图通过 inline style 设置不会被覆盖 */
.post-card {
    border-radius: var(--card-radius) !important;
    background-color: var(--bg-card-solid);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-spring), box-shadow var(--transition-spring), border-color var(--transition-fast) !important;
    will-change: transform;
    position: relative;
    overflow: hidden;
}

/* picture 样式卡片保留其 inline style 的 background-image */
.post-card.post-card-picture {
    background-color: var(--bg-hover);
}

.post-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(245,158,11,0), rgba(99,102,241,0));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
    z-index: 1;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-elevated) !important;
}

.post-card:hover::before {
    opacity: 1;
    background: linear-gradient(135deg, var(--accent-glow), var(--accent-2-light));
}

/* 卡片图片悬停缩放（小图卡片图片自带 border-radius，不需要容器 overflow:hidden） */
.post-card-img,
.post-card-picture {
    overflow: hidden;
}

.post-card-img img,
.post-card-img-small img {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) !important;
    will-change: transform;
}

.post-card:hover .post-card-img img,
.post-card:hover .post-card-img-small img {
    transform: scale(1.06);
}

/* picture 样式背景缩放 */
.post-card-picture {
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.post-card:hover .post-card-picture {
    transform: scale(1.03);
}

/* 标题 hover 强调 */
.post-card-title a {
    transition: color var(--transition-fast);
    background-image: linear-gradient(var(--accent), var(--accent));
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size var(--transition-normal), color var(--transition-fast);
}

.post-card:hover .post-card-title a {
    color: var(--accent);
    background-size: 100% 2px;
}

/* foot 信息胶囊化 */
.post-card-foot .foot-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--bg-hover);
    font-size: 12px;
    color: var(--text-secondary);
    transition: background var(--transition-fast), color var(--transition-fast);
}

.post-card-foot .foot-item:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.post-card-foot .foot-item i {
    font-size: 13px;
}

/* 分类徽章多彩化 */
.img-category-badge,
.picture-category-badge {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 8px var(--accent-glow);
    backdrop-filter: blur(8px);
}

/* 标签彩色化 —— 通过 nth-child 循环配色 */
.post-tags .label,
.post-tags .badge {
    display: inline-block;
    padding: 3px 10px !important;
    border-radius: 999px !important;
    font-size: 12px !important;
    color: #fff !important;
    margin: 2px 4px 2px 0;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.post-tags .label:hover,
.post-tags .badge:hover {
    transform: translateY(-2px);
}

.post-tags .label:nth-child(6n+1), .post-tags .badge:nth-child(6n+1) { background: var(--tag-blue) !important; }
.post-tags .label:nth-child(6n+2), .post-tags .badge:nth-child(6n+2) { background: var(--tag-green) !important; }
.post-tags .label:nth-child(6n+3), .post-tags .badge:nth-child(6n+3) { background: var(--tag-purple) !important; }
.post-tags .label:nth-child(6n+4), .post-tags .badge:nth-child(6n+4) { background: var(--tag-pink) !important; }
.post-tags .label:nth-child(6n+5), .post-tags .badge:nth-child(6n+5) { background: var(--tag-cyan) !important; }
.post-tags .label:nth-child(6n+6), .post-tags .badge:nth-child(6n+6) { background: var(--tag-red) !important; }

/* 置顶徽章 */
.top-badge {
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* ---------- 页面转场动效 ---------- */
/* View Transitions API 支持 */
@supports (view-transition-name: none) {
    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation-duration: 0.4s;
        animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    }
    ::view-transition-old(root) {
        animation-name: vt-fade-out;
    }
    ::view-transition-new(root) {
        animation-name: vt-fade-in;
    }
    @keyframes vt-fade-out {
        to { opacity: 0; transform: translateY(-8px) scale(0.99); }
    }
    @keyframes vt-fade-in {
        from { opacity: 0; transform: translateY(12px) scale(0.99); }
    }
}

/* 水面上升转场动效（v4.0.4 重写）
 * 点击站内链接时：蓝色水面从底部上升至顶部，水面有真实波浪起伏，伴随气泡上浮
 * 水面到顶后跳转新页面
 *
 * 关键改进：
 * 1. 水面用两层 SVG 波浪 path 做连续起伏，不是简单的 translateX 抖动
 * 2. 水体用 transform: translateY 上升（而非 height 动画），避免布局重排
 * 3. 气泡用真实物理感：底部生成、上浮、到水面破裂淡出
 */

/* 转场容器：固定全屏，默认不可见，overflow 裁剪波浪溢出 */
.water-transition {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    overflow: hidden;
}

/* 水体容器：整体从底部 translateY 上升，transform 不触发布局 */
.water-fill {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100%;
    transform: translateY(100%);
    background: linear-gradient(
        to top,
        #0c4a6e 0%,
        #075985 25%,
        #0369a1 55%,
        #0ea5e9 85%,
        #38bdf8 100%
    );
}

.water-transition.active .water-fill {
    animation: water-rise 1.0s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes water-rise {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* 水面波浪：用 SVG path 做真实波浪起伏
 * 两层波浪叠加，不同速度向左/右流动，形成真实水面感 */
.water-surface {
    position: absolute;
    left: 0;
    right: 0;
    top: -24px;
    height: 28px;
    width: 200%;
    pointer-events: none;
}

.water-surface svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

/* 后层波浪：慢速向左流动 */
.water-surface .wave-back {
    animation: wave-flow-left 4s linear infinite;
    opacity: 0.5;
}

/* 前层波浪：快速向右流动 */
.water-surface .wave-front {
    animation: wave-flow-right 2.5s linear infinite;
    opacity: 0.85;
}

@keyframes wave-flow-left {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes wave-flow-right {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

/* 水面高光：波浪顶部的亮色高光带 */
.water-surface::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 8px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    opacity: 0.7;
}

/* 气泡容器 */
.water-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

/* 单个气泡：玻璃质感，从底部升起 */
.bubble {
    position: absolute;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(
        circle at 32% 28%,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(186, 230, 253, 0.55) 35%,
        rgba(125, 211, 252, 0.2) 65%,
        transparent 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow:
        inset -2px -2px 4px rgba(255, 255, 255, 0.25),
        inset 1px 1px 2px rgba(125, 211, 252, 0.3);
    opacity: 0;
    animation-name: bubble-rise;
    animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
    animation-fill-mode: forwards;
}

@keyframes bubble-rise {
    0% {
        transform: translate(0, 0) scale(0.3);
        opacity: 0;
    }
    10% {
        opacity: 0.95;
        transform: translate(var(--drift-x, 4px), -30px) scale(1);
    }
    60% {
        opacity: 0.85;
        transform: translate(var(--drift-x, 8px), calc(-50vh - 20px)) scale(1.08);
    }
    90% {
        opacity: 0.4;
        transform: translate(var(--drift-x, 10px), calc(-90vh - 10px)) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--drift-x, 12px), -100vh) scale(0.6);
    }
}

/* 深色模式下水面颜色稍暗 */
body.dark-mode .water-fill {
    background: linear-gradient(
        to top,
        #082f49 0%,
        #0c4a6e 25%,
        #075985 55%,
        #0284c7 85%,
        #0ea5e9 100%
    );
}

/* ---------- 导航栏升级 ---------- */
.desktop-header {
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
}

.desktop-header.scrolled {
    box-shadow: var(--shadow-md);
}

.desktop-nav-item {
    position: relative;
    transition: color var(--transition-fast);
}

.desktop-nav-item::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 2px;
    transform: translateX(-50%);
    transition: width var(--transition-normal);
}

.desktop-nav-item:hover::after,
.desktop-nav-dropdown:hover .desktop-nav-item::after {
    width: 70%;
}

.desktop-nav-item:hover {
    color: var(--accent) !important;
}

.desktop-action-btn {
    transition: all var(--transition-bounce);
}

.desktop-action-btn:hover {
    background: var(--accent-light);
    color: var(--accent);
    transform: rotate(-8deg) scale(1.08);
}

/* ---------- 微交互：按钮涟漪 ---------- */
.floating-action-btn,
.back-to-top,
.desktop-action-btn,
.load-more-btn {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: ripple-spread 0.6s ease-out;
    pointer-events: none;
}

body.dark-mode .ripple {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes ripple-spread {
    to { transform: scale(4); opacity: 0; }
}

/* 加载更多按钮升级 */
.load-more-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover)) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: var(--shadow-accent) !important;
    padding: 12px 36px !important;
    border-radius: 999px !important;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-spring) !important;
}

.load-more-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 28px var(--accent-glow) !important;
}

.load-more-btn:active {
    transform: translateY(0) scale(0.97) !important;
}

.load-more-btn i {
    transition: transform var(--transition-bounce);
}

.load-more-btn:hover i {
    transform: translateY(3px);
}

/* 返回顶部按钮升级 */
.back-to-top {
    background: linear-gradient(135deg, var(--accent-2), var(--accent-2-hover)) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 8px 20px var(--accent-2-light) !important;
}

.back-to-top:hover {
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35) !important;
}

/* 链接强调色 */
.post-content a, .post-card-desc a {
    color: var(--accent-2);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.post-content a:hover, .post-card-desc a:hover {
    border-bottom-color: var(--accent-2);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
    background-clip: content-box;
}

/* 选中文本配色 */
::selection {
    background: var(--accent-glow);
    color: var(--text-primary);
}

/* 骨架屏（图片加载占位）—— 仅对没有 src 的 img 生效，避免污染真实图片 */
.post-card-img img:not([src]),
.post-card-img-small img:not([src]),
.post-card-img img[src=""],
.post-card-img-small img[src=""] {
    background: linear-gradient(110deg, var(--bg-hover) 8%, var(--bg-input) 18%, var(--bg-hover) 33%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
    to { background-position-x: -200%; }
}

/* 减少动效偏好支持 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .post-card:hover { transform: none !important; }
}

/* 自定义顶置文章视觉标记（仅用右上角胶囊徽章标识，无左边条） */
.post-card.is-custom-sticky {
    position: relative;
}

.post-card.is-custom-sticky::after {
    content: "顶置";
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    box-shadow: 0 2px 8px var(--accent-glow);
    pointer-events: none;
}

/* picture 样式的顶置文章，标记位置调整避免与分类徽章重叠 */
.post-card.is-custom-sticky.post-card-picture::after {
    top: auto;
    bottom: 12px;
    right: 12px;
}

/* 小图样式的顶置标记移到右上 */
.post-card.is-custom-sticky.post-card-small::after {
    top: 12px;
    right: 12px;
}