/* 明星页面样式 */
.starWrapper {
    padding: 0 3%;
    margin: 0 auto;
}

.starWrapper .list {
    margin-top: 40px;
}

.starWrapper .list .grid {
    margin: 0 -15px;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
}

.starWrapper .list .grid .item {
    width: 33.333%;
    padding: 0 15px;
    margin-bottom: 30px;
    font-size: 0;
    box-sizing: border-box;
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

.starWrapper .list .grid .item .pic {
    display: block;
    overflow: hidden;
    position: relative;
    border: 1px solid #eaeaea;
    background-color: #fff;
    padding: 8px;
    transition: all 0.3s ease;
}

.starWrapper .list .grid .item .pic:hover {
    border-color: #bdbdbd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.starWrapper .list .grid .item .pic img {
    width: 100%;
    height: auto;
    display: block;
}

.starWrapper .list .grid .item .pic .mask {
    opacity: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.starWrapper .list .grid .item .pic .mask i {
    font-size: 14px;
    color: #fff;
    padding: 8px 16px;
    border-radius: 2px;
    border: 1px solid #fff;
    white-space: nowrap;
    font-style: normal;
    font-weight: normal;
    line-height: 1.5;
    display: block;
}

.starWrapper .list .grid .item .pic:hover .mask {
    opacity: 1;
}

.starWrapper .list .grid .item.animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

.starWrapper .list .grid .item.zoomIn {
    animation-name: zoomIn;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale3d(0.3, 0.3, 0.3);
    }
    50% {
        opacity: 1;
    }
    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

.starWrapper .grid-loader {
    overflow: hidden;
    opacity: 0;
    width: 100%;
    height: 26px;
    margin-bottom: 10px;
    text-align: center;
    transition: opacity 0.3s ease;
}

.starWrapper .grid-loader.grid-loader-show {
    opacity: 1;
}

.starWrapper .grid-loader .line-scale {
    margin: 0 auto;
    width: 118px;
    text-align: center;
}

.starWrapper .grid-loader .line-scale .sk-child {
    width: 8px;
    height: 8px;
    background-color: #666;
    border-radius: 100%;
    display: inline-block;
    animation: sk-three-bounce 1.4s ease-in-out 0s infinite both;
    margin: 0 4px;
}

.starWrapper .grid-loader .line-scale .sk-bounce1 {
    animation-delay: -0.32s;
}

.starWrapper .grid-loader .line-scale .sk-bounce2 {
    animation-delay: -0.16s;
}

@keyframes sk-three-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.starWrapper .nothing {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Fancybox 样式已在 base.css 中包含，这里只添加页面特定的样式调整 */
/* 将缩略图改为底部显示（参考网站效果） */
#imageViewer.fancybox-container .fancybox-thumbs {
    top: auto;
    bottom: 0;
    left: 0;
    right: auto;
    width: 100%;
    height: 100px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
}

/* 当缩略图显示时，调整 inner 容器位置 */
#imageViewer.fancybox-container.fancybox-show-thumbs .fancybox-inner {
    right: 0;
    bottom: 100px;
}

/* 当缩略图隐藏时，inner 容器占满整个空间 */
#imageViewer.fancybox-container:not(.fancybox-show-thumbs) .fancybox-inner {
    right: 0;
    bottom: 0;
}

#imageViewer.fancybox-container .fancybox-thumbs-x > ul {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

#imageViewer.fancybox-container .fancybox-thumbs > ul > li {
    float: none;
    display: inline-block;
    width: 80px;
    height: 80px;
    max-width: 80px;
    max-height: 80px;
    margin: 0 5px;
}

/* 确保导航按钮在查看器打开时显示（不在隐藏状态） */
#imageViewer.fancybox-container.fancybox-is-open.fancybox-show-nav .fancybox-navigation .fancybox-button {
    opacity: 1;
    visibility: visible;
}

/* 弹出窗口中的左右翻页箭头样式 - 没有背景只有箭头，箭头位于图片左右 */
#imageViewer.fancybox-container .fancybox-navigation .fancybox-button {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    color: #fff !important;
    top: 50% !important;
    transform: translateY(-50%);
    margin-top: 0 !important;
}

/* 隐藏 SVG 箭头 */
#imageViewer.fancybox-container .fancybox-navigation .fancybox-button svg {
    display: none !important;
}

/* 左箭头使用 leftarrow.png - 固定在屏幕左边 */
#imageViewer.fancybox-container .fancybox-navigation .fancybox-button--arrow_left {
    background-image: url(../img/leftarrow.png) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    width: 24px !important;
    height: 24px !important;
    left: 0 !important;
    right: auto !important;
}

