/* 加载动画 */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 240, 250, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    will-change: opacity, visibility;
}

.loader-content {
    font-size: 2em;
    animation: bounce 1s infinite;
    color: #ff69b4;
    text-shadow: 0 0 10px #ffb6c1;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

#loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* 页面基础样式 */
html, body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    font-family: Arial, sans-serif;
    position: relative;
}

/* 背景层和樱花 Canvas */
#backgroundLayer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url(https://www.dmoe.cc/random.php) no-repeat center center fixed;
    background-size: cover;
    z-index: -2;
}

#sakuraCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    display: block;
    background: transparent;
}

/* 主内容容器 */
.container {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.4);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    max-width: 50vw;
    width: 100%;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 15px 25px;
    margin: 10px;
    font-size: 1.2em;
    color: white;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.5s ease;
    background-image: linear-gradient(to right, #007BFF, #007BFF);
    background-size: 200% 100%;
    background-position: left bottom;
}
.button:hover {
    background-position: right bottom;
    background-image: linear-gradient(to right, #007BFF, #800080);
}

/* 模态弹窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.modal.show {
    display: flex;
    opacity: 1;
}
.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    text-align: center;
    border-radius: 10px;
    transform: scale(0.7);
    transition: transform 0.5s ease;
    color: black;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}
.modal-content.show {
    transform: scale(1);
}
.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}
.close:hover {
    color: black;
}

/* 页脚样式（已适配移动端底部导航栏） */
#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(50px + env(safe-area-inset-bottom)); /* 适配底部安全区域 */
    padding-bottom: env(safe-area-inset-bottom);       /* 防止遮挡 */
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
    box-sizing: border-box;
}

#footer a {
    color: white;
    text-decoration: none;
    animation: textGlow 1s infinite;
}

@keyframes textGlow {
    0% { text-shadow: 0 0 10px white; }
    50% { text-shadow: 0 0 20px white; }
    100% { text-shadow: 0 0 10px white; }
}

