/* ===== 字体定义 ===== */
@font-face {
    font-family: 'LXGW WenKai';
    src: url('../lxgw-wenkai-v1.522/LXGWWenKai-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'LXGW WenKai';
    src: url('../lxgw-wenkai-v1.522/LXGWWenKai-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FZ JingLei';
    src: url('../fzjljt_xz7.com/xjlFont.fon') format('embedded-opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b9d;
    --primary-light: #ff8fab;
    --primary-dark: #e05580;
    --accent: #ffc2d1;
    --bg-soft: #fff0f3;
    --text-main: #4a3a40;
    --text-light: #8b7380;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow-soft: 0 8px 32px rgba(255, 107, 157, 0.12);
    --shadow-hover: 0 12px 40px rgba(255, 107, 157, 0.22);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'LXGW WenKai', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.8;
    color: var(--text-main);
    background: linear-gradient(135deg, #fff0f3 0%, #ffe4ec 35%, #ffd6e0 70%, #ffe9f0 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== 动态背景光斑 ===== */
body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

body::before {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ffb3c6, transparent);
    top: -100px;
    left: -100px;
    animation: floatBlob 12s ease-in-out infinite;
}

body::after {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #ffc8dd, transparent);
    bottom: -80px;
    right: -80px;
    animation: floatBlob 15s ease-in-out infinite reverse;
}

@keyframes floatBlob {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===== 页面顶部进度条 ===== */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
    z-index: 9999;
    width: 0;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.5);
}

/* ===== 飘落爱心 ===== */
.falling-heart {
    position: fixed;
    top: -40px;
    font-size: 20px;
    color: var(--primary);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    animation: heartFall linear forwards;
    text-shadow: 0 0 8px rgba(255, 107, 157, 0.4);
}

@keyframes heartFall {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(105vh) rotate(360deg) scale(1);
        opacity: 0;
    }
}

/* ===== 头部 ===== */
header {
    position: relative;
    text-align: center;
    padding: 5rem 2rem 4rem;
    overflow: hidden;
    z-index: 2;
}

header::before {
    content: '❤';
    position: absolute;
    font-size: 18rem;
    opacity: 0.06;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: heartbeat 2.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    15% { transform: translate(-50%, -50%) scale(1.15); }
    30% { transform: translate(-50%, -50%) scale(1); }
    45% { transform: translate(-50%, -50%) scale(1.1); }
}

header h1 {
    font-size: 3.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.8rem;
    letter-spacing: 2px;
    position: relative;
    display: inline-block;
}

header .subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 1px;
    position: relative;
}

/* ===== 主内容区 ===== */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem 4rem;
    position: relative;
    z-index: 2;
}

section {
    margin-bottom: 5rem;
}

/* ===== 区块标题 ===== */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: inline-block;
    position: relative;
    padding: 0 3rem;
}

.section-title h2::before,
.section-title h2::after {
    content: '❤';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: var(--primary-light);
    opacity: 0.7;
}

.section-title h2::before {
    left: 0;
}

.section-title h2::after {
    right: 0;
}

.section-title .title-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

/* ===== 时间线故事 ===== */
.timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, transparent, var(--primary-light), var(--primary), var(--primary-light), transparent);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 1.5rem 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
}

/* 时间线节点 */
.timeline-item::before {
    content: '';
    position: absolute;
    top: 2.2rem;
    width: 18px;
    height: 18px;
    background: var(--white);
    border: 4px solid var(--primary);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 0 5px rgba(255, 107, 157, 0.15);
    transition: all 0.3s ease;
}

.timeline-item:nth-child(odd)::before {
    right: -9px;
}

.timeline-item:nth-child(even)::before {
    left: -9px;
}

.timeline-item:hover::before {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(255, 107, 157, 0.2);
}

/* 故事卡片 */
.story-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.8rem 2rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.story-card:hover::before {
    opacity: 1;
}

