/*
Theme Name: Supreme
Description: 现代化博客主题 - 毛玻璃效果、暗色模式、响应式设计
Version: 1.0.0
Author: Supreme Team
*/


:root {
    --transition-speed: 0.3s;
    /* 主题强调色（Joe 思路：当字重差异不明显时，用主题色让加粗文字跳出来） */
    --theme: #3b82f6;
}

:root.dark {
    --theme: #60a5fa;
}



/* 防止横竖屏切换时浏览器自动放大文字 */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* 正文斜体（em / i）显式声明 italic 并允许字体合成倾斜。
   中文等无斜体字模的字体默认不会倾斜，必须 font-synthesis 才能看到斜体，
   否则前台 <em> 会被渲染成正体，表现为「后台斜体、前台不斜」。 */
.post-content em,
.post-content i {
    font-style: italic;
    font-synthesis: style;
}

/* 仅PC端预留滚动条位置，避免刷新时内容横向跳动；
   移动端不启用，防止部分浏览器预留右侧空隙导致页面整体偏左 */
@media (min-width: 769px) {
    html {
        scrollbar-gutter: stable;
    }
}

/* 防止内容横向溢出导致页面左右抖动 */
html, body {
    overflow-x: hidden;
    
    /* weight style：允许浏览器合成「粗体」与「斜体」。
       之前只写 weight 会禁用斜体合成——中文无斜体字模时 <em> 会被渲染成正体，
       表现为「后台斜体、前台不斜」。 */
    font-synthesis: weight style;
}

/* 对 <strong>/<b> 使用当前字体可提供的最大字重（多字重字体用 Black/Heavy，
   单字重黑体则使用最浓的伪粗体），并叠加主题强调色（Joe 思路：字重不够时靠颜色区分），
   让英文加粗在各种字体下都清晰可辨 */
strong, b {
    font-weight: 900;
    color: var(--theme);
}


body, a, button, input, select, textarea, label, [role="button"] {
    touch-action: manipulation;
}

/* 移除移动端点击高亮，避免点击时的视觉跳动 */
* {
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
    /* 表单元素字号不小于 16px，避免 iOS 聚焦输入框时自动放大页面 */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* iOS 对 background-attachment: fixed 支持不佳，改为 scroll 避免滚动卡顿抖动 */
    .bg-pattern {
        background-attachment: scroll;
    }
}

/* 触屏设备（无 hover 能力）：禁用 transform 类悬停效果，避免点击后效果残留卡住 */
@media (hover: none), (pointer: coarse) {
    .glass-card:hover,
    .glass-card:hover img.avatar,
    .sidebar-item:hover,
    .float-animation:hover,
    .page-navigator li a:hover {
        transform: none;
    }
}



@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 标签浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.float-animation {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

/* 不同的延迟时间，让标签浮动错开 */
.float-delay-0 { animation-delay: 0s; }
.float-delay-1 { animation-delay: 0.2s; }
.float-delay-2 { animation-delay: 0.4s; }
.float-delay-3 { animation-delay: 0.6s; }
.float-delay-4 { animation-delay: 0.8s; }
.float-delay-5 { animation-delay: 1s; }
.float-delay-6 { animation-delay: 1.2s; }
.float-delay-7 { animation-delay: 1.4s; }


.float-animation:hover {
    animation-play-state: paused;
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    transition: background-color var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* 适配移动端地址栏收起/展开，避免视口高度变化引起页面跳动 */
    min-height: 100dvh;
}

/* 页脚始终在底部 */
main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
    transition: all var(--transition-speed) ease;
}

.dark .glass-effect {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
}

.glass-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: all var(--transition-speed) ease;
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
}

.glass-footer {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .glass-footer {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
    border-color: rgba(0, 115, 245, 0.3);
}

.dark .glass-card:hover {
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.4);
    border-color: rgba(0, 115, 245, 0.5);
}

/* 文章卡片内元素的交互效果 */
.glass-card h3 {
    transition: color 0.3s ease;
}

.glass-card:hover h3 {
    color: var(--primary-500);
}

.glass-card p {
    transition: color 0.3s ease;
}

.glass-card:hover p {
    color: var(--text-primary);
}

/* 文章卡片内的图标和按钮效果 */
.glass-card .flex.items-center.text-gray-500 {
    transition: opacity 0.3s ease;
}

.glass-card:hover .flex.items-center.text-gray-500 {
    opacity: 1;
}


.glass-card img.avatar {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover img.avatar {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(0, 115, 245, 0.3);
}

.sidebar-item {
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    transform: translateX(5px);
}

.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .mobile-menu {
    background: rgba(15, 23, 42, 0.7);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu.active {
    transform: translateX(0);
}

.bg-pattern {
    background-image: url('https://free.picui.cn/free/2025/11/02/6906ffe8e529f.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.dark .bg-pattern {
    background-image: url('https://free.picui.cn/free/2025/10/04/68e0c7a4eaed9.jpg');
}

.social-icon {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.social-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 115, 245, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.social-icon:active::after {
    width: 300px;
    height: 300px;
}

@keyframes socialFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.social-icon {
    animation: socialFadeIn 0.6s ease forwards;
    opacity: 0;
}

.social-icon:nth-child(1) { animation-delay: 0.1s; }
.social-icon:nth-child(2) { animation-delay: 0.2s; }
.social-icon:nth-child(3) { animation-delay: 0.3s; }
.social-icon:nth-child(4) { animation-delay: 0.4s; }

.nav-scrolled {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dark .nav-scrolled {
    background: rgba(15, 23, 42, 0.85);
}


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

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.slide-up {
    animation: slideUp 0.6s ease forwards;
}


.modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}


::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 115, 245, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 115, 245, 0.7);
}

.dark ::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(0, 115, 245, 0.3);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 115, 245, 0.5);
}


