* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

body {
    background-color: #ffeef8;
    background-image: radial-gradient(#ffafd7 1px, transparent 1px);
    background-size: 40px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    padding: 20px 0;
}

.container {
    padding: 2rem;
    width: 100%;
    max-width: 800px;
}

/* 信封样式 */
.envelope {
    width: 300px;
    height: 200px;
    margin: 80px auto 0;
    position: relative;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.envelope:hover {
    transform: scale(1.05);
}

.envelope-front {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #ff8eb8;
    border-radius: 5px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform-style: preserve-3d;
    z-index: 2;
}

.envelope-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #ff9cd7;
    border-radius: 5px;
    transform: translateZ(-1px);
    z-index: 1;
}

.envelope-flap {
    width: 100%;
    height: 80px;
    position: absolute;
    top: -80px;
    left: 0;
    border-bottom: 100px solid #ff6699;
    border-left: 150px solid transparent;
    border-right: 150px solid transparent;
    border-radius: 5px 5px 0 0;
    transform-origin: bottom;
    transition: transform 0.4s ease;
    z-index: 3;
}

.envelope-pocket {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    border-top: 100px solid transparent;
    border-right: 150px solid #ff80a6;
    border-bottom: 100px solid #ff80a6;
    border-left: 150px solid #ff80a6;
    border-radius: 5px;
}

.envelope-letter {
    width: 90%;
    height: 90%;
    background-color: white;
    position: absolute;
    top: 5%;
    left: 5%;
    border-radius: 3px;
    z-index: 2;
    transition: transform 0.6s ease;
    transform-origin: top;
    transform-style: preserve-3d;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.envelope-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.envelope-message span {
    display: block;
    font-size: 1.2rem;
    color: #ff6699;
    margin-bottom: 10px;
    font-weight: bold;
}

.click-hint {
    font-size: 0.9rem !important;
    margin-top: 20px;
    color: #888 !important;
    animation: pulse 1.5s infinite;
}

.envelope-heart {
    position: absolute;
    width: 30px;
    height: 30px;
    bottom: 15px;
    right: 15px;
    z-index: 4;
}

.envelope-heart:before, .envelope-heart:after {
    content: "";
    position: absolute;
    width: 15px;
    height: 24px;
    background: #ff6699;
    border-radius: 15px 15px 0 0;
}

.envelope-heart:before {
    transform: rotate(-45deg);
    transform-origin: 100% 100%;
}

.envelope-heart:after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 0 100%;
}

/* 信封打开动画类 */
.envelope.open .envelope-flap {
    transform: rotateX(180deg);
}

.envelope.open .envelope-letter {
    transform: translateY(-100px) translateZ(10px) rotateX(10deg);
    transition-delay: 0.2s;
}

@keyframes pulse {
    0% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
    100% { opacity: 0.6; transform: scale(1); }
}

/* 卡片样式（原有） */
.card {
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
    overflow: hidden;
    padding: 2rem;
    position: relative;
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

h1 {
    color: #ff6699;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.heart {
    position: relative;
    width: 50px;
    height: 45px;
    margin: 1rem auto;
    animation: heartbeat 1.5s infinite;
}

.heart:before, .heart:after {
    content: "";
    position: absolute;
    left: 25px;
    top: 0;
    width: 25px;
    height: 40px;
    background: #ff6699;
    border-radius: 25px 25px 0 0;
    transform: rotate(-45deg);
    transform-origin: 0 100%;
}

.heart:after {
    left: 0;
    transform: rotate(45deg);
    transform-origin: 100% 100%;
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.message {
    text-align: center;
    line-height: 2;
    color: #555;
    margin-bottom: 2rem;
    width: 100%;
}

.message p {
    margin-bottom: 0.5rem;
}

.dear {
    font-size: 1.2rem;
    color: #ff6699;
    font-weight: bold;
}

.highlight {
    font-size: 1.8rem;
    color: #ff6699;
    font-weight: bold;
    margin: 1.5rem 0;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.flowers {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.flower {
    width: 60px;
    height: 60px;
    margin: 0 15px;
    position: relative;
    transition: transform 0.3s;
}

.flower:hover {
    transform: scale(1.1) rotate(10deg);
}

.flower:before, .flower:after {
    content: '';
    position: absolute;
    background: #ff6699;
}

.flower:before {
    width: 100%;
    height: 20px;
    border-radius: 50px;
    top: 20px;
}

.flower:after {
    height: 100%;
    width: 20px;
    border-radius: 50px;
    left: 20px;
}

.flower:nth-child(2) {
    transform: scale(0.85) rotate(45deg);
}

.flower:nth-child(3) {
    transform: scale(0.7) rotate(22.5deg);
}

.flower:nth-child(4) {
    transform: scale(0.75) rotate(-15deg);
}

.flower:nth-child(5) {
    transform: scale(0.8) rotate(30deg);
}

.footer {
    text-align: center;
    margin-top: 2rem;
}

.love {
    font-style: italic;
    color: #888;
    margin-bottom: 0.5rem;
}

.date {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 1rem;
}

/* 照片框样式 */
.photo-frame {
    width: 260px;
    height: auto;
    border-radius: 15px;
    overflow: hidden;
    margin: 0 auto 2rem auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 5px solid #fff;
    outline: 1px solid #ffafd7;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

.photo-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.photo-caption {
    text-align: center;
    padding: 10px;
    color: #ff6699;
    font-size: 1rem;
    font-weight: bold;
    background-color: #fff9fb;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffafd7 0%, #ff6699 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-text {
    color: white;
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* 诗歌样式 */
.poem {
    text-align: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #fff9fb;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #ff6699;
    width: 100%;
}

.poem h3 {
    color: #ff6699;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.poem p {
    color: #666;
    line-height: 1.8;
    font-style: italic;
}

/* 记忆墙样式 */
.memory-wall {
    width: 100%;
    margin: 2rem 0;
    text-align: center;
}

.memory-wall h3 {
    color: #ff6699;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.memories {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 15px;
}

.memory-item {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.memory-item:hover {
    transform: scale(1.05);
}

.memory-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff9cd7 0%, #ff8eb8 100%);
    display: flex;
    justify-content: center;
    align-items: center;
}

.memory-placeholder span {
    color: white;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* 音乐控制样式 */
.music-control {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ff6699;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem auto;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 102, 153, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.music-control:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 102, 153, 0.5);
}

.music-control:active {
    transform: scale(0.98);
}

.music-control.playing {
    animation: rotate 5s linear infinite;
}

.music-note {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 漂浮元素样式 */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.floating-heart, .floating-element {
    position: absolute;
    opacity: 0;
    font-size: 1.5rem;
    animation: float 15s linear infinite;
}

.floating-heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.floating-heart:nth-child(2) {
    left: 40%;
    animation-delay: 5s;
}

.floating-heart:nth-child(3) {
    left: 70%;
    animation-delay: 9s;
}

.floating-element:nth-child(4) {
    left: 20%;
    animation-delay: 2s;
}

.floating-element:nth-child(5) {
    left: 50%;
    animation-delay: 7s;
}

.floating-element:nth-child(6) {
    left: 80%;
    animation-delay: 11s;
}

/* 动画效果 */
@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% {
        transform: translateY(120vh) rotate(0deg);
        opacity: 0.7;
    }
    100% {
        transform: translateY(-20vh) rotate(360deg);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .envelope {
        width: 280px;
        height: 180px;
        margin: 60px auto 0;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .highlight {
        font-size: 1.5rem;
    }

    .photo-frame {
        width: 220px;
    }

    .memories {
        justify-content: center;
    }

    .memory-item {
        width: 100px;
        height: 100px;
        margin-bottom: 10px;
    }
} 