/* zone1 条带：右上角固定，不随页面滚动 */

.z1-root {
    position: fixed;
    top: 5px;
    right: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 9999;
    pointer-events: none;
}

.z1-root .z1-strip {
    pointer-events: auto;
}

.z1-strip {
    display: flex;
    align-items: stretch;
    width: 320px;
    border-radius: 0 8px 8px 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.z1-strip--hidden {
    display: none;
}

.z1-content {
    flex: 1;
    min-width: 0;
    aspect-ratio: 29 / 5;
    display: block;
    text-decoration: none;
    overflow: hidden;
}

.z1-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

.z1-close {
    flex-shrink: 0;
    width: 40px;
    height: auto;
    min-height: 100%;
    padding: 0;
    border: none;
    border-radius: 0 8px 8px 0;
    background: #e8e8e8;
    color: #333;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.z1-close:hover {
    background: #ddd;
}

.z1-close::after {
    content: '\00D7';
}

@media (max-width: 768px) {
    .z1-strip {
        max-width: none;
        width: 55vw;
    }

    .z1-close {
        width: 36px;
        font-size: 16px;
    }
}

/* zone 2：底部左右视频广告，854:480，静音自动播放，关闭/播完后下移隐藏，各 slot 固定左右位不随另一个隐藏而移动 */
.z2-root {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0 10px;
    z-index: 9998;
    pointer-events: none;
}

.z2-root .z2-slot {
    pointer-events: auto;
}

.z2-slot {
    position: absolute;
    bottom: 0;
    width: 300px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.z2-slot--hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.z2-slot--left {
    left: 10px;
}

.z2-slot--right {
    right: 10px;
}

.z2-link {
    display: block;
    width: 100%;
    aspect-ratio: 854 / 480;
    text-decoration: none;
    overflow: hidden;
}

.z2-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

.z2-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 0 0 0 8px;
    background: rgba(80, 80, 80, 0.9);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.z2-close:hover {
    background: rgba(100, 100, 100, 0.95);
}

.z2-close::after {
    content: '\5173\95ed';
}

@media (max-width: 768px) {
    .z2-root {
        padding: 0 2px;
    }

    .z2-slot {
        width: 45vw;
    }

    .z2-slot--left {
        left: 2px;
    }

    .z2-slot--right {
        right: 2px;
    }

    .z2-close {
        width: 36px;
        height: 32px;
        font-size: 12px;
    }
}

/* zone 3：底部单图广告，5:1，从下方滑入，关闭后下滑隐藏 */
.z3-root {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 9997;
    pointer-events: none;
}

.z3-root .z3-slot {
    pointer-events: auto;
}

.z3-slot {
    position: relative;
    width: 400px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.z3-slot--visible {
    transform: translateY(0);
}

.z3-slot--hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.z3-link {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 1;
    text-decoration: none;
    overflow: hidden;
}

.z3-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

.z3-close {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 0 0 0 8px;
    background: rgba(80, 80, 80, 0.9);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.z3-close:hover {
    background: rgba(100, 100, 100, 0.95);
}

.z3-close::after {
    content: '\5173\95ed';
}

#z-extra-1,
#z-extra-2,
#z-extra-3,
#z-extra-4 {
    display: block;
    width: 100%;
    aspect-ratio: 12 / 1;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;    
    background-color: #666;
}

#z-extra-1 {
    aspect-ratio: 5 / 1;
}

#z-extra-4 {
    aspect-ratio: 160 / 600;
}

@media (max-width: 768px) {
    .z3-slot {
        width: 100vw;
    }

    .z3-close {
        width: 36px;
        height: 32px;
        font-size: 12px;
    }

    .z-gate-modal {
        max-width: 100%;
        max-height: 80vh;
    }

}

/* zone 4 / 5 / 8：固定广告位（固定容器 + aspect-ratio + 素材 100%） */
.z-fixed-zones {
    display: block;
    width: 100%;
}

.z-fixed-zones-content {
    display: block;
    width: 100%;
    aspect-ratio: 12 / 1;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 5px;
    box-sizing: border-box;
    padding: 2px;
    background-color: #ccc;
}

.z-fixed-zones-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

.z-fixed-zones.z8 .z-fixed-zones-content {
    aspect-ratio: 1 / 1;
}

/* 强制模态窗（门禁） */
.z-gate-mask {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.z-gate-modal {
    position: relative;
    max-width: 80vw;
    max-height: 80vh;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
}

.z-gate-body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.z-gate-link {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    text-decoration: none;
}

.z-gate-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    vertical-align: middle;
    background-color: #000;
}

.z-gate-message {
    flex: 0 0 auto;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    color: #e5e5e5;
    background: #050505;
}

.z-links {
    display: inline-block;
}

.z-links>a::after {
    padding: 0 5px;
    content: '|';
}

.z6-root {
    width: 100%;
    aspect-ratio: 2 / 3;
    background-repeat: no-repeat;
    background-size: cover;
    cursor: pointer;
}

.z6-root .z6-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    vertical-align: middle;
}

.z-300x250 {
    aspect-ratio: 300 / 250;
    display: flex;
    align-items: center; 
    justify-content: center;
}