@media (max-width: 768px) {
    .glass-card {
        background: rgba(255, 255, 255, 0.7);
    }
    
    .dark .glass-card {
        background: rgba(15, 23, 42, 0.9);
    }
}



/* 确保侧边栏宽度一致 */
.desktop-sidebar,
.desktop-rightbar {
    width: 100%;
}

@media (min-width: 1024px) {
    .desktop-sidebar,
    .desktop-rightbar {
        width: 16rem; 
        flex-shrink: 0;
    }
}


.flex-1.min-w-0 {
    overflow-wrap: break-word;
}

/* 确保文章卡片网格对齐 */
.grid.grid-cols-1.md\:grid-cols-2 {
    align-items: stretch;
}

.grid.grid-cols-1.md\:grid-cols-2 > .glass-card {
    display: flex;
    flex-direction: column;
}

/* 侧边栏卡片间距统一 */
.desktop-sidebar .glass-card,
.desktop-rightbar .glass-card {
    margin-bottom: 1.5rem;
}

.desktop-sidebar .glass-card:last-child,
.desktop-rightbar .glass-card:last-child {
    margin-bottom: 0;
}


.stat-progress-item:active {
  transform: scale(0.98);
}


.stat-progress-item:hover .bg-blue-500 {
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3), 0 2px 4px -1px rgba(59, 130, 246, 0.3);
}

.stat-progress-item:hover .bg-green-500 {
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3), 0 2px 4px -1px rgba(16, 185, 129, 0.3);
}

.stat-progress-item:hover .bg-purple-500 {
  box-shadow: 0 4px 6px -1px rgba(139, 92, 246, 0.3), 0 2px 4px -1px rgba(139, 92, 246, 0.3);
}

.stat-progress-item:hover .bg-red-500 {
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3), 0 2px 4px -1px rgba(239, 68, 68, 0.3);
}

/* ============================================================
   Typecho 文章内容样式
   ============================================================ */

.post-content {
    line-height: 1.8;
    color: inherit;
}

/* 6 级标题差异化样式（与 SpEdit 编辑器预览保持一致：字号层级 + 主题色专属装饰） */
body .post-content h1,
body .post-content h2,
body .post-content h3,
body .post-content h4,
body .post-content h5,
body .post-content h6 {
    position: relative;
    color: var(--main, #303133);
    line-height: 1.35;
    font-weight: 700;
    margin: 18px 0 12px;
}

/* h1：最大号 + 主色 # 前缀 + 底部主题色分隔线 */
body .post-content h1 {
    font-size: 28px;
    padding: 0 0 8px;
    border-bottom: 2px solid var(--theme);
}
body .post-content h1::before {
    content: "# ";
    color: var(--theme);
    font-weight: 800;
}


body .post-content h2 {
    font-size: 23px;
    padding: 0 14px;
}
body .post-content h2::before {
    content: "";
    position: absolute;
    top: 8%;
    bottom: 8%;
    left: 0;
    width: 5px;
    border-radius: 3px;
    background: var(--theme);
}


body .post-content h3 {
    font-size: 20px;
    padding: 0 14px;
}
body .post-content h3::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--theme);
    border-radius: 0 4px 4px 0;
}


body .post-content h4 {
    font-size: 18px;
}
body .post-content h4::before {
    content: "\300C";
    color: var(--theme);
    font-weight: 700;
    margin-right: 4px;
}
body .post-content h4::after {
    content: "\300D";
    color: var(--theme);
    font-weight: 700;
    margin-left: 4px;
}

/* h5：主题色实心菱形标记 */
body .post-content h5 {
    font-size: 16px;
    padding: 0 0 0 22px;
}
body .post-content h5::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 4px;
    width: 9px;
    height: 9px;
    background: var(--theme);
    border-radius: 2px;
    transform: translateY(-50%) rotate(45deg);
}

/* h6：胶囊标签（浅底主色文字，最小号；display:table 收缩到内容宽度且独占一行） */
body .post-content h6 {
    font-size: 14px;
    display: table;
    padding: 3px 12px;
    color: var(--theme);
    background: color-mix(in srgb, var(--theme) 14%, transparent);
    border-radius: 999px;
    margin: 14px 0 10px;
}

/* 正文加粗：用当前字体可用的最大字重 900 + 主题强调色，让编辑器里的加粗文字
   在已发布文章中清晰可辨。已改用系统默认字体，粗体由系统字体原生提供；
   若个别系统字体缺 900 字重，html,body 上的 font-synthesis: weight 仍会合成
   更重的伪粗体，保证加粗效果稳定可见。 */
body .post-content strong,
body .post-content b {
    font-weight: 900;
    color: var(--theme);
}

.post-content h1 { font-size: 1.8em; }
.post-content h2 { font-size: 1.5em; }
.post-content h3 { font-size: 1.3em; }
.post-content h4 { font-size: 1.1em; }

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

.post-content a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s;
}

.post-content a:hover {
    color: #2563eb;
}

.dark .post-content a {
    color: #60a5fa;
}

.dark .post-content a:hover {
    color: #93c5fd;
}

/* 文章正文图片：照搬 Joe 主题 .joe_detail__article img:not([class]) 的写法。
   Joe 的关键决定：图片完全 margin: 0 auto，自己不掺一脚；间距全由段落默认 1em(16px) 自然节奏。
   我们额外加一条 img + img 把"图-图"再收近 8px，字图/图字节奏保持 16px 不变。
   
   关键：必须加 :not([class]) 限定 —— 否则特异性 (0,1,1) 的 .post-content img 会覆盖
   .owo_image (0,1,0) / .comment-emoji (0,1,0) 的 display: inline-block，导致 OwO 表情、
   评论表情全部被强制 block 居中、竖排堆叠成"图片样式"。这是 09-05 用户反馈"表情样式变了"的修复。 */