.story-card .story-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    background: rgba(255, 107, 157, 0.1);
    padding: 0.25rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.story-card h3 {
    font-size: 1.35rem;
    color: var(--primary-dark);
    margin-bottom: 0.7rem;
    font-weight: 700;
}

.story-card p {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.9;
}

/* ===== 文章区块 ===== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2.8rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    overflow: hidden;
}

.article-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.article-card:hover::before {
    opacity: 1;
}

.article-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px dashed rgba(255, 107, 157, 0.2);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.article-header h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    font-weight: 700;
}

.article-date {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 600;
    background: rgba(255, 107, 157, 0.1);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.article-body p {
    color: var(--text-main);
    font-size: 1.02rem;
    line-height: 2;
    margin-bottom: 1.2rem;
    text-indent: 2em;
}

.article-body p:last-child {
    margin-bottom: 0;
}

/* ===== 媒体网格 ===== */
.media-groups {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.media-group {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
}

.media-group-label {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px dashed rgba(255, 107, 157, 0.25);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.media-group-label::before {
    content: '📸';
    font-size: 1.2rem;
}

.media-group-label.music-label::before {
    content: '🎵';
}

.media-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* 媒体项卡片 */
.media-item {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.1);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
    position: relative;
    opacity: 0;
    transform: translateY(25px);
}

.media-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.media-item:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.media-item .media-thumb {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--bg-soft);
}

.media-item .media-thumb img,
.media-item .media-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.media-item:hover .media-thumb img,
.media-item:hover .media-thumb video {
    transform: scale(1.08);
}

/* 图片遮罩 */
.media-item .media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(224, 85, 128, 0.7), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 1rem;
}

.media-item:hover .media-overlay {
    opacity: 1;
}

.media-item .media-overlay span {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 0.4rem 1rem;
    border-radius: 20px;
}

/* 视频播放按钮 */
.media-item .play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.media-item:hover .play-badge {
    transform: translate(-50%, -50%) scale(1.15);
    background: var(--white);
}

.media-item .play-badge::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 16px solid var(--primary);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 4px;
}

/* 音频卡片 */
.media-item.audio-card {
    cursor: default;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #fff, #fff5f8);
}

.media-item.audio-card:hover {
    transform: translateY(-6px);
}

.audio-card .audio-icon {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.8rem;
    animation: musicSpin 4s linear infinite;
    display: inline-block;
}

@keyframes musicSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.audio-card .audio-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 0.3rem;
}

.audio-card .audio-artist {
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 1rem;
}

.audio-card audio {
    width: 100%;
    height: 36px;
    border-radius: 18px;
}

/* 媒体描述 */
.media-item .media-desc {
    padding: 1rem 1.2rem;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    border-top: 1px solid rgba(255, 107, 157, 0.08);
}

.media-item .media-desc .media-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.3rem;
}

/* ===== 灯箱 ===== */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(30, 15, 25, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img,
.lightbox-content video {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    white-space: nowrap;
}

/* ===== 音乐播放器（悬浮） ===== */
.music-player {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9000;
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    box-shadow: var(--shadow-hover);
    padding: 6px 6px 6px 6px;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: 60px;
    overflow: hidden;
}

.music-player.expanded {
    max-width: 340px;
    border-radius: 50px;
}

.music-toggle-btn {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.music-toggle-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(255, 107, 157, 0.5);
}

.music-toggle-btn.playing .music-icon {
    animation: musicSpin 3s linear infinite;
}

.music-player-info {
    display: flex;
    flex-direction: column;
    margin-left: 12px;
    margin-right: 8px;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
    min-width: 0;
}

.music-player.expanded .music-player-info {
    opacity: 1;
}

.music-player-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.music-player-artist {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
}

.music-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.3s ease 0.15s;
}

.music-player.expanded .music-controls {
    opacity: 1;
}

.music-ctrl-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.music-ctrl-btn:hover {
    background: rgba(255, 107, 157, 0.12);
}

/* ===== 页脚 ===== */
footer {
    text-align: center;
    padding: 2.5rem 2rem;
    position: relative;
    z-index: 2;
}

