/* ===== 知乎风格浅色主题组件样式 ===== */

/* ===== 文章相关样式 ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #8590a6;
    font-size: 1.1rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.post-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(26,26,26,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ebebeb;
}

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

.post-cover {
    height: 200px;
    overflow: hidden;
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-cover img {
    transform: scale(1.02);
}

.post-content {
    padding: 1.5rem;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.post-title a {
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #0084ff;
}

.post-excerpt {
    color: #8590a6;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #8590a6;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-item i {
    font-size: 0.8rem;
}

.category-link {
    color: #0084ff;
}

.category-link:hover {
    color: #0066cc;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #f6f6f6;
    color: #8590a6;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    border: 1px solid #ebebeb;
}

.tag:hover {
    background: #0084ff;
    color: #ffffff;
    border-color: #0084ff;
}

.post-actions {
    text-align: right;
}

.read-more {
    color: #0084ff;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #0066cc;
}

.read-more i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* ===== 无文章状态 ===== */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: #8590a6;
}

.no-posts-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: #d1d5db;
}

.no-posts h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.no-posts p {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ===== 分页样式 ===== */
.pagination {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
}

.pagination .page-number,
.pagination .prev,
.pagination .next {
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    background: #ffffff;
    color: #8590a6;
    border-radius: 6px;
    border: 1px solid #ebebeb;
    transition: all 0.3s ease;
}

.pagination .page-number:hover,
.pagination .prev:hover,
.pagination .next:hover {
    background: #0084ff;
    color: #ffffff;
    border-color: #0084ff;
}

.pagination .current {
    background: #0084ff;
    color: #ffffff;
    border-color: #0084ff;
}

/* ===== 特色内容区域 ===== */
.featured-section {
    background: #ffffff;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.featured-item {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #ebebeb;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26,26,26,0.1);
}

.featured-icon {
    width: 60px;
    height: 60px;
    background: #f6f6f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #0084ff;
    font-size: 1.5rem;
}

.featured-item h3 {
    color: #1a1a1a;
    font-weight: 600;
    margin-bottom: 1rem;
}

.featured-item p {
    color: #8590a6;
    line-height: 1.6;
}

/* ===== 文章页面样式 ===== */
.post {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #ebebeb;
    margin-bottom: 2rem;
}

.post-header {
    background: #ffffff;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #ebebeb;
}

.post .post-title {
    color: #1a1a1a;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post .post-meta {
    color: #8590a6;
    font-size: 0.9rem;
}

.post .post-tags {
    margin-top: 1rem;
}

.post .post-content {
    padding: 2rem;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.7;
}

.post .post-content h1,
.post .post-content h2,
.post .post-content h3,
.post .post-content h4,
.post .post-content h5,
.post .post-content h6 {
    color: #1a1a1a;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

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

.post .post-content h2 {
    font-size: 1.5rem;
}

.post .post-content h3 {
    font-size: 1.25rem;
}

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

.post .post-content blockquote {
    background: #f6f6f6;
    border-left: 4px solid #0084ff;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    color: #1a1a1a;
}

.post .post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post .post-content code {
    background: #f6f6f6;
    color: #1a1a1a;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.post .post-content pre {
    background: #f6f6f6;
    color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post .post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.copy-code-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #8590a6;
    color: #ffffff;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.copy-code-btn:hover {
    background: #0084ff;
}

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

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

.post .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(26,26,26,0.1);
}

.post .post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 6px;
    overflow: hidden;
}

.post .post-content th,
.post .post-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #ebebeb;
}

.post .post-content th {
    background: #f6f6f6;
    color: #1a1a1a;
    font-weight: 600;
}

.post .post-content tr:hover {
    background: #f6f6f6;
}

/* ===== 文章页脚 ===== */
.post-footer {
    padding: 2rem;
    background: #ffffff;
    border-top: 1px solid #ebebeb;
}

.post-copyright {
    background: #f6f6f6;
    padding: 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    border: 1px solid #ebebeb;
}

.post-copyright p {
    color: #8590a6;
    margin-bottom: 0.5rem;
}

.post-copyright p:last-child {
    margin-bottom: 0;
}

.post-copyright a {
    color: #0084ff;
}

