.page1 {
    position: relative;
    overflow: hidden;
}

/* 标题样式 */
.title-text {
    position: absolute;
    z-index: 3;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(85vw, 1000px);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    color: white;
    text-align: center;
    line-height: 1.3;
    font-family: 'Arial', sans-serif;
    opacity: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.page1.active .title-text {
    animation: titleReveal 1.5s ease forwards;
}

/* 弹幕容器和样式 */
.danmu-container {
    position: fixed;
    top: 5vh;
    left: 0;
    width: 100vw;
    height: 25vh;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.danmu {
    position: absolute;
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    color: white;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    will-change: transform;
    animation: moveLeft var(--duration, 15s) linear;
    transform: translateZ(0);  /* 启用硬件加速 */
}

/* 背景样式 */
#beijing {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transform: scale(1.1);
    transition: transform 0.8s ease;
}

.heisebeijing {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.7) 0%,
        rgba(0,0,0,0.5) 50%,
        rgba(0,0,0,0.7) 100%
    );
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.8s ease;
}

/* 开始按钮优化 */
.start-button {
    position: absolute;
    z-index: 3;
    bottom: 20vh;
    left: 50%;
    transform: translate(-50%, 20px);
    padding: 1rem 3rem;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: white;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50px;
    backdrop-filter: blur(5px);
    cursor: pointer;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 0.8em;
    transition: all 0.3s ease;
}

.start-button span {
    font-weight: 500;
    letter-spacing: 0.05em;
}

.start-button i {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.page1.active .start-button {
    animation: buttonAppear 1s ease 1.5s forwards;
}

.start-button:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.5);
    transform: translate(-50%, -5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.start-button:hover i {
    transform: translateY(3px);
}

/* 激活状态样式 */
.page1.active #beijing {
    transform: scale(1);
}

.page1.active .heisebeijing {
    opacity: 1;
}

/* 动画定义 */
@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: translate(-50%, -30%);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
        filter: blur(0);
    }
}

@keyframes buttonAppear {
    from {
        opacity: 0;
        transform: translate(-50%, 30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes moveLeft {
    from { transform: translateX(100vw); }
    to { transform: translateX(-100%); }
}

/* 交互效果 */

/* 移动端适配 */
@media (max-width: 768px) {
    .title-text {
        font-size: clamp(1.5rem, 5vw, 2rem);
        width: 90vw;
    }
    
    .start-button {
        bottom: 12vh;
        padding: 0.8rem 2rem;
    }
    
    .danmu {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
    }
}