footer p {
    font-size: 1.05rem;
    color: var(--primary-dark);
    font-weight: 500;
    letter-spacing: 1px;
}

footer p::before,
footer p::after {
    content: ' ❤ ';
    color: var(--primary);
    animation: heartbeat 2s ease-in-out infinite;
    display: inline-block;
}

/* ===== 加载状态 ===== */
#loading {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #fff0f3, #ffe4ec);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
    transition: opacity 0.5s ease;
}

#loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-heart {
    font-size: 4rem;
    animation: heartbeat 1.2s ease-in-out infinite;
    display: inline-block;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 12px rgba(255, 107, 157, 0.4));
}

.loading-content p {
    color: var(--primary-dark);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 1px;
}

/* ===== 错误提示 ===== */
#error {
    position: fixed;
    inset: 0;
    background: rgba(255, 240, 243, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20000;
}

.error-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    text-align: center;
    max-width: 450px;
}

.error-content .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

#retry-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.3);
}

#retry-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 107, 157, 0.45);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    header {
        padding: 3.5rem 1.5rem 3rem;
    }

    header h1 {
        font-size: 2.2rem;
    }

    header .subtitle {
        font-size: 1rem;
    }

    main {
        padding: 1rem 1.2rem 3rem;
    }

    .section-title h2 {
        font-size: 1.7rem;
        padding: 0 2.2rem;
    }

    /* 时间线改为单侧 */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding: 1rem 1rem 1rem 3.5rem;
    }

    .timeline-item::before {
        left: 11px !important;
        right: auto !important;
    }

    .story-card {
        padding: 1.3rem 1.5rem;
    }

    .story-card h3 {
        font-size: 1.15rem;
    }

    .article-card {
        padding: 1.5rem 1.3rem;
    }

    .article-header h3 {
        font-size: 1.25rem;
    }

    .article-body p {
        font-size: 0.95rem;
        line-height: 1.9;
    }

    .media-group {
        padding: 1.3rem;
    }

    .media-group-items {
        grid-template-columns: 1fr;
    }

    .media-item .media-thumb {
        height: 200px;
    }

    .music-player {
        bottom: 16px;
        right: 16px;
    }

    .music-player.expanded {
        max-width: calc(100vw - 32px);
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== 相册组件 ===== */
.gallery-container {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.gallery-group-label {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 600;
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px dashed rgba(255, 107, 157, 0.25);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-photo-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-soft);
    box-shadow: 0 3px 12px rgba(255, 107, 157, 0.12);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0;
    transform: translateY(20px);
    aspect-ratio: 1;
}

.gallery-photo-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-photo-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.25);
}

.gallery-photo-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-photo-card:hover .gallery-photo-wrap img {
    transform: scale(1.08);
}

.gallery-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(224, 85, 128, 0.75), transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0.8rem;
    gap: 0.4rem;
}

.gallery-photo-card:hover .gallery-photo-overlay {
    opacity: 1;
}

.gallery-photo-date {
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.8rem;
    border-radius: 12px;
}

.gallery-photo-zoom {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 月份归档 */
.gallery-month-group {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transform: translateY(25px);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-month-group.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-month-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px dashed rgba(255, 107, 157, 0.2);
}

.month-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.month-count {
    font-size: 0.85rem;
    color: var(--text-light);
    background: rgba(255, 107, 157, 0.1);
    padding: 0.25rem 0.8rem;
    border-radius: 12px;
}

.gallery-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ===== 灯箱导航按钮 ===== */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    line-height: 1;
    padding-bottom: 4px;
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

@media (max-width: 768px) {
    .lightbox-prev {
        left: 10px;
    }
    .lightbox-next {
        right: 10px;
    }
}


/* ===== 图书翻页组件 ===== */
.book-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 1rem 0 2rem;
}