.post-share h4 {
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-weight: 600;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    background: #f6f6f6;
    color: #8590a6;
    padding: 0.75rem 1.5rem;
    border: 1px solid #ebebeb;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.share-btn.weibo {
    background: #ff6b6b;
    color: #ffffff;
}

.share-btn.qq {
    background: #1969ff;
    color: #ffffff;
}

.share-btn.copy {
    background: #0084ff;
    color: #ffffff;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26,26,26,0.15);
}

/* ===== 文章导航 ===== */
.post-nav {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.post-nav-item {
    flex: 1;
}

.post-nav-item.prev {
    text-align: left;
}

.post-nav-item.next {
    text-align: right;
}

.post-nav-link {
    display: block;
    background: #f6f6f6;
    color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #ebebeb;
    transition: all 0.3s ease;
}

.post-nav-link:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(26,26,26,0.1);
    color: #0084ff;
}

.post-nav-direction {
    font-size: 0.8rem;
    color: #8590a6;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.post-nav-title {
    font-weight: 600;
    line-height: 1.4;
}

/* ===== 侧边栏组件 ===== */
.widget {
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #ebebeb;
    overflow: hidden;
}

.widget-header {
    padding: 1.5rem 1.5rem 0;
}

.widget-title {
    color: #1a1a1a;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.widget-content {
    padding: 0 1.5rem 1.5rem;
}

/* 用户资料卡片 */
.profile-avatar {
    text-align: center;
    margin-bottom: 1rem;
}

.profile-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ebebeb;
}

.profile-info {
    text-align: center;
}

.profile-name {
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profile-desc {
    color: #8590a6;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 1rem;
    border-top: 1px solid #ebebeb;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 600;
}

.stat-label {
    color: #8590a6;
    font-size: 0.8rem;
}

/* 最近文章列表 */
.recent-posts-list {
    list-style: none;
}

.recent-post-item {
    padding: 1rem 0;
    border-bottom: 1px solid #ebebeb;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-link {
    color: #1a1a1a;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.recent-post-link:hover {
    color: #0084ff;
}

.recent-post-date {
    color: #8590a6;
    font-size: 0.8rem;
}

/* 分类和标签列表 */
.category-list,
.tag-list {
    list-style: none;
}

.category-item,
.tag-item {
    margin-bottom: 0.5rem;
}

.category-link,
.tag-link {
    color: #8590a6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.category-link:hover,
.tag-link:hover {
    color: #0084ff;
}

.category-count,
.tag-count {
    color: #8590a6;
    font-size: 0.8rem;
}

/* 标签云 */
.tag-cloud {
    line-height: 2;
}

.tag-link {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #f6f6f6;
    color: #8590a6;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid #ebebeb;
}

.tag-link:hover {
    background: #0084ff;
    color: #ffffff;
    border-color: #0084ff;
}

/* ===== 页脚样式 ===== */
#footer {
    background: #f6f6f6;
    color: #8590a6;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid #ebebeb;
}

.footer-content {
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #ffffff;
    color: #8590a6;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid #ebebeb;
}

.social-link:hover {
    background: #0084ff;
    color: #ffffff;
    border-color: #0084ff;
}

.copyright {
    text-align: center;
}

.copyright p {
    margin-bottom: 0.5rem;
}

.powered-by {
    font-size: 0.8rem;
}

.powered-by a {
    color: #0084ff;
}

.powered-by a:hover {
    color: #0066cc;
}

.beian {
    font-size: 0.8rem;
}

.beian a {
    color: #8590a6;
}

/* ===== 返回顶部按钮 ===== */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #0084ff;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: #0066cc;
    transform: translateY(-2px);
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profile-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .social-links {
        flex-wrap: wrap;
    }

    .social-link {
        width: 35px;
        height: 35px;
    }

    .post .post-title {
        font-size: 1.5rem;
    }

    .post-header,
    .post .post-content,
    .post-footer {
        padding: 1.5rem;
    }

    .post-nav {
        flex-direction: column;
    }

    .post-nav-item {
        width: 100%;
    }

    .share-buttons {
        justify-content: center;
    }
}

/* ===== 页面特定样式 ===== */
.page-header {
    text-align: center;
    padding: 3rem 0;
    background: #ffffff;
    margin-bottom: 3rem;
    border-bottom: 1px solid #ebebeb;
}

.page-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.page-title {
    color: #1a1a1a;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title i {
    color: #0084ff;
}

