/* 自定义样式补充 */

/* 代码高亮 */
pre[class*="language-"] {
    position: relative;
    padding: 1.5em !important;
    margin: 1.5em 0;
    overflow: auto;
    border-radius: 8px;
    background: #1a1a1a !important;
}

code[class*="language-"] {
    font-family: 'Fira Code', 'Consolas', 'Monaco', 'Andale Mono', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.copy-code {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.copy-code:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 暗色模式优化 */
[data-theme="dark"] pre[class*="language-"] {
    background: #2d2d2d !important;
}

/* 加载动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
}

.button.secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.button.secondary:hover {
    background: var(--card-bg);
    border-color: var(--primary);
}

/* 工具提示 */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--text);
    color: var(--bg);
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1000;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 8px);
}

/* 响应式表格 */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.post-content th,
.post-content td {
    padding: 12px;
    border: 1px solid var(--border);
    text-align: left;
}

.post-content th {
    background: var(--bg);
    font-weight: 600;
}

/* 打印样式 */
@media print {
    .site-header,
    .site-footer,
    .theme-toggle,
    .search-form,
    .post-navigation,
    .comments-area {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .post-content {
        border: none;
        box-shadow: none;
        padding: 0;
    }
}
