* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-decoration: none;
}

:root {
    --primary: #ff4d94;
    --secondary: #8a2be2;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --gray: #6c757d;
    --accent: #ff6b9d;
}

body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
header {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: relative;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    margin-bottom: 30px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    flex-wrap:wrap;
}
.search-form {
    display: flex;
    width: 100%;
}
.logo {
    font-size: 28px;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    z-index: 1001;
}

.logo i {
    margin-right: 10px;
    font-size: 32px;
}

.nav-links {
    display: flex;
    list-style: none;
    transition: all 0.3s ease;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding: 5px 0;
    display: block;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.search-bar {
    display: flex;
    margin-left: 20px;
    transition: all 0.3s ease;
}

.search-bar input {
    padding: 10px 15px;
    border: none;
    border-radius: 30px 0 0 30px;
    width: 220px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--light);
    outline: none;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-bar button {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    padding: 10px 20px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: transform 0.3s;
    color: white;
}

.search-bar button:hover {
    transform: scale(1.05);
}

.mobile-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--light);
    z-index: 1001;
}


.link-friend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 5px;
    max-width: 1200px;
    margin: 0 auto;
}

.link-friend a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background-color: rgba(255, 77, 148, 0.2);
    border-radius: 3px;
    text-decoration: none;
    color: var(--primary);
    /* border: 1px solid #d1e9ff; */
    transition: all 0.3s;
    text-align: center;
    /* min-height: 40px; */
}

.link-friend a:hover {
    background-color: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .link-friend {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
        padding: 15px;
    }
    
}

@media (max-width: 480px) {
    .link-friend {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
        padding: 10px;
    }
    
    .link-friend a {
        font-size: 14px;
        padding: 5px 5px;
    }
}

/* 全站TOP 100部分 */
.top-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 28px;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
}

.section-description {
    text-align: center;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
}

/* 图片网格布局 - 电脑端四列，手机端两列 */
.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    /* 电脑端宽高比242:347 */
    aspect-ratio: 242 / 347;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

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

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

.gallery-info {
    padding: 8px;
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gallery-info h3 {
    margin-bottom: 2px;
    font-size: 13px;
    color: white;
}

.gallery-info>h3 {
    width: 100%; /* 可根据需求改为固定宽度，如 300px */
    max-width: 100%; /* 防止宽度溢出 */
    display: -webkit-box; /* 将元素转为弹性盒模型 */
    -webkit-line-clamp: 2; /* 限制最多显示 2 行 */
    -webkit-box-orient: vertical; /* 文本垂直排列 */
    overflow: hidden; /* 隐藏超出容器的内容 */
    text-overflow: ellipsis; /* 超出部分显示省略号 */
    line-height: 1.5; /* 行高，控制行间距 */
    word-break: break-all; /* 允许单词内换行（避免长单词撑破容器） */
}

.gallery-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* 第一层信息：分类和标签 */
.info-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.image-category {
    background: rgba(255, 77, 148, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
}

.tag-list {
    display: flex;
    gap: 5px;
    margin-left: auto;
    width: 70%;
    justify-content: flex-end;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

/* 第二层信息：图片数量和互动数据 */
.info-row-2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-count {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.image-count i {
    margin-right: 5px;
    color: var(--primary);
}

.interaction-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.likes, .views {
    display: flex;
    align-items: center;
}

.likes i, .views i {
    margin-right: 5px;
}

.likes i {
    color: #ff4d6d;
}

.views i {
    color: #4d94ff;
}

/* 查看更多按钮 */
.load-more {
    display: block;
    margin: 30px auto 60px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 5px 15px rgba(255, 77, 148, 0.4);
}

.load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 77, 148, 0.6);
}

/* 分类模块 */
.category-section {
    margin-bottom: 60px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.category-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 18px;
}

.asian .category-icon {
    background: linear-gradient(45deg, #ff9a9e, #fad0c4);
}

.european .category-icon {
    background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
}

.young .category-icon {
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
}

.comic .category-icon {
    background: linear-gradient(45deg, #84fab0, #8fd3f4);
}

.category-title {
    font-size: 22px;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.category-list {
    list-style: none;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

.item-content {
    display: flex;
    align-items: center;
    width: 90%;
}

.item-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* margin-right: 12px; */
    font-size: 10px;
    /* background: rgba(255, 255, 255, 0.1); */
    color: #ff4d94;
}

.item-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
}

.item-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    width: 10%;
    justify-content: flex-end;
}

/* 分页UI组件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 20px;
    gap: 8px;
}

.pagination-button {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pagination-button:hover:not(.active):not(.disabled) {
    border-color: #ff4d94;
    color: #ff4d94;
    background-color: rgba(168, 85, 247, 0.05);
}

.pagination-button.active {
    background-color: #ff4d94;
    color: white;
    border-color: #ff4d94;
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

.pagination-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* 简化后的页脚样式 */
footer {
    background: rgba(10, 10, 20, 0.9);
    padding: 40px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px 15px 0 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

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

.footer-column h3 {
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
    padding-bottom: 10px;
    color: var(--primary);
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
}

.footer-column ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
}

.footer-column ul li a:hover {
    color: var(--primary);
    background: rgba(255, 77, 148, 0.1);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 40px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .search-bar input {
        width: 180px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        display: block;
    }
    
    /* 移动端菜单展开时的样式 */
    .nav-active .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 26, 46, 0.95);
        backdrop-filter: blur(10px);
        padding: 20px;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }
    
    .nav-active .nav-links li {
        margin: 10px 0;
    }
    
    /* 修复搜索框在移动端的显示 - 独占一行 */
    .search-bar {
        display: flex;
        width: 100%;
        margin: 15px 0 0 0;
        order: 3;
    }
    
    .search-bar input {
        width: 100%;
        border-radius: 30px 0 0 30px;
    }
    
    /* 手机端两列显示，宽高比160:229 */
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .gallery-item {
        aspect-ratio: 160 / 229;
    }
    
    .gallery-info {
        padding: 12px;
        height: 20%;
    }
    
    .footer-column ul {
        flex-direction: column;
        gap: 10px;
    }
    .category-card {
        width: calc(100vw - 40px);
    }
    .gallery-img {
        width: 100%;
        height: 80%;
    }
}

@media (max-width: 576px) {
    .gallery {
        grid-template-columns: 1fr;
    }
    
    .footer-column ul {
        flex-direction: row;
        gap: 10px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    .item-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
