@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700&display=swap');

/* --- 基本重置和全局设置 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    background-color: #111;
    color: #f0f0f0;
    overflow-x: hidden;
}

/* --- 音乐控件 --- */
#music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease;
}
#music-control:hover {
    transform: scale(1.1);
}
#music-control svg {
    fill: #fff;
    transition: opacity 0.3s ease;
}
#music-control.paused svg {
    opacity: 0.5;
}
#music-control.playing {
    animation: spin 3s linear infinite;
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- 场景通用样式 --- */
.scene {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* 核心：视差效果 */
}

/* --- 各个场景的背景 --- */
#scene1 { background-image: linear-gradient(rgba(17, 17, 17, 0.6), rgba(17, 17, 17, 0.8)), url('bg1.jpg'); }
#scene2 { background-image: linear-gradient(rgba(17, 17, 17, 0.7), rgba(17, 17, 17, 0.7)), url('bg1.jpg'); }
#scene3 { background-image: linear-gradient(rgba(20, 25, 30, 0.7), rgba(20, 25, 30, 0.7)), url('bg2.jpg'); }
#scene4 { background-image: linear-gradient(rgba(30, 20, 20, 0.6), rgba(30, 20, 20, 0.6)), url('bg6.jpg'); }
#scene5 { background-image: linear-gradient(rgba(30, 20, 20, 0.6), rgba(30, 20, 20, 0.6)), url('bg5.jpg'); }
#scene6 { background-image: linear-gradient(rgba(17, 17, 17, 0.5), rgba(17, 17, 17, 0.5)), url('bg3.jpg'); }
#scene7 { background-image: linear-gradient(rgba(100, 20, 20, 0.3), rgba(17, 17, 17, 0.8)), url('bg4.jpg'); }

/* --- 文本容器和样式 --- */
.text-container {
    max-width: 800px;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2rem 3rem;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

h1 {
    font-size: 4rem;
    font-weight: 700;
    /* 如果有合适的书法字体，可以在此替换 */
    /* font-family: 'YourCalligraphyFont', 'Noto Serif SC', serif; */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    color: #f5f5f5;
}

p {
    font-size: 1.8rem;
    line-height: 2;
    margin: 10px 0;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8);
}

.final-line {
    font-size: 2rem;
}

.strong-line {
    font-weight: 700;
    color: #e74c3c; /* 醒目的红色 */
    margin-top: 2rem;
    font-size: 2.5rem;
}

/* --- 动画效果 --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s ease-out, transform 1.2s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 为段落中的每一行设置延迟，形成逐行出现的效果 */
.text-container p.fade-in:nth-child(2) { transition-delay: 0.3s; }
.text-container p.fade-in:nth-child(3) { transition-delay: 0.6s; }
.text-container p.fade-in:nth-child(4) { transition-delay: 0.9s; }
.text-container p.fade-in:nth-child(5) { transition-delay: 1.2s; }


/* --- 响应式设计 --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    p {
        font-size: 1.2rem;
    }
    .final-line {
        font-size: 1.4rem;
    }
    .strong-line {
        font-size: 1.6rem;
    }
    .text-container {
        padding: 1.5rem;
        backdrop-filter: blur(3px);
    }
}