.post-content img:not([class]) {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;          /* Joe 风格：不掺 margin，间距由段落控制 */
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform .35s ease, box-shadow .35s ease;
}
.post-content img:not([class]):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -8px var(--theme, rgba(59, 130, 246, .35));
}

/* 包含图的段落清零 margin-bottom，避免与下方文字段 margin-top collapse 出 16+16=16，
   视觉上叠加 img line-box 撑高看着"图→文字"间距过大。
   段落顶端保留默认 margin-top，所以"文字→图"节奏仍由文字段 margin-bottom(16) + 图段 margin-top(16) collapse = 16px 主导。
   注意：这里 .post-content p { margin-bottom: 1em } 特异性 (0,1,1) = .post-content p:has(img) (0,2,1) 不冲突，
   反而是 :has 选择器更高，所以含图段落能正确清零。 */
.post-content p:has(img) {
    margin-bottom: 0;
}

/* 核心：相邻两张图时把第二张图轻微上移（图-图 ~8px），不动字图/图字（仍 16px）。
   数学（Joe 节奏 16px 基础上）：
     - 文字 → 图：文字段 margin-bottom(16) collapse + img margin-top(0) = 16px
     - 图 → 文字：img margin-bottom(0) + 文字段 margin-top(16) = 16px
     - 图 → 图：图段 collapse(16) + img1 margin-bottom(0) + img2 margin-top(-8) = 8px ✓ */
.post-content img + img {
    margin-top: -8px;
}

/* 防御：部分文章是 <figure><img></figure>，给 figure 也居中以保持视觉一致 */
.post-content figure {
    margin: 1em auto;
    text-align: center;
}
.post-content figure img {
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0;
}
.post-content figcaption {
    margin-top: .5em;
    font-size: .875em;
    color: #6b7280;
    text-align: center;
}
.dark .post-content figcaption {
    color: #9ca3af;
}

.post-content blockquote {
    border-left: 4px solid #3b82f6;
    padding: 0.5em 1em;
    margin: 1em 0;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0 8px 8px 0;
}

.dark .post-content blockquote {
    background: rgba(59, 130, 246, 0.1);
}

/* 仅在高亮关闭（pre 无 language- 类）时作为兜底，高亮开启后由选中的 Prism 主题接管 */
.post-content pre:not([class*="language-"]) {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1em 0;
    font-size: 0.9em;
}

