/**
 * 自定义样式
 * 用于覆盖默认样式，可以根据需要进行修改
 */

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 10px var(--shadow-color);
    z-index: 99;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

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

/* 代码复制按钮 */
.copy-code-button {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 3px 8px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.copy-code-button:hover {
    opacity: 1;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 文章内容增强 */
.post-content {
    line-height: 1.8;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

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

.post-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.5em auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

.post-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}

.post-content a:hover {
    border-color: var(--primary-color);
}

.post-content blockquote {
    margin: 1.5em 0;
    padding: 0.5em 1em;
    border-left: 4px solid var(--primary-light);
    background-color: var(--secondary-color);
    color: var(--text-light);
    font-style: italic;
}

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

.post-content table th,
.post-content table td {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
}

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

.post-content table tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .post-content {
        font-size: 0.95rem;
    }
    
    .post-content h1 {
        font-size: 1.8rem;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
    }
    
    .post-content h3 {
        font-size: 1.3rem;
    }
    
    .back-to-top {
        width: 36px;
        height: 36px;
        bottom: 15px;
        right: 15px;
    }
}