.book-wrapper {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.book {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    display: flex;
    perspective: 2000px;
    box-shadow: 0 20px 60px rgba(139, 69, 19, 0.3);
    border-radius: 8px;
    overflow: hidden;
}

.book-left,
.book-right {
    position: relative;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #fdf6e3 0%, #f5e6c8 50%, #ede0c0 100%);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-left {
    border-right: 1px solid rgba(139, 69, 19, 0.15);
    border-radius: 8px 0 0 8px;
    box-shadow: inset -15px 0 30px -15px rgba(139, 69, 19, 0.2);
}

.book-right {
    border-left: 1px solid rgba(139, 69, 19, 0.15);
    border-radius: 0 8px 8px 0;
    box-shadow: inset 15px 0 30px -15px rgba(139, 69, 19, 0.2);
}

.book-left:hover {
    background: linear-gradient(135deg, #fef9ed 0%, #f7ebd0 50%, #f0e3c5 100%);
}

.book-right:hover {
    background: linear-gradient(135deg, #fef9ed 0%, #f7ebd0 50%, #f0e3c5 100%);
}

.book-spine {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    transform: translateX(-50%);
    background: linear-gradient(to right, rgba(139, 69, 19, 0.3), rgba(139, 69, 19, 0.5), rgba(139, 69, 19, 0.3));
    z-index: 2;
    pointer-events: none;
}

/* 3D翻页效果 */
.book {
    perspective: 2500px;
    transform-style: preserve-3d;
    transition: box-shadow 0.3s ease;
}

.book-left,
.book-right {
    transform-style: preserve-3d;
}

/* 翻页纸张 */
.flip-paper {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 10;
    pointer-events: none;
    border-radius: 0 8px 8px 0;
    visibility: hidden;
    opacity: 0;
}

.flip-paper.flipping-next,
.flip-paper.flipping-prev {
    visibility: visible;
    opacity: 1;
}

.flip-paper-front,
.flip-paper-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    overflow: hidden;
}

.flip-paper-front {
    background: linear-gradient(135deg, #fdf6e3 0%, #f5e6c8 50%, #ede0c0 100%);
    border-radius: 0 8px 8px 0;
    box-shadow: inset 15px 0 30px -15px rgba(139, 69, 19, 0.2);
    z-index: 2;
}

.flip-paper-back {
    background: linear-gradient(135deg, #ede0c0 0%, #f5e6c8 50%, #fdf6e3 100%);
    transform: rotateY(180deg);
    border-radius: 8px 0 0 8px;
    box-shadow: inset -15px 0 30px -15px rgba(139, 69, 19, 0.2);
}

/* 向后翻：纸张从右向左翻 */
.flip-paper.flipping-next {
    transform: rotateY(-180deg);
    box-shadow: -20px 0 40px rgba(139, 69, 19, 0.3);
}

/* 向前翻：纸张从左向右翻 */
.flip-paper.flipping-prev {
    transform: rotateY(0deg);
    left: 0;
    transform-origin: right center;
    box-shadow: 20px 0 40px rgba(139, 69, 19, 0.3);
}

.flip-paper.flipping-prev .flip-paper-front {
    transform: rotateY(180deg);
}

.flip-paper.flipping-prev .flip-paper-back {
    transform: rotateY(0deg);
}

/* 页面内容 */
.page-content {
    width: 100%;
    height: 100%;
    padding: 2rem 1.8rem;
    overflow-y: auto;
    box-sizing: border-box;
}

.page-content::-webkit-scrollbar {
    width: 4px;
}

.page-content::-webkit-scrollbar-thumb {
    background: rgba(139, 69, 19, 0.2);
    border-radius: 2px;
}

.page-blank {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(139, 69, 19, 0.2);
    font-size: 3rem;
}

/* 封面 */
.book-page-cover {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
}

.cover-ornament {
    font-size: 2rem;
    color: #8b4513;
    opacity: 0.6;
}

.cover-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #5c3317;
    font-family: 'Ma Shan Zheng', cursive, serif;
    margin: 0;
}

.cover-divider {
    width: 60%;
    height: 2px;
    background: linear-gradient(to right, transparent, #8b4513, transparent);
    margin: 0.5rem 0;
}

.cover-subtitle {
    font-size: 1rem;
    color: #8b6914;
    letter-spacing: 0.2em;
    margin: 0;
}

.cover-content {
    font-size: 0.95rem;
    color: #a0826d;
    margin-top: 1rem;
}

.cover-hint {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    font-size: 0.8rem;
    color: #a0826d;
    opacity: 0.7;
    animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

/* 封底 */
.book-page-back {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1rem;
}

.back-ornament {
    font-size: 2rem;
    color: #8b4513;
    opacity: 0.6;
}

.back-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #5c3317;
    font-family: 'Ma Shan Zheng', cursive, serif;
    margin: 0;
}

.back-content {
    font-size: 1rem;
    color: #a0826d;
}

.back-heart {
    font-size: 2.5rem;
    color: #e8a0bf;
    animation: heartBeat 1.5s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 故事页 */
.story-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.story-date {
    font-size: 0.85rem;
    color: #8b6914;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-indicator {
    font-size: 0.75rem;
    color: #a0826d;
    opacity: 0.7;
}

.story-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #5c3317;
    margin: 0 0 0.8rem 0;
    font-family: 'Ma Shan Zheng', cursive, serif;
}

.story-divider {
    width: 40px;
    height: 2px;
    background: #8b4513;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.story-text {
    font-size: 0.95rem;
    line-height: 1.9;
    color: #4a3728;
    text-align: justify;
    flex: 1;
}

/* 聊天页 */
.chat-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chat-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.chat-bubble {
    max-width: 85%;
    padding: 0.5rem 0.9rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    word-break: break-word;
}

.chat-me {
    align-self: flex-end;
    background: linear-gradient(135deg, #e8a0bf, #f0b8d0);
    color: #5c3317;
    border-bottom-right-radius: 4px;
}

.chat-her {
    align-self: flex-start;
    background: rgba(139, 69, 19, 0.1);
    color: #4a3728;
    border-bottom-left-radius: 4px;
}

.chat-more {
    font-size: 0.75rem;
    color: #a0826d;
    text-align: center;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* 媒体页 */
.media-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    flex: 1;
    align-content: start;
}

.media-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(139, 69, 19, 0.05);
    transition: transform 0.3s ease;
}

.media-thumb:hover {
    transform: scale(1.05);
}

.media-thumb img,
.media-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.media-more {
    font-size: 0.75rem;
    color: #a0826d;
    text-align: center;
    margin-top: 0.5rem;
    opacity: 0.7;
}

/* 导航 */
.book-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.book-prev,
.book-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(139, 69, 19, 0.3);
    background: rgba(255, 255, 255, 0.6);
    color: #8b4513;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding-bottom: 3px;
}

.book-prev:hover,
.book-next:hover {
    background: #8b4513;
    color: white;
    transform: scale(1.1);
}

.book-page-num {
    font-size: 0.9rem;
    color: #8b6914;
    font-weight: 500;
    min-width: 80px;
    text-align: center;
}

/* 响应式 */
@media (max-width: 768px) {
    .book {
        aspect-ratio: 4 / 5;
        flex-direction: column;
    }
    .book-left,
    .book-right {
        width: 100%;
        height: 50%;
    }
    .book-left {
        border-right: none;
        border-bottom: 1px solid rgba(139, 69, 19, 0.15);
        border-radius: 8px 8px 0 0;
    }
    .book-right {
        border-left: none;
        border-top: 1px solid rgba(139, 69, 19, 0.15);
        border-radius: 0 0 8px 8px;
    }
    .book-spine {
        left: 0;
        top: 50%;
        width: 100%;
        height: 4px;
        transform: translateY(-50%);
        background: linear-gradient(to bottom, rgba(139, 69, 19, 0.3), rgba(139, 69, 19, 0.5), rgba(139, 69, 19, 0.3));
    }
    .page-content {
        padding: 1.2rem 1rem;
    }
    .cover-title {
        font-size: 1.6rem;
    }
    .story-title {
        font-size: 1.1rem;
    }
    .story-text {
        font-size: 0.85rem;
    }
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}



/* ===== 月份页面样式 ===== */
.page-blank-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.03), rgba(139, 69, 19, 0.06));
}

