html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, Cantarell, Oxygen, Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
}

#background-video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#background-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#main-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-top: 20px;
    width: 100%;
    transition: background 0.3s ease;
}

#top-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 55px;
    background: rgba(0, 0, 0, 0.2);
    z-index: 10;
    backdrop-filter: blur(12px);
}

#top-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

#top-menu li {
    margin: 0 10px;
}

#top-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    display: block;
    border-radius: 25px;
    position: relative;
    background-color: rgba(, 0, 0, 0.1);
    transition: background-color 0.3s, color 0.3s;
}

#top-menu a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

#play-button {
    text-align: center;
    font-size: 14px;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.2);
    color: white;
    border-radius: 25px;
    cursor: pointer;
    margin: 20px auto;
    width: max-content;
    transition: background-color 0.3s ease;
    z-index: 20;
}

#play-button:hover {
    background-color: rgba(0, 0, 0, 0.4);
}

#volume-control {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#volume-control i {
    font-size: 16px;
    margin: 0 10px;
    cursor: pointer;
    color: white; /* 白色图标 */
}

#volume-bar {
    width: 150px;
}

#show-scene-toggle {
    text-align: center;
    margin-top: 20px;
    opacity: 1;
    transition: opacity 0.3s ease;
    color: white;
}

#scene-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.scene-item {
    width: 20%;
    height: 250px;
    margin: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
    color: #fff;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    position: relative;
    opacity: 1; /* Ensure opacity is 1 by default */
    visibility: visible; /* Ensure the element is visible by default */
}

.scene-item:hover {
    transform: scale(1.01);
}

.scene-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.scene-item h3 {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 2;
    text-align: center;
}

.scene-title-en {
    font-size: 18px;
    display: block;
}

.scene-title-zh {
    font-size: 14px;
    display: block;
    margin-top: 5px;
}

#footer-text {
    text-align: center; /* 居中 */
    color: rgba(255, 255, 255, 0.8); /* 白色文字 */
    font-size: 14px; /* 字体大小 14px */
    margin-top: 20px; /* 上边距 */
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

#top-menu.hidden, #play-button.hidden, #scene-container.hidden, #footer-text.hidden, #volume-control.hidden, #show-scene-toggle.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden; /* Ensures the element is hidden properly */
}

.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden; /* Ensures the element is hidden properly */
    transform: translateY(-20px);
    transition: opacity 1s ease, transform 1s ease, visibility 0s ease 1s; /* Adds delay on visibility change */
}

.hidden:not(.hidden) {
    opacity: 1;
    pointer-events: all;
    visibility: visible; /* Ensures the element is visible again */
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease; /* Smooth transition */
}

.show {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
    visibility: visible; /* Ensures visibility is maintained */
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.show.delayed {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
    visibility: visible; /* Ensures visibility is maintained */
    transition: opacity 0.3s ease, transform 0.3s ease 0.3s; /* Adds a slight delay for smooth transition */
}

@media (max-width: 768px) {
    #top-menu ul li:nth-child(n+4) {
        display: none;
    }

    .scene-item {
        width: 45%;
        margin: 5px;
    }

    #footer-text .key {
        display: none;
    }
}