.post-content code {
    background: rgba(59, 130, 246, 0.1);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre:not([class*="language-"]) code {
    background: none;
    padding: 0;
}

/* ============================================================
   代码块容器（macOS 窗口 + 复制按钮图标化，对所有高亮主题通用）
   ============================================================ */
.post-content .code-window {
    position: relative;
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    margin: 1em 0;
    /* 去掉容器投影，避免各浅色/条纹主题（如 Twilight）底部出现阴影 */
    box-shadow: none;
}

.post-content .code-window-header {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: #252526;
    border-bottom: 1px solid #333;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.post-content .code-window-dots {
    display: flex;
    gap: 6px;
}

.post-content .code-window-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.post-content .code-window-dot-red { background: #ff5f56; }
.post-content .code-window-dot-yellow { background: #ffbd2e; }
.post-content .code-window-dot-green { background: #27c93f; }

.post-content .code-window-lang {
    font-size: 11px;
    color: #858585;
    text-transform: uppercase;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* 标题栏右侧：语言标签 + 复制按钮（内联 SVG 图标，不依赖 prism-toolbar 插件，彻底无 Copy/Copied! 文字泄漏） */
.post-content .code-window-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.post-content .code-window-copy {
    background: transparent;
    border: 0;
    color: #858585;
    font-size: 18px;
    padding: 4px;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.post-content .code-window-copy svg {
    width: 1em;
    height: 1em;
    display: block;
}

.post-content .code-window-copy:hover {
    color: #fff;
}

/* 代码块内滚动条：统一变细，避免移动端出现粗大滚动条；
   用多选择器 + !important 强制覆盖全局蓝色滚动条（style.css 顶部 ::-webkit-scrollbar-thumb 蓝色规则），
   并改用中性灰色 thumb，使各深色主题底部不再出现蓝色条。 */
.post-content .code-window pre::-webkit-scrollbar,
.post-content .code-window pre[class*="language-"]::-webkit-scrollbar,
.post-content .code-window pre.line-numbers::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.post-content .code-window pre::-webkit-scrollbar-track,
.post-content .code-window pre[class*="language-"]::-webkit-scrollbar-track,
.post-content .code-window pre.line-numbers::-webkit-scrollbar-track {
    background: transparent !important;
}

.post-content .code-window pre::-webkit-scrollbar-thumb,
.post-content .code-window pre[class*="language-"]::-webkit-scrollbar-thumb,
.post-content .code-window pre.line-numbers::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, 0.35) !important;
    border-radius: 3px;
}

.post-content .code-window pre::-webkit-scrollbar-thumb:hover,
.post-content .code-window pre[class*="language-"]::-webkit-scrollbar-thumb:hover,
.post-content .code-window pre.line-numbers::-webkit-scrollbar-thumb:hover {
    background: rgba(128, 128, 128, 0.55) !important;
}

.post-content .code-window pre {
    scrollbar-width: thin;
    scrollbar-color: rgba(128, 128, 128, 0.35) transparent;
}


@media (max-width: 640px) {
    .post-content .code-window {
        border-radius: 8px;
        margin: 0.75em 0;
    }

    .post-content .code-window-header {
        height: 34px;
        padding: 0 10px;
    }

    .post-content .code-window-dot {
        width: 8px;
        height: 8px;
    }

    .post-content .code-window-dots {
        gap: 5px;
    }

    .post-content .code-window-lang {
        font-size: 10px;
    }

    .post-content .code-window-meta {
        gap: 8px;
    }

    .post-content .code-window-copy {
        font-size: 16px;
    }

    .post-content .code-window pre::-webkit-scrollbar,
    .post-content .code-window pre[class*="language-"]::-webkit-scrollbar,
    .post-content .code-window pre.line-numbers::-webkit-scrollbar {
        height: 3px;
        width: 3px;
    }

    .post-content .code-window pre::-webkit-scrollbar-thumb,
    .post-content .code-window pre[class*="language-"]::-webkit-scrollbar-thumb,
    .post-content .code-window pre.line-numbers::-webkit-scrollbar-thumb {
        background: rgba(128, 128, 128, 0.35) !important;
    }

    .post-content .code-window pre {
        font-size: 0.8em !important;
    }
}

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

.post-content ul li {
    list-style: disc;
    margin-bottom: 0.3em;
}

.post-content ol li {
    list-style: decimal;
    margin-bottom: 0.3em;
}

/* 文章正文任务列表：与前台编辑器预览(.speos_checkbox)保持完全一致
   短代码 {x}/{ } 由 short.php 输出；markdown 任务符 ☐/☑ 由 features.js 的 JS 替换成同一 class */
.post-content .speos_checkbox,
.post-content .speos-task-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    display: inline-block;
    width: 15px;
    height: 15px;
    min-width: 15px;
    min-height: 15px;
    border: 2px solid #409eff;
    border-radius: 2px;
    background: transparent;
    vertical-align: -3px;
    margin: 0 0.3em 0 0;
    padding: 0;
    cursor: default;
    flex-shrink: 0;
    box-sizing: border-box;
}

.post-content .speos_checkbox:disabled,
.post-content .speos-task-checkbox:disabled {
    cursor: not-allowed;
}

.post-content .speos_checkbox:checked,
.post-content .speos-task-checkbox:checked {
    border: none;
    background: #409eff;
}

.post-content .speos_checkbox:checked::after,
.post-content .speos-task-checkbox:checked::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
    box-sizing: border-box;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.post-content th,
.post-content td {
    border: 1px solid rgba(148, 163, 184, 0.3);
    padding: 0.5em 0.75em;
    text-align: left;
}

.post-content th {
    background: rgba(59, 130, 246, 0.1);
    font-weight: 600;
}

.dark .post-content th {
    background: rgba(59, 130, 246, 0.15);
}

.post-content hr {
    border: none;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    margin: 1.5em 0;
}



.page-navigator {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-navigator li a,
.page-navigator li span {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.page-navigator li a {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: inherit;
}

.dark .page-navigator li a {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.page-navigator li a:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
}

.dark .page-navigator li a:hover {
    background: rgba(15, 23, 42, 0.95);
}

.page-navigator li.current span,
.page-navigator li.current a {
    background: #3b82f6;
    color: #fff;
    border: none;
}

/* ============================================================
   Typecho 标签样式
   ============================================================ */

.post-content .tags a,
.tag-list a {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 12px;
    margin: 2px;
    transition: all 0.2s;
}

.post-content .tags a:hover,
.tag-list a:hover {
    background: rgba(59, 130, 246, 0.2);
}

.dark .post-content .tags a,
.dark .tag-list a {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.dark .post-content .tags a:hover,
.dark .tag-list a:hover {
    background: rgba(59, 130, 246, 0.25);
}

/* 评论内容中的 Emoji 表情图片 */
.comment-emoji {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    vertical-align: -0.25em;
    margin: 0 1px;
}

/* 泡泡/阿鲁贴纸（owo 包）：阿鲁素材是“高 66px、宽 53~185px”不等的矩形文字贴纸，
   方形盒会把它拉伸变形（圆脸变椭圆、长贴压扁）。这里只固定高度、宽度按原图比例自适应，
   并放宽并排间距；泡泡是正方形贴纸，等比后尺寸不变。 */
.comment-emoji-owo {
    width: auto;
    height: 1.4em;
    margin: 0 2px;
}

/* 文章标签与分享区 */
.speos_operate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.speos_operate-tags {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
}

.speos_operate-tags::-webkit-scrollbar {
    display: none;
}

.speos_operate-tags a {
    flex-shrink: 0;
    position: relative;
    font-size: 12px;
    background: rgba(59, 130, 246, 0.08);
    color: #4b5563;
    border: 1px solid rgba(59, 130, 246, 0.15);
    padding-right: 10px;
    padding-left: 28px;
    height: 26px;
    line-height: 24px;
    border-radius: 13px;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border 0.25s, color 0.25s, background 0.25s;
}

.speos_operate-tags a:hover {
    color: var(--theme);
    border-color: var(--theme);
    background: rgba(59, 130, 246, 0.12);
}

.speos_operate-tags a:last-child,
.speos_operate-tags a:nth-child(5) {
    margin-right: 0;
}

.speos_operate-tags a:nth-child(n+6) {
    display: none;
}

.speos_operate-tags a::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
}

.speos_operate-tags a::after {
    content: '\f02e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: var(--theme);
}

.dark .speos_operate-tags a {
    background: rgba(96, 165, 250, 0.1);
    color: #d1d5db;
    border-color: rgba(96, 165, 250, 0.2);
}

.dark .speos_operate-tags a::before {
    background: #1f2937;
}

.speos_operate-share {
    position: relative;
    flex-shrink: 0;
}

.speos_share-trigger {
    display: block;
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: transform 0.35s ease;
    border-radius: 50%;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.speos_share-trigger:hover {
    transform: rotate(360deg) scale(1.15);
}

.speos_share-trigger:focus,
.speos_share-trigger:active {
    outline: none;
    box-shadow: none;
}

.speos_share-reach {
    position: absolute;
    z-index: 20;
    top: auto;
    right: 0;
    bottom: calc(100% + 6px);
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 10px;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.08);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: visibility 0.25s, opacity 0.25s, transform 0.25s;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.dark .speos_share-reach {
    background: rgba(31, 41, 55, 0.78);
    border-color: rgba(255, 255, 255, 0.08);
}

.speos_operate-share.active .speos_share-reach {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.speos_share-reach a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.speos_share-reach a:hover {
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 0.12);
}

.speos_share-reach a .icon {
    width: 20px;
    height: 20px;
}

/* 海报分享弹窗 */
.speos_poster-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    backdrop-filter: blur(4px);
}

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

    .speos_poster-modal__inner {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: min(88vw, 380px);
        max-height: 92vh;
        transform: translateY(15px) scale(0.96);
        transition: transform 0.25s ease;
    }

.speos_poster-modal.active .speos_poster-modal__inner {
    transform: translateY(0) scale(1);
}

.speos_poster-modal__canvas {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.speos_poster-modal__canvas canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    border-radius: 12px;
}

.speos_poster-modal__actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.speos_poster-modal__actions button {
    padding: 9px 22px;
    font-size: 14px;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    color: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.speos_poster-modal__actions button:hover {
    transform: translateY(-2px);
}

.speos_poster-save {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35);
}

.speos_poster-close {
    background: rgba(255, 255, 255, 0.18);
}

.speos_poster-close:hover {
    opacity: 0.85;
}

@media (max-width: 768px) {
    .speos_share-trigger {
        width: 26px;
        height: 26px;
    }

    .speos_poster-modal {
        padding: 12px;
    }

    .speos_poster-modal__inner {
        max-width: min(94vw, 330px);
        max-height: 90vh;
    }

    .speos_poster-modal__actions {
        gap: 8px;
        margin-top: 12px;
    }

    .speos_poster-modal__actions button {
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* 评论列表整体更紧凑 */
.comment-item {
    padding-bottom: 12px; /* 替代 pb-4，减少卡片高度 */
}
.comment-device {
    margin: 0 0 4px; /* 减少 UA 标识与上下元素的间距 */
}

/* 评论嵌套缩进：JS 依据 data-parent 给 .comment-item.is-reply 加左缩进，
   去掉左侧竖线，改为与顶层评论一致的干净卡片，仅保留缩进体现层级；整体更矮、主次分明 */
.comment-item.is-reply {
    border-left: none;
    padding: 4px 0 10px 0;
    background: transparent;
    border-radius: 0;
}

/* 手机端进一步削弱缩进，避免空间被压扁 */
@media (max-width: 640px) {
    .comment-item.is-reply {
        border-left: none;
        padding: 3px 0 8px 0;
        margin-left: calc(var(--comment-depth, 1) * 8px) !important;
    }
}

/* 弹出式搜索框样式 */
#search-modal {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

/* 关闭时彻底不显示（ID 特异性高于 Tailwind 的 .hidden，防止被 flex 规则覆盖） */
#search-modal.hidden {
    display: none;
}

/* 打开时 flex 居中；Tailwind 产物缺少相关类（构建后新增未重建），必须在此兜底，否则宽度塌缩贴顶不居中。
   :not(.closing) 区分出场过渡（关闭先加 .closing 播放回退动画再隐藏） */
#search-modal:not(.hidden):not(.closing) {
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#search-modal-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#search-modal:not(.hidden):not(.closing) #search-modal-overlay {
    opacity: 1;
}

/* 搜索框内容容器：左右 16px 边距、最大宽 512px、搜索框与热门搜索间距 16px。
   整体上移 120px（视觉重心偏高不贴中心）；出入场为纯淡入淡出（无位移无缩放） */
#search-modal .search-modal-body {
    position: relative;
    z-index: 10;
    width: calc(100% - 2rem);
    max-width: 32rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(-7.5rem);
    opacity: 0;
    transition: opacity 0.25s ease-out;
}

#search-modal:not(.hidden):not(.closing) .search-modal-body {
    opacity: 1;
}

#search-modal-suggestions {
    opacity: 0;
    transition: opacity 0.25s ease-out 0.1s;
}

#search-modal:not(.hidden):not(.closing) #search-modal-suggestions {
    opacity: 1;
}

#search-modal-input {
    transition: all 0.3s ease;
}

