/* 博客风格页面样式 */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 导航栏 */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.navbar-brand {
    font-size: 1.5rem;
    color: #0d6efd !important;
}

/* 卡片样式 */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,.15) !important;
}

.card-title a {
    color: #212529;
    transition: color 0.2s;
}

.card-title a:hover {
    color: #0d6efd;
}

/* 博客文章样式 */
.blog-post {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

/* Markdown 内容样式 */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #212529;
}

.blog-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.blog-content h2 {
    font-size: 1.75rem;
}

.blog-content h3 {
    font-size: 1.5rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    border-left: 4px solid #0d6efd;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #6c757d;
    font-style: italic;
}

.blog-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
    color: #e83e8c;
}

.blog-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.blog-content pre code {
    background-color: transparent;
    padding: 0;
    color: #212529;
}

.blog-content a {
    color: #0d6efd;
    text-decoration: none;
}

.blog-content a:hover {
    text-decoration: underline;
}

.blog-content strong {
    font-weight: 600;
    color: #212529;
}

.blog-content em {
    font-style: italic;
    color: #6c757d;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1.5rem 0;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.blog-content table th,
.blog-content table td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
}

.blog-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.blog-content hr {
    border: none;
    border-top: 1px solid #dee2e6;
    margin: 2rem 0;
}

/* 这些样式已移到上面的 :global() 选择器中 */

/* 响应式设计 */
@media (max-width: 768px) {
    .blog-post {
        padding: 1.5rem;
    }
    
    .blog-content {
        font-size: 1rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 页脚 */
footer {
    margin-top: auto;
}

/* 搜索面板样式 */
.search-panel {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-panel .card {
    border-radius: 8px;
    background: #fff;
}

.search-panel .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 导航栏搜索按钮 */
#search-toggle-btn {
    padding: 0.5rem 0.75rem;
    color: #212529;
    border: none;
    background: none;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#search-toggle-btn:hover {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 4px;
}

#search-toggle-btn.active {
    color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.15);
}

#search-toggle-btn i {
    font-size: 1.2rem;
}

