.scroll-container {
    width: 90%;
    height: 280px;
    margin: 40px auto;
    overflow: hidden;
    position: relative;
    border-radius: 16px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    z-index: 1;
    /* 防止容器内元素溢出触发重排 */
    contain: layout paint;
    transform: translateZ(0); /* 硬件加速 */
}

.scroll-wrapper {
    display: flex;
    align-items: center;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    /* 核心：硬件加速 + 禁止换行 + 提升渲染层级 */
    transform: translateZ(0);
    will-change: transform;
    white-space: nowrap;
    backface-visibility: hidden;
}

.scroll-item {
    flex: 0 0 auto;
    width: 220px;
    height: 220px;
    margin: 0 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    /* 固定尺寸，避免图片加载时尺寸变化 */
    position: relative;
}

.scroll-item:hover {
    transform: scale(1.1); /* 悬停放大效果 */
}

/* 关键：图片占位，避免加载时尺寸抖动 */
.scroll-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    /* 图片加载过渡，避免突然显示 */
    opacity: 0;
    transition: opacity 0s ease;
}

.scroll-item img.loaded {
    opacity: 1;
}

.empty-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255,255,255,0.6);
    font-size: 16px;
}

.photo{
    border-radius: 10px;
    box-shadow: 0 4px 15px grey;
    height: 400px;
    width: auto;
}