.month-text-page,
.month-media-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(139, 69, 19, 0.15);
}

.month-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: #5c3317;
    font-family: 'Ma Shan Zheng', cursive, serif;
}

.month-page-hint {
    font-size: 0.75rem;
    color: #a0826d;
    opacity: 0.7;
}

.month-stories {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.month-story-item {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed rgba(139, 69, 19, 0.1);
}

.month-story-item:last-child {
    border-bottom: none;
}

.month-story-date {
    display: inline-block;
    font-size: 0.75rem;
    color: #8b6914;
    background: rgba(139, 105, 20, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    margin-right: 0.5rem;
}

.month-story-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #5c3317;
}

.month-story-item p {
    margin: 0.4rem 0 0 0;
    font-size: 0.85rem;
    line-height: 1.7;
    color: #4a3728;
}

.month-chats-section {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px dashed rgba(139, 69, 19, 0.15);
}

.section-subtitle {
    font-size: 0.8rem;
    color: #8b6914;
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.no-content {
    text-align: center;
    color: #a0826d;
    font-size: 0.9rem;
    padding: 2rem 0;
    opacity: 0.6;
}

/* 媒体页网格调整 */
.month-media-page .media-grid {
    flex: 1;
    align-content: start;
    overflow-y: auto;
    padding-right: 0.3rem;
}



/* ===== 流式分页样式 ===== */
.flow-text-page,
.flow-chat-page,
.flow-media-page {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.flow-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.6rem;
    margin-bottom: 0.8rem;
    border-bottom: 2px solid rgba(139, 69, 19, 0.15);
}

.flow-page-title {
    font-size: 1rem;
    font-weight: 700;
    color: #5c3317;
    font-family: 'Ma Shan Zheng', cursive, serif;
}

.flow-page-count {
    font-size: 0.75rem;
    color: #a0826d;
    opacity: 0.7;
}

.flow-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 0.3rem;
}

/* 流式故事项 */
.flow-story-item {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed rgba(139, 69, 19, 0.1);
}

.flow-story-item:last-child {
    border-bottom: none;
}

.flow-story-date {
    font-size: 0.75rem;
    color: #8b6914;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.flow-story-text {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.8;
    color: #4a3728;
    text-align: justify;
}

/* 流式聊天 */
.flow-chat-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-row {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.chat-row-date {
    font-size: 0.65rem;
    color: #a0826d;
    opacity: 0.6;
    min-width: 35px;
    padding-top: 0.3rem;
    flex-shrink: 0;
}

.chat-row .chat-bubble {
    max-width: 80%;
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
}

/* 流式图片网格 */
.flow-media-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    flex: 1;
    align-content: start;
    overflow-y: auto;
    padding-right: 0.3rem;
}

.flow-media-grid .media-thumb {
    aspect-ratio: 1;
}



/* ===== 混合内容流样式 ===== */
.stream-page {
    height: 100%;
    overflow: hidden;
}

.stream-content {
    height: 100%;
    overflow-y: auto;
    padding-right: 0.3rem;
}

.stream-item {
    margin-bottom: 0.8rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed rgba(139, 69, 19, 0.1);
}

.stream-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.stream-date {
    font-size: 0.7rem;
    color: #8b6914;
    font-weight: 600;
    margin-bottom: 0.3rem;
    opacity: 0.8;
}

.stream-text {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.7;
    color: #4a3728;
    text-align: justify;
    font-family: 'FZ JingLei', 'LXGW WenKai', 'KaiTi', 'STKaiti', serif;
}

/* 聊天流 */
.stream-chat-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stream-chat-list .chat-bubble {
    max-width: 85%;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
}

/* 媒体流 */
.stream-media-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
}

