/* 自定义PhotoSwipe样式，用于手机壁纸列表页面 */
.list {
    display: flex;
    flex-wrap: wrap;
    margin: -1px; /* 补偿padding */
}

.list figure {
    width: calc(100% / 6 - 2px); /* 每行6张图片，减去左右padding各1px */
    margin: 0;
    padding: 1px;
    box-sizing: border-box;
}

.list figure a {
    width: 100%;
    display: block;
    position: relative;
    overflow: hidden;
    color: #333;
    text-decoration: none;
    margin-bottom: 0;
}

.list figure img {
    width: 229px;
    height: 407px;
    display: block;
    transition: transform 0.3s ease;
}

.list figure:hover img {
    transform: scale(1.05);
}

.list .image-info {
    position: absolute;
    bottom: 1px;
    left: 1px;
    right: 1px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 2;
}

.list figure:hover .image-info {
    transform: translateY(0);
}

.list .image-info .image-title {
    margin: 0 0 5px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: bold;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list .image-info .image-meta {
    margin: 0;
    font-size: 12px;
    color: #ccc;
    display: flex;
    justify-content: space-between;
}

.list .image-info .copyright-title {
    margin: 2px 0 0;
    font-size: 12px;
    color: #eee;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list .image-info .icon-view {
    width: 16px;
    height: auto;
    margin-right: 3px;
    vertical-align: middle;
}

.list .image-info .view-count {
    display: flex;
    align-items: center;
}

/* 响应式设计 - 手机端 */
@media (min-width: 360px) and (max-width: 767px) {
    .container {
        width: 100%;
        max-width: 100%;
    }
    .list figure {
        width: calc(50% - 2px); /* 手机端每行2张图片 */
    }
    
    .list figure img {
        width: 100%;
        height: auto;
    }
    
    .list figure .image-info .image-title {
        font-size: 12px;
    }
    
    .list figure .image-info .image-meta,
    .list figure .image-info .copyright-title {
        font-size: 11px;
    }
    .pswp__custom-caption {
        max-width: 420px;
    }
}

/* 响应式设计 - 平板端 */
@media (min-width: 768px) and (max-width: 1024px) {
    .list figure {
        width: calc(33.33% - 2px); /* 平板端每行3张图片 */
    }
    
    .list figure img {
        width: 100%;
        height: auto;
    }
}

/* 响应式设计 - 中等屏幕 */
@media (min-width: 1025px) and (max-width: 1199px) {
    .list figure {
        width: calc(25% - 2px); /* 中等屏幕每行4张图片 */
    }
    
    .list figure img {
        width: 100%;
        height: auto;
    }
}

/* 大屏幕保持每行6张 */
@media (min-width: 1200px) {
    .list figure {
        width: calc(100% / 6 - 2px);
    }
    
    .list figure img {
        width: 229px;
        height: 407px;
    }

    .pswp__custom-caption {
        max-width: 510px;
    }
}

/* 清除浮动 */
.list::after {
    content: "";
    display: table;
    clear: both;
}

/* 确保PhotoSwipe在容器内正确显示 */
.pswp {
    z-index: 10000;
}

/* 修复图片信息显示问题 */
.pswp__caption__center {
    text-align: center;
    font-size: 16px;
    color: #fff;
    max-width: 80%;
    margin: 0 auto;
}

/* 修复按钮显示问题 */
.pswp__button {
    background-color: transparent;
    border: none;
}

.pswp__counter {
    color: #fff;
    font-size: 14px;
}

/* 修复关闭按钮 */
.pswp__button--close {
    background: none;
}

.pswp__button--close:before {
    content: "×";
    font-size: 30px;
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pswp__custom-caption {
  background: rgba(0, 0, 0, 0.75);
  font-size: 16px;
  color: #fff;
  width: calc(100% - 2px);
  max-width: 507px;
  padding: 2px 8px;
  border-radius: 4px;
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
}
.pswp__custom-caption a {
  color: #337ab7;
  text-decoration: underline;
}
.hidden-caption-content {
  display: none;
}