* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
    touch-action: manipulation;
    /* 防止手势缩放 */
    -webkit-text-size-adjust: 100%;
    /* 防止字体自动缩放 */
}

.container {
    height: 100vh;
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 20px 20px 0 20px;
    background-color: rgb(214, 228, 236);
    border: 1px solid #eee;
    border-radius: 15px;
    color: #151111;
    font-family: sans-serif, "Microsoft Yahei", "汉仪甜心体";
    font-size: 14px !important;
    line-height: 1.8 !important;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;

    scroll-behavior: smooth;
    /* 添加平滑滚动 */
    -webkit-overflow-scrolling: touch;
    /* iOS平滑滚动 */
}

.art-font,
.art-text,
.split-slogan1,
.split-slogan2,
.art-text-yes,
.art-text-ido {
    font-family: inherit;
    /* 让它们使用自己的特殊字体 */
}

/* 确保所有普通文字继承.container的字体设置 */
.container * {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

#header {
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    width: calc(100% + 40px);
    margin: -20px -20px 20px -20px;
    /*container本身就有20px间距*/
    background-image: linear-gradient(pink, rgb(214, 228, 236));
    box-sizing: border-box;
}

#header h2 {
    margin: 0;
    font-size: 18px !important;
    text-align: center;
    /* 添加这行 */
    width: 100%;
}

/* 艺术字+图片容器 */
.art-image-container {
    display: flex;
    flex-direction: column;
    /* 垂直排列，图片在上，艺术字在下 */
    align-items: flex-start;
    /* 改为左对齐，让图片可以偏右 */
    gap: 5px;
    max-width: 100%;
    margin: 0 auto 30px;
    padding: 20px;
    position: relative;
}

.art-image-wrapper {
    width: 100%;
    max-width: 450px;
    /* 图片较大 */
    margin-left: auto;
    /* 让图片靠右 */
    margin-right: 20px;
    /* 右边距，让图片更靠右 */
}

