/* style.css */

/* 引入 Google 字体 */
body {
    font-family: 'Noto Sans SC', 'Arial', sans-serif; /* 主要文字 */
    margin: 0;
    line-height: 1.6;
    color: #000000;
    background-color: #f8f8f8;
    scroll-behavior: smooth; /* 平滑滚动 */
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif; /* 标题字体 */
    color: #00896C; /* 更温馨的标题颜色 */
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 3.5em; /* 主标题更大 */
    letter-spacing: 1px;
}

h2 {
    font-size: 2.5em;
    padding-top: 60px; /* 章节顶部留白 */
    padding-bottom: 20px;
}

p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 20px auto;
    font-size: 1.5em;
    line-height: 1.8;
}

/* 全屏封面区 */
.full-screen-section {
    min-height: 100vh; /* 至少一个视口高度 */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(to bottom right, #b4efcf, #8ADEB0); /* 渐变背景 */
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 10;
    padding: 20px;
}

.hero-section .subtitle {
    font-size: 2.5em;
    margin-top: 20px;
    margin-bottom: 20px;
    font-style: italic;
}

.cover-photo {
    max-width: 70%;
    height: auto;
    max-height: 70%;
    display: block;
    margin: 0 auto 40px auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.cover-photo:hover {
    transform: scale(1.03);
}

.scroll-down-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 25px;
    background-color: #00896C;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.scroll-down-btn:hover {
    background-color: #5AC7B0;
    transform: translateY(-3px);
}


/* 内容区通用样式 */
.content-section {
    padding: 80px 20px;
    background-color: #b4efcf;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
    max-width: 1000px;
    margin: 20px auto;
}

/* 故事区 */
.story-section {
    background-color: #cdf0dd;
}

.story-chapter {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    border-left: 8px solid #5AC7B0; /* 故事线效果 */
    text-align: left; /* 故事内容左对齐 */
}


.story-chapter h3 {
    text-align:  justify;
    color: #00896C;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.story-chapter p {
    text-align: left;
    margin: 0;
    padding-left: 10px;
    font-size: 1.05em;
}

.story-photo {
    width: 100%; /* 新增：宽度占满父容器 */
    max-width: 600px; /* 新增：设置一个最大宽度，防止图片过大 */
    height: auto; /* 高度自动，保持图片比例 */
    max-height: 400px; /* 新增：设置一个最大高度 */
    /*object-fit: contain; /* 新增：确保图片完整显示，如果图片比例与容器不符，则留白 */
    object-fit: cover; /* 替代方案：裁剪图片以填充容器，可能会裁剪部分内容 */ */
    border-radius: 10px;
    margin: 20px auto; /* 居中并设置上下边距 */
    display: block; /* 居中图片 */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 关于你区 */
.about-you-section {
    background-color: #cdf0dd;
}

.trait-list {
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
    justify-content: center;
    gap: 30px; /* 项目间距 */
    margin-top: 40px;
}

.trait-item {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    flex: 1; /* 弹性布局 */
    min-width: 280px; /* 最小宽度 */
    max-width: 350px; /* 最大宽度 */
    text-align: center;
    transition: transform 0.3s ease;
}

.trait-item:hover {
    transform: translateY(-8px);
}

.trait-item h3 {
    color: #FFCC99;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.trait-item p {
    font-size: 1em;
    text-align: center; /* 描述文字居中 */
    margin-bottom: 10px;
}

.trait-photo {
    width: 100%; /* 宽度占满其父容器 trait-item */
    max-width: 300px; /* 新增：设置一个最大宽度 */
    height: 200px; /* 新增：固定高度，可以调整 */
    object-fit: cover; /* 新增：裁剪图片以填充固定高度的容器 */
    border-radius: 8px;
    margin-top: 15px;
}


/* 我想对你说区 */
.message-section {
    background-color: #cdf0dd;
    text-align: center;
}

.love-letter {
    font-size: 1.3em;
    font-style: italic;
    color: #555;
    line-height: 2;
    text-align: center; /* 信件内容两端对齐 */
    padding: 0 50px;
    max-width: 900px;
    margin: 30px auto;
    white-space: pre-wrap; /* 保留换行和空格 */
}

audio {
    margin-top: 30px;
    width: 80%;
    max-width: 400px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* 甜蜜相册区 */
.gallery-section {
    background-color: #cdf0dd;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 响应式网格 */
    gap: 20px;
    margin-top: 40px;
}

.gallery-grid img {
    width: 100%;
    height: 250px; /* 统一高度 */
    object-fit: cover; /* 裁剪填充 */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 底部 */
footer {
    text-align: center;
    padding: 30px 20px;
    background-color: #333;
    color: #aaa;
    font-size: 0.9em;
    margin-top: 40px;
}

/* 媒体查询 - 适应小屏幕 */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }
    h2 {
        font-size: 2em;
    }
    .hero-section .subtitle {
        font-size: 1.4em;
    }
    .cover-photo {
        max-width: 90%;
        max-height: 50vh;
    }
    .story-photo {
        max-width: 100%; /* 小屏幕上故事图片可以更大 */
        max-height: 300px; /* 小屏幕上故事图片高度调整 */
    }
    .trait-photo {
        height: 180px; /* 小屏幕上特征图片高度调整 */
    }
    .gallery-grid img {
        height: 200px;
    }
    .trait-list {
        flex-direction: column; /* 小屏幕下垂直堆叠 */
        align-items: center;
    }
    .trait-item {
        max-width: 90%;
    }
    .love-letter {
        padding: 0 20px;
        font-size: 1.1em;
    }
}