* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation; /* 禁止双击缩放 */
}

body {
    font-family: 'Noto Serif SC', serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    overflow-x: hidden;
    touch-action: manipulation; /* 禁止双击缩放 */
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* 开场动画样式 */
.opening-screen {
    text-align: center;
    animation: fadeIn 2s ease-in;
}

.heart-animation {
    margin-bottom: 30px;
}

.heart {
    font-size: 100px;
    animation: heartbeat 1.5s ease-in-out infinite;
    display: inline-block;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.title {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 48px;
    color: #d63384;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.start-btn {
    font-size: 20px;
    padding: 15px 40px;
    background: linear-gradient(45deg, #ff6b6b, #ff8787);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* 情书容器样式 */
.letter-container {
    max-width: 600px;
    width: 100%;
}

.envelope {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    animation: slideIn 0.8s ease-out;
}

.letter-paper {
    padding: 60px;
    background: linear-gradient(to bottom, #ffffff 0%, #fff5f5 100%);
    position: relative;
}

.letter-paper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ff9a9e, #fecfef, #ff9a9e);
}

.letter-header h2 {
    color: #d63384;
    font-size: 32px;
    margin-bottom: 30px;
    text-align: center;
    font-family: 'Ma Shan Zheng', cursive;
}

.letter-content p {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
    text-align: justify;
}

.signature {
    text-align: right;
    margin-top: 40px;
    font-style: italic;
}

.signature p {
    margin-bottom: 5px;
    color: #d63384;
}

/* 淡入动画 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.2s; }
.fade-in:nth-child(2) { animation-delay: 0.4s; }
.fade-in:nth-child(3) { animation-delay: 0.6s; }
.fade-in:nth-child(4) { animation-delay: 0.8s; }
.fade-in:nth-child(5) { animation-delay: 1.0s; }
.fade-in:nth-child(6) { animation-delay: 1.2s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 全屏爱心雨 */
.full-screen-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    overflow: hidden;
    z-index: 1000;
}

/* 交互区域 */
.interactive-area {
    text-align: center;
    margin-top: 40px;
    position: relative;
}

.love-btn {
    font-size: 18px;
    padding: 12px 30px;
    background: linear-gradient(45deg, #ff6b6b, #ff8787);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.love-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

/* 漂浮爱心 */
.floating-hearts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.heart-float {
    position: absolute;
    font-size: 20px;
    animation: float 3s ease-in-out infinite;
}

.heart-float:nth-child(1) { left: 10%; animation-delay: 0s; }
.heart-float:nth-child(2) { left: 50%; animation-delay: 1s; }
.heart-float:nth-child(3) { left: 80%; animation-delay: 2s; }

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 回应页面 */
.response-container {
    text-align: center;
    animation: fadeIn 1s ease-in;
    position: relative;
    width: 100%;
    height: 100%;
}

.response-content h2 {
    font-size: 48px;
    color: #d63384;
    margin-bottom: 30px;
    font-family: 'Ma Shan Zheng', cursive;
}

.response-content p {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.final-hearts {
    margin-top: 40px;
}

/* 蝴蝶容器 */
.butterfly-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    overflow: hidden;
}

.butterfly {
    position: absolute;
    font-size: 30px;
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s;
    z-index: 100;
    color: #87CEEB; /* 浅蓝色 */
    text-shadow: 0 0 8px rgba(135, 206, 235, 0.8); /* 添加浅蓝色发光效果 */
}

.butterfly:hover {
    transform: scale(1.2);
}

/* 隐藏页面 */
.hidden-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.5s ease-in;
}

.hidden-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    text-align: center;
    margin: 20px;
}

.hidden-content h2 {
    color: #3366cc;
    font-size: 32px;
    margin-bottom: 20px;
    font-family: 'Ma Shan Zheng', cursive;
}

.hidden-content p {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
    text-align: justify;
}

.back-btn {
    font-size: 18px;
    padding: 12px 30px;
    background: linear-gradient(45deg, #3366cc, #6699ff);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(51, 102, 204, 0.4);
    margin-top: 20px;
}

.back-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(51, 102, 204, 0.6);
}

/* 音乐控制按钮 */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .title {
        font-size: 36px;
    }

    .letter-paper {
        padding: 30px;
    }

    .letter-header h2 {
        font-size: 28px;
    }

    .letter-content p {
        font-size: 16px;
    }

    .response-content h2 {
        font-size: 36px;
    }

    .response-content p {
        font-size: 20px;
    }

    .hidden-content {
        padding: 20px;
    }

    .hidden-content h2 {
        font-size: 28px;
    }

    .hidden-content p {
        font-size: 16px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes butterflyFly {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(5px, -5px) rotate(5deg);
    }
    50% {
        transform: translate(0, -10px) rotate(0deg);
    }
    75% {
        transform: translate(-5px, -5px) rotate(-5deg);
    }
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}