.stream-media-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(139, 69, 19, 0.05);
    transition: transform 0.3s ease;
}

.stream-media-thumb:hover {
    transform: scale(1.03);
}

.stream-media-thumb img,
.stream-media-thumb video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}



/* ===== 美化滚动条 ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 107, 157, 0.08);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ff8fab, #e05580);
    border-radius: 3px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ff6b9d, #c9446d);
    width: 8px;
}

::-webkit-scrollbar-corner {
    background: transparent;
}

/* 书页内滚动条 */
.page-content::-webkit-scrollbar,
.stream-content::-webkit-scrollbar,
.month-stories::-webkit-scrollbar,
.flow-content::-webkit-scrollbar {
    width: 4px;
}

.page-content::-webkit-scrollbar-thumb,
.stream-content::-webkit-scrollbar-thumb,
.month-stories::-webkit-scrollbar-thumb,
.flow-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c9a87c, #8b6914);
}

.page-content::-webkit-scrollbar-track,
.stream-content::-webkit-scrollbar-track,
.month-stories::-webkit-scrollbar-track,
.flow-content::-webkit-scrollbar-track {
    background: rgba(139, 69, 19, 0.05);
}

/* Firefox 滚动条 */
* {
    scrollbar-width: thin;
    scrollbar-color: #ff8fab rgba(255, 107, 157, 0.08);
}