/* 右箭头使用 rightarrow.png - 固定在屏幕右边 */
#imageViewer.fancybox-container .fancybox-navigation .fancybox-button--arrow_right {
    background-image: url(../img/rightarrow.png) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    width: 24px !important;
    height: 24px !important;
    right: 0 !important;
    left: auto !important;
}

#imageViewer.fancybox-container .fancybox-navigation .fancybox-button:hover {
    opacity: 0.8;
}

/* 保留 :after 伪元素用于扩大点击区域，但不显示背景 */
#imageViewer.fancybox-container .fancybox-navigation .fancybox-button:after {
    background: transparent !important;
    left: -15px;
    top: -15px;
    padding: 30px;
}

/* 确保工具栏按钮在查看器打开时显示 */
#imageViewer.fancybox-container.fancybox-is-open.fancybox-show-toolbar .fancybox-toolbar {
    opacity: 1;
    visibility: visible;
}

/* 隐藏工具栏按钮中的 SVG */
#imageViewer.fancybox-container .fancybox-toolbar .fancybox-button svg {
    display: none !important;
}

/* 工具栏按钮统一大小 */
#imageViewer.fancybox-container .fancybox-toolbar .fancybox-button {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin: 30px 20px 0 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

/* 列表按钮使用 list.svg */
#imageViewer.fancybox-container .fancybox-toolbar .fancybox-button--thumbs,
#imageViewer.fancybox-container .fancybox-toolbar #viewerToggleThumbs {
    background-image: url(../img/list.svg) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

/* 关闭按钮使用 close.svg */
#imageViewer.fancybox-container .fancybox-toolbar .fancybox-button--close,
#imageViewer.fancybox-container .fancybox-toolbar #viewerClose {
    background-image: url(../img/close.svg) !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
}

/* 确保信息栏在查看器打开时显示 */
#imageViewer.fancybox-container.fancybox-is-open.fancybox-show-infobar .fancybox-infobar {
    opacity: 1;
    visibility: visible;
}

/* 确保查看器隐藏时，所有内容都不可见 */
#imageViewer.fancybox-container.fancybox-is-hidden {
    display: none !important;
}

