* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    touch-action: manipulation;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.video-stage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    z-index: 1;
}

.video-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    transform: translateY(100%);
    pointer-events: none;
    z-index: 1;
}

.video-layer.active-layer {
    transform: translateY(0);
    pointer-events: auto;
    z-index: 2;
}

/* 只有在真正做位移动画时才加过渡，拖拽跟手时不能有过渡延迟 */
.video-layer.anim {
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.title {
    position: absolute;
    bottom: 2px;
    left: 2px;
    color: white;
    font-size: 8px;
    background: rgba(0,0,0,0.5);
    padding: 5px 10px;
    border-radius: 8px;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 15;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(209, 26, 45, 0.3);
    border-radius: 50%;
    border-top-color: #d11a2d;
    animation: spin 1s ease-in-out infinite;
    position: absolute;
    top: 50%;
    left: 50%;
}

.swipe-hint {
    position: absolute;
    bottom: 100px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    animation: fadeHint 3s infinite;
    z-index: 10;
    display: none;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes fadeHint {
    0%, 100% {
        opacity: 0.4;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-8px);
    }
}