/* ===== 照片墙背景 ===== */
.photo-wall {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.15;
}

.photo-row {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    width: max-content;
}

.photo-row-1 {
    animation: photoScrollLeft 120s linear infinite;
}

.photo-row-2 {
    animation: photoScrollRight 150s linear infinite;
    margin-top: 10px;
}

@keyframes photoScrollLeft {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes photoScrollRight {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

.photo-item {
    flex-shrink: 0;
    width: 200px;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 确保内容在照片墙上面 */
header, main, footer, .music-player, .chat-popup-btn, #progress-bar {
    position: relative;
    z-index: 1;
}

/* ===== 右上角聊天记录按钮 ===== */
.chat-popup-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
    transition: all 0.3s ease;
}

.chat-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.5);
}

.chat-btn-icon {
    font-size: 18px;
}

/* ===== 聊天记录弹窗（微信样式） ===== */
.chat-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 200;
    display: none;
}

.chat-popup.active {
    display: block;
}

.chat-popup-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.chat-popup-window {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    height: 80vh;
    max-height: 700px;
    background: #ededed;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
}

.chat-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f7f7f7;
    border-bottom: 1px solid #e0e0e0;
}

.chat-popup-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.chat-avatar {
    font-size: 20px;
}

.chat-popup-close {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-popup-close:hover {
    background: #e0e0e0;
    color: #333;
}

.chat-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #ededed;
}

.chat-loading, .chat-error {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 14px;
}

.chat-date-sep {
    text-align: center;
    color: #b2b2b2;
    font-size: 12px;
    margin: 16px 0;
}

.chat-msg {
    display: flex;
    margin-bottom: 14px;
    align-items: flex-start;
}

.chat-msg-me {
    flex-direction: row-reverse;
}