/* 图片样式 - 大尺寸 */
.art-image {
    width: 100%;
    height: 450px;
    /* 较大高度 */
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

/* 艺术字容器 - 在下方 */
.art-title {
    font-family: 'Parisienne', cursive !important;
    font-size: 80px !important;
    /* 较大的艺术字 */
    color: #8b3a62 !important;
    line-height: 1;
    letter-spacing: 3px;
    text-align: left;
    /* 居左对齐 */
    margin-top: -10px;
    /* 负边距让艺术字更靠近图片 */
    padding: 5px 0;
    width: 100%;
}

.music-btn {
    /* 移除float */
    float: none;

    /* 使用绝对定位 */
    position: absolute;
    top: 15px;
    /* 调整位置 */
    right: 15px;

    /* 保持其他样式 */
    width: 30px;
    height: 30px;
    z-index: 9999;
    border-radius: 50%;
    background: rgba(255, 192, 203, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 定义循环转动的动画 */
@keyframes musicRotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.music-btn.playing {
    animation: musicRotate 2s linear infinite;
    /*animation-play-state: paused;*/
}

/* 暂停状态：停止动画 */
.music-btn.paused {
    animation-play-state: paused;
}

.couple-section {
    max-width: 100%;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.couple-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    max-width: 400px;
    padding: 10px;
    border-radius: 15px;
    flex-wrap: nowrap !important;
}

.couple-card img {
    width: 140px;
    height: 160px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    /*禁止图片被压缩*/
}

.couple-text {
    text-align: left;
}

.art-font {
    font-family: 'Great Vibes', cursive !important;
    font-size: 32px !important;
    color: #8b3a62 !important;
    margin: 0;
    line-height: 1;
}

.role {
    margin: 5px 0;
}

.name {
    margin-left: 50px;
}

.art-photo-module {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 50px auto;
    aspect-ratio: 9/10;
    border-radius: 15px;
    overflow: hidden;
}

.art-text {
    font-family: 'Parisienne', cursive !important;
    color: #7a1939 !important;
    margin: 0;
    line-height: 1;
    z-index: 4;
    position: absolute;
}

.art-text-yes {
    left: 5% !important;
    top: 15% !important;
    font-size: 70px !important;
}

.art-text-ido {
    left: 15% !important;
    top: 35% !important;
    font-size: 70px !important;
}

.module-photo-right {
    position: absolute;
    right: 5px;
    top: 0;
    width: 55%;
    height: 65%;
    object-fit: cover;
    z-index: 1;
    border-radius: 15px;
}

.module-photo-left {
    position: absolute;
    left: 5px;
    bottom: 0;
    width: 55%;
    height: 40%;
    object-fit: cover;
    z-index: 2;
    border-radius: 15px;
}

.split-layout1,
.split-layout2 {
    display: flex;
    align-items: center;
    /* 改为居中对齐，使图片和文字在垂直方向居中 */
    gap: 40px;
    /* 进一步增加间距到40px */
    width: 95%;
    /* 几乎占满宽度 */
    max-width: 580px;
    /* 接近container的最大宽度600px */
    margin: 20px auto;
    padding: 0 20px;
    /* 增加内边距 */
    flex-wrap: nowrap !important;
    justify-content: space-between;
    /* 两端对齐充分利用空间 */
    box-sizing: border-box;
}

.split-text1,
.split-text2 {
    flex: 1.8;
    /* 增加文字区域占比 */
    min-width: 0;
    font-size: 14px;
    line-height: 1.7;
    padding: 0 15px;
    /* 进一步增加内边距 */
}

.split-img1,
.split-img2 {
    flex: 0 0 210px;
    /* 增加到210px */
    width: 210px;
    height: 315px;
    /* 2:3比例，210*1.5=315 */
    overflow: hidden;
}

.split-text1 {
    text-align: left;
}

.split-text2 {
    text-align: right;
}

.split-text1 p,
.split-text2 p {
    margin-bottom: 8px;
}

.split-img1 img,
.split-img2 img {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    object-fit: cover;
}

.split-slogan1,
.split-slogan2 {
    color: #7a1939 !important;
    font-size: 20px !important;
    margin: 0;
    line-height: 1.5 !important;
}

.double-wrap {
    max-width: 100%;
    margin: 0 auto;
    flex-shrink: 0;
}

.double-text {
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
}

.double-img-container {
    width: calc(100% + 20px);
    margin: 0 -10px;
    padding: 0;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: nowrap !important;
    justify-content: center;
}

.double-img-container img {
    width: calc((100% - 10px) / 2);
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    display: block;
    flex-shrink: 0;
}

.countdown-container {
    width: 100%;
    margin: 30px auto;
    display: flex;
    gap: 20px;
    padding: 0 15px;
    flex-wrap: nowrap !important;
    justify-content: center;
    align-items: center;
}

.countdown-nums {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.countdown-item {
    background-color: #7a1939;
    color: white !important;
    width: 80px;
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.countdown-item span {
    font-size: 14px;
    font-weight: bold;
}

.countdown-item p {
    margin: 0;
    font-size: 14px;
}

.countdown-item span,
.countdown-item p {
    color: inherit !important;
    /* 修正为继承父元素的颜色 */
    font-size: 14px;
    font-weight: bold;
}

.countdown-img {
    max-width: 300px;
    max-height: 400px;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
    border-radius: 15px;
}

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

/*地址模块整体居中*/
.address-section {
    width: 100%;
    min-width: 300px;
    margin: 20px auto;
    padding: 0 5px;
    flex-shrink: 0;
}

.address-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 强制平分两列 */
    gap: 10px;
    width: 100%;
    min-width: 0;
    overflow-x: visible !important;
}

.address-item {
    text-align: center;
    min-width: 0;
}

.address-map {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.address-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.address-info {
    margin-top: 10px;
}

.address-info a {
    font-size: 14px;
    color: #1f197a !important;
    text-decoration: none;
    line-height: 1.6;
    word-break: break-all;
}

#wedding-photo_wrap {
    background: linear-gradient(rgb(214, 228, 236) 0%,
            /* 起点 */
            rgba(214, 228, 236, 0.95) 8%,
            /* 缓降过渡 */
            rgba(214, 228, 236, 0.7) 18%,
            /* 更缓的透明度变化 */
            rgba(214, 228, 236, 0.2) 35%,
            /* 延长半透明阶段 */
            rgba(214, 228, 236, 0) 45%,
            /* 完全透明的起点后移，过渡更久 */
            rgba(214, 228, 236, 0) 55%,
            /* 完全透明的终点前移，对称分布 */
            rgba(214, 228, 236, 0.2) 65%,
            /* 对称的半透明过渡 */
            rgba(214, 228, 236, 0.7) 82%,
            /* 缓升过渡 */
            rgba(214, 228, 236, 0.95) 92%,
            /* 接近终点的缓升 */
            rgb(214, 228, 236) 100%
            /* 终点 */
        ), url("y_339A3249_1.jpg");
    background-size: cover;
    background-position: center;
    min-height: 600px;
    width: calc(100% + 40px);
    margin: 0 -20px;
    padding: 40px 20px;
    box-sizing: border-box;
    border-radius: 15px;
}

#ending {
    background: linear-gradient(to bottom,
            rgb(214, 228, 236) 0%,
            /* 起点 */
            rgba(214, 228, 236, 0.9) 15%,
            /* 缓降过渡 */
            rgba(214, 228, 236, 0.5) 35%,
            /* 更缓的透明度变化 */
            rgba(214, 228, 236, 0) 55%,
            /* 完全透明的起点后移 */
            rgba(214, 228, 236, 0) 75%,
            /* 延长完全透明阶段 */
            rgba(0, 0, 0, 0.05) 82%,
            /* 暗化开始，极低透明度 */
            rgba(0, 0, 0, 0.15) 88%,
            /* 缓升暗化 */
            rgba(0, 0, 0, 0.25) 95%,
            /* 接近最终暗化值 */
            rgba(0, 0, 0, 0.3) 100%
            /* 最终暗化值 */
        ), url("y_339A3259_1.jpg");
    background-size: cover;
    background-position: center;
    min-height: 600px;
    width: calc(100% + 40px);
    margin: 0 -20px;
    padding: 40px 20px;
    box-sizing: border-box;
    border-radius: 15px;
}

/* 修改手机端媒体查询，保持布局但缩小内容 */
@media (max-width: 768px) {
    .container {
        padding: 15px 12px 0 12px;
        font-size: 13px !important;
        /* 整体缩小字体 */
    }

    /* 确保所有普通文字同步缩小 */
    .container * {
        font-size: inherit !important;
        /* 继承容器的字体大小 */
    }

    #header {
        width: calc(100% + 24px);
        margin: -12px -12px 20px -12px;
        padding: 12px;
    }

    #header h2 {
        font-size: 16px !important;
        text-align: center;
        /* 确保手机端也居中 */
        width: 100%;
    }

    .art-image-container {
        gap: 0;
        padding: 15px;
        align-items: flex-start;
        /* 保持左对齐 */
    }

    .art-image-wrapper {
        margin-right: 15px;
        /* 小屏幕右边距减小一点 */
        max-width: 85%;
        /* 稍微缩小一点，给小屏幕留出右边空间 */
    }

    .art-image {
        height: 400px;
        /* 调整为400px，保持一致性 */
    }

    .art-title {
        font-family: 'Parisienne', cursive !important;
        /* 确保字体一致 */
        font-size: 50px !important;
        /* 调整为50px，比例更协调 */
        color: #8b3a62 !important;
        text-align: left;
        /* 明确保持居左 */
        margin-top: -10px;
        width: 100%;
    }

    .art-photo-module {
        margin: 30px auto;
        max-width: calc(100% - 24px);
        aspect-ratio: 9/10;
    }

    .split-layout1,
    .split-layout2 {
        gap: 10px;
        margin: 15px auto;
        padding: 0 5px;
        /* 手机端也添加内边距 */
    }

    .split-text1,
    .split-text2 {
        flex: 3;
        /* 保持比例 */
        padding: 0 8px;
    }

    .split-img1,
    .split-img2 {
        flex: 2;
        /* 保持比例 */
        max-width: 150px;
    }

    .split-slogan1,
    .split-slogan2 {
        font-size: 16px !important;
        /* 缩小标语字体 */
        margin: 8px 0 4px 0;
    }

    /* 情侣卡片缩小 */
    .couple-card {
        gap: 20px;
        margin: 15px 0;
        max-width: 100%;
    }

    .couple-card img {
        width: 110px;
        height: 125px;
    }

    .art-font {
        font-size: 26px !important;
    }

    .role,
    .name {
        font-size: 13px;
    }

    /* Yes, I do 艺术字体缩小 */
    .art-text-yes,
    .art-text-ido {
        font-size: 50px !important;
    }

    /* 双图容器缩小 */
    .double-img-container img {
        height: 180px;
    }

    .double-text {
        font-size: 13px;
    }

    /* 倒计时模块调整 */
    .countdown-container {
        /* 保持原有布局，只按比例缩小尺寸 */
        gap: 15px;
        /* 稍微缩小间距 */
        margin: 20px auto;
        padding: 0 10px;
    }

    .countdown-nums {
        gap: 8px;
        /* 缩小数字之间的间距 */
    }

    .countdown-item {
        width: 70px;
        /* 按比例缩小 */
        height: 70px;
    }

    .countdown-item span {
        font-size: 13px;
    }

    .countdown-item p {
        font-size: 13px;
    }

    .countdown-img {
        max-width: 280px;
        /* 按比例缩小 */
        max-height: 370px;
    }

    /* 地址模块保持两列，但缩小 */
    .address-list {
        gap: 8px;
    }

    .address-info a {
        font-size: 13px;
    }

    #wedding-photo_wrap,
    #ending {
        width: calc(100% + 24px);
        margin: 0 -12px;
        min-height: 450px;
        padding: 30px 15px;
    }
}

