/* ============================================
   🎨 CSS变量定义 - 统一管理
   ============================================ */

:root {
    /* V海暗色系核心配色 */
    --primary-color: #268BD2;
    --secondary-color: #657B83;
    --bg-color: #002B36;
    --bg-secondary: #073642;
    --sidebar-bg: #01313f;
    --text-color: #93A1A1;
    --text-highlight: #d0edf7;
    --border-color: #33555E;
    --selection-bg: #C7EBF6;
    --selection-color: #002B36;
    --accent-green: #859900;
    --accent-cyan: #2AA198;
    --accent-red: #D30102;
    --accent-orange: #CB4B16;
    --accent-yellow: #B58900;
    --accent-magenta: #D33682;
    
    /* 🤖 AI科技感配色 */
    --ai-glow-primary: #00d4ff;
    --ai-glow-secondary: #7b2cbf;
    --ai-glow-accent: #39ff14;
}

* {
    box-sizing: border-box;
}

/* ============================================
   🌐 基础布局样式（新窗口与弹窗共用）
   ============================================ */

/* 护眼选区样式 */
::selection {
    background: var(--selection-bg);
    color: var(--selection-color);
}

::-moz-selection {
    background: var(--selection-bg);
    color: var(--selection-color);
}

/* 新窗口body样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-color);
    margin: 0;
    padding: 20px;
    overflow-y: auto;
}

/* 新窗口容器 */
.container {
    max-width: 95vw;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
    overflow: visible;
    border: 1px solid var(--border-color);
}

/* ============================================
   🤖 通用标题区域 - 科技感AI风格
   ============================================ */

/* 统一头部容器：支持新窗口(.md-header)和弹窗(#md-title-display) */
.md-header,
#md-title-display {
    background: linear-gradient(
        160deg,
        var(--sidebar-bg) 0%,
        #0d2a3a 40%,
        var(--bg-secondary) 100%
    ) !important;
    padding: 25px 30px !important;
    margin-bottom: 0;
    position: relative;
    z-index: 999;
    box-shadow: 
        inset 0 1px 0 rgba(0, 212, 255, 0.1),
        inset 0 -10px 30px rgba(7, 54, 66, 0.3);
    text-align: center;
    overflow: visible;
}

/* 标题区域顶部装饰线 - 霓虹渐变 */
.md-header::before,
#md-title-display::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--ai-glow-primary) 20%,
        var(--ai-glow-secondary) 50%,
        var(--ai-glow-primary) 80%,
        transparent 100%
    );
    animation: neonFlow 3s ease-in-out infinite;
    box-shadow: 
        0 0 10px var(--ai-glow-primary),
        0 0 20px var(--ai-glow-primary),
        0 0 30px var(--ai-glow-secondary);
}

/* 底部柔和过渡效果 */
.md-header::after,
#md-title-display::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(
        to bottom,
        rgba(0, 43, 54, 0) 0%,
        rgba(7, 54, 66, 0.6) 50%,
        rgba(7, 54, 66, 0.95) 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* 新窗口特有的渐变层和分隔线（可选） */
.md-header .gradient-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(
        to bottom,
        rgba(7, 54, 66, 0) 0%,
        rgba(7, 54, 66, 0.3) 30%,
        rgba(7, 54, 66, 0.7) 60%,
        rgba(7, 54, 66, 0.95) 100%
    );
    z-index: 1;
    pointer-events: none;
}

.md-header .divider {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 1px;
    z-index: 3;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 212, 255, 0.3) 20%,
        rgba(0, 212, 255, 0.6) 50%,
        rgba(0, 212, 255, 0.3) 80%,
        transparent 100%
    );
    box-shadow: 
        0 0 8px rgba(0, 212, 255, 0.3),
        0 0 15px rgba(0, 212, 255, 0.15);
}

/* 霓虹流动动画 */
@keyframes neonFlow {
    0%, 100% {
        background-position: 0% 50%;
        filter: brightness(1);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.3);
    }
}

