/* 全局重置 & 字体配置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "方正楷体_GBK", "KaiTi_GB2312", "楷体", serif;
}

html,
body {
    height: 100%;
    overflow: hidden;
    background-color: #f0f8ff;
}

/* 全屏透明点击层（最顶层） */
.fullscreen-click-layer {
    position: fixed;
    /* 全屏覆盖，不随滚动变化 */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    /* 完全透明 */
    z-index: 99999;
    /* 确保在所有元素最顶层 */
    cursor: pointer;
    pointer-events: auto;
    /* 允许点击 */
}

/* 点击后隐藏层，避免重复触发 */
.fullscreen-click-layer.hidden {
    pointer-events: none;
    /* 禁用点击 */
    display: none;
    /* 彻底隐藏 */
}



/* 音乐开关（固定右上角，精准位置） */
.music-btn {
    position: absolute;
    /* 改回absolute，绑定邀请函容器 */
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
}

/* 补充：邀请函容器改为relative，让图标定位生效 */
.invitation-container {
    position: relative;
    /* 确保已存在，若无则添加 */
    width: 100%;
    max-width: 380px;
    height: 100vh;
    margin: 0 auto;
    /* 原有样式... */
}

.music-btn img {
    width: 20px;
    height: 20px;
    display: block;
}

/* 邀请函容器（精准尺寸） */
.invitation-container {
    width: 100%;
    max-width: 380px;
    height: 100vh;
    margin: 0 auto;
    background-color: #d9edf7;
    /* 基础浅蓝色背景 */
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    padding: 10px 8px;
}

/* 背景透明图覆盖层（预留位置） */
.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    /* 可通过JS调整透明度 */
}

/* 流动小花特效容器 */
.flower-container {
    position: absolute;
    /* 改回absolute，绑定邀请函容器 */
    top: 0;
    left: 0;
    width: 100%;
    /* 容器宽度，适配手机/电脑 */
    height: 100%;
    /* 初始高度为容器可视区 */
    min-height: 100vh;
    /* 关键：保证至少覆盖视口，适配长内容 */
    pointer-events: none;
    z-index: 1;
}

/* 流动小花样式 */
.floating-flower {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0.8;
    animation: float linear infinite;
}

.floating-flower img {
    width: 100%;
    height: 100%;
    display: block;
}

/* 小花流动动画 */
@keyframes float {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.guaishou {
    width: 100px;
    height: 80px;
}

.guaishou img {
    width: 100%;
    height: 100%;
}

#guaishou1 {
    position: relative;
    top: -140px;
    left: 280px;
}

#guaishou2 {
    position: relative;
    top: 160px;
    left: -260px;
}


/* 顶部birthday+恐龙占位区（完整尺寸布局） */
.top-reserve-area {
    width: 100%;
    height: 250px;
    /* 总高度 */
    position: relative;
    z-index: 2;
}

/* birthday文字占位（精准尺寸/位置） */
.birthday-text-placeholder {
    width: 100%;
    height: 120px;
    /* 文字区域高度 */
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 恐龙图片占位（精准尺寸/位置） */
.dinosaur-img-placeholder {
    width: 100%;
    /* 恐龙图宽度 */
    height: 300px;
    /* 恐龙图高度 */
    position: absolute;
    top: 40px;
}

/* 邀请函标题 */
.invite-main-title {
    text-align: center;
    font-size: 23px;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 60px;
    margin-bottom: 30px;
    position: relative;
    z-index: 2;
    line-height: 1.2;
}

/* 时间地址 */
.time-address-wrap {
    text-align: center;
    font-size: 14px;
    color: #2a2c2d;
    line-height: 1.8;
    margin: 0 auto 12px;
    position: relative;
    z-index: 2;
    padding: 0 5px;
}

/* 邀请语 */
.invite-text-wrap {
    text-align: center;
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    margin: 0 auto 18px;
    position: relative;
    z-index: 2;
    padding: 0 10px;
}

/* 照片容器通用 */
.photo-box {
    position: relative;
    z-index: 2;
    margin: 0 auto 15px;
}

/* 圆形主照片 */
.main-photo {
    width: 70%;
    height: 70%;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
}

.main-photo img,
.photo-item img,
.row1 img,
.row2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 强制填充 */
}

