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

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f8f0f0;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.invitation-container {
    width: 100%;
    max-width: 800px;
    height: 600px;
    position: relative;
    perspective: 1500px;
}

/* 封面样式 */
.invitation-cover {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('https://img1.baidu.com/it/u=3710197924,3720200958&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=667');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    transition: transform 1s ease;
    z-index: 2;
    position: relative;
}

.invitation-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
}

.cover-content {
    text-align: center;
    color: #fff;
    z-index: 1;
    position: relative;
}

.cover-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-in-out;
}

.invitation-subtitle {
    font-size: 1.5rem;
    margin: 20px 0 30px;
    animation: fadeIn 1.5s ease-in-out;
}

/* 心形动画 */
.heart-animation {
    width: 60px;
    height: 60px;
    margin: 20px auto;
    position: relative;
    animation: heartbeat 1.5s ease-in-out infinite;
}

.heart-animation:before,
.heart-animation:after {
    content: '';
    position: absolute;
    top: 0;
    width: 30px;
    height: 50px;
    background: #ff4b91;
    border-radius: 50px 50px 0 0;
}

.heart-animation:before {
    left: 0;
    transform: rotate(-45deg);
    transform-origin: 100% 100%;
}

.heart-animation:after {
    left: 30px;
    transform: rotate(45deg);
    transform-origin: 0 100%;
}

/* 打开按钮 */
.open-btn {
    padding: 12px 30px;
    font-size: 1.2rem;
    background-color: #fff;
    color: #ff4b91;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 75, 145, 0.3);
    animation: fadeIn 2s ease-in-out;
}

.open-btn:hover {
    background-color: #ff4b91;
    color: #fff;
    transform: scale(1.05);
}

/* 音乐控制按钮样式 */
.music-control {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.music-control:hover {
    background-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* 内页样式 */
.invitation-inside {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('https://img1.baidu.com/it/u=3710197924,3720200958&fm=253&fmt=auto&app=120&f=JPEG?w=500&h=667');
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    transition: transform 1s ease;
    z-index: 1;
    padding: 40px;
    position: relative;
}

.invitation-inside::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
}

.inside-content {
    width: 100%;
    max-width: 500px;
    text-align: center;
    z-index: 2;
    position: relative;
}

.couple-info h2,
.wedding-details h2 {
    color: #ff4b91;
    margin-bottom: 20px;
    font-size: 2rem;
}

.names {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
}

.groom, .bride {
    text-align: center;
}

.name-label {
    display: block;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 5px;
}

.name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.heart-icon {
    font-size: 2rem;
    margin: 0 30px;
    color: #ff4b91;
}

.wedding-details {
    margin-bottom: 40px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.detail-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.invitation-message {
    margin-bottom: 40px;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #555;
    font-style: italic;
}

.rsvp-section h3 {
    color: #ff4b91;
    margin-bottom: 20px;
}

.rsvp-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.rsvp-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.accept {
    background-color: #4caf50;
    color: white;
}

.accept:hover {
    background-color: #45a049;
    transform: scale(1.05);
}

.decline {
    background-color: #f44336;
    color: white;
}

.decline:hover {
    background-color: #da190b;
    transform: scale(1.05);
}

.close-btn {
    padding: 10px 25px;
    font-size: 1rem;
    background-color: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: #d0d0d0;
    transform: scale(1.05);
}

/* RSVP 弹窗样式 */
.rsvp-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rsvp-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    color: #ff4b91;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.modal-content p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 25px;
}

.modal-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    background-color: #ff4b91;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    background-color: #ff3380;
    transform: scale(1.05);
}

/* 动画效果 */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(1);
    }
}

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

/* 响应式设计 */
@media (max-width: 768px) {
    .invitation-container {
        height: 90vh;
        max-height: 600px;
    }
    
    .cover-content h1 {
        font-size: 2.5rem;
    }
    
    .names {
        flex-direction: column;
    }
    
    .heart-icon {
        margin: 20px 0;
    }
    
    .rsvp-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .rsvp-btn {
        width: 200px;
    }
}