#search-modal-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#search-modal-input::placeholder {
    color: #6b7280;
}

/* 热门搜索：一行 4 个（Tailwind 产物中无基础 grid-cols-4，必须在此兜底） */
#search-modal-word-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

#search-modal-word-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.4rem 0.25rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
}

/* 长关键词单行截断，保证一行 3 个不换行（完整词见 title 属性） */
#search-modal-word-grid a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#search-modal-word-grid a i {
    flex-shrink: 0;
}

#search-modal-word-grid a:hover {
    background: rgba(59, 130, 246, 0.08);
}

/* 深色模式下的搜索框样式 */
.dark #search-modal input {
    color: #f3f4f6;
}

.dark #search-modal input::placeholder {
    color: #9ca3af;
}

.dark #search-modal-suggestions {
    border-color: rgba(255, 255, 255, 0.1);
}

.dark #search-modal-word-grid a {
    color: #e5e7eb;
}

.dark #search-modal-word-grid a:hover {
    background: rgba(255, 255, 255, 0.08);
}

#search-modal:not(.hidden):not(.closing) {
    opacity: 1;
}

#search-modal-overlay {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

#search-modal:not(.hidden):not(.closing) #search-modal-overlay {
    opacity: 1;
}

#search-modal .glass-effect {
    opacity: 0;
    transition: opacity 0.25s ease-out 0.05s;
}

#search-modal:not(.hidden):not(.closing) .glass-effect {
    opacity: 1;
}

#search-modal .glass-effect {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dark #search-modal .glass-effect {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#search-modal-input {
    background: transparent;
    border: none;
    outline: none;
}

#search-modal-input:focus {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.dark #search-modal-input:focus {
    background: rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

#search-modal-suggestions {
    opacity: 0;
    transition: opacity 0.25s ease-out 0.1s;
}

#search-modal:not(.hidden):not(.closing) #search-modal-suggestions {
    opacity: 1;
}

