
/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}
a {
    text-decoration: none;
}
body {
    background-color: #f8f8f8;
    color: #333;
    line-height: 1.6;
}
ul {
    list-style: none;
}
.container {
    /*width: 90%;*/
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /*position: sticky;*/
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    color: #ff6b6b;
    font-size: 24px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    padding: 10px 15px;
    display: block;
    transition: all 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    color: #ff6b6b;
}

/* 分类导航 */
.category-nav {
    margin: 25px 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.category-nav a {
    padding: 10px 20px;
    background-color: white;
    border-radius: 30px;
    text-decoration: none;
    color: #666;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.category-nav a:hover, .category-nav a.active {
    background-color: #ff6b6b;
    color: white;
}

/* 分类区域 */
.category-section {
    margin: 40px 0;
}

.category-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6b6b;
    color: #444;
}

/* 图片画廊 */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}
.gallery a {
    color: #ff6b6b !important;
}
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    background: white;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.03);
}

.image-info {
    padding: 15px;
    height: 117px;
    position: relative;
}

.image-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #444;
    display: -webkit-box;          /* 弹性伸缩盒子模型 */
    -webkit-box-orient: vertical;  /* 垂直排列 */
    -webkit-line-clamp: 2;         /* 限制显示行数 */
    line-clamp: 2;
    overflow: hidden;              /* 超出隐藏 */
    text-overflow: ellipsis;       /* 超出部分显示省略号 */
}

.photo-category {
    display: inline-block;
    padding: 3px 8px;
    background-color: #e9f0f8;
    color: #4a6fa5;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    position: absolute;
    bottom: 10px;
    left: 10px;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}
.ad ul {
    display: flex;
    margin-top: 20px;
    gap: 30px;
}
.ad ul li a{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    color: #ff6b6b;
}
.ad ul li a:hover{
    color: red;
}
.ad ul li img{
    width: 100%;
    border-radius: 10px;
}
.ad ul li span{
    padding-top: 10px;
}
.banner li a{
    width: auto !important;
}


@media (max-width: 480px) {
    .banner li:nth-child(2){
        display: none;
    }
    .gallery {
        grid-template-columns: 1fr 1fr;
    }
    
    .category-nav {
        /* flex-direction: column; */
        align-items: center;
    }
    
    .category-nav a {
        width: 40%;
        text-align: center;
    }
    #page-total {
        display: none;
    }
}


/* 搜索框样式 */
.search-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 15px;
}

.search-box {
    display: flex;
    width: 100%;
}

.search-input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ff6b6b;
    border-radius: 30px 0 0 30px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

.search-input:focus {
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.3);
}

.search-button {
    width: 60px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #ff4757;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    gap: 10px;
    align-items: center
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: white;
    border: 1px solid #eee;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.page-btn:hover, .page-btn.active {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.page-btn.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: pointer;
}

/* 底部操作 */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 12px;
}

.action-btn i {
    font-size: 20px;
    margin-bottom: 3px;
}

.like-btn.active {
    color: #ff6b6b;
}

.link-friend {
    display: flex;
    gap: 10px 10px;
    list-style:none;
    flex-wrap: wrap;
}

.link-friend a {

    padding: 10px 15px;
    background-color: #ff6b6b;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    font-size: 13px;
    box-sizing: border-box;
    width: 137px;
    text-align: center;
}

@media (max-width: 480px) {
    .link-friend {
        display: flex;
        gap: 6px 2%;
        list-style:none;
        flex-wrap: wrap;
    }


    .link-friend a {
        padding: 8px 8px;
        background-color: #ff6b6b;
        border-radius: 10px;
        text-decoration: none;
        color: white;
        font-weight: bold;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        transition: all 0.3s;
        font-size: 14px;
        width: 32%;
    }
}