.page-subtitle {
    color: #8590a6;
    font-size: 1.1rem;
    margin-top: 1rem;
}

/* ===== 分类和标签页面 ===== */
.categories-container,
.tags-container {
    background: #ffffff;
    padding: 2rem 0;
}

.categories-grid,
.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card,
.tag-card {
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover,
.tag-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26,26,26,0.1);
}

.category-icon,
.tag-icon {
    width: 60px;
    height: 60px;
    background: #f6f6f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: #0084ff;
    font-size: 1.5rem;
}

.category-name,
.tag-name {
    margin-bottom: 1rem;
}

.category-name a,
.tag-name a {
    color: #1a1a1a;
    font-weight: 600;
    font-size: 1.2rem;
}

.category-name a:hover,
.tag-name a:hover {
    color: #0084ff;
}

.category-count,
.tag-count {
    color: #8590a6;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.category-posts-preview,
.tag-posts-preview {
    border-top: 1px solid #ebebeb;
    padding-top: 1rem;
}

.preview-post {
    padding: 0.75rem 0;
    border-bottom: 1px solid #ebebeb;
}

.preview-post:last-child {
    border-bottom: none;
}

.preview-title {
    color: #1a1a1a;
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.preview-title:hover {
    color: #0084ff;
}

.preview-date {
    color: #8590a6;
    font-size: 0.8rem;
}

.preview-more {
    text-align: center;
    padding-top: 1rem;
}

.preview-more a {
    color: #0084ff;
    font-size: 0.9rem;
}

.category-action,
.tag-action {
    text-align: center;
    margin-top: 2rem;
}

.back-to-categories,
.back-to-tags {
    color: #0084ff;
    padding: 0.75rem 2rem;
    border: 1px solid #0084ff;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* ===== 无内容状态 ===== */
.no-categories,
.no-tags {
    text-align: center;
    padding: 4rem 2rem;
    color: #8590a6;
}

.no-categories-icon,
.no-tags-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    color: #d1d5db;
}

/* ===== 统计信息 ===== */
.categories-stats,
.tags-stats {
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ebebeb;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #f6f6f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: #0084ff;
    font-size: 1.5rem;
}

.stat-info {
    text-align: center;
}

.stat-number {
    display: block;
    color: #1a1a1a;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #8590a6;
    font-size: 0.9rem;
}

/* ===== 标签云组件 ===== */
.tag-cloud-section {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #ebebeb;
}

.section-title {
    color: #1a1a1a;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #0084ff;
}

.tag-cloud-wrapper {
    line-height: 2.5;
}

.tag-cloud-item {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    background: #f6f6f6;
    color: #8590a6;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid #ebebeb;
}

.tag-cloud-item:hover {
    background: #0084ff;
    color: #ffffff;
    border-color: #0084ff;
    transform: translateY(-1px);
}

/* ===== 归档页面 ===== */
.archive-timeline {
    background: #ffffff;
}

.year-group {
    margin-bottom: 3rem;
}

.year-header {
    background: #f6f6f6;
    padding: 1.5rem 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #ebebeb;
    position: sticky;
    top: 80px;
    z-index: 10;
}

.year-title {
    color: #1a1a1a;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.year-title i {
    color: #0084ff;
}

.year-count {
    color: #8590a6;
    font-size: 1rem;
    margin-left: auto;
}

.months-container {
    padding-left: 2rem;
}

.month-group {
    margin-bottom: 2rem;
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    overflow: hidden;
}

.month-header {
    background: #f6f6f6;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #ebebeb;
}

.month-title {
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.month-title i {
    color: #0084ff;
}

.month-count {
    color: #8590a6;
    margin-left: auto;
}

.posts-list {
    padding: 0;
}

.archive-post {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #ebebeb;
    transition: background-color 0.3s ease;
}

.archive-post:last-child {
    border-bottom: none;
}

.archive-post:hover {
    background: #f6f6f6;
}

.post-date {
    flex-shrink: 0;
    margin-right: 2rem;
    text-align: center;
    padding: 0.75rem;
    background: #f6f6f6;
    border-radius: 6px;
    border: 1px solid #ebebeb;
}

.date-day {
    display: block;
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 700;
}

.date-month {
    color: #8590a6;
    font-size: 0.8rem;
}

.post-info {
    flex: 1;
}

.archive-post .post-title {
    margin-bottom: 0.5rem;
}

.archive-post .post-title a {
    color: #1a1a1a;
    font-weight: 500;
}

.archive-post .post-title a:hover {
    color: #0084ff;
}

.archive-post .post-meta {
    color: #8590a6;
    font-size: 0.8rem;
}

.post-category a {
    color: #0084ff;
}

/* ===== 搜索页面 ===== */
.search-input-wrapper {
    max-width: 600px;
    margin: 0 auto 3rem;
    position: relative;
}

.search-form {
    position: relative;
}

#search-input-main {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    border: 2px solid #ebebeb;
    border-radius: 8px;
    font-size: 1rem;
    background: #ffffff;
    color: #1a1a1a;
    transition: border-color 0.3s ease;
}

#search-input-main:focus {
    outline: none;
    border-color: #0084ff;
}

#search-btn-main {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: #0084ff;
    color: #ffffff;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#search-btn-main:hover {
    background: #0066cc;
}

