/* 拜佛详情页：固定 1900×1000 设计稿，整页等比缩放 */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    background: #1a120a;
}

.baifo-viewport {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #1a120a;
}

/* 设计坐标固定；实际显示尺寸由 JS transform: scale() 控制 */
.baifo-stage {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 1900px;
    height: 1000px;
    margin: 0;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    background: url(images/fozu/baifo/bf_bg.png) center / 100% 100% no-repeat;
    z-index: 1;
    will-change: transform;
}

.baifo-stage > * {
    position: absolute;
    background-repeat: no-repeat;
    background-position: top center;
    background-size: contain;
    box-sizing: border-box;
}

/* 佛像框 */
.foxiang {
    left: 50%;
    top: 72px;
    width: 215px;
    height: 255px;
    transform: translateX(-50%);
    z-index: 5;
    background-image: url(images/fozu/baifo/pz.png);
    background-size: 100% 100%;
    border-radius: 4px;
    padding: 10px 4px 6px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.28));
}

.foxiang img {
    width: 95%;
    height: 96%;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}

/* 供品层：对齐供桌黄幔 */
.offerings {
    left: 560px;
    top: 300px;
    width: 780px;
    height: 380px;
    z-index: 6;
    pointer-events: none;
}

.offerings > * {
    position: absolute;
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: contain;
    pointer-events: none;
}

.apple {
    left: 240px;
    top: 230px;
    width: 96px;
    height: 54px;
    background-image: url(images/fozu/baifo/b_05.png);
    z-index: 2;
}

.peach {
    left: 420px;
    top: 230px;
    width: 96px;
    height: 54px;
    background-image: url(images/fozu/baifo/b_06.png);
    z-index: 2;
}

.ju {
    left: 110px;
    top: 175px;
    width: 145px;
    height: 110px;
    background-image: url(images/fozu/baifo/b_08.png);
    z-index: 2;
}

.lily {
    left: 500px;
    top: 175px;
    width: 145px;
    height: 110px;
    background-image: url(images/fozu/baifo/b_07.png);
    z-index: 2;
}

/* 香火：加大，底座落在供桌上 */
.xiang {
    left: 50%;
    top: -70px;
    width: 220px;
    height: 480px;
    transform: translateX(-50%);
    background-image: url(images/fozu/baifo/xiang3.gif);
    background-size: contain;
    background-position: center bottom;
    z-index: 4;
    filter: drop-shadow(0 4px 6px rgba(80, 20, 0, 0.25));
}

.la {
    left: 18px;
    top: 100px;
    width: 96px;
    height: 190px;
    background-image: url(images/fozu/baifo/b_03.png);
    background-size: contain;
    background-position: center bottom;
    z-index: 3;
}

.la.la2 {
    left: auto;
    right: 18px;
}

.fire,
.fire2 {
    display: block;
    width: 96px;
    height: 80px;
    margin-left: 0;
    background-repeat: no-repeat;
    background-position: top center;
    background-size: contain;
}

.fire {
    background-image: url(images/fozu/baifo/fire.png);
    animation: fade 600ms infinite;
}

.fire2 {
    margin-top: -80px;
    background-image: url(images/fozu/baifo/fire2.png);
    animation: fade2 300ms infinite;
}

/* 上香顶礼垫：落在地面中央前景 */
.dian {
    left: 860px;
    top: 905px;
    width: 180px;
    height: 84px;
    z-index: 8;
    cursor: pointer;
    background-image: url(images/fozu/baifo/mat.png);
    background-size: 180px 168px;
    background-position: 0 0;
    pointer-events: auto;
    filter: drop-shadow(0 14px 12px rgba(0, 0, 0, 0.45));
    transition: transform 0.15s ease, filter 0.15s ease;
}

.dian:hover,
.dian:focus-visible {
    background-position: 0 -84px;
    transform: translateY(2px) scale(1.04);
    filter: drop-shadow(0 8px 8px rgba(180, 100, 0, 0.45));
}

/* 顶礼反馈：拜垫上方 */
.dingli {
    left: 850px;
    top: 760px;
    width: 200px;
    height: 160px;
    z-index: 9;
    display: none;
    background-image: url(images/fozu/baifo/dingli.gif);
    background-size: contain;
    background-position: center bottom;
    pointer-events: none;
    align-items: flex-end;
    justify-content: center;
}

.dingli.show {
    display: flex;
}

.dingli.show::after {
    content: "顶礼中…";
    color: #5a3a1a;
    font-size: 20px;
    font-weight: 600;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
    animation: bowPulse 1.1s ease-in-out infinite;
}

@keyframes bowPulse {
    0%, 100% { opacity: 0.55; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(4px); }
}

/* 功德箱：落在右侧地面，与左侧书案同高度感 */
.gdx {
    left: 1275px;
    top: 720px;
    width: 190px;
    height: 245px;
    z-index: 10;
    cursor: pointer;
    background-image: url(images/fozu/baifo/gdx.png);
    background-size: contain;
    background-position: center bottom;
    pointer-events: auto;
    filter: drop-shadow(12px 18px 16px rgba(0, 0, 0, 0.48));
    transition: filter 0.15s ease, transform 0.15s ease;
}

.gdx:hover,
.gdx:focus-visible {
    background-image: url(images/fozu/baifo/gdx_h.png);
    transform: translateY(-2px);
    filter: drop-shadow(10px 18px 16px rgba(0, 0, 0, 0.48));
}

@keyframes fade {
    from { opacity: 1; }
    50% { opacity: 0.8; }
    to { opacity: 1; }
}

@keyframes fade2 {
    from { opacity: 1; }
    50% { opacity: 0.4; }
    to { opacity: 1; }
}