/* 统一标题样式：支持新窗口(h1)和弹窗(#article-title) */
.md-header h1,
.md-title,
#article-title {
    margin: 0 auto;
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    
    /* 渐变文字 */
    background: linear-gradient(
        120deg,
        #ffffff 0%,
        var(--ai-glow-primary) 30%,
        #a8edea 50%,
        var(--ai-glow-primary) 70%,
        #ffffff 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    font-size: 26px !important;
    font-weight: 700 !important;
    font-family: 
        "SF Pro Display",
        -apple-system, 
        BlinkMacSystemFont, 
        "Segoe UI", 
        Roboto, 
        "Microsoft YaHei",
        sans-serif !important;
    letter-spacing: 1px;
    text-shadow: none !important;
    
    filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.4))
            drop-shadow(0 0 12px rgba(0, 212, 255, 0.2));
    
    animation: textShine 4s linear infinite;
}

/* 文字闪光动画 */
@keyframes textShine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* 标题装饰元素 */
.md-header h1::before,
.md-title::before,
#article-title::before {
    content: "◆";
    margin-right: 12px;
    font-size: 12px;
    color: var(--ai-glow-primary);
    -webkit-text-fill-color: var(--ai-glow-primary);
    animation: decorBlink 1.5s ease-in-out infinite;
}

.md-header h1::after,
.md-title::after,
#article-title::after {
    content: "◆";
    margin-left: 12px;
    font-size: 12px;
    color: var(--ai-glow-primary);
    -webkit-text-fill-color: var(--ai-glow-primary);
    animation: decorBlink 1.5s ease-in-out infinite 0.75s;
}

/* 装饰闪烁动画 */
@keyframes decorBlink {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* 标题悬停效果 */
.md-header:hover h1,
.md-header:hover .md-title,
#md-title-display:hover #article-title {
    animation: textShine 2s linear infinite;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.6))
            drop-shadow(0 0 20px rgba(0, 212, 255, 0.4));
}

/* 粒子效果容器 */
.md-header .particles,
#md-title-display .particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.3;
    z-index: 0;
}

.md-header .particle,
#md-title-display .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--ai-glow-primary);
    border-radius: 50%;
    animation: particleFloat 6s ease-in-out infinite;
}

.md-header .particle:nth-child(1),
#md-title-display .particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.md-header .particle:nth-child(2),
#md-title-display .particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.md-header .particle:nth-child(3),
#md-title-display .particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.md-header .particle:nth-child(4),
#md-title-display .particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.md-header .particle:nth-child(5),
#md-title-display .particle:nth-child(5) { left: 50%; animation-delay: 4s; }
.md-header .particle:nth-child(6),
#md-title-display .particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.md-header .particle:nth-child(7),
#md-title-display .particle:nth-child(7) { left: 70%; animation-delay: 0.5s; }
.md-header .particle:nth-child(8),
#md-title-display .particle:nth-child(8) { left: 80%; animation-delay: 1.5s; }
.md-header .particle:nth-child(9),
#md-title-display .particle:nth-child(9) { left: 90%; animation-delay: 2.5s; }

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(100%) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
        transform: translateY(80%) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateY(-20%) scale(1);
    }
    100% {
        transform: translateY(-30%) scale(0);
        opacity: 0;
    }
}

/* ============================================
   📝 通用Markdown内容区域样式
   ============================================ */

/* 内容区域基础：新窗口(.content)和弹窗(#md-markdown-content) */
.content,
.md-content,
#md-markdown-content {
    padding: 30px;
    min-height: 500px;
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: var(--text-color);
    background: var(--bg-secondary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* 弹窗内容区域特定调整 */
#md-markdown-content {
    margin-top: -25px;
    padding-top: 35px !important;
    position: relative;
    z-index: 2;
    background: linear-gradient(
        180deg,
        rgba(7, 54, 66, 0.2) 0%,
        var(--bg-secondary) 8%,
        var(--bg-secondary) 100%
    ) !important;
}

/* 新窗口内容容器特定样式 */
.content {
    border-radius: 0 0 8px 8px;
}

/* Markdown内容样式（统一使用 .md-content 或 #markdown-content） */
.md-content h1, .md-content h2, .md-content h3, .md-content h4, .md-content h5, .md-content h6,
#markdown-content h1, #markdown-content h2, #markdown-content h3, #markdown-content h4, #markdown-content h5, #markdown-content h6,
#md-markdown-content h1, #md-markdown-content h2, #md-markdown-content h3, #md-markdown-content h4, #md-markdown-content h5, #md-markdown-content h6 {
    margin-top: 1.5em !important;
    margin-bottom: 0.5em !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    color: var(--text-highlight) !important;
}

