/* 引入优雅的衬线字体 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@300;400;600&display=swap');

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* 隐藏原生滚动条，交给内部容器处理 */
    /* 木质渐变背景 - 模拟灯光下的木桌 */
    background: radial-gradient(circle at center, #5c3a21 0%, #2e1a0d 100%); 
    color: #f4e8d3; /* 温润的米白色文字 */
    font-family: 'Noto Serif SC', serif;
}

/* 木质纹理噪点背景叠加 */
body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* 极轻微的高级质感噪点 */
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 400 400" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.6" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.04"/%3E%3C/svg%3E');
    pointer-events: none;
    z-index: 0;
}

#intro-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #2e1a0d;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 1.5s ease, visibility 1.5s;
}

.intro-text {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 5px;
    color: #e5b38f;
    animation: pulseText 2.5s infinite alternate;
}

@keyframes pulseText {
    0% { opacity: 0.5; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1.02); }
}

#sakura-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; /* 让花瓣不会阻挡点击和滚动 */
    z-index: 1;
    overflow: hidden;
}

/* 樱花花瓣样式 */
.sakura {
    position: absolute;
    background: linear-gradient(135deg, #ffb7c5, #ffd1da);
    /* 采用类似花瓣的形状 */
    border-radius: 100% 0 100% 0;
    opacity: 0.7;
    box-shadow: 0 0 4px rgba(255, 183, 197, 0.4);
}

#letter-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10;
    overflow-y: auto;
    scroll-behavior: smooth;
    /* 隐藏滚动条使得画面更沉浸干净 */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
#letter-container::-webkit-scrollbar {
    display: none;
}

.letter-content {
    /* 留白一半高度，使文字可以精准定在视口中间 */
    padding: 45vh 30px; 
    max-width: 700px;
    margin: 0 auto;
}

/* 默认状态（未聚焦或者滚动远的段落） */
.paragraph {
    font-size: 1.25rem;
    line-height: 2.3;
    margin-bottom: 90px;
    text-align: justify;
    text-indent: 2em;
    letter-spacing: 1.5px;
    transform-origin: center center;
    /* 设定了优美的贝塞尔曲线使得放大缩小顺滑 */
    transition: all 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.15;
    transform: scale(0.8) translateY(20px);
    text-shadow: 0 0 10px rgba(0,0,0,0.6);
}

/* 聚焦状态（中心视口） */
.paragraph.active {
    opacity: 1;
    transform: scale(1.1) translateY(0);
    color: #fff4e3; 
    text-shadow: 0 0 20px rgba(255, 234, 208, 0.3), 0 0 5px rgba(0,0,0,0.8);
}

/* 已经滚动过去的段落形态 */
.paragraph.past {
    transform: scale(0.75) translateY(-30px);
    opacity: 0.1;
}

/* 将要滚动的将来段落形态 */
.paragraph.future {
    transform: scale(0.75) translateY(30px);
    opacity: 0.1;
}

/* 第一段跟最后署名的小调整 */
.paragraph:first-child {
    text-indent: 0;
    font-weight: 600;
    font-size: 1.4rem;
}

.paragraph:nth-last-child(2) {
    text-align: right;
    text-indent: 0;
    margin-top: 40px;
}

.spacer {
    height: 50vh;
}
