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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fdf8f3;
}

/* 导航栏 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 18px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-brand {
    font-size: 28px;
    font-weight: bold;
    color: #d4a574;
    margin-bottom: 12px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0;
    justify-content: center;
}

.nav-links li {
    position: relative;
}

.nav-links li:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-size: 18px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-size: 20px;
    padding: 8px 25px;
    transition: color 0.3s;
    display: block;
}

.nav-links a:hover {
    color: #d4a574;
}

/* 首页横幅 */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 100px;
}

.hero-content h1 {
    font-size: 56px;
    color: #5a4a3a;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
    min-height: 80px;
}

/* 打字机效果的每个字 */
.typing-title .char {
    opacity: 0;
    display: inline-block;
    animation: charFadeIn 0.5s ease forwards;
}

@keyframes charFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content .subtitle {
    font-size: 24px;
    color: #7a6a5a;
    margin-bottom: 40px;
}

.designer-info {
    margin-top: 30px;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    object-fit: cover;
}

.designer-info p {
    margin-top: 15px;
    color: #7a6a5a;
    font-size: 18px;
}

/* 全家福图片 */
.family-photo {
    display: block;
    margin: 25px auto 0;
    max-width: 400px;
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 5px solid #fff;
}


/* 通用板块样式 */
.section {
    padding: 100px 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 30px;
}

.section-title {
    font-size: 48px;
    text-align: center;
    color: #5a4a3a;
    margin-bottom: 25px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #d4a574;
    margin: 18px auto 0;
}

.date-tag {
    text-align: center;
    color: #d4a574;
    font-size: 26px;
    margin-bottom: 25px;
    font-style: italic;
}

.story-text {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 45px;
    font-size: 22px;
    color: #555;
    line-height: 2;
}

