* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #000;
    font-family: Arial, sans-serif;
}

/* Background image container */
#site-background {
    position: fixed;
    inset: 0;
    /* top:0; right:0; bottom:0; left:0 */
    background-image: url('assets/image/background3.jpg');
    background-size: cover;
    background-position: center center;
    /* 可改为 center top 保留焦点 */
    background-repeat: no-repeat;
    z-index: 0;
}

/* Logo positioned above background but under the loading UI */
/* Place the logo around the upper third of the viewport */
#site-logo {
    position: fixed;
    top: 33vh;
    /* around 1/3 down the viewport */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: auto;
    z-index: 15;
    pointer-events: none;
}

/* Make the preload overlay transparent so the background image is visible */
#preload_container {
    background-color: transparent;
}

/* Make canvas transparent so the page background can be seen behind it during loading */
canvas {
    display: block;
    background-color: transparent;
}

/* center the animation container so the scaled canvas stays centered */
#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#animation_container {
    position: relative; /* positioned by flex centering */
    transform-origin: 0 0;
}

/* ensure canvas remains transparent (no solid black overlay) */
canvas {
    display: block;
    background-color: transparent;
}

#dom_overlay_container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    display: none;
}

.loading-content {
    position: absolute;
    top: 66vh;
    /* place loading UI around lower third */
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 30;
    /* ensure loading UI is above logo */
}

.loading-bar {
    width: 300px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 20px;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background-color: #4CAF50;
    border-radius: 3px;
    transition: width 0.3s ease;
}

#preload_container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    /* soft translucent overlay so background is visible but UI is readable */
    background-color: rgba(0, 0, 0, 0.35);
    opacity: 1;
    /* transition: opacity 0.5s ease-out; */
}

.loading-text {
    color: white;
    font-size: 18px;
    margin-bottom: 10px;
}