.chat-avatar-wx {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.chat-avatar-me {
    background: #07c160;
    color: white;
    margin-left: 8px;
}

.chat-avatar-her {
    background: #ff6b9d;
    color: white;
    margin-right: 8px;
}

.chat-bubble-wx {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    position: relative;
}

.chat-msg-her .chat-bubble-wx {
    background: white;
    color: #333;
    border-top-left-radius: 2px;
}

.chat-msg-me .chat-bubble-wx {
    background: #95ec69;
    color: #333;
    border-top-right-radius: 2px;
}

.chat-popup-footer {
    padding: 10px 16px;
    background: #f7f7f7;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.chat-count {
    font-size: 12px;
    color: #999;
}

/* ===== 七夕模块 ===== */
.qixi-section {
    padding: 60px 20px 80px;
    text-align: center;
}

.qixi-subtitle {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 8px;
}

.qixi-iframe-wrapper {
    max-width: 900px;
    margin: 30px auto 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(255, 107, 157, 0.2);
}

.qixi-iframe {
    width: 100%;
    height: 800px;
    display: block;
    border: none;
}

/* ===== 引导页 ===== */
.landing-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.landing-page.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.landing-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffd6e0 0%, #ffc2d1 25%, #ffb3c6 50%, #ffc8dd 75%, #ffe4ec 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.landing-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.landing-hearts::before,
.landing-hearts::after {
    content: '♥';
    position: absolute;
    color: rgba(255, 255, 255, 0.3);
    font-size: 30px;
    animation: floatHeart 6s ease-in-out infinite;
}

.landing-hearts::before {
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.landing-hearts::after {
    top: 60%;
    right: 15%;
    animation-delay: 3s;
    font-size: 40px;
}

@keyframes floatHeart {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
    50% { transform: translateY(-30px) rotate(10deg); opacity: 0.6; }
}

.landing-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
    max-width: 600px;
}

.landing-ornament {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.landing-title {
    font-size: 48px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 20px rgba(255, 107, 157, 0.4);
    margin-bottom: 16px;
    letter-spacing: 4px;
}

.landing-divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.landing-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-style: italic;
}

.landing-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

.enter-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #ff6b9d, #ff8fab);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(255, 107, 157, 0.5);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.enter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.enter-btn:hover::before {
    left: 100%;
}

.enter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 107, 157, 0.6);
}

.enter-btn:active {
    transform: translateY(-1px);
}

.enter-btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.enter-btn:hover .enter-btn-icon {
    transform: translateX(5px);
}

.landing-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 20px;
}

.landing-loading {
    margin-top: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.landing-loading.show {
    opacity: 1;
}

.landing-loading span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 8px;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.loading-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #fff, #ffd6e0);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 主内容隐藏/显示 */
.main-content.hidden {
    display: none;
}

.main-content {
    display: block;
}

/* ===== 三行横向滚动瀑布流 ===== */
.gallery-hint {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 8px;
    opacity: 0.7;
}

.masonry-horizontal {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 20px 40px 30px;
    margin: 0 -40px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* 自定义横向滚动条 */
.masonry-horizontal::-webkit-scrollbar {
    height: 8px;
}

.masonry-horizontal::-webkit-scrollbar-track {
    background: rgba(255, 107, 157, 0.1);
    border-radius: 4px;
    margin: 0 40px;
}

.masonry-horizontal::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #ff8fab, #e05580);
    border-radius: 4px;
}

.masonry-horizontal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, #ff6b9d, #c9446d);
}

.masonry-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    width: max-content;
}

/* 三行不同高度，形成瀑布流错落效果 */
.masonry-row-1 .masonry-item img {
    height: 220px;
}

.masonry-row-2 .masonry-item img {
    height: 170px;
}

.masonry-row-3 .masonry-item img {
    height: 200px;
}

.masonry-item {
    flex-shrink: 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.masonry-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.25);
}

.masonry-item-wrap {
    position: relative;
    width: 100%;
    height: 100%;
}

.masonry-item img {
    display: block;
    width: auto;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.masonry-item:hover img {
    transform: scale(1.05);
}

.masonry-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: 12px;
}

.masonry-item:hover .masonry-item-overlay {
    opacity: 1;
}

.masonry-item-date {
    color: white;
    font-size: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.masonry-item-zoom {
    color: white;
    font-size: 16px;
    background: rgba(255,255,255,0.2);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

/* 响应式 */
@media (max-width: 768px) {
    .masonry-horizontal {
        padding: 16px 20px 24px;
        margin: 0 -20px;
    }
    
    .masonry-row-1 .masonry-item img {
        height: 160px;
    }
    
    .masonry-row-2 .masonry-item img {
        height: 130px;
    }
    
    .masonry-row-3 .masonry-item img {
        height: 150px;
    }
}