/* 结婚板块 - 木质相框样式 */
.wedding-section {
    background: linear-gradient(180deg, #e8f4fc 0%, #d4eaf5 100%);
    padding: 100px 20px;
}

.photo-frames {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    perspective: 1000px;
}

/* 木质相框效果 */
.photo-frame {
    position: relative;
    background: linear-gradient(145deg, #e8d4b8 0%, #d4b896 50%, #c4a882 100%);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.25),
        0 5px 15px rgba(0, 0, 0, 0.1),
        inset 0 2px 3px rgba(255, 255, 255, 0.3),
        inset 0 -2px 3px rgba(0, 0, 0, 0.1);
    transform: rotate(-3deg) translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.photo-frame:nth-child(2) {
    transform: rotate(3deg) translateY(0);
}

.photo-frame:hover {
    transform: rotate(0deg) translateY(-10px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 10px 20px rgba(0, 0, 0, 0.15),
        inset 0 2px 3px rgba(255, 255, 255, 0.3),
        inset 0 -2px 3px rgba(0, 0, 0, 0.1);
}

/* 相框内边框装饰 */
.photo-frame::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    pointer-events: none;
}

/* 小花装饰 */
.photo-frame::after {
    content: '✿ ❀ ✿ ❀ ✿ ❀ ✿ ❀ ✿';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #e8a0b0;
    letter-spacing: 8px;
    white-space: nowrap;
}

/* 相框内部白色衬底 */
.frame-inner {
    background: #fff;
    padding: 8px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photo-frame img {
    width: 280px;
    height: 350px;
    object-fit: cover;
    display: block;
}

/* 相框底座效果 */
.frame-stand {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 25px;
    background: linear-gradient(145deg, #d4b896 0%, #c4a882 100%);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.photo-frame.pink {
    background: linear-gradient(145deg, #fce4ec 0%, #f8bbd9 50%, #f48fb1 100%);
}

.photo-frame.pink::after {
    content: '♡ ✿ ♡ ✿ ♡ ✿ ♡ ✿ ♡';
    color: #e91e63;
}

/* 出生板块 */
.birth-section {
    background: linear-gradient(180deg, #fff5f8 0%, #ffeef2 100%);
}

.birth-container {
    max-width: 1100px;
}

/* 横向相框容器 */
.photo-frames-horizontal {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: nowrap;
}

/* 横向粉色相框 */
.photo-frame-h {
    position: relative;
    background: linear-gradient(145deg, #fce4ec 0%, #f8bbd0 50%, #f48fb1 100%);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 5px 15px rgba(0, 0, 0, 0.1),
        inset 0 2px 3px rgba(255, 255, 255, 0.3);
    transform: rotate(-2deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.photo-frame-h:nth-child(2) {
    transform: rotate(2deg);
}

.photo-frame-h:hover {
    transform: rotate(0deg) translateY(-8px) scale(1.02);
}

/* 横向相框小花装饰 */
.photo-frame-h::after {
    content: '♡ ✿ ♡ ✿ ♡ ✿ ♡ ✿ ♡ ✿ ♡';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #ec407a;
    letter-spacing: 5px;
    white-space: nowrap;
}

/* 横向相框内部 */
.frame-inner-h {
    background: #fff;
    padding: 6px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
}

.photo-frame-h img {
    width: 320px;
    height: 220px;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.birth-section .photo-frame.pink {
    background: linear-gradient(145deg, #fce4ec 0%, #f8bbd0 50%, #f48fb1 100%);
}

.birth-section .photo-frame.pink::after {
    content: '♡ ✿ ♡ ✿ ♡ ✿ ♡ ✿ ♡ ✿ ♡ ✿ ♡';
    color: #ec407a;
}

.birth-section .photo-frame.pink .frame-stand {
    background: linear-gradient(145deg, #f8bbd0 0%, #f48fb1 100%);
}

/* 童年时光板块 */
.childhood-section {
    background: #fffbf0;
}

.childhood-section .container {
    max-width: 1100px;
}

.hobby-gallery {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: nowrap;
}

.hobby-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1;
    min-width: 0;
}

.hobby-card h3 {
    color: #d4a574;
    margin-bottom: 15px;
    font-size: 24px;
}

.hobby-photos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.hobby-photos img {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s;
}

.hobby-photos img:hover {
    transform: scale(1.1);
}


/* 时间轴样式 */
.timeline-section {
    background: linear-gradient(180deg, #f5f0e8 0%, #ebe5db 100%);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #d4a574;
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    cursor: pointer;
}

.timeline-dot {
    position: absolute;
    left: -38px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: #d4a574;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, background 0.3s;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    background: #c49464;
}

.timeline-date {
    font-size: 20px;
    color: #d4a574;
    font-weight: bold;
    margin-bottom: 10px;
}

.timeline-content {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-height: 80px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.timeline-content.expanded {
    max-height: 600px;
}

.timeline-content h3 {
    color: #5a4a3a;
    margin-bottom: 10px;
    font-size: 26px;
}

.timeline-content p {
    color: #555;
    line-height: 1.8;
    font-size: 20px;
}

.timeline-photos {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.timeline-photos img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* 川渝之旅板块 */
.travel-section {
    background: linear-gradient(180deg, #e8f4f8 0%, #d4e8ed 100%);
}

.travel-story {
    max-width: 900px;
    margin: 0 auto 50px;
    text-align: center;
}

.typewriter-text {
    font-size: 22px;
    color: #555;
    line-height: 2.2;
    opacity: 0;
    animation: fadeInText 2s ease forwards;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* 翻页相册样式 */
.album-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.album {
    position: relative;
    width: 100%;
    height: 500px;
    background: #8b7355;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.album::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #5a4a3a;
    transform: translateX(-50%);
    z-index: 10;
}

.album-page {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: #fff;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: rotateY(-90deg);
    transition: all 0.6s ease;
    transform-origin: left center;
}

.album-page.active {
    opacity: 1;
    transform: rotateY(0deg);
}

.album-page img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
}

.album-controls {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.album-btn {
    padding: 12px 30px;
    background: #d4a574;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.album-btn:hover {
    background: #c49464;
    transform: scale(1.05);
}

.page-indicator {
    font-size: 18px;
    color: #666;
}

/* 页脚 */
.footer {
    background: #5a4a3a;
    color: #fff;
    text-align: center;
    padding: 40px 20px;
}

.footer p {
    margin: 5px 0;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 20px;
    }
    
    .nav-brand {
        margin-bottom: 10px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-links li:not(:last-child)::after {
        display: none;
    }
    
    .nav-links a {
        font-size: 16px;
        padding: 5px 12px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .photo-frame img {
        width: 250px;
        height: 330px;
    }

    .timeline {
        padding-left: 40px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-dot {
        left: -28px;
    }

    .timeline-photos img {
        width: 120px;
        height: 120px;
    }

    .album {
        height: 350px;
    }

    .hobby-gallery {
        flex-wrap: wrap;
    }
    
    .hobby-card {
        flex: none;
        width: 100%;
        max-width: 350px;
    }

    .hobby-photos img {
        width: 120px;
        height: 120px;
    }
}

/* 滚动动画 */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 图片放大灯箱效果 */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 50px;
    color: #fff;
    cursor: pointer;
    transition: transform 0.3s;
    line-height: 1;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

/* 让所有图片可点击 */
.photo-frame img,
.hobby-photos img,
.timeline-photos img,
.album-page img {
    cursor: zoom-in;
}

/* 结尾页样式 */
.ending-section {
    background: linear-gradient(180deg, #fdf6f0 0%, #f8ece3 100%);
    padding: 100px 20px;
}

.ending-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.ending-text {
    font-size: 24px;
    color: #5a4a3a;
    line-height: 2.5;
    margin: 0;
    opacity: 0;
    animation: fadeInLine 0.8s ease forwards;
}

.ending-text:nth-child(1) { animation-delay: 0.2s; }
.ending-text:nth-child(2) { animation-delay: 0.4s; }
.ending-text:nth-child(3) { animation-delay: 0.6s; }
.ending-text:nth-child(4) { animation-delay: 0.8s; }
.ending-text:nth-child(5) { animation-delay: 1s; }
.ending-text:nth-child(6) { animation-delay: 1.2s; }
.ending-text:nth-child(7) { animation-delay: 1.4s; }
.ending-text:nth-child(8) { animation-delay: 1.6s; }
.ending-text:nth-child(9) { animation-delay: 1.8s; }

@keyframes fadeInLine {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ending-wish {
    font-size: 28px;
    color: #d4a574;
    font-weight: bold;
    margin-top: 20px;
}

/* 小彩蛋区域 */
.easter-egg-section {
    text-align: center;
    margin-top: 60px;
}

.easter-egg-hint {
    font-size: 22px;
    color: #7a6a5a;
    margin-bottom: 30px;
}

.easter-egg-btn {
    display: inline-block;
    cursor: pointer;
    transition: transform 0.3s;
    text-align: center;
}

.easter-egg-btn:hover {
    transform: scale(1.1);
}

.easter-egg-btn img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    animation: bounce 2s infinite;
}

.easter-egg-btn span {
    display: block;
    margin-top: 10px;
    color: #d4a574;
    font-size: 18px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* 彩蛋照片展示 */
.easter-egg-photos {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
}

.easter-egg-photos.show {
    display: flex;
}

.egg-photo {
    width: 200px;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
}

.egg-photo.visible {
    opacity: 1;
    transform: scale(1);
}

.egg-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}