#search-modal-suggestions a {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
}

#search-modal-suggestions a:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.dark #search-modal-suggestions a {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark #search-modal-suggestions a:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.dark #search-modal-suggestions a:hover {
    background: rgba(31, 41, 55, 0.5);
}

/* 出场过渡：ui.js 关闭时先给 #search-modal 加 .closing（打开态规则因 :not(.closing) 失效，
   元素回到初始态并按下方 ease-in 曲线快速淡出），动画播完后再加 .hidden 彻底隐藏。
   注意：closing 期间必须保留 flex 居中布局——否则打开态规则失效后 body 失去居中，
   内容会瞬间跳到视口顶部再淡出（观感即“从顶部出场”），与纯淡出不符 */
#search-modal.closing {
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease-in;
}

#search-modal.closing #search-modal-overlay {
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

#search-modal.closing .search-modal-body {
    opacity: 0;
    transition: opacity 0.18s ease-in;
}

#search-modal.closing .glass-effect {
    opacity: 0;
    transition: opacity 0.15s ease-in;
}

#search-modal.closing #search-modal-suggestions {
    opacity: 0;
    transition: opacity 0.15s ease-in 0.04s;
}

/* 实时搜索结果下拉（ui.js 防抖 300ms 请求 action=supreme-search 后渲染） */
#search-modal-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 0.5rem);
    z-index: 20;
    max-height: 280px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.75rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

#search-modal-results a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background-color 0.15s ease;
}

#search-modal-results a:last-child {
    border-bottom: none;
}

#search-modal-results a:hover {
    background: rgba(59, 130, 246, 0.08);
}

/* 标题单行截断（flex 子项需 min-width:0 才能收缩） */
#search-modal-results a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#search-modal-results a i {
    flex-shrink: 0;
}

/* 命中片段高亮（HTML 已先转义再包 <em>，无 XSS 风险） */
#search-modal-results em {
    color: #2563eb;
    font-style: normal;
    font-weight: 600;
}

#search-modal-results .search-empty {
    padding: 0.8rem 0.9rem;
    font-size: 0.8125rem;
    color: #9ca3af;
}

.dark #search-modal-results {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark #search-modal-results a {
    color: #e5e7eb;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.dark #search-modal-results em {
    color: #60a5fa;
}

/* PC 端桌面搜索框实时结果下拉（widgets.js 渲染到 #search-live-results） */
#search-live-results a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: #374151;
    transition: background-color 0.15s ease;
}

#search-live-results a:hover {
    background: rgba(59, 130, 246, 0.08);
}

/* 标题单行截断（flex 子项需 min-width:0 才能收缩） */
#search-live-results a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#search-live-results a i {
    flex-shrink: 0;
}

/* 命中片段高亮（HTML 已先转义再包 <em>，无 XSS 风险） */
#search-live-results em {
    color: #2563eb;
    font-style: normal;
    font-weight: 600;
}

#search-live-results .search-empty {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: #9ca3af;
}

.dark #search-live-results a {
    color: #e5e7eb;
}

.dark #search-live-results a:hover {
    background: rgba(139, 92, 246, 0.15);
}

.dark #search-live-results em {
    color: #60a5fa;
}

/* PC 端热门搜索：一行 3 个（Tailwind 产物中无基础 grid-cols-3，必须在此兜底） */
#search-hot-words-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem;
    padding: 0.5rem;
}

#search-hot-words-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 0;
    padding: 0.35rem 0.25rem;
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    transition: all 0.2s ease;
}

#search-hot-words-grid a:hover {
    background: rgba(255, 255, 255, 0.25);
}

#search-hot-words-grid a span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark #search-hot-words-grid a {
    color: #e5e7eb;
}

.dark #search-hot-words-grid a:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* 评论区设备标识（评论者浏览器/系统，UA 解析输出） */
.comment-device {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 12px;
    margin: 2px 0 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #9ca3af;
}
.comment-device span {
    display: inline-flex;
    align-items: center;
}
.comment-device i {
    width: 14px;
    margin-right: 4px;
    text-align: center;
    font-size: 0.8125rem;
}
.dark .comment-device {
    color: #6b7280;
}

/* =====================================================================
 * 评论区回复增强：@被回复者徽章 + 昵称行 + 回复按钮悬停反馈
 *
 * 徽章由 comments.php threadedComments 的 static 昵称映射派生渲染（不写入评论内容），
 * 父评论在本页列表时才出现；点击锚点平滑定位到原评论。
 * ===================================================================== */
.comment-author-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-right: 8px;      /* 与右侧时间列保持间距 */
}
.comment-author-name {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comment-at {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    line-height: 1;
    color: var(--theme, #3b82f6);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.10), rgba(139, 92, 246, 0.10));
    border: 1px solid rgba(59, 130, 246, 0.16);
    border-radius: 999px;
    padding: 3px 10px;
    text-decoration: none;
    transition: all .2s ease;
    vertical-align: middle;
}
.comment-at__icon {
    flex-shrink: 0;
    font-size: 10px;
    opacity: 0.85;
}
.comment-at__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.comment-at:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(139, 92, 246, 0.18));
    border-color: rgba(59, 130, 246, 0.28);
    color: #2563eb;
}
.dark .comment-at {
    color: #93c5fd;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.14), rgba(139, 92, 246, 0.14));
    border-color: rgba(96, 165, 250, 0.22);
}
.dark .comment-at:hover {
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(139, 92, 246, 0.22));
    border-color: rgba(96, 165, 250, 0.32);
    color: #bfdbfe;
}

/* 回复按钮：hover 出现胶囊底色（负 margin 抵消 padding，布局不跳动） */
.comment-reply {
    padding: 2px 8px;
    margin: -2px -8px;
    border-radius: 999px;
    transition: background-color .2s ease;
}
.comment-reply:hover {
    background: rgba(59, 130, 246, 0.10);
}
.dark .comment-reply:hover {
    background: rgba(96, 165, 250, 0.14);
}

