.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.menu {
    text-align: center;
    margin-top: 8%;
}

.title {
    position: relative;
    width: 100vh;
    margin: 0 auto;
    display: flex;
}

/* 按钮 */
.button {
    position: relative;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    z-index: 5;

    display: flex;
    /* 开启弹性布局 */
    justify-content: center;
    /* 居中排列 */
    flex-wrap: nowrap;
    /* 不换行 */
    gap: 75px;
    /* 元素之间的间距 */
}

.button img {
    width: 175px;
    transition: filter 0.3s ease;
}

.button img:hover {
    filter: brightness(1.2);
}
/* 隐藏 */
.button-build a{
    display: none;
}

.button-login,
.button-build {
    display: flex;
    position: absolute;
    gap: 150px;
    /* 图片之间的间距 */
    align-items: center;
    justify-content: center;
}

.button-exit {
    display: none;          /* 默认隐藏 */
    position: fixed;        /* 固定在浏览器窗口右下角 */
    bottom: -250px;           /* 距离底部 20px */
    right: 50px;            /* 距离右边 20px */
    z-index: 100;           /* 保证在最上层 */
    cursor: pointer;        /* 鼠标样式 */
}

#moon-text {
    width: 47%;
    position: absolute;
    top: 3%;
    left: 3%;
    z-index: 1;
    animation: slowRotate 7s linear infinite;
}

@keyframes slowRotate {

    0% {
        transform: rotate(5deg);
    }

    2% {
        transform: rotate(-5deg);
    }

    30% {
        transform: rotate(-5deg);
    }

    40% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }

    60% {
        transform: rotate(-5deg);
    }

    70% {
        transform: rotate(5deg);
    }

    80% {
        transform: rotate(-5deg);
    }

    90% {
        transform: rotate(-5deg);
    }

    100% {
        transform: rotate(365deg);
    }

}

#shamate {
    position: absolute;
    top: -15px;
    right: 25px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    z-index: 1;
    color: transparent;
    background: linear-gradient(90deg,
            rgb(255, 64, 58), rgb(225, 255, 0), #615eff, #ff0000,
            #e4ff1c, #ffffff, #b8beff, #ff0000, #22ff00,
            #22ff00, #ff00d4, #00ffff, #ff9900, #00ffff,
            #22ff00, #ff89eb, #78ff10, #ff562c, #ff0000,
            #03fff2, #c0ff2d, #ff9900, #a0e4ff, #ff0000);
    background-size: 800% 800%;
    -webkit-background-clip: text;
    background-clip: text;
    animation:
        rotateScale 1s linear infinite,
        /* 旋转缩放：1秒一圈，匀速循环 */
        gradientFlow 7s linear infinite;
    /* 渐变流动：7秒循环，动态变色 */
}

@keyframes rotateScale {
    0% {
        transform: rotate(0deg) scale(1);
        /* 初始：0度，缩小到1 */
    }

    50% {
        transform: rotate(10deg) scale(2);
        /* 中间：180度，到1 */
    }

    100% {
        transform: rotate(0deg) scale(1);
        /* 结束：360度，回到0.1 */
    }
}

/* 动画2：颜色动态切换 */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
        /* 初始渐变位置 */
    }

    50% {
        background-position: 100% 50%;
        /* 中间渐变位置 */
    }

    100% {
        background-position: 0% 50%;
        /* 回到初始位置，循环 */
    }
}

/* 遮罩层样式 */
.screen-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    text-align: center;
}

.mask-content {
    max-width: 90%;
    padding: 30px;
}

.mask-content h1 {
    font-size: 26px;
    margin-bottom: 15px;
}

.mask-content p {
    font-size: 17px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.continue-btn {
    padding: 12px 32px;
    font-size: 17px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.continue-btn:hover {
    background-color: #45a049;
}

/* 核心：CSS媒体查询控制响应式（屏幕小于768×500时触发） */
@media (max-width: 767px) or (max-height: 499px) {

    /* 小屏时显示遮罩 */
    .screen-mask {
        display: flex;
    }

    /* 点击按钮后通过类名控制显示内容（配合JS） */
    .main-content.show {
        display: block;
    }

    .screen-mask.hide {
        display: none;
    }
}