.md-content h1, #markdown-content h1, #md-markdown-content h1 {
    font-size: 2em !important;
    border-bottom: 2px solid var(--border-color) !important;
    padding-bottom: 0.3em !important;
}

.md-content h2, #markdown-content h2, #md-markdown-content h2 {
    font-size: 1.5em !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding-bottom: 0.3em !important;
}

.md-content h3, #markdown-content h3, #md-markdown-content h3 {
    font-size: 1.25em !important;
}

.md-content p, #markdown-content p, #md-markdown-content p {
    margin-top: 0 !important;
    margin-bottom: 16px !important;
}

.md-content a, #markdown-content a, #md-markdown-content a {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.md-content a:hover, #markdown-content a:hover, #md-markdown-content a:hover {
    text-decoration: none !important;
    border-bottom-color: var(--primary-color) !important;
}

/* 代码块 */
.md-content pre, #markdown-content pre, #md-markdown-content pre {
    background: var(--sidebar-bg) !important;
    border-radius: 6px !important;
    padding: 16px !important;
    overflow: auto !important;
    margin: 16px 0 !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
}

/* 行内代码 */
.md-content code, #markdown-content code, #md-markdown-content code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace !important;
    font-size: 85% !important;
    background: rgba(147, 161, 161, 0.1) !important;
    padding: 0.2em 0.4em !important;
    border-radius: 3px !important;
    color: var(--accent-cyan) !important;
}

.md-content pre code, #markdown-content pre code, #md-markdown-content pre code {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 100% !important;
    color: var(--text-color) !important;
}

/* 引用块 */
.md-content blockquote, #markdown-content blockquote, #md-markdown-content blockquote {
    border-left: 4px solid var(--secondary-color) !important;
    margin: 0 0 16px 0 !important;
    padding: 0.5em 1em !important;
    color: var(--secondary-color) !important;
    font-style: italic;
    background: rgba(101, 123, 131, 0.05) !important;
    border-radius: 0 4px 4px 0;
}

/* 表格 */
.md-content table, #markdown-content table, #md-markdown-content table {
    width: 100% !important;
    overflow: auto !important;
    margin-bottom: 16px !important;
    border-collapse: collapse !important;
    border: 2px solid var(--primary-color) !important;
    border-radius: 4px !important;
    font-family: "JetBrains Mono", "Menlo", monospace !important;
    font-size: 14px !important;
}

.md-content table th, #markdown-content table th, #md-markdown-content table th {
    background: linear-gradient(180deg, #145369 0%, #0d3440 100%) !important;
    color: cyan !important;
    font-weight: bold !important;
    padding: 12px 16px !important;
    border: 1px solid #33555E !important;
    border-bottom: 2px solid var(--primary-color) !important;
    text-align: left !important;
}

.md-content table tr:nth-child(odd), #markdown-content table tr:nth-child(odd), #md-markdown-content table tr:nth-child(odd) {
    background-color: #002B36 !important;
}

.md-content table tr:nth-child(even), #markdown-content table tr:nth-child(even), #md-markdown-content table tr:nth-child(even) {
    background-color: #073642 !important;
}

.md-content table td, #markdown-content table td, #md-markdown-content table td {
    padding: 10px 14px !important;
    border: 1px solid #33555E !important;
    color: var(--text-color) !important;
}

.md-content table tr:hover, #markdown-content table tr:hover, #md-markdown-content table tr:hover {
    background-color: #0d3440 !important;
    box-shadow: inset 0 0 0 1px var(--primary-color) !important;
}

/* 列表 */
.md-content ul, .md-content ol, #markdown-content ul, #markdown-content ol, #md-markdown-content ul, #md-markdown-content ol {
    padding-left: 2em !important;
    margin-top: 0 !important;
    margin-bottom: 16px !important;
    color: var(--text-color) !important;
}

.md-content li, #markdown-content li, #md-markdown-content li {
    margin-bottom: 4px !important;
}

/* 图片 */
.md-content img, #markdown-content img, #md-markdown-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
    border: 1px solid var(--border-color) !important;
    margin: 16px 0;
}

/* 强调文本 */
.md-content strong, #markdown-content strong, #md-markdown-content strong {
    color: var(--text-highlight) !important;
    font-weight: 600 !important;
}

