@charset "utf-8";
/* CSS Document */

body {
    margin: 0;
    padding: 0;
}

section {
    height: 100vh;
    background: #000000;
    position: relative; /* 添加这一行 */
}

section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #f00, #f00, #0f0, #0ff, #ff0, #0ff);
    mix-blend-mode: color;
    pointer-events: none;
    z-index: 1; /* 添加这一行 */
}

video {
    object-fit: cover;
    height: 100vh;
    width: 100%;
    position: relative; /* 添加这一行 */
    z-index: 0; /* 添加这一行 */
}

h1 {
    margin: 0;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    text-align: center;
    color: #FFFFFF;
    font-size: 5em;
    letter-spacing: 0.2em;
    font-family: "Ma Shan Zheng", cursive;
    font-style: normal;
    z-index: 2; /* 添加这一行 */
}

h1 span {
    opacity: 0;
    display: inline-block;
    animation: animate 1s linear forwards;
}

@keyframes animate {
    0% {
        opacity: 0;
        transform: rotateY(90deg);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: rotateY(0deg);
        filter: blur(0);
    }
}

h1 span:nth-child(1) { animation-delay: 1s; }
h1 span:nth-child(2) { animation-delay: 2s; }
h1 span:nth-child(3) { animation-delay: 2.5s; }
h1 span:nth-child(4) { animation-delay: 3s; }
h1 span:nth-child(5) { animation-delay: 3.5s; }
h1 span:nth-child(6) { animation-delay: 3.75s; }
h1 span:nth-child(7) { animation-delay: 4s; }
h1 span:nth-child(8) { animation-delay: 4.5s; }
h1 span:nth-child(9) { animation-delay: 5s; }

@media screen and (max-width: 992px) {
    section {
        height: 100vh;
    }

    video {
        object-fit: contain; /* 修改这一行 */
        height: auto;
        width: 100%;
    }

    h1 {
        font-size: 3em; /* 调整字体大小 */
    }
}