/* 响应式设计 */
@media screen and (max-width: 1200px) {
    .starWrapper {
        padding: 0 3%;
    }
    
    .starWrapper .list .grid {
        margin: 0 -6px;
    }
    
    .starWrapper .list .grid .item {
        width: 33.333%;
        padding: 0 6px;
        margin-bottom: 12px;
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
}

@media screen and (max-width: 768px) {
    .starWrapper .list .grid .item {
        width: 50%;
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media screen and (max-width: 575px) {
    .starWrapper .list .grid {
        margin: 0 -6px;
    }
    
    .starWrapper .list .grid .item {
        width: 50%;
        padding: 0 6px;
        margin-bottom: 12px;
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Lookbook 页面特定样式 - 遮罩显示"搜索更多"文字，带白色外框 */
.lookbookWarpper .list .grid .item .pic .mask i {
    font-size: 14px;
    color: #fff;
    padding: 8px 16px;
    border-radius: 2px;
    border: 1px solid #fff;
    white-space: nowrap;
    font-style: normal;
    font-weight: normal;
    line-height: 1.5;
}

/* Videos 页面特定样式 - 一行显示两条，播放按钮，遮罩显示标题 */
.videosWrapper {
    padding: 0 3%;
    margin: 0 auto;
}

.videosWrapper .list {
    margin-top: 40px;
}

.videosWrapper .list .grid {
    margin: 0 -15px;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
}

.videosWrapper .list .grid .item {
    width: 50%;
    padding: 0 15px;
    margin-bottom: 30px;
    font-size: 0;
    box-sizing: border-box;
    flex: 0 0 50%;
    max-width: 50%;
}

.videosWrapper .list .grid .item .pic {
    display: block;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

.videosWrapper .list .grid .item .pic img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.videosWrapper .list .grid .item .pic:hover img {
    transform: scale(1.05);
}

/* 播放按钮 - 图片正中显示 */
.videosWrapper .list .grid .item .pic .play-button {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
    width: 60px;
    height: 60px;
}

.videosWrapper .list .grid .item .pic .play-button img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.videosWrapper .list .grid .item .pic:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

/* 遮罩 - 鼠标悬停时显示标题 */
.videosWrapper .list .grid .item .pic .mask {
    opacity: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
    padding: 20px;
    box-sizing: border-box;
}

.videosWrapper .list .grid .item .pic:hover .mask {
    opacity: 1;
}

.videosWrapper .list .grid .item .pic .mask .video-title {
    color: #fff;
    font-size: 18px;
    text-align: center;
    line-height: 1.5;
    font-weight: normal;
    max-width: 100%;
    word-wrap: break-word;
    position: absolute;
    top: calc(50% + 30px + 30px); /* 播放按钮中心(50%) + 播放按钮高度的一半(30px) + 间距(30px) */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
}

.videosWrapper .list .grid .item.animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

.videosWrapper .list .grid .item.zoomIn {
    animation-name: zoomIn;
}

.videosWrapper .nothing {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* 响应式设计 */
@media screen and (max-width: 1200px) {
    .videosWrapper {
        padding: 0 3%;
    }
    
    .videosWrapper .list .grid {
        margin: 0 -10px;
    }
    
    .videosWrapper .list .grid .item {
        width: 50%;
        padding: 0 10px;
        margin-bottom: 20px;
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media screen and (max-width: 768px) {
    .videosWrapper .list .grid .item {
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .videosWrapper .list .grid .item .pic .play-button img {
        width: 50px;
        height: 50px;
    }
    
    .videosWrapper .list .grid .item .pic .mask .video-title {
        font-size: 16px;
    }
}

/* Celebrity 页面特定样式 - 移除边框，添加标题 */
.starWrapper .list .grid .item .item-title {
    margin-top: 15px;
    font-size: 14px;
    color: #333;
    text-align: center;
    line-height: 1.5;
    font-weight: normal;
}

/* 更精确的方式：通过 body 类或 URL 判断，这里使用更通用的方式 */
body:has(.sub-nav-tabs .sub-nav-tab[href*="celebrity"].active) .starWrapper .list .grid .item .pic,
.starWrapper:has(.sub-nav-tabs .sub-nav-tab[href*="celebrity"].active) .list .grid .item .pic {
    border: none;
    padding: 0;
    background-color: transparent;
}

.starWrapper:has(.sub-nav-tabs .sub-nav-tab[href*="celebrity"].active) .list .grid .item .pic:hover {
    border: none;
    box-shadow: none;
}

/* 如果浏览器不支持 :has，使用类名方式 */
.starWrapper.celebrity-page .list .grid .item .pic {
    border: none;
    padding: 0;
    background-color: transparent;
}

.starWrapper.celebrity-page .list .grid .item .pic:hover {
    border: none;
    box-shadow: none;
}

/* Star 页面样式 - 移除边框，与 celebrity 页面一致 */
.starWrapper.star-page .list .grid .item .pic {
    border: none;
    padding: 0;
    background-color: transparent;
}

.starWrapper.star-page .list .grid .item .pic:hover {
    border: none;
    box-shadow: none;
}

/* 瀑布流布局样式 - records 页面专用 */
/* 大屏幕下让 starWrapper 和 list 容器居中 */
@media screen and (min-width: 1401px) {
    .starWrapper.celebrity-page {
        padding: 0;
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .starWrapper.celebrity-page .list {
        margin-top: 40px;
        padding: 0;
    }
}

.starWrapper.celebrity-page .list .masonry-grid {
    column-count: 3;
    column-gap: 20px;
    margin: 0;
    padding: 0;
    width: 100%;
}

.starWrapper.celebrity-page .list .masonry-item {
    break-inside: avoid;
    margin-bottom: 20px;
    display: inline-block;
    width: 100%;
    vertical-align: top;
    page-break-inside: avoid;
}

.starWrapper.celebrity-page .list .masonry-item .pic {
    display: block;
    overflow: hidden;
    position: relative;
    border: none;
    padding: 0;
    background-color: transparent;
    transition: transform 0.3s ease;
}

.starWrapper.celebrity-page .list .masonry-item .pic:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.starWrapper.celebrity-page .list .masonry-item .pic img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.starWrapper.celebrity-page .list .masonry-item .pic .mask {
    opacity: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 4px;
}

.starWrapper.celebrity-page .list .masonry-item .pic:hover .mask {
    opacity: 1;
}

/* 响应式设计 - 瀑布流 */
@media screen and (max-width: 1400px) {
    .starWrapper.celebrity-page .list .masonry-grid {
        column-count: 3;
    }
}

@media screen and (max-width: 991px) {
    .starWrapper.celebrity-page .list .masonry-grid {
        column-count: 2;
        column-gap: 15px;
    }
    
    .starWrapper.celebrity-page .list .masonry-item {
        margin-bottom: 15px;
    }
}

@media screen and (max-width: 575px) {
    .starWrapper.celebrity-page .list .masonry-grid {
        column-count: 2;
        column-gap: 10px;
    }
    
    .starWrapper.celebrity-page .list .masonry-item {
        margin-bottom: 10px;
    }
}