/* ============================================================
   全局复制提示 Toast（适配浅色/深色模式）
   ============================================================ */
.copy-toast {
    position: fixed;
    z-index: 9999;
    left: 50%;
    bottom: 80px;
    transform: translateX(-50%) translateY(20px);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    max-width: 80vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.copy-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.copy-toast--success {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.25);
}
.copy-toast--error {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.25);
}
.dark .copy-toast {
    color: #f3f4f6;
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.3);
}
.dark .copy-toast--success {
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}
.dark .copy-toast--error {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
}
@media (max-width: 640px) {
    .copy-toast {
        bottom: 40px;
        font-size: 13px;
        padding: 9px 15px;
    }
}
/* ==========================================
   置顶 / 推荐 文章卡片专属标记
   ========================================== */
.supreme-postcard {
    position: relative;
}

/* 顶部细渐变条：一眼区分置顶与推荐 */
.supreme-postcard--sticky::after,
.supreme-postcard--recommend::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 12;
    pointer-events: none;
}

.supreme-postcard--sticky::after {
    background: linear-gradient(90deg, #e60012 0%, #ff2431 55%, #c0000f 100%);
}

.supreme-postcard--recommend::after {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 55%, #f97316 100%);
}

.supreme-postcard--sticky,
.dark .supreme-postcard--sticky {
    box-shadow: 0 8px 32px 0 rgba(230, 0, 18, 0.18);
}

.supreme-postcard--recommend,
.dark .supreme-postcard--recommend {
    box-shadow: 0 8px 32px 0 rgba(245, 158, 11, 0.18);
}

.supreme-postcard--sticky:hover {
    border-color: rgba(230, 0, 18, 0.45);
    box-shadow: 0 14px 40px 0 rgba(230, 0, 18, 0.28);
}

.dark .supreme-postcard--sticky:hover {
    border-color: rgba(230, 0, 18, 0.65);
}

.supreme-postcard--recommend:hover {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 14px 40px 0 rgba(245, 158, 11, 0.28);
}

.dark .supreme-postcard--recommend:hover {
    border-color: rgba(245, 158, 11, 0.65);
}

/* 缩略图左上角徽章组 */
.supreme-flags {
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 13;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    pointer-events: none;
}

.supreme-flag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.7;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.supreme-flag i {
    font-size: 10px;
}

.supreme-flag--sticky {
    background: linear-gradient(135deg, rgba(230, 0, 18, 0.82), rgba(192, 0, 15, 0.82));
}

.supreme-flag--recommend {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.75), rgba(234, 88, 12, 0.75));
}

/* 缩略图底部信息条：左下角时间 / 右下角分类 */
.supreme-thumb-meta {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 6px;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    pointer-events: none;
}

.supreme-thumb-date,
.supreme-thumb-cat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 62%;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.6;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    border: 0.5px solid rgba(255, 255, 255, 0.32);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.supreme-thumb-date {
    background: rgba(17, 24, 39, 0.42);
}

.supreme-thumb-cat {
    background: rgba(16, 185, 129, 0.62);
}

.supreme-thumb-date i,
.supreme-thumb-cat i {
    font-size: 10px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .supreme-flags {
        top: 5px;
        left: 5px;
        gap: 4px;
    }

    .supreme-flag {
        padding: 1px 7px 1px 6px;
        font-size: 10px;
    }

    .supreme-thumb-meta {
        left: 5px;
        right: 5px;
        bottom: 5px;
        gap: 5px;
    }

    .supreme-thumb-date,
    .supreme-thumb-cat {
        padding: 1px 7px;
        font-size: 10px;
    }
}

/* ==========================================
   深色模式适配：置顶 / 推荐角标、缩略图胶囊
   ========================================== */
.dark .supreme-flag {
    border-color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.dark .supreme-flag--sticky {
    background: linear-gradient(135deg, rgba(230, 0, 18, 0.9), rgba(192, 0, 15, 0.9));
}

.dark .supreme-flag--recommend {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(234, 88, 12, 0.9));
}

.dark .supreme-thumb-date,
.dark .supreme-thumb-cat {
    border-color: rgba(255, 255, 255, 0.42);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark .supreme-thumb-date {
    background: rgba(15, 23, 42, 0.6);
}

.dark .supreme-thumb-cat {
    background: rgba(16, 185, 129, 0.72);
}

.dark .supreme-postcard--sticky {
    box-shadow: 0 8px 32px 0 rgba(230, 0, 18, 0.3);
}

.dark .supreme-postcard--recommend {
    box-shadow: 0 8px 32px 0 rgba(245, 158, 11, 0.3);
}

.dark .supreme-postcard--sticky::after {
    background: linear-gradient(90deg, #ff2431 0%, #ff4d57 55%, #e60012 100%);
}

.dark .supreme-postcard--recommend::after {
    background: linear-gradient(90deg, #fbbf24 0%, #fde68a 55%, #f97316 100%);
}

.dark .supreme-postcard--sticky:hover {
    box-shadow: 0 14px 40px 0 rgba(230, 0, 18, 0.42);
}

.dark .supreme-postcard--recommend:hover {
    box-shadow: 0 14px 40px 0 rgba(245, 158, 11, 0.42);
}

/* ==========================================
   点赞按钮：可点赞 / 取消，红心跳动反馈
   ========================================== */
.like-btn {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.like-btn.is-liked,
.like-btn.is-liked .fa-heart {
    color: #ef4444;
}

.dark .like-btn.is-liked,
.dark .like-btn.is-liked .fa-heart {
    color: #f87171;
}

@keyframes supreme-like-pop {
    0% {
        transform: scale(1);
    }
    35% {
        transform: scale(1.45);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

.like-btn .fa-heart.like-pop {
    animation: supreme-like-pop 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================
   留言板：留言墙（玻璃卡片网格）
   ========================================== */
.supreme-message-wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.supreme-message-wall-item {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 14px 14px 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.62) 100%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 18px 0 rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.supreme-message-wall-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 14px;
    right: 14px;
    height: 2px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.55), rgba(139, 92, 246, 0.55));
    opacity: 0.85;
}

.supreme-message-wall-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px 0 rgba(15, 23, 42, 0.12);
    border-color: rgba(59, 130, 246, 0.35);
}

.dark .supreme-message-wall-item {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.72) 0%, rgba(30, 41, 59, 0.55) 100%);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 4px 18px 0 rgba(0, 0, 0, 0.35);
}

.dark .supreme-message-wall-item::before {
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.7), rgba(167, 139, 250, 0.7));
}

