* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-overflow-scrolling: touch; 
}

/* 整体背景 */
.main-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/背景.webp') no-repeat center center;
    background-size: cover;
    z-index: 1;
}

/* 音乐开关样式 */
.music-controller {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    z-index: 100;
    cursor: pointer;
}

.music-controller img {
    width: 100%;
    height: 100%;
}

/* 旋转动画 */
.rotating {
    animation: rotateAnim 3s linear infinite;
}

@keyframes rotateAnim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.center-gif {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 150%;
}

/* 亚克力黑色按钮 */
.start-btn {
    position: absolute;
    bottom: 15%;
    padding: 12px 30px;
    color: white;
    font-size: 18px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

/* 信纸 (层级低) */
.letter {
    position: absolute;
    bottom: -100%; 
    width: 85%;
    z-index: 11; 
    transition: all 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 信封 (层级高) */
.envelope {
    position: absolute;
    bottom: -9%;
    width: 100%;
    /* 添加或修改以下代码 */
    left: -1%; /* 如果太靠右，就设置负值（如 -1% 到 -5%）往左拉 */
    /* 或者使用 transform 微调: transform: translateX(-10px); */
    opacity: 0;
    z-index: 12; 
    transition: opacity 1s ease-in-out;
    pointer-events: none; 
}

.hidden { display: none !important; }
.show-envelope { opacity: 1 !important; }
.show-letter { bottom: 10% !important; }