/* 更小屏幕进一步缩小 */
@media (max-width: 480px) {
    .container {
        padding: 12px 10px 0 10px;
        font-size: 12px;
    }

    #header {
        width: calc(100% + 20px);
        margin: -10px -10px 15px -10px;
        padding: 10px;
    }

    #header h2 {
        font-size: 14px !important;
        text-align: center;
        /* 确保小屏幕也居中 */
        width: 100%;
    }

    .art-image-container {
        gap: 0;
        padding: 12px;
        align-items: flex-start;
        /* 保持左对齐 */
    }

    .art-image {
        height: 400px;
        /* 保持400px高度 */
    }

    .art-title {
        font-family: 'Parisienne', cursive !important;
        /* 确保字体一致 */
        font-size: 40px !important;
        /* 调整为40px */
        color: #8b3a62 !important;
        text-align: left;
        /* 明确保持居左 */
        margin-top: -10px;
        width: 100%;
    }

    .split-layout1,
    .split-layout2 {
        gap: 5px;
        margin: 12px auto;
    }

    .split-img1,
    .split-img2 {
        flex: 0 0 110px;
        /* 进一步缩小 */
        width: 110px;
        height: 165px;
    }

    .split-text1,
    .split-text2 {
        font-size: 11px;
        padding-right: 5px;
    }

    .split-slogan1,
    .split-slogan2 {
        font-size: 14px !important;
    }

    .couple-card {
        gap: 15px;
    }

    .couple-card img {
        width: 95px;
        height: 110px;
    }

    .art-font {
        font-size: 22px !important;
    }

    .art-text-yes,
    .art-text-ido {
        font-size: 40px !important;
    }

    .art-text-yes {
        left: 3% !important;
        top: 10% !important;
    }

    .art-text-ido {
        left: 12% !important;
        top: 30% !important;
    }

    .double-img-container img {
        height: 150px;
    }

    .double-text {
        font-size: 11px;
    }

    .countdown-container {
        gap: 12px;
        padding: 0 8px;
    }

    .countdown-item {
        width: 60px;
        height: 60px;
    }

    .countdown-item span {
        font-size: 12px;
    }

    .countdown-item p {
        font-size: 11px;
    }

    .countdown-img {
        max-width: 240px;
        max-height: 320px;
    }
}

/* 超小屏幕进一步微调 */
@media (max-width: 375px) {
    .container {
        padding: 10px 8px 0 8px;
    }

    #header {
        width: calc(100% + 16px);
        margin: -8px -8px 12px -8px;
        padding: 8px;
    }

    .split-layout1,
    .split-layout2 {
        gap: 3px;
    }

    .split-img1,
    .split-img2 {
        flex: 0 0 100px;
        width: 100px;
        height: 150px;
    }

    .split-text1,
    .split-text2 {
        font-size: 10px;
    }

    .split-slogan1,
    .split-slogan2 {
        font-size: 11px !important;
    }

    .art-text-yes,
    .art-text-ido {
        font-size: 35px !important;
    }

    .couple-card img {
        width: 85px;
        height: 100px;
    }

    .art-font {
        font-size: 20px !important;
    }

    .double-img-container img {
        height: 140px;
    }

    .double-text {
        font-size: 10px;
    }

    .countdown-container {
        gap: 10px;
        padding: 0 6px;
    }

    .countdown-item {
        width: 55px;
        height: 55px;
    }

    .countdown-item span {
        font-size: 10px;
    }

    .countdown-img {
        max-width: 200px;
        max-height: 270px;
    }
}