.search-tips {
    margin-bottom: 2rem;
}

.tips-item {
    background: #f6f6f6;
    padding: 1rem;
    border-radius: 6px;
    color: #8590a6;
    border: 1px solid #ebebeb;
}

.search-status {
    margin-bottom: 2rem;
}

.search-loading {
    text-align: center;
    color: #8590a6;
    padding: 2rem;
}

.search-no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-icon {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 2rem;
}

.search-results {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #ebebeb;
    overflow: hidden;
}

.results-header {
    background: #f6f6f6;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #ebebeb;
}

.results-title {
    color: #1a1a1a;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.results-count {
    color: #8590a6;
    font-size: 0.9rem;
}

.results-container {
    padding: 0;
}

.search-result-item {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #ebebeb;
    transition: background-color 0.3s ease;
}

.search-result-item:hover {
    background: #f6f6f6;
}

.result-title {
    margin-bottom: 0.5rem;
}

.result-title a {
    color: #1a1a1a;
    font-weight: 600;
}

.result-title a:hover {
    color: #0084ff;
}

.result-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
}

.result-date,
.result-category {
    color: #8590a6;
}

.result-excerpt {
    color: #8590a6;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.result-excerpt mark {
    background: #fff3cd;
    color: #1a1a1a;
    padding: 0 0.25rem;
}

