* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: "SimSun", "STSong", serif;
    background-color: #f5f1e8;
    color: #444444;
    overflow-x: hidden;
}
/* 开场点灯页面 */
.start-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 1.6s ease-out;
    background-image: url("candle-start.jpg");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f5f1e8;
}
.start-page.hide {
    opacity: 0;
    pointer-events: none;
}
.corner-top-left {
    position: absolute;
    top: 24px;
    left: 32px;
    font-size: 13px;
    color: #888;
}
.corner-top-right {
    position: absolute;
    top: 24px;
    right: 32px;
    font-size: 14px;
    color: #777;
    cursor: pointer;
}
.candle-wrap {
    position: relative;
    width: 420px;
    height: 520px;
}
.candle-container {
    position: absolute;
    right: 1%;
    top: 45%;
    transform: translate(50%, -50%);
    width: 420px;
    height: 520px;
    background: url("img/candlestick.png") center / contain no-repeat;
}
.candle {
    width: 52px;
    height: 130px;
    background: #ece8dd;
    border-radius: 4px 4px 0 0;
    border: 1px solid #c9c2b6;
    position: relative;
    margin: 0 auto;
}
.candle::after {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: #333;
}
.to-title {
    position: absolute;
    right:30%;
    top: 20%;
    width: 100%;
    text-align: center;
    font-size: 32px;
    color: #6b5f50;
    letter-spacing:4px;
    font-family: "SimSun", serif;
    z-index: 1002;
}
.happy-title {
    position: absolute;
    right:20%;
    top: 30%;
    width: 100%;
    text-align: center;
    font-size: 42px;
    color: #6b5f50;
    letter-spacing:8px;
    font-family: "SimSun", serif;
    z-index: 1002;
}
.luokuan-title {
    position: absolute;
    right:10%;
    top: 55%;
    width: 100%;
    text-align: center;
    font-size: 22px;
    color: #6b5f50;
    letter-spacing:4px;
    font-family: "SimSun", serif;
    z-index: 1002;
}
.flame {
    width: 24px;
    height: 34px;
    background: radial-gradient(#fff7b0, #ffc864, #ff7b38);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: fixed;
    left: 45%;
    top: 52%;
    transform: translate(-50%, -50%);
    opacity: 0;
    filter: blur(1px);
    animation: none;
    z-index: 999;
}
.flame.on-fire {
    animation: flicker 0.6s infinite alternate;
}
@keyframes flicker {
    0% {transform: translate(-50%, -50%) scale(1); opacity:0.85;}
    100% {transform: translate(-50%, -50%) scale(1.08); opacity:1;}
}
.stand {
    width: 140px;
    height: 110px;
    background: #c9d4dd;
    border-radius: 0 0 40px 40px;
    border: 2px solid #99a8b3;
    position: relative;
    margin-top: -12px;
}
.stand::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 220px;
    border: 3px solid #d4b878;
    border-radius: 50% 50% 0 0;
    border-bottom: none;
    right: -110px;
    top: -160px;
}
.moon-star {
    position: absolute;
    top: -140px;
    right: -90px;
}
.moon {
    width: 70px;
    height:70px;
    border-radius: 50%;
    box-shadow: -14px 10px 0 #e6c879;
}
.star {
    width: 24px;
    height:24px;
    background: #e6c879;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    position:absolute;
}
.star1 {top: 20px;left: 70px;}
.star2 {top: 80px;left: 90px; width:32px;height:32px;}
.match {
    position: fixed;
    left: 50%;
    bottom: 48%;
    cursor: grab;
    touch-action: none;
    z-index: 1000;
}
.match-stick {
    width: 110px;
    height: 4px;
    background: #d6b88f;
    border-radius: 2px;
    transform: rotate(-18deg);
}
.match-fire {
    width: 16px;
    height: 20px;
    background: radial-gradient(#fff9b8, #ffbc5c);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    left: 0;
    top: -8px;
    transform: rotate(-18deg);
}
.tip-text {
    margin-top: 50px;
    text-align: center;
}
.tip-text .en {
    font-size: 34px;
    font-style: italic;
    color: #555;
    margin-bottom: 12px;
}
.tip-text .zh {
    font-size: 16px;
    color: #777;
}
/* 主内容页面 */
.main-page {
    min-height: 100vh;
    padding: 60px 20px;
    opacity: 0;
    transition: opacity 1.4s ease;
}
.main-page.show {
    opacity: 1;
}
.content-wrap {
    max-width: 720px;
    margin: 0 auto;
}
.section {
    margin-bottom: 90px;
    text-align: center;
}
.section h2 {
    font-size: 24px;
    color: #5c544b;
    margin-bottom: 24px;
    font-weight: normal;
    letter-spacing: 2px;
}
.day-count {
    font-size: 32px;
    color: #6b5f50;
    margin: 16px 0;
}
.day-count span {
    color: #b88c5c;
    font-size: 38px;
}
.story-text p {
    font-size: 17px;
    line-height: 2;
    color: #555;
}
/* 小诗 */
.poem {
    line-height: 2.4;
    font-size:19px;
    color:#5c544b;
}
.final p {
    font-size:20px;
    line-height:2.2;
    color:#6b5f50;
}
/* 音乐按钮 */
.music-btn {
    position: fixed;
    bottom: 30px;
    right:30px;
    width:48px;
    height:48px;
    border-radius:50%;
    border: none;
    background: #fff;
    color:#776857;
    font-size:22px;
    box-shadow: 0 3px 10px #00000018;
    cursor: pointer;
    z-index: 9999;
}
/* 隐藏原生绘制的蜡烛、烛台、火苗等元素 */
.candle,
.candle-body,
.candle-fire,
.stand,
.candle-base,
.wax {
  display: none !important;
}
.candle,
.stand,
.moon-star {
    display: none;
}
/* ==========分页新增样式========== */
.page-item {
    display: none;
}
.page-item.active {
    display: block;
}
.page-btn-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap:24px;
    margin-top:40px;
}
.page-btn {
    border:1px solid #c9bca9;
    background-color: #fff;
    color:#6b5f50;
    padding:8px 22px;
    border-radius: 30px;
    cursor: pointer;
    font-size:15px;
    font-family: "SimSun",serif;
}
.page-btn:disabled {
    opacity:0.35;
    cursor: not-allowed;
}
.page-indicator {
    color:#888;
    font-size:14px;
}
/* ========== 浮动照片墙 + 上下浮动动画 ========== */
.photo-intro{
    margin-bottom:24px;
    color:#6b5f50;
    line-height:1.8;
}
.photo-wall{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap:16px;
}
.float-img{
    width:100%;
    border-radius:12px;
    border:5px solid #fff;
    box-shadow:0 3px 10px #00000015;
    animation: float 3s ease-in-out infinite;
}
.float-img:nth-child(2n){
    animation-delay: 0.6s;
}
.float-img:nth-child(3n){
    animation-delay: 1.2s;
}
@keyframes float {
    0%{transform: translateY(0px);}
    50%{transform: translateY(-8px);}
    100%{transform: translateY(0px);}
}