/* 主照片描述文字 */
.main-photo-desc {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #2a2c2d;
    line-height: 1.5;
}


/* 双照片网格描述文字 */
.photo-desc {
    position: absolute;
    left: 50%;
    text-align: center;
    font-size: 12px;
    color: #2a2c2d;
    line-height: 1.5;
    margin-bottom: 50px;
}

/* 双照片网格 */
.two-photo-grid {
    display: flex;
    justify-content: space-around;
    /* 水平均分 */
    align-items: center;
    /* 垂直居中 */
    z-index: 2;
    margin-bottom: 120px;
}

.two-photo-grid .photo-item {
    border-radius: 8px;
    overflow: hidden;
}

.two-photo-grid .photo-item:nth-child(1) {
    width: 50%;
    height: 260px;
}

.two-photo-grid .photo-item:nth-child(2) {
    width: 40%;
    height: 200px;
    position: relative;
    top: 120px;
    left: 50px;
}


/* 多照片网格 */
.multi-photo-grid {
    padding: 0 20px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-flow: wrap;
}

.multi-photo-grid .row1 {
    width: 90%;
    height: 170px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    margin-left: 30px;
}


.multi-photo-grid .row2 {
    position: relative;
    display: flex;
    flex-flow: wrap;
    top: -50px;
}

.multi-photo-grid .row2 .photo-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.multi-photo-grid .row2 .photo-item:nth-child(2) {
    position: relative;
    top: 70px;
    left: 30px;
}


.multi-photo-grid .row2 .photo-item img {
    width: 100%;
    height: 100%;
    border: 2px solid #fff;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

/* 单照片区 */
.single-photo-box {
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.single-photo-box .photo-item {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
}

/* 底部照片区 */
.bottom-photo-grid {
    padding: 0 20px;
    margin: 0 auto 25px;
    margin-top: 70px;
    position: relative;
    z-index: 2;
}

.bottom-photo-grid .row1 .photo-item {
    width: 47%;
    height: 170px;
    border-radius: 8px;
    overflow: hidden;
}

.bottom-photo-grid .row1 {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bottom-photo-grid .row1 .photo-item:nth-child(2) {
    position: relative;
    top: -60px;

}


.bottom-photo-grid .row2 {
    width: 200px;
    height: 130px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    top: -80px;
    left: 110px;
}

/* 文案区块 */
.text-block {
    text-align: center;
    font-size: 14px;
    line-height: 2;
    color: #333;
    margin: 0 auto 20px;
    padding: 0 10px;
    position: relative;
    z-index: 2;
}

/* 倒计时 */
.countdown-wrap {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 20px;
    width: 85%;
    position: relative;
    z-index: 2;
}

.countdown-item {
    background-color: #000000;
    color: #ffffff;
    width: 55px;
    height: 55px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.countdown-num {
    font-size: 18px;
    font-weight: bold;
}

.countdown-label {
    font-size: 11px;
    margin-top: 1px;
}

/* 底部祝福语 */
.blessing-wrap {
    text-align: center;
    font-size: 14px;
    line-height: 2;
    color: #333;
    margin: 0 auto 20px;
    padding: 0 10px;
    position: relative;
    z-index: 2;
}


/* 滚动条美化 */
.invitation-container::-webkit-scrollbar {
    width: 2px;
}

.invitation-container::-webkit-scrollbar-track {
    background: transparent;
}

.invitation-container::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 1px;
}

/* 响应式适配 */
@media (max-width: 380px) {
    .invitation-container {
        width: 100%;
        padding: 8px 6px;
    }

    .two-photo-grid,
    .multi-photo-grid,
    .single-photo-box,
    .bottom-photo-grid {
        padding: 0 15px;
    }
}