.md-content em, #markdown-content em, #md-markdown-content em {
    color: var(--accent-yellow) !important;
    font-style: italic !important;
}

.md-content del, #markdown-content del, #md-markdown-content del {
    color: var(--secondary-color) !important;
    text-decoration: line-through !important;
}

/* 分隔线 */
.md-content hr, #markdown-content hr, #md-markdown-content hr {
    height: 0.25em !important;
    padding: 0 !important;
    margin: 24px 0 !important;
    background-color: var(--border-color) !important;
    border: 0 !important;
}

/* 加载状态 */
.loading, #md-loading {
    text-align: center;
    padding: 50px;
    color: var(--secondary-color);
    font-size: 16px;
}

/* 错误提示 */
.md-content .error, #markdown-content .error, #md-markdown-content .error {
    color: var(--accent-magenta);
    padding: 20px;
    background: rgba(211, 54, 130, 0.1);
    border-radius: 4px;
    margin: 20px 0;
    border: 1px solid rgba(211, 54, 130, 0.3);
}

/* ============================================
   🎨 代码高亮 - Solarized Dark（通用）
   ============================================ */

.hljs {
    display: block;
    overflow-x: auto;
    padding: 0;
    background: transparent !important;
    color: var(--text-color);
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-section,
.hljs-link {
    color: var(--accent-green) !important;
    font-weight: 600;
}

.hljs-function .hljs-title,
.hljs-class .hljs-title,
.hljs-title {
    color: var(--primary-color) !important;
}

.hljs-string,
.hljs-regexp,
.hljs-addition {
    color: var(--accent-cyan) !important;
}

.hljs-comment,
.hljs-quote {
    color: var(--secondary-color) !important;
    font-style: italic;
}

.hljs-number,
.hljs-bullet {
    color: var(--accent-magenta) !important;
}

.hljs-built_in,
.hljs-class,
.hljs-params,
.hljs-variable.language_,
.hljs-constant {
    color: var(--accent-yellow) !important;
}

.hljs-variable,
.hljs-property,
.hljs-attribute {
    color: var(--text-color) !important;
}

.hljs-meta,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-template-tag,
.hljs-type {
    color: var(--accent-orange) !important;
}

.hljs-tag {
    color: var(--secondary-color) !important;
}

.hljs-name {
    color: var(--accent-green) !important;
}

.hljs-attr {
    color: var(--primary-color) !important;
}

/* ============================================
   📌 弹窗特定样式（layui-layer）
   ============================================ */

/* 弹窗容器背景 */
.layui-layer.layui-layer-page {
    background-color: var(--bg-color) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
}

/* 弹窗标题栏 */
.layui-layer-title {
    background: linear-gradient(135deg, var(--sidebar-bg), var(--bg-color)) !important;
    color: var(--text-highlight) !important;
    border-bottom: 1px solid var(--border-color) !important;
    font-weight: 600 !important;
}

/* 弹窗内容区域 */
.layui-layer-content {
    background-color: var(--bg-color) !important;
    overflow: auto !important;
}

/* 预览容器 */
#md-preview-container {
    background: var(--bg-color);
    height: calc(100vh - 120px);
    overflow: auto;
}

/* 弹窗工具栏 */
#md-toolbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(135deg, var(--sidebar-bg), var(--bg-color)) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 8px 15px;
    z-index: 1001;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#md-toolbar button {
    margin-right: 8px;
    height: 34px;
    min-width: auto;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
}

#md-toolbar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    background: rgba(255,255,255,0.1);
}

#md-toolbar button:last-child {
    margin-left: auto;
    min-width: 80px;
    background: linear-gradient(135deg, #ff6b6b, #ff4757) !important;
    border-color: rgba(255, 107, 107, 0.4);
    color: white !important;
}

/* 工具栏滚动条 */
#md-toolbar::-webkit-scrollbar {
    height: 6px;
}

#md-toolbar::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 3px;
}

#md-toolbar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

#md-toolbar::-webkit-scrollbar-thumb:hover {
    background: #586e75;
}

/* 弹窗滚动条 */
#md-preview-container::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#md-preview-container::-webkit-scrollbar-track {
    background: var(--bg-color);
}

#md-preview-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}

#md-preview-container::-webkit-scrollbar-thumb:hover {
    background: #586e75;
}

/* 弹窗选区 */
#md-markdown-content ::selection,
#md-preview-container ::selection {
    background: #C7EBF6;
    color: #002B36;
}