/* ========== 圆形交互时间轮盘【支持拖拽】 ========== */
.circle-timeline-wrap{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:40px;
    max-width:700px;
    margin: 30px auto 0;
}
/* ========== 圆形时间轮盘：节点绕圆心分布，文字保持正向 ========== */

.circle-wheel-container {
    position: relative;
    width: 320px;
    height: 320px;
    flex-shrink: 0;
}

.circle-indicator {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 0;
    width: 30px;
    height: 1px;
    background: #d4b878;
    transform: translateY(-50%);
}

.circle-wheel {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid #d9cdbc;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: grab;
}

.circle-wheel:active {
    cursor: grabbing;
}

.wheel-node {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 90px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    font-size: 12px;
    color: #7a654e;
    cursor: pointer;
    margin-left: -45px;
    margin-top: -14px;
    transform-origin: center center;
    white-space: nowrap;
}

.wheel-node:hover {
    color: #b88c5c;
    font-weight: bold;
}

.wheel-node.active {
    color: #b88c5c;
    font-weight: bold;
}

/* 移动端缩小版 */
@media (max-width: 620px) {
    .circle-wheel-container {
        width: 260px;
        height: 260px;
    }

    .wheel-node {
        width: 74px;
        font-size: 11px;
        margin-left: -37px;
    }
}
/* ========== 轮盘右侧详情卡片 ========== */
.wheel-detail-card {
    flex: 1;
    min-width: 260px;
    text-align: left;
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.08);
    transition: opacity 0.4s ease;
}

.detail-img {
    width: 100%;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}

.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-date {
    font-size: 16px;
    color: #7a654e;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.detail-text {
    font-size: 14px;
    color: #555;
    line-height: 1.75;
}

/* 移动端适配 */
@media (max-width: 620px) {
    .wheel-detail-card {
        min-width: 0;
        width: 100%;
    }
    .detail-img {
        height: 140px;
    }
}
/* ========== 祝福页烟花背景 ========== */

#fireworks {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.page-5 {
    position: relative;
    overflow: hidden;
}

.page-5 .section {
    position: relative;
    z-index: 1;
}
/* ========== 回忆页彩带背景 ========== */

#confetti {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.page-3 {
    position: relative;
    overflow: hidden;
}

.page-3 .section {
    position: relative;
    z-index: 1;
}
/* ========== 小诗页信纸背景 ========== */

.page-4 {
    position: relative;
    overflow: hidden;
}

.letter-bg {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(640px, 92vw);
    height: auto;
    aspect-ratio: 3 / 4;
    background-image: url("img/letter-bg.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(120, 100, 70, 0.25);
    z-index: 0;
}

.page-4 .section {
    position: relative;
    z-index: 1;
    padding: 40px 28px;
}

.page-4 h2 {
    margin-bottom: 20px;
}

.page-4 .poem {
    line-height: 2;
    font-size: 16px;
    color: #4f4539;
}
.page-4 .poem {
    line-height: 2.5;
    font-size: 16px;
    color: #4f4539;
    background: rgba(255, 252, 245, 0.55);
    padding: 18px;
    border-radius: 12px;
}
/* ========== 故事页打字机效果 ========== */
.story-text {
    min-height: 320px;
    text-align: center;
    text-indent:2em;
    line-height: 2;
    font-size: 17px;
    color: #555;
    white-space: pre-wrap;
}


.tw-cursor {
    display: inline-block;
    color: #7a654e;
    font-weight: bold;
    margin-left: 2px;
    animation: twBlink 0.8s infinite;
}

@keyframes twBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}



