/* 记忆展示样式 - 基于 integrated.css */

.memory-box {
    margin: 30px auto;
    max-width: 850px;
    text-align: center;
    padding: 10px;
}

.memory-text {
    text-align: center;
    color: #FFFFFF;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    margin: 50px auto 0 auto;
    font-size: 28px;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    max-width: 850px;
    box-sizing: border-box;
}

.memory-text p {
    margin: 10px 0;
    text-align: center;
    color: #FFFFFF;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    font-size: 28px;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    line-height: 1.8;
}

.memory-content {
    padding: 20px;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    font-size: 24px;
    color: #FFFFFF;
    line-height: 1.8;
    text-align: center;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    margin: 0 auto 50px auto;
    max-width: 850px;
    box-sizing: border-box;
}

/* 祝福语内容特殊样式 */
#blessingContent {
    font-family: 'YangRenDongZhuShiTi-Semibold', cursive !important;
    color: #553d2f !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

#blessingContent p {
    font-family: 'YangRenDongZhuShiTi-Semibold', cursive !important;
    color: #553d2f !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5) !important;
}

#blessingContent p strong {
    font-weight: bold !important;
    color: #553d2f !important;
    font-size: 1.1em !important; /* 稍微增大字体 */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important; /* 添加阴影增强效果 */
}

.memory-image-container {
    position: relative;
    width: 100%;
    max-width: 850px;
    margin: 50px auto;
    overflow: visible;
    box-sizing: border-box;
}

/* 最后的图片和祝福语容器之间的空间 */
.memory-group:last-child .memory-image-container {
    margin-bottom: 30px;
}

.memory-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    max-height: none;
    border-radius: 8px;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

/* 祝福内容样式 - 参考memories.html */
.memory-content-container {
    position: relative;
    width: 100%;
    max-width: 850px;
    margin: 30px auto;
    padding: 0 20px;
    background-color: rgba(255, 249, 239, 0.95);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(210, 180, 140, 0.3) inset;
    border: 1px solid rgba(210, 180, 140, 0.5);
    overflow: hidden;
    text-align: center;
    font-family: 'STKaiti', 'Microsoft YaHei', serif;
    font-size: 26px;
    color: #553d2f;
    box-sizing: border-box;
}

/* 第四屏图片和祝福语容器样式统一 */
.memory-group-4 {
    width: 100% !important;
    max-width: 850px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

.memory-group-4 .memory-box {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.memory-group-4 .memory-image-container,
.memory-group-4 .memory-content-container {
    width: 100% !important;
    max-width: 850px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* 确保图片和内容宽度完全一致 */
.memory-image-container, .memory-content-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* 确保最后一张图片和祝福语之间有30px间距 */
.memory-group-4 .memory-box-8 .memory-image-container {
    margin-bottom: 30px !important;
}



@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.8;
        transform: translateY(0);
    }
}

.memory-content-decoration-top,
.memory-content-decoration-bottom {
    height: 30px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto 100%;
    margin: 0 auto 15px auto;
    width: 100%;
    max-width: 600px;
    opacity: 0.9;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="600" height="30" viewBox="0 0 600 30"><path d="M50,15 Q150,5 300,15 Q450,25 550,15" stroke="%23d4a08c" stroke-width="1.5" fill="none" stroke-linecap="round"/></svg>');
}

.memory-content-decoration-bottom {
    margin: 15px auto 0 auto;
    transform: rotate(180deg);
}

/* 音频播放区域 */
.memory-audio-section {
    padding: 25px;
    margin: 30px auto;
    max-width: 800px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.memory-audio-text {
    text-align: center;
    font-family: Microsoft YaHei, cursive;
    font-size: 28px;
    color: #ff85a2;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.audio-player {
    width: 100%;
    height: 250px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1); /* 添加背景色确保可见 */
}

.audio-player iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    display: block; /* 确保iframe显示 */
}

/* 字体定义 */
@font-face {
    font-family: 'BrushUpLife';
    src: url('../../fonts/BrushUpLife.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'YangRenDongZhuShiTi-Semibold';
    src: url('../../fonts/YRDZSSemibold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 发送者文本样式 */
.sender-text {
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
    color: #FFFFFF;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    font-size: 28px;
    text-align: center;
    margin: 20px 0;
    font-weight: bold;
}

/* Merry Christmas 文字样式 */
.merry-christmas-text-large {
    font-family: 'BrushUpLife', cursive !important;
    color: #FFFFFF !important;
    font-size: 36px !important;
    text-align: center !important;
    margin-top: 20px !important;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8) !important;
    position: relative !important;
    z-index: 1 !important;
}

/* 回忆展示样式 */
.memories-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    /* 自定义滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

/* WebKit浏览器滚动条样式 */
.memories-container::-webkit-scrollbar {
    width: 6px;
}

.memories-container::-webkit-scrollbar-track {
    background: transparent;
}

.memories-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    border: none;
}

/* 滚动条悬停效果 */
.memories-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.memory-group {
    text-align: center;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 基础样式 */
    .memory-box {
        margin: 10px auto;
        max-width: 100%;
        width: 100%;
    }
    
    .memories-container {
        padding: 0 20px;
        text-align: center;
        margin: 0;
    }
    
    .memory-group {
        text-align: center;
    }
    
    /* 移动端图片优化 */
    .memory-image {
        width: 100%;
        border-radius: 4px;
        box-shadow: none;
    }
    
    /* 基础容器样式 */
    .memory-text,
    .memory-content,
    .memory-content-container {
        width: 100%;
        max-width: 850px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 20px;
        box-sizing: border-box;
    }
    
    /* 第四屏特殊处理 - 确保图片和祝福语容器完全一致 */
    .screen-4 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* 核心样式：确保第四屏图片和内容宽度完全一致 */
    .memory-group-4 {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .memory-group-4 .memory-box {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* 确保图片和内容容器宽度完全一致 */
    .memory-group-4 .memory-box-8 .memory-image-container {
        width: calc(100% - 40px) !important;
        max-width: calc(100% - 40px) !important;
        margin: 0 auto 30px auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    .memory-group-4 .memory-box-9 .memory-content-container {
        width: calc(100% - 40px) !important;
        max-width: calc(100% - 40px) !important;
        margin: 0 auto !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* 祝福语内容样式 */
    #blessingContent {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 20px !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    
    /* 确保所有元素box-sizing一致 */
    * {
        box-sizing: border-box !important;
    }
    
    /* 文本样式调整 */
    .memory-content-container {
        font-size: 22px;
    }
    
    .memory-content {
        font-size: 20px;
        margin: 0 auto 50px auto !important;
        padding: 20px !important;
    }
    
    .memory-text {
        font-size: 24px;
        margin: 50px auto 0 auto !important;
    }
    
    .memory-text p {
        font-size: 24px;
    }
    
    .sender-text {
        font-size: 24px;
        font-weight: bold;
    }
}