/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: #764ba2;
}

/* 导航样式 */
.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #667eea;
}

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

.nav-link.active {
    color: #667eea;
}

.nav-link.active::after {
    width: 100%;
}

/* 搜索区域样式 */
.search-section {
    padding: 3rem 0;
    text-align: center;
    color: white;
}

.search-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* 标签列表样式 */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 2rem;
    padding: 0 1rem;
}

.tag-item {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.tag-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tag-item:active {
    transform: translateY(0);
}

.search-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.search-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

/* 分类导航样式 */
.category-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.category-list {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.category-item {
    text-decoration: none;
    color: #555;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-item:hover,
.category-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* 壁纸网格样式 */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.wallpaper-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.wallpaper-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.wallpaper-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

/* 图片懒加载样式 */
.lazyload {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazyload.loaded {
    opacity: 1;
}

/* 渐进式加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.wallpaper-image.loaded {
    animation: fadeIn 0.5s ease-in-out;
}

/* 图片容器，用于实现模糊占位符 */
.wallpaper-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

/* 占位符图片 */
.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    object-fit: cover;
    filter: blur(10px);
    z-index: 1;
}

/* 主图片 */
.wallpaper-image {
    position: relative;
    z-index: 2;
}

.wallpaper-card:hover .wallpaper-image {
    transform: scale(1.05);
}

.wallpaper-info {
    padding: 1.5rem;
}

.wallpaper-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.wallpaper-category {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: inline-block;
    background: rgba(102, 126, 234, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
}

.wallpaper-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #777;
}

/* 骨架屏样式 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.skeleton-image {
    width: 100%;
    height: 300px;
    border-radius: 0;
}

.skeleton-info {
    padding: 1.5rem;
}

.skeleton-category {
    width: 60px;
    height: 18px;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    width: 80%;
    height: 24px;
    margin-bottom: 0.5rem;
}

.skeleton-meta {
    width: 50px;
    height: 16px;
}

/* 分页样式 */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.pagination-info {
    display: flex;
    gap: 24px;
    color: #cbd5e1;
    font-size: 14px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    min-width: 36px;
    height: 36px;
    background-color: #1e293b;
    color: white;
    border: 1px solid #334155;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #334155;
    border-color: #475569;
}

.pagination-btn.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

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

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    color: #cbd5e1;
    font-size: 14px;
    cursor: default;
}

/* 页脚样式 */
.footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 3rem 0;
    margin-top: 4rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: #667eea;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #999;
}

/* 详情页样式 */
.detail-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 20px;
}

.detail-content {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.detail-image {
    width: 100%;
    height: auto;
    display: block;
}

.detail-info {
    padding: 2rem;
}

.detail-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #333;
}

.detail-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.detail-description {
    color: #555;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.detail-tags {
    margin-bottom: 2rem;
}

.detail-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.detail-actions {
    display: flex;
    gap: 1rem;
}

.detail-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-share {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 页面内容样式（隐私政策、服务条款、关于我们） */
.page-container {
    padding: 2rem 0;
}

.page-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 1000px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 700;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
}

.page-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.8rem;
    color: #444;
    margin-bottom: 1.5rem;
    font-weight: 600;
    border-left: 4px solid #667eea;
    padding-left: 1rem;
}

.section-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.section-list {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.section-list li {
    margin-bottom: 0.5rem;
}

.contact-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.contact-title {
    font-size: 1.5rem;
    color: #444;
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

.contact-info {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
}

.contact-email {
    margin-bottom: 0.5rem;
}

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

.advantage-item {
    text-align: center;
    padding: 2rem;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.advantage-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.advantage-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.advantage-title {
    font-size: 1.3rem;
    color: #444;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.advantage-text {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .search-title {
        font-size: 2rem;
    }

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

    .category-list {
        gap: 1rem;
    }

    .wallpaper-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

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

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

    .detail-actions {
        flex-direction: column;
    }
    
    /* 页面内容响应式设计 */
    .page-content {
        padding: 2rem 1.5rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .search-title {
        font-size: 1.5rem;
    }

    .wallpaper-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wallpaper-card {
    animation: fadeInUp 0.6s ease forwards;
}

.wallpaper-card:nth-child(2) { animation-delay: 0.1s; }
.wallpaper-card:nth-child(3) { animation-delay: 0.2s; }
.wallpaper-card:nth-child(4) { animation-delay: 0.3s; }
.wallpaper-card:nth-child(5) { animation-delay: 0.4s; }
.wallpaper-card:nth-child(6) { animation-delay: 0.5s; }
.wallpaper-card:nth-child(7) { animation-delay: 0.6s; }
.wallpaper-card:nth-child(8) { animation-delay: 0.7s; }