/**后台相册管理列表**/
* {
    padding: 0;
    margin: 0;
    text-decoration: none;
    list-style: none;
    outline: 0;
}

.photo-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 5px;
    width: 100%;
}

.photo-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s ease;
    aspect-ratio: 1/1; /* 确保正方形 */
}

.photo-thumb {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.photo-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}



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

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

@media (max-width: 480px) {
    .photo-wall {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}


/**弹框UI**/
/* 相册编辑弹框样式 */
/* ===== 相册编辑弹框样式 ===== */
.editBox {
    overflow: hidden !important;
    border-radius: 5px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.editBox .layui-layer-content {
    overflow: hidden !important;
    padding: 0 !important;
}

.edit-photo {
    padding: 20px 30px;
}

.edit-photo h3 {
    font-size: 20px;
    font-weight: 500;
    color: #1e1e1e;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    height: 35px;
    line-height: 35px;
    padding: 0 10px;
    font-size: 14px;
    border: 1px solid #cfcfcf;
    border-radius: 2px;
    box-sizing: border-box;
}

.form-group textarea {
    height: 80px;
    line-height: 1.5;
    padding: 8px 10px;
    resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border: 1px solid #5b5b5b;
    box-shadow: 0px 0px 0px 3px #efefef;
    transition: 0.4s all;
    outline: none;
}

.edit-footer {
    text-align: right;
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.edit-footer button {
    border: none;
    border-radius: 3px;
    padding: 0 20px;
    height: 32px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

#cancel-btn {
    background: #fff;
    color: #606266;
    border: 1px solid #E0E0E0;
}

#cancel-btn:hover {
    background: #f5f5f5;
    border-color: #d0d0d0;
}

#delete-btn {
    background: #F56C6C;
    color: #fff;
    margin-right: auto;
}

#delete-btn:hover {
    background: #e65c5c;
}

.edit-footer button[type="submit"] {
    background: #333;
    color: #fff;
}

.edit-footer button[type="submit"]:hover {
    background: #444;
}

/* ===== 删除确认弹框样式 ===== */
.deleteBox {
    padding: 20px 30px !important;
    border-radius: 5px !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.deleteBox .layui-layer-title {
    font-weight: 600;
    background-color: #fff;
    border-bottom: none;
    font-size: 16px;
    height: auto;
    padding: 0;
    margin-bottom: 10px;
}

.deleteBox h3 {
    font-size: 18px;
    font-weight: 500;
    color: #f34848;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.deleteBox h3 i {
    font-size: 20px;
    margin-right: 8px;
}

.deleteDec {
    font-size: 14px;
    color: #777777;
    line-height: 1.6;
    padding-top: 15px;
    border-top: 1px solid #f3f3f3;
    margin-top: 15px;
}

.deleteBox .layui-layer-btn {
    display: flex;
    justify-content: center;
    padding: 0 !important;
    flex-direction: row-reverse;
    margin-top: -10px !important;
    font-size: 14px;
}

.deleteBox .layui-layer-btn0 {
    border: none !important;
    background: #f34848 !important;
    color: #fff !important;
    flex: 1;
    text-align: center;
}

.deleteBox .layui-layer-btn0:hover {
    background: #e53c3c !important;
}

.deleteBox .layui-layer-btn1 {
    box-sizing: border-box;
    flex: 1;
    text-align: center;
}

.deleteBox .layui-layer-btn1:hover {
    background: #f5f5f5 !important;
    border-color: #d0d0d0 !important;
}

/**前台相册模板照片列表**/

.photo-contain {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px; 
}

.photos {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    width: 85%;
}

.photo {
    width: 168px;
    height: 168px;
    border: 1px solid var(--white);
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.image-shadow {
    position: relative;
    background: var(--white);
    -webkit-transition: all .2s linear;
    transition: all .2s linear;
}

.image-shadow:hover {
    z-index: 2;
    -webkit-box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    -webkit-transform: translate3d(0, -2px, 0);
    transform: translate3d(0, -2px, 0);
}

/**手机端响应式设计**/
@media (max-width: 767px) {
    /**相册页面**/
    .photo-contain {
        padding-top: 0px; 
    }
    .photos {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        width: 100%;
    }
    
    .photo {
        flex-basis: 33.33%;
        position: relative;
        padding-top: 33.33%;
        width: auto;
        height: auto;
    }

    .photo a {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 1px solid var(--white);
    }

}