* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #fff;
    color: #333;
    min-height: 100vh;
}

.header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 30px;
    background: linear-gradient(90deg, #1a3a8f 0%, #2d5bbd 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(26, 58, 143, 0.3);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    transform: rotate(30deg);
    z-index: 0;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header h1 {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 2.8rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.container {
    width: 100%;
    margin: 0 auto;
}

.filter-bar {
    display: flex;
    justify-content: center;

    gap: 0px;
    flex-wrap: wrap;
    margin-top: 100px;


    border-bottom: 1px solid #f0f0f0;
}

.filter-btn {

    color: #2b2b2b;
    padding-top: 10px;
    padding-bottom: 6px;
    margin-right: 36px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    font-size: 16px;
    font-weight: normal;
    align-items: center;
    flex-wrap: wrap;
    width: 56px;
    gap: 8px;
   
    border-bottom: 2px solid transparent;
}

.filter-btn:hover,
.filter-btn.active {
    color: #2b2b2b;
    border-bottom: 2px solid #2b2b2b;
}

/* 添加瀑布流容器样式     justify-content: center;
    margin: 0 auto;*/
.masonry-container {
    width: 100%;
    display: flex;
    justify-content: flex-end;

    
}

/** margin: 0 auto;*/
.masonry-grid {
   
    margin: 0 auto;
    width: 100%;
}

.masonry-item {
    width: 260px; /* 固定项目宽度 */
    margin-bottom: 16px;
    transition: none;
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 12px;
    cursor: pointer;
   /* box-shadow: 0 4px 12px rgba(0,0,0,0.05);*/
}

.masonry-item img {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
  /*  border-bottom: 1px solid #f0f0f0;*/
}

.masonry-item:hover img {
    /*transform: scale(1.05);*/
}



.masonry-item .effect-content {
    position: absolute;
    z-index: 10;
    bottom:0px;
    display: flex;
    justify-content: flex-end;
    width:100%;
    height:38px;
    transform: scale(0.85);
   left:10px;
opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.masonry-item:hover .effect-content {
    position: absolute;
    z-index: 10;
    bottom:30px;
    display: flex;
    opacity: 1;
    justify-content: flex-end;
    width:100%;
    height:43px;
}


.effect-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a3a8f;

    display: flex;
    font-size: 12px;
    align-items: center;
    position:absolute;
    z-index: 10;
    top:6px;
    right:6px;
}

.effect-title i {
    margin-right: 10px;
    color: #ff6b6b;
}

.effect-desc {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
    min-height: 72px;
}

.effect-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;


}

.effect-tag {
    background: rgba(255, 255, 255, 0.8);
    color: #666; 
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    font-size: 12px;
    height:25px;
  padding-left: 10px;
  padding-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;  
}
.masonry-item .effect_bgs{
    background-image:linear-gradient(180deg,transparent,rgba(0,0,0,0.5));
    position: absolute; 
    left: 0px; 
   opacity: 0;
    width: 100%;
    z-index: 1;
    height:60px;
    bottom:0px;
}

.masonry-item:hover .effect_bgs{
    background-image:linear-gradient(180deg,transparent,rgba(0,0,0,0.8));
    position: absolute; 
    left: 0px; 
   opacity: 1;
    width: 100%;
    z-index: 1;
    height:60px;
    bottom:0px;
}

.badge {


    font-size: 0.9rem;

    border-radius: 20px;
    font-weight: 600;
    z-index: 10;
       transform: scale(0.95);
    transform-origin:center;

}

.badge-new {
    background: rgba(140, 213, 13, 1);
    font-weight: normal;
    font-size: 12px;
    color: white;
}

.badge-hot {
    background: rgba(232, 152, 161, 1);
    font-weight: normal;
    font-size: 12px;
    color: white;
}
.badge-super {
    background: #ffdf89;
    font-weight: normal;
    font-size: 12px;
    color: #6a4103;
 
}

.footer {
    text-align: center;
    padding: 30px 0;
    color: #666;
    font-size: 1.1rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 1.5rem;
    color: #4a6bdf;
    grid-column: 1 / -1;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.empty-state i {
    font-size: 5rem;
    color: #d0d8ff;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #4a6bdf;
    margin-bottom: 15px;
}

.empty-state p {
    color: #888;
    max-width: 600px;
    margin: 0 auto;
}

.data-source {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #666;
}

.import-btn {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: #95bf03;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    width: 90%;
    opacity: 0;
    display: flex;
    z-index: 30;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.masonry-item:hover .import-btn {
    opacity: 1;
}

@media (max-width: 1200px) {
    .masonry-grid {
        max-width: 970px;
    }
}

@media (max-width: 992px) {
    .masonry-grid {
        max-width: 750px;
    }
}

@media (max-width: 768px) {
    .masonry-grid {
        max-width: 100%;
    }
    
    .masonry-item {
        width: 100%;
    }

    .header h1 {
        font-size: 2.2rem;
    }

    .filter-bar {
        gap: 10px;
        justify-content: flex-start;
        position:absolute;
        top:0px;
        left:0px;
        width:45px;
        flex-wrap: wrap;
        height:100%;
        z-index:999;
    }
    
    .filter-btn {
        margin-right: 20px;
        margin-bottom: 15px;
        width: auto;
        min-width: 80px;
    }
    
    .filter-btn:last-child {
        margin-right: 0;
    }
}


/* 添加新样式 */
.filter-container {
    position: relative;
    z-index: 1000;
    margin-bottom: 30px;
}

.filter-bar.fixed {
    position: fixed;
    top: 0px; /* 与顶部栏高度匹配 */
    left: 0;
    right: 0;
    background:rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;

    margin: 0;
    justify-content: center;
}

.masonry-banner {
    width: 536px;
height:476px;

    border-radius: 12px;
    position: absolute;
    z-index: 50;
    overflow: hidden;
   
  
    text-align: center;
}

/* 搜索相关样式 */
#searchInput:focus {
    outline: none;
}

#searchResultsCount {
    animation: fadeIn 0.3s ease;
}

#searchSuggestions {

   
}

.hot-tag {
    user-select: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translate(-50%, 0);

    }
    to { 
        opacity: 1;
        transform: translate(-50%, 0);
     
    }
}
/* 视频悬停效果样式 */
.masonry-item.has-video .image-container {
    position: relative;
}

.masonry-item.has-video .image-container:hover {
    transform: scale(1);
    transition: transform 0.3s ease;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.5s;
    border-radius: 12px;
}

.masonry-item.has-video:hover .video-overlay {
    opacity: 1;
}

.video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.effect-video {
    border-radius: 12px;
}

/* 确保图片在视频播放时变暗 */
.masonry-item.has-video .effect-image {
    transition: opacity 0.5s;
}