@charset "UTF-8";
/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: #fff8f2;
    color: #5a3c2a;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

/* 顶部导航 */
header {
    background: linear-gradient(135deg, #ff5a00, #e65100);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-menu {
    display: flex;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    font-size: 16px;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
    color: #fff;
}

.nav-menu a:hover {
    color: #ffccbc;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffccbc;
    transition: width 0.3s;
}

.nav-menu a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 28px;
    color: #fff;
    align-items: center;
    justify-content: center;
}

/* 汉堡图标样式优化 */
.hamburger-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.hamburger:hover .hamburger-icon {
    transform: scale(1.1);
}

/* 搜索区域 */
.search-section {
    background: linear-gradient(135deg, #ff8a50, #ff5a00);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-section h1 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    outline: none;
    background-color: rgba(255, 255, 255, 0.9);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 5px;
    background: linear-gradient(135deg, #e65100, #bf360c);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.search-box button:hover {
    background: linear-gradient(135deg, #bf360c, #8c1c00);
    transform: translateY(-2px);
}

/* 瀑布流图片展示区 */
.gallery-section {
    margin-bottom: 50px;
}

.gallery-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    color: #ff5a00;
}

.masonry {
    column-count: 4;
    column-gap: 10px;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 15px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.masonry-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.masonry-item img {
    width: 100%;
    display: block;
    transition: transform 0.5s;
}

.masonry-item:hover img {
    transform: scale(1.05);
}

.masonry-item-title {
    padding: 10px;
    text-align: center;
    font-size: 18px;
    background-color: #fff;
    color: #5a3c2a;
}

/* 友情链接 */
.links-section {
    background: linear-gradient(135deg, #ff8a50, #ff5a00);
    padding: 10px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.links-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 20px;
    color: #fff;
}

.links-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.links-container a {
    margin: 0 10px 10px;
    padding: 5px 0;
    position: relative;
    color: #fff;
}

.links-container a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #fff;
    transition: width 0.3s;
}

.links-container a:hover::after {
    width: 100%;
}

/* 页脚 */
footer {
    background: linear-gradient(135deg, #5a3c2a, #3e2723);
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .masonry {
        column-count: 3;
    }
    
    /* 平板端导航栏边距优化 */
    .nav-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 768px) {
    .masonry {
        column-count: 2;
    }
    
    /* 手机端导航栏边距优化 */
    .nav-container {
        padding-left: 25px;
        padding-right: 25px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #ff5a00, #e65100);
        flex-direction: column;
        padding: 15px 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0;
        text-align: center;
        padding: 10px 0;
    }
    
    .hamburger {
        display: flex;
        font-size: 38px; /* 控制汉堡图标大小 */
    }
    
    .search-section h1 {
        font-size: 28px;
    }
}

@media (max-width: 576px) {
    .masonry {
        column-count: 2;
    }
    
    .nav-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .logo {
        font-size: 26px;
    }
    
    .hamburger {
        font-size: 38px; /* 手机端缩小汉堡图标 */
    }
    
    .search-section h1 {
        font-size: 28px;
    }
}

/* 面包屑导航样式 */
.breadcrumbs {
    padding: 20px 0;
    background-color: #fff;
    border-bottom: 1px solid #ffe0cc;
    margin-bottom: 15px;
}

.breadcrumbs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
    font-size: 16px;
}

.breadcrumbs span {
    display: inline-block;
}

.breadcrumbs .sep {
    margin: 0 8px;
    color: #ff5a00;
}

.breadcrumbs a {
    color: #5a3c2a;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: #ff5a00;
}

.breadcrumbs .current {
    color: #ff5a00;
    font-weight: 500;
}

/* 分页导航样式 */
.pagination-section {
    margin: 40px 0 60px;
    text-align: center;
}

.pagination {
    display: inline-block;
    width: 100%;
    padding: 0 10px;
}

.pagination ul {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap; 
    gap: 5px; 
}

.pagination li {
    margin: 0;
}

.pagination .page-numbers {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    background-color: #fff;
    color: #5a3c2a;
    transition: all 0.3s;
    border: 1px solid #ffe0cc;
}

.pagination .page-numbers:hover {
    background-color: #fff3ea;
    color: #ff5a00;
    border-color: #ff5a00;
}

.pagination .page-numbers.current {
    background-color: #ff5a00;
    color: #fff;
    border-color: #ff5a00;
    font-weight: 500;
}

@media (max-width: 768px) {
    .pagination ul {
        gap: 4px; 
    }
    
    .pagination .page-numbers {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .pagination ul {
        gap: 3px; 
    }
    
    .pagination .page-numbers {
        padding: 5px 10px;
        font-size: 13px;
    }
}

/* 文章页样式 */
.article-container {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}

/* 左侧文章内容区 */
.article-content {
    flex: 8; 
    background-color: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.article-title {
    font-size: 28px;
    color: #5a3c2a;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    color: #8d6e63;
    font-size: 14px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ffe0cc;
}

.article-meta .meta-date {
    margin-right: 10px; 
}

.article-body {
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.8;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* 上下篇导航 */
.article-navigation {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    margin: 30px 0;
    border-top: 1px solid #ffe0cc;
    border-bottom: 1px solid #ffe0cc;
}

.prev-article, .next-article {
    flex: 1;
}

.prev-article {
    text-align: left;
}

.next-article {
    text-align: right;
}

.article-nav-title {
    color: #8d6e63;
    font-size: 14px;
    margin-bottom: 5px;
}

.article-nav-link {
    color: #ff5a00;
    transition: color 0.3s;
}

.article-nav-link:hover {
    color: #e65100;
    text-decoration: underline;
}

/* 相关推荐 */
.related-posts {
    margin-top: 40px;
}

.related-title {
    font-size: 20px;
    color: #5a3c2a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff5a00;
    display: inline-block;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.related-item {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 10px 0;
    border-bottom: 1px dashed #ffe0cc;
}

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

.related-link {
    transition: color 0.3s;
    flex: 1; 
    margin-right: 10px; 
}

.related-link:hover {
    color: #ff5a00;
}

.related-date {
    color: #8d6e63;
    font-size: 14px;
    white-space: nowrap; 
}

/* 右侧侧边栏 */
.sidebar {
    flex: 2; 
}

.sidebar-title {
    font-size: 20px;
    color: #5a3c2a;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff5a00;
}

/* 热门推荐竖排瀑布流 */
.sidebar-masonry {
    column-count: 1;
    column-gap: 10px;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .article-container {
        flex-direction: column;
    }
    
    .sidebar {
        margin-top: 30px;
    }
    
    .sidebar-masonry {
        column-count: 2; 
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 24px;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .prev-article, .next-article {
        text-align: left;
    }
    
    .sidebar-masonry {
        column-count: 2; 
    }
}

@media (max-width: 576px) {
    .article-content {
        padding: 20px 10px;
    }
    
    .article-title {
        font-size: 22px;
    }
    
    /* 手机端相关推荐 */
    .related-item {
        flex-direction: column;
        align-items: flex-start; 
        gap: 5px;
    }
    
    .related-date {
        white-space: normal; 
        font-size: 13px;
    }
}