:root {
    /* 亮色模式变量 */
    --primary-color: #1890ff;
    --primary-hover: #40a9ff;
    --background-color: #f0f2f5;
    --card-bg: #fff;
    --text-color: #314659;
    --text-secondary: #697b8c;
    --header-text: #0d1a26;
    --border-color: #f0f0f0;
    --code-bg: #292d3e;
    --header-bg: #fff;
    --nav-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    --success-color: #52c41a;
    --error-color: #f5222d;
    --warning-color: #faad14;
    --poem-bg: #ffffff;
    --poem-border: #04314D;
    --status-normal: #52c41a;
    --status-fault: #f5222d;
}

.dark-mode {
    /* 暗色模式变量 */
    --primary-color: #177ddc;
    --primary-hover: #3da1ff;
    --background-color: #15181d;
    --card-bg: #1f1f1f;
    --text-color: #d9d9d9;
    --text-secondary: #8a8d90;
    --header-text: #f0f0f0;
    --border-color: #303030;
    --code-bg: #1e1e1e;
    --header-bg: #141414;
    --nav-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --success-color: #49aa19;
    --error-color: #d32029;
    --warning-color: #d89614;
    --poem-bg: #111d2c;
    --poem-border: #153450;
    --status-normal: #49aa19;
    --status-fault: #d32029;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 导航栏 */
header {
    background: var(--header-bg);
    box-shadow: var(--nav-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
}

/* 为所有锚点目标添加滚动偏移 */
section[id],
div[id] {
    scroll-margin-top: 64px;
    /* 留出导航栏高度 */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* 允许子元素换行 */
    gap: 8px;
    /* 添加图片与文字之间的间距 */
}

.logo img.logo-image {
    width: auto;
    height: 30px;
    max-width: 100%;
    max-height: 30px;
    /* 控制最大高度 */
    object-fit: contain;
    /* 等比缩放，保持完整显示 */
    /* aspect-ratio: 396 / 100; */
    /* 强制维持 396:100 比例 */
}

.logo i {
    color: var(--primary-color);
    font-size: 28px;
    margin-right: 12px;
}

.logo h1 {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--header-text);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 15px;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.active-nav {
    color: var(--primary-color) !important;
    font-weight: 500;
}

.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-hover);
}

/* 页面标题 */
.page-header {
    background: var(--card-bg);
    padding: 40px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.page-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: var(--header-text);
    margin-bottom: 12px;
}

.page-header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 16px;
}

/* 系统状态标签 */
.system-status {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.status-tag {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.dark-mode .status-tag {
    background: rgba(255, 255, 255, 0.05);
}

.status-tag.normal {
    background-color: rgba(82, 196, 26, 0.1);
    border-color: rgba(82, 196, 26, 0.3);
    color: var(--status-normal);
}

.status-tag.fault {
    background-color: rgba(245, 34, 45, 0.1);
    border-color: rgba(245, 34, 45, 0.3);
    color: var(--status-fault);
}

.status-tag .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-tag.normal .indicator {
    background-color: var(--status-normal);
}

.status-tag.fault .indicator {
    background-color: var(--status-fault);
}

/* API详情 */
.api-detail {
    background: var(--card-bg);
    border-radius: 4px;
    box-shadow: var(--card-shadow);
    padding: 24px;
    margin-bottom: 24px;
}

/* 返回顶部按钮样式 */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px);
}

.dark-mode .back-to-top {
    background-color: var(--primary-color);
    color: white;
}

.dark-mode .back-to-top:hover {
    background-color: var(--primary-hover);
}

.api-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.api-title h3 {
    font-size: 20px;
    color: var(--header-text);
}

.method {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
}

.method.get {
    background-color: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(24, 144, 255, 0.4);
}

.api-url {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    padding: 12px 16px;
    font-family: monospace;
    color: var(--text-color);
    margin: 16px 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    border-left: 4px solid var(--primary-color);
    position: relative;
}