.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.result-tag {
    background: #f6f6f6;
    color: #8590a6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

/* ===== 页面特定样式调整 ===== */
.page {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #ebebeb;
    margin-bottom: 2rem;
}

.page .page-header {
    background: #ffffff;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #ebebeb;
}

.page .page-title {
    color: #1a1a1a;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page .page-meta {
    color: #8590a6;
    font-size: 0.9rem;
}

.page-content {
    padding: 2rem;
    background: #ffffff;
    color: #1a1a1a;
    line-height: 1.7;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    color: #1a1a1a;
    font-weight: 600;
    margin: 2rem 0 1rem;
}

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

.page-content h2 {
    font-size: 1.5rem;
}

.page-content h3 {
    font-size: 1.25rem;
}

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

.page-content blockquote {
    background: #f6f6f6;
    border-left: 4px solid #0084ff;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    color: #1a1a1a;
}

.page-content code {
    background: #f6f6f6;
    color: #1a1a1a;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.page-content pre {
    background: #f6f6f6;
    color: #1a1a1a;
    padding: 1.5rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.page-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.page-footer {
    padding: 2rem;
    background: #ffffff;
    border-top: 1px solid #ebebeb;
    text-align: center;
}

.tag.current {
    background: #0084ff;
    color: #ffffff;
    border-color: #0084ff;
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
    .page-header {
        padding: 2rem 1rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .categories-grid,
    .tags-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .year-header,
    .month-header {
        padding: 1rem;
    }

    .archive-post {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .post-date {
        margin-right: 0;
    }

    .search-form {
        flex-direction: column;
    }

    .result-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .popular-tags {
        justify-content: center;
    }

    .recent-post-item {
        padding: 0.75rem 0;
    }

    .recent-post-date {
        font-size: 0.7rem;
    }
}

/* ===== 侧边栏组件特定样式 ===== */
.widget-categories .widget-content {
    padding: 0;
}

.widget-archive .widget-content {
    padding: 0;
}

.widget-categories .category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget-categories .category-item {
    border-bottom: 1px solid #ebebeb;
}

.widget-categories .category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #1a1a1a;
    transition: all 0.3s ease;
}

.widget-categories .category-link:hover {
    background: #f6f6f6;
    color: #0084ff;
}

.widget-categories .category-link:focus {
    outline: none;
    background: #f6f6f6;
    color: #0084ff;
}

.widget-categories .category-count {
    background: #f6f6f6;
    color: #8590a6;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
}

.widget-archive .archive-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget-archive .archive-item {
    border-bottom: 1px solid #ebebeb;
}

.widget-archive .archive-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    color: #1a1a1a;
    transition: all 0.3s ease;
}

.widget-archive .archive-link:hover {
    background: #f6f6f6;
    color: #0084ff;
}

.widget-archive .archive-count {
    background: #f6f6f6;
    color: #8590a6;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
}

/* ==============
   Mermaid图表样式
   ============== */
.mermaid {
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    text-align: center;
    overflow-x: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.mermaid:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #0084ff;
}

.mermaid svg {
    max-width: 100%;
    height: auto;
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 覆盖mermaid默认的深色主题 */
.mermaid .node rect,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .node polygon {
    fill: #f6f6f6 !important;
    stroke: #0084ff !important;
    stroke-width: 2px !important;
}

.mermaid .node .label {
    color: #1a1a1a !important;
    font-weight: 500 !important;
}

.mermaid .edgePath .path {
    stroke: #0084ff !important;
    stroke-width: 2px !important;
}

.mermaid .edgeLabel {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid #ebebeb !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
}

/* 流程图特定样式 */
.mermaid .nodeLabel {
    color: #1a1a1a !important;
    font-weight: 500 !important;
}

/* 时序图样式 */
.mermaid .actor {
    fill: #f6f6f6 !important;
    stroke: #0084ff !important;
    stroke-width: 2px !important;
}

.mermaid .actor-man {
    fill: #f6f6f6 !important;
    stroke: #0084ff !important;
}

.mermaid .messageLine0 {
    stroke: #0084ff !important;
    stroke-width: 2px !important;
}

.mermaid .messageLine1 {
    stroke: #0084ff !important;
    stroke-width: 2px !important;
    stroke-dasharray: 4,4 !important;
}

.mermaid .messageText {
    fill: #1a1a1a !important;
    font-weight: 500 !important;
}

/* 类图样式 */
.mermaid .classBox {
    fill: #f6f6f6 !important;
    stroke: #0084ff !important;
    stroke-width: 2px !important;
}

.mermaid .classText {
    fill: #1a1a1a !important;
}

/* 状态图样式 */
.mermaid .state {
    fill: #f6f6f6 !important;
    stroke: #0084ff !important;
    stroke-width: 2px !important;
}

.mermaid .stateText {
    fill: #1a1a1a !important;
    font-weight: 500 !important;
}

/* 甘特图样式 */
.mermaid .section0, .mermaid .section1, .mermaid .section2 {
    fill: #f6f6f6 !important;
}

.mermaid .task0, .mermaid .task1, .mermaid .task2, .mermaid .task3 {
    fill: #0084ff !important;
    stroke: #0084ff !important;
}

.mermaid .taskText {
    fill: #1a1a1a !important;
    font-weight: 500 !important;
}

.mermaid .titleText {
    fill: #1a1a1a !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

/* 改进代码块的样式 */
.post .post-content pre {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 20px 0;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.post .post-content pre::before {
    content: "代码";
    position: absolute;
    top: 0;
    right: 0;
    background: #0084ff;
    color: white;
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 0 8px 0 8px;
    font-weight: 500;
}

.post .post-content pre code {
    background: none;
    color: #2f3741;
    padding: 0;
    font-family: 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    line-height: 1.6;
}

/* 改进行内代码样式 */
.post .post-content code {
    background: #f1f3f4;
    color: #d73a49;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Fira Code', 'SF Mono', Monaco, monospace;
    border: 1px solid #e1e4e8;
}

/* 移除暗色模式，保持与网站浅色主题一致 */

/* 响应式调整 */
@media (max-width: 768px) {
    .mermaid {
        padding: 15px;
        margin: 15px 0;
    }
    
    .post .post-content pre {
        padding: 1rem;
        margin: 15px 0;
    }
}

/* ==============
   五行相生相克图表样式
   ============== */
.wuxing-container {
    max-width: 700px;
    margin: 40px auto;
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8fffe 0%, #f3f7ff 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    border: 1px solid rgba(255,255,255,0.8);
}

.wuxing-diagram-new {
    position: relative;
    width: 340px;
    height: 340px;
    margin: 0 auto 30px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(231, 76, 60, 0.1) 0%, transparent 50%),
        radial-gradient(circle, #ffffff 20%, #f8f9fa 100%);
    box-shadow: 
        0 0 0 1px rgba(255,255,255,0.8),
        0 20px 40px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
}

.wuxing-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.wuxing-element-new {
    position: absolute;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 20px rgba(0,0,0,0.15),
        0 1px 3px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    z-index: 2;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.wuxing-element-new:hover {
    transform: scale(1.15) translateZ(0);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.25),
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.4);
    z-index: 10;
}

.wuxing-element-new::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wuxing-element-new:hover::before {
    opacity: 1;
}

.element-name-new {
    font-size: 18px;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-family: 'Noto Sans SC', sans-serif;
}

.element-nature-new {
    font-size: 9px;
    opacity: 0.9;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
    font-weight: 500;
}

/* 五行元素位置和渐变 */
.wood-new {
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 50%, #58d68d 100%);
}

.fire-new {
    top: 100px;
    right: 25px;
    background: linear-gradient(135deg, #e74c3c 0%, #ec7063 50%, #f1948a 100%);
}

.earth-new {
    bottom: 65px;
    right: 65px;
    background: linear-gradient(135deg, #f39c12 0%, #f4d03f 50%, #f7dc6f 100%);
}

.metal-new {
    bottom: 65px;
    left: 65px;
    background: linear-gradient(135deg, #95a5a6 0%, #aab7b8 50%, #d5dbdb 100%);
}

.water-new {
    top: 100px;
    left: 25px;
    background: linear-gradient(135deg, #3498db 0%, #5dade2 50%, #85c1e9 100%);
}

.wuxing-center-new {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 6px 24px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    border: 2px solid rgba(255,255,255,0.2);
    z-index: 3;
}

.wuxing-title-new {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.wuxing-subtitle-new {
    font-size: 10px;
    opacity: 0.9;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

/* 图例样式 */
.wuxing-legend-new {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.legend-item-new {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.legend-line {
    width: 30px;
    height: 3px;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sheng-line {
    background: linear-gradient(90deg, #27ae60, #2ecc71);
}

.ke-line {
    background: linear-gradient(90deg, #e74c3c, #ec7063);
    background-image: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 4px,
        rgba(255,255,255,0.3) 4px,
        rgba(255,255,255,0.3) 6px
    );
}

/* 详细说明样式 */
.wuxing-explanation {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    text-align: left;
}

.explanation-section {
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(255,255,255,0.8);
}

.explanation-section h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 600;
}

.relation-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.relation-item {
    padding: 8px 12px;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #34495e;
    border: 1px solid rgba(52, 152, 219, 0.1);
    transition: all 0.3s ease;
}

.relation-item:hover {
    background: rgba(52, 152, 219, 0.1);
    transform: translateX(4px);
}

/* 改进SVG箭头样式 */
.wuxing-svg path {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.wuxing-svg marker polygon {
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

/* 响应式设计 */
@media (max-width: 768px) {
    .wuxing-container {
        margin: 20px auto;
        padding: 20px 15px;
    }
    
    .wuxing-diagram-new {
        width: 280px;
        height: 280px;
    }
    
    .wuxing-element-new {
        width: 48px;
        height: 48px;
    }
    
    .element-name-new {
        font-size: 16px;
    }
    
    .element-nature-new {
        font-size: 8px;
    }
    
    .wuxing-center-new {
        width: 60px;
        height: 60px;
    }
    
    .wuxing-title-new {
        font-size: 18px;
    }
    
    .wuxing-subtitle-new {
        font-size: 9px;
    }
    
    .wuxing-explanation {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .wuxing-legend-new {
        gap: 20px;
    }
    
    .legend-item-new {
        font-size: 13px;
    }
} 