/* ============================================
   🌐 新窗口特定样式
   ============================================ */

/* 元信息区域 */
.meta {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: var(--text-color);
    position: relative;
    z-index: 2;
}

.meta-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.actions {
    margin-top: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* AI感现代化按钮组样式 */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 10px 10px 0 0;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.1), 
        transparent
    );
}

/* 关闭按钮 */
.btn-close {
    color: #ff7e79;
    border: 1px solid rgba(255, 126, 121, 0.2);
    box-shadow: 
        0 0 15px rgba(255, 126, 121, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-close::before {
    background: linear-gradient(90deg, #ff6b6b, #ff8e8e, #ff6b6b);
}

.btn-close:hover {
    color: #fff;
    background: rgba(255, 126, 121, 0.15);
    border-color: rgba(255, 126, 121, 0.4);
    box-shadow: 
        0 0 25px rgba(255, 126, 121, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-close:hover .fa-times {
    transform: rotate(90deg);
}

.btn-close .fa-times {
    transition: transform 0.3s ease;
}

/* 复制链接按钮 */
.btn-copy {
    color: #5fdeff;
    border: 1px solid rgba(95, 222, 255, 0.2);
    box-shadow: 
        0 0 15px rgba(95, 222, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-copy::before {
    background: linear-gradient(90deg, #2aa198, #5fdeff, #2aa198);
}

.btn-copy:hover {
    color: #fff;
    background: rgba(95, 222, 255, 0.12);
    border-color: rgba(95, 222, 255, 0.4);
    box-shadow: 
        0 0 25px rgba(95, 222, 255, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* 打印按钮 */
.btn-print {
    color: #a8e6cf;
    border: 1px solid rgba(168, 230, 207, 0.2);
    box-shadow: 
        0 0 15px rgba(168, 230, 207, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.btn-print::before {
    background: linear-gradient(90deg, #2ecc71, #a8e6cf, #2ecc71);
}

.btn-print:hover {
    color: #fff;
    background: rgba(168, 230, 207, 0.12);
    border-color: rgba(168, 230, 207, 0.4);
    box-shadow: 
        0 0 25px rgba(168, 230, 207, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 2px var(--bg-color),
        0 0 0 4px currentColor,
        0 0 20px currentColor;
}

/* ============================================
   📱 响应式适配
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: 10px;
        background: var(--bg-color);
    }
    
    .md-header, #md-title-display {
        padding: 15px 20px !important;
    }
    
    .md-header h1, .md-title, #article-title {
        font-size: 20px !important;
    }
    
    .content, .md-content, #md-markdown-content {
        padding: 15px !important;
        font-size: 14px !important;
    }
    
    .md-content h1, #markdown-content h1, #md-markdown-content h1 {
        font-size: 1.75em !important;
    }
    
    .md-content h2, #markdown-content h2, #md-markdown-content h2 {
        font-size: 1.5em !important;
    }
    
    .md-content pre, #markdown-content pre, #md-markdown-content pre {
        padding: 12px !important;
        overflow-x: auto;
    }
    
    #md-toolbar button {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    #md-title-display::after {
        height: 30px;
    }
    
    #md-markdown-content {
        margin-top: -20px;
        padding-top: 30px !important;
    }
}

@media (prefers-color-scheme: dark) {
    .btn {
        background: rgba(255, 255, 255, 0.02);
    }
}

/* ============================================
   🖨️ 打印样式优化
   ============================================ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .md-header, #md-title-display {
        background: #f0f0f0 !important;
        color: black !important;
        -webkit-text-fill-color: black !important;
    }
    
    .md-header h1, .md-title, #article-title {
        background: none !important;
        -webkit-text-fill-color: black !important;
        filter: none !important;
        animation: none !important;
    }
    
    .md-header h1::before, .md-header h1::after,
    .md-title::before, .md-title::after,
    #article-title::before, #article-title::after {
        -webkit-text-fill-color: #333 !important;
        animation: none !important;
    }
    
    .md-header::before, .md-header::after,
    #md-title-display::before, #md-title-display::after,
    .particles {
        display: none !important;
    }
    
    .md-content pre, #markdown-content pre, #md-markdown-content pre {
        background: #f5f5f5 !important;
        border: 1px solid #ddd;
    }
}