.dark-mode .api-url {
    background: rgba(255, 255, 255, 0.05);
}

.api-url span {
    color: var(--primary-color);
    margin-right: 6px;
    font-weight: 500;
    font-size: 18px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.api-url .copy-btn {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.api-url .copy-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.dark-mode .api-url .copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.copy-notification {
    position: absolute;
    top: -35px;
    right: 0;
    background: var(--card-bg);
    color: var(--success-color);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    pointer-events: none;
    border: 1px solid var(--success-color);
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.api-description {
    margin-bottom: 24px;
    color: var(--text-color);
}

/* 表格样式 - 优化版 */
.table-container {
    margin: 24px 0;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.table-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--header-text);
}

.feature-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--header-text);
    padding-left: 16px;
    margin-bottom: 20px;
    display: inline-block;
    position: relative;
    font-family: 'Microsoft YaHei', sans-serif;
}

/* 为H3和H4标题单独设置微软雅黑字体 */
h3 {
    font-family: 'Microsoft YaHei', sans-serif;
}

.feature-title::before {
    content: "✦";
    /* 使用 Unicode 图标 */
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    /* 使用主色调 */
    font-size: 18px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background-color: rgba(0, 0, 0, 0.02);
    font-weight: 600;
    text-align: left;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.dark-mode th {
    background-color: rgba(255, 255, 255, 0.05);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

tr:last-child td {
    border-bottom: none;
}

/* 代码块 */
.code-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-top: 24px;
}

.tab {
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.code-block {
    background: var(--code-bg);
    color: #bfc7d5;
    padding: 16px;
    border-radius: 0 0 8px 8px;
    font-family: monospace;
    font-size: 14px;
    overflow-x: auto;
    margin-top: -1px;
    line-height: 1.8;
}

.code-block-f {
    background: var(--code-bg);
    color: #bfc7d5;
    padding: 16px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 14px;
    overflow-x: auto;
    margin-top: -1px;
    line-height: 1.8;
}

.code-block .keyword {
    color: #c792ea;
}

.code-block .string {
    color: #c3e88d;
}

.code-block .comment {
    color: #697098;
}

.code-block .number {
    color: #f78c6c;
}

.code-block .property {
    color: #82aaff;
}

/* 响应状态部分 */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.status-card {
    background: var(--card-bg);
    border-radius: 4px;
    box-shadow: var(--card-shadow);
    padding: 16px;
    border-left: 4px solid;
    transition: all 0.3s;
}

.status-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-card.success {
    border-left-color: var(--success-color);
}

.status-card.error {
    border-left-color: var(--error-color);
}

.status-card .code {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 6px;
}

.status-card.success .code {
    color: var(--success-color);
}

.status-card.error .code {
    color: var(--error-color);
}

/* 页脚 */
footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

/* 诗词展示区 - 优化版 */
.poem-display {
    background: var(--poem-bg);
    border: 1px solid var(--poem-border);
    border-radius: 8px;
    padding: 24px;
    margin: 32px 0;
    text-align: center;
    transition: all 0.5s;
}

.poem-content {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.8;
    margin-bottom: 16px;
    color: var(--header-text);
    font-family: "楷体", "STKaiti", serif;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poem-author {
    font-size: 16px;
    color: var(--text-secondary);
    font-style: italic;
}

.poem-meta {
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.poem-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.try-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.try-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.try-button:disabled {
    background-color: #bfbfbf;
    cursor: not-allowed;
    transform: none;
}

.try-button .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}


.footer-content {
    padding: 32px 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-text {
    margin-bottom: 8px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.footer-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-meta span {
    white-space: nowrap;
}

.footer-meta:hover {
    opacity: 1;
}

.typewriter {
    overflow: hidden;
    /* 隐藏超出部分 */
    white-space: nowrap;
    /* 禁止换行 */
    margin-bottom: 12px;
    border-right: 3px solid var(--header-text);
    /* 光标闪烁效果 */
    width: 0;
    /* 初始宽度为0 */
    animation: typing 3s steps(30, end) forwards,
        blink-caret 0.75s step-end infinite;
}

/* 打字动画 */
@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

/* 光标闪烁动画 */
@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--header-text);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.response-info {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
    text-align: left;
    font-family: monospace;
    font-size: 14px;
    max-height: 300px;
    overflow-y: auto;
}

.dark-mode .response-info {
    background: rgba(255, 255, 255, 0.05);
}

.error-message {
    color: var(--error-color);
    margin-top: 16px;
    padding: 12px;
    background: rgba(245, 34, 45, 0.1);
    border-radius: 4px;
    font-size: 14px;
}

.code-block-container {
    position: relative;
    margin-top: 24px;
}

.code-header {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.dark-mode .copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.copy-notification {
    position: absolute;
    top: -35px;
    right: 0;
    background: var(--card-bg);
    color: var(--success-color);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s;
    pointer-events: none;
    white-space: nowrap;
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.feature-section {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.feature-intro {
    margin-bottom: 24px;
}

.feature-description {
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.7;
}

.feature-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.feature-card {
    flex: 1;
    min-width: 250px;
    background: rgba(0, 0, 0, 0.02);
    border-left: 3px solid var(--primary-color);
    padding: 16px 20px;
    border-radius: 6px;
    transition: background 0.3s;
}

.dark-mode .feature-card {
    background: rgba(255, 255, 255, 0.03);
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--header-text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-list {
    list-style: disc inside none;
    padding-left: 16px;
    color: var(--text-secondary);
    font-size: 15px;
}

.feature-list li {
    margin-bottom: 8px;
}

.code-block-f .keyword {
    color: #c792ea;
    /* 关键字 */
}

.code-block-f .string {
    color: #c3e88d;
    /* 字符串 */
}

.code-block-f .comment {
    color: #697098;
    /* 注释 */
}

.code-block-f .number {
    color: #f78c6c;
    /* 数字 */
}

.code-block-f .property {
    color: #82aaff;
    /* 属性名 */
}

.code-block-f .tag {
    color: #ff5370;
    /* HTML标签 */
}

.code-block-f .class {
    color: #f07178;
    /* 类名/构造函数 */
}

.vertical-divider {
    display: inline-block;
    width: 1px;
    height: 20px;
    margin: 0 16px;
    background: var(--border-color);
    opacity: 0.6;
    vertical-align: middle;
}

.dark-mode .vertical-divider {
    background: rgba(255, 255, 255, 0.2);
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-right: 8px;
    vertical-align: middle;
}

.tag-h {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-right: 8px;
    vertical-align: middle;
}



.free-tag {
    background-color: rgba(var(--success-color-rgb), 0.1); /* 使用 success-color 的浅色背景 */
    color: var(--success-color); /* 使用 success-color 文字颜色 */
    border: 1px solid rgba(var(--success-color-rgb), 0.4); /* success-color 边框 */
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    vertical-align: middle;
    transition: all 0.3s ease;
}

.free-tag:hover {
    background-color: rgba(var(--success-color-rgb), 0.2);
}

.http-tag {
    background-color: rgba(24, 144, 255, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(24, 144, 255, 0.4);
}

.get-tag {
    background-color: rgba(82, 196, 26, 0.1);
    color: var(--status-normal);
    border: 1px solid rgba(82, 196, 26, 0.3);
    margin-bottom: 24px;
}

.nopost-tag {
    background-color: rgba(245, 34, 45, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(245, 34, 45, 0.3);
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    /* 增加 container 的移动端适配 */
    .container {
        padding: 0 16px;
        width: 100%;
        max-width: 100%;
    }

    /* 确保 feature-section 能够撑满可用空间 */
    .feature-section {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 8px;
    }
}

/* 响应式 */
@media (max-width: 768px) {
    
    .nav-links {
        display: none;
    }

    .page-header h2 {
        font-size: 26px;
    }

    .status-cards {
        grid-template-columns: 1fr;
    }

    .poem-content {
        font-size: 20px;
    }

    .poem-meta {
        flex-direction: column;
        gap: 8px;
    }

    .system-status {
        flex-direction: column;
        align-items: center;
    }
}

.table-container td,
.table-container th {
    white-space: normal;
    /* 允许换行 */
    word-break: break-word;
    /* 强制断行 */
    max-width: 200px;
    /* 可选：限制最大宽度 */
}

/* 或者使用省略号 */
@media (max-width: 768px) {

    .table-container td,
    .table-container th {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }
}

@media (max-width: 768px) {

    .table-container table,
    .table-container th,
    .table-container td {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .logo img.logo-image {
        height: 24px;
        max-height: 24px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 16px;
        /* 移动端更小的字体 */
    }
}

/* 新增代码高亮样式 */
.code-block-container .code-block {
    position: relative;
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    font-family: 'Fira Code', 'Consolas', monospace;
    overflow-x: auto;
    line-height: 1.5;
    font-size: 14px;
    margin: 20px 0;
}

.dark-mode .code-block-container .code-block {
    background-color: #2d2d2d;
}

.code-block code .keyword {
    color: #d73a49;
}

.code-block code .tag {
    color: #22863a;
}

.code-block code .string {
    color: #032f62;
}

.code-block code .property {
    color: #6f42c1;
}

.code-block code .number {
    color: #005cc5;
}

.code-block code .class {
    color: #6f42c1;
    font-weight: bold;
}

.dark-mode .code-block code .keyword {
    color: #ff7b72;
}

.dark-mode .code-block code .tag {
    color: #7ee787;
}

.dark-mode .code-block code .string {
    color: #a5d6ff;
}

.dark-mode .code-block code .property {
    color: #d2a8ff;
}

.dark-mode .code-block code .number {
    color: #79c0ff;
}

.dark-mode .code-block code .class {
    color: #d2a8ff;
}

/* 调整复制按钮样式 */
.copy-notification {
    position: absolute;
    top: -15px;
    right: 65px;
    background: #e6f4ea;
    color: #137333;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 10;
}

.api-link {
    font-family: 'Microsoft YaHei', sans-serif;
}

@media (max-width: 768px) {
    .hide-mobile {
        display: none;
    }
}

/* 代码块容器样式 */
.code-block-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 16px;
    border: 1px solid #e1e4e8;
    background-color: #f6f8fa;
}

.dark-mode .code-block-container {
    background-color: #2d2d2d;
    border-color: #444;
}

.code-header {
    display: flex;
    justify-content: flex-end;
    padding: 8px 12px;
    /* background-color: #f6f8fa; */
    /* border-bottom: 1px solid #e1e4e8; */
}

.dark-mode .code-header {
    /* background-color: #2d2d2d;
    background-color: var(--code-bg); */
    border-bottom-color: #444;
}

.copy-notification {
    position: absolute;
    top: 50px;
    right: 20px;
    background: #ffffff;
    color: rgb(0, 0, 0);
    padding: 8px 16px;
    border-radius: 4px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.copy-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.hljs {
    padding: 1em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 0 0 8px 8px;
}

.dark-mode .hljs {
    background-color: #2d2d2d;
}

/* 亮色主题下的Highlight.js样式覆盖 */
@media (prefers-color-scheme: light) {
    .hljs {
        /* background-color: #f6f8fa; */
        background-color: #292d3e;

    }
}

.copy-notification.show {
    opacity: 1;
}

.dark-mode .copy-notification {
    background: #0d2d21;
    color: #3acf67;
}

/* 代码块容器样式 */
.code-block-container {
    position: relative;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
}

.code-header {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
}

.code-header .copy-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 14px;
    transition: all 0.3s;
}

.code-header .copy-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.dark-mode .code-header .copy-btn {
    background: rgba(45, 45, 45, 0.7);
    color: #f8f8f8;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .code-header .copy-btn:hover {
    background: rgba(65, 65, 65, 0.7);
}