.dark .supreme-message-wall-item:hover {
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 10px 26px 0 rgba(0, 0, 0, 0.5);
}

.supreme-message-wall-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.supreme-message-wall-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    border: 2px solid rgba(59, 130, 246, 0.45);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.dark .supreme-message-wall-avatar {
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.supreme-message-wall-name {
    font-size: 13px;
    font-weight: 600;
    color: rgb(31, 41, 55);
    line-height: 1.3;
}

.dark .supreme-message-wall-name {
    color: rgb(226, 232, 240);
}

.supreme-message-wall-time {
    font-size: 11px;
    color: rgb(107, 114, 128);
    line-height: 1.3;
    margin-top: 1px;
}

.dark .supreme-message-wall-time {
    color: rgb(148, 163, 184);
}

.supreme-message-wall-replies {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.32);
}

.dark .supreme-message-wall-replies {
    box-shadow: 0 2px 6px rgba(96, 165, 250, 0.42);
}

.supreme-message-wall-content {
    font-size: 13px;
    line-height: 1.65;
    color: rgb(55, 65, 81);
    word-break: break-word;
    flex: 1;
    min-height: 38px;
}

.supreme-message-wall-content p {
    margin: 0 0 4px;
}

.supreme-message-wall-content p:last-child {
    margin-bottom: 0;
}

.supreme-message-wall-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    vertical-align: middle;
}

.supreme-message-wall-content a {
    color: rgb(59, 130, 246);
    text-decoration: none;
    transition: color 0.2s ease;
}

.supreme-message-wall-content a:hover {
    color: rgb(37, 99, 235);
    text-decoration: underline;
}

.dark .supreme-message-wall-content {
    color: rgb(203, 213, 225);
}

.dark .supreme-message-wall-content a {
    color: rgb(147, 197, 253);
}

.dark .supreme-message-wall-content a:hover {
    color: rgb(191, 219, 254);
}

.supreme-message-wall-ua {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(148, 163, 184, 0.25);
    font-size: 11px;
    color: rgb(107, 114, 128);
}

.supreme-message-wall-ua span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.supreme-message-wall-ua i {
    font-size: 11px;
    opacity: 0.85;
}

.dark .supreme-message-wall-ua {
    border-top-color: rgba(148, 163, 184, 0.22);
    color: rgb(148, 163, 184);
}

@media (max-width: 640px) {
    .supreme-message-wall-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .supreme-message-wall-item {
        padding: 12px 12px 10px;
    }

    .supreme-message-wall-avatar {
        width: 32px;
        height: 32px;
    }
}

/* ==========================================
   留言板：卡片点击定位 + 评论区折叠 / 高亮
   ========================================== */

/* 可点击的留言卡片 */
.supreme-message-wall-item--jump {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.supreme-message-wall-item--jump:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.6);
    outline-offset: 2px;
}

/* 底部「查看评论位置」提示：默认淡出，hover 时浮现 */
.supreme-message-wall-jump {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    color: rgb(59, 130, 246);
    opacity: 0;
    transform: translateY(2px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.supreme-message-wall-jump i {
    font-size: 10px;
}

.supreme-message-wall-item--jump:hover .supreme-message-wall-jump,
.supreme-message-wall-item--jump:focus-visible .supreme-message-wall-jump {
    opacity: 1;
    transform: translateY(0);
}

.dark .supreme-message-wall-jump {
    color: rgb(147, 197, 253);
}

/* 移动端无 hover，常驻显示提示 */
@media (hover: none) {
    .supreme-message-wall-jump {
        opacity: 0.85;
        transform: none;
    }
}

/* 评论区折叠（留言板场景默认）：用 display 让占位彻底消失，避免空白 */
.supreme-comment-collapsed {
    display: none !important;
}

/* 展开 / 收起切换按钮 */
.supreme-comment-toggle {
    display: inline-flex;
    align-items: center;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.supreme-comment-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.36);
}

.supreme-comment-toggle:active {
    transform: translateY(0);
}

.supreme-comment-toggle i {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.dark .supreme-comment-toggle {
    box-shadow: 0 4px 14px rgba(96, 165, 250, 0.34);
}

.dark .supreme-comment-toggle:hover {
    box-shadow: 0 8px 20px rgba(96, 165, 250, 0.44);
}

/* 定位高亮：点击留言墙卡片后，目标留言淡蓝背景提示（无竖线） */
.supreme-comment-highlight {
    border-radius: 8px;
    animation: supreme-comment-highlight 2.2s ease-out;
}

@keyframes supreme-comment-highlight {
    0% {
        background-color: rgba(59, 130, 246, 0.18);
    }
    60% {
        background-color: rgba(59, 130, 246, 0.22);
    }
    100% {
        background-color: transparent;
    }
}

.dark .supreme-comment-highlight {
    animation-name: supreme-comment-highlight-dark;
}

@keyframes supreme-comment-highlight-dark {
    0% {
        background-color: rgba(96, 165, 250, 0.22);
    }
    60% {
        background-color: rgba(96, 165, 250, 0.26);
    }
    100% {
        background-color: transparent;
    }
}
