/*
Theme Name: Universal Stretch Image
Version: 2.0
*/

/* 基础重置 */
html, body {
    margin: 0!important;
    padding: 0!important;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* 禁用水平滚动 */
}

/* 容器样式 */
.image-scroll-container {
    position: relative;
    width: 100vw;
    min-height: 100vh;
}
.image-scroll-container img{width:100%;}

/* 图片核心样式 */
.stretch-image {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw !important; /* 强制宽度等于视口 */
    height: auto;
    min-width: 100%;
    display: block;
    object-fit: cover;
}

/* 高度自适应逻辑 */
@media (orientation: portrait) {
    .stretch-image {
        width: 100vw !important;
        height: auto !important;
    }
}

@media (orientation: landscape) {
    .stretch-image {
        width: auto !important;
        min-width: 100vw;
        height: auto;
    }
}

/* 消除所有潜在间隙 */
body:after {
    content: "";
    display: block;
    position: fixed;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: inherit;
    pointer-events: none;
    z-index: -1;
}