/* =========================================================
   UY10 手機長圖滑動效果
   僅使用 uy10- 前綴，避免影響網站其他 gallery / overlay 樣式
   ========================================================= */

/* 全寬作品圖 */
.uy10-full-image {
    clear: both;
    width: 100%;
}

.uy10-full-image > img {
    width: 100%;
    height: auto;
    display: block;
}

/* 手機展示區 */
.uy10-phone-demo {
    position: relative;
    clear: both;
    float: left;

    width: 100%;
    margin: 55px 0 45px;
    padding: 0 15px;

    display: flex;
    flex-direction: column;
    align-items: center;

    overflow: visible;
    box-sizing: border-box;
}

/* 手機上方提示文字 */
.uy10-phone-tip {
    display: block;
    width: fit-content;
    max-width: calc(100% - 30px);

    margin: 0 auto 24px;
    padding: 12px 25px;

    background: #fdfdfd;
    color: #666666;

    border: 1px solid #dedede;
    border-radius: 999px;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.04),
        0 8px 20px rgba(0, 0, 0, 0.09);

    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.02em;
    text-align: center;

    box-sizing: border-box;
}

/* 手機本體：這一段是原 CSS 缺少的關鍵設定 */
.uy10-phone-shell {
    position: relative;

    width: 420px;
    max-width: 100%;
    aspect-ratio: 704 / 1465;

    margin: 0 auto;

    user-select: none;
    -webkit-user-select: none;

    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.16));
}

/* 不支援 aspect-ratio 的舊瀏覽器備援 */
@supports not (aspect-ratio: 1 / 1) {
    .uy10-phone-shell {
        height: 0;
        padding-bottom: 208.0966%;
    }
}

/* 手機實際螢幕範圍 */
.uy10-phone-screen {
    position: absolute;
    z-index: 1;

    left: 7.67%;
    top: 3.55%;

    width: 84.38%;
    height: 92.01%;

    overflow: hidden;
    background: #000000;
    border-radius: 44px;
}

/* 手機內的長條圖片 */
.uy10-phone-long {
    --uy10-phone-move-y: 0px;

    position: absolute;
    top: 0;
    left: 0;

    width: 100% !important;
    max-width: none !important;
    height: auto !important;

    margin: 0 !important;
    padding: 0 !important;

    display: block;

    animation-name: uy10PhoneAutoScroll;
    animation-duration: 10s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-fill-mode: both;

    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* 滑鼠移到手機上時暫停，移開後繼續 */
.uy10-phone-shell:hover .uy10-phone-long {
    animation-play-state: paused;
}

/* 手機長圖滑動動畫 */
@keyframes uy10PhoneAutoScroll {
    0%,
    6% {
        transform: translate3d(0, 0, 0);
    }

    94%,
    100% {
        transform: translate3d(
            0,
            var(--uy10-phone-move-y),
            0
        );
    }
}

/* 手機透明外框 */
.uy10-phone-frame {
    position: absolute;
    z-index: 2;

    inset: 0;

    width: 100% !important;
    max-width: none !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    display: block;
    object-fit: contain;

    pointer-events: none;
}

/* 下方四張長圖 */
.uy10-detail-images {
    clear: both;
    width: 100%;
    text-align: center;
}

.uy10-detail-images > img {
    width: 90%;
    max-width: 100%;
    height: auto;

    margin: 0 auto 25px;
    display: block;
}

@media only screen and (max-width: 768px) {
    .uy10-phone-demo {
        margin-top: 38px;
        margin-bottom: 35px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .uy10-phone-tip {
        max-width: calc(100% - 20px);
        margin-bottom: 18px;
        padding: 10px 18px;

        font-size: 14px;
        line-height: 1.55;
        border-radius: 28px;
    }

    .uy10-phone-shell {
        width: 390px;
        max-width: 95vw;
    }

    .uy10-phone-screen {
        border-radius: 38px;
    }
}

@media only screen and (max-width: 420px) {
    .uy10-phone-tip {
        width: 100%;
        max-width: 100%;
        padding: 10px 14px;
        font-size: 13px;
    }

    .uy10-phone-shell {
        width: 100%;
        max-width: 360px;
    }

    .uy10-phone-screen {
        border-radius: 34px;
    }
}
