/* 基本样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SimSun', serif;
    background-color: #f5f5f5;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 烟花效果样式 */
#fireworks-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.firework {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: fireworks-explode 2s ease-out forwards;
}

@keyframes fireworks-explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* 雪花效果样式 */
#snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.snowflake {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0.8;
    animation: snowfall linear infinite;
}

@keyframes snowfall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 图片查看模态框样式 */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover,
.close-modal:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease-in-out;
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* 图片点击效果 */
.slider-img {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.slider-img:hover {
    transform: scale(1.02);
}

/* 邀请函容器 */
.invitation-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #c41e3a;
    color: #fff;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* 背景纹理 */
.invitation-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/><path d="M0 50 L100 50 M50 0 L50 100" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></svg>');
    z-index: 0;
}

/* 头部装饰 */
.decorative-top {
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.lantern {
    width: 60px;
    height: 80px;
    background-color: #ffd700;
    border-radius: 50% 50% 30% 30%;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.lantern::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background-color: #ffd700;
    border-radius: 50%;
}

.lantern::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 20px;
    background-color: #ffd700;
}

/* 标题样式 */
.invitation-title {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    padding: 10px 20px;
    background-color: rgba(196, 30, 58, 0.8);
    border: 2px solid #ffd700;
    border-radius: 20px;
    display: inline-block;
    margin: 0 auto 10px;
    left: 50%;
    transform: translateX(-50%);
}

.invitation-subtitle {
    text-align: center;
    font-size: 20px;
    color: #ffd700;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

/* 内容区域 */
.invitation-content {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.invitation-text {
    font-size: 24px;
    margin-bottom: 15px;
    color: #fff;
}

.invitation-info {
    font-size: 20px;
    margin-bottom: 10px;
    color: #ffd700;
}

.invitation-note {
    font-size: 16px;
    margin-top: 20px;
    padding: 0 20px;
    line-height: 1.8;
    color: #fff;
}

/* 照片展示区 */
.photo-gallery {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.photo-frame {
    width: 90%;
    height: 400px;
    margin: 0 auto;
    background-color: #e6e6e6;
    border: 5px solid #ffd700;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.photo-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slider-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    background-color: #f0f0f0;
}

.slider-img.active {
    opacity: 1;
}

/* 轮播控制 */
.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.prev-btn, .next-btn {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.prev-btn:hover, .next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* 轮播指示器 */
.slider-indicators {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.indicator {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.indicator.active {
    background-color: #ffd700;
}

/* 背景音乐控制 */
.music-control {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.music-btn {
    background-color: #ffd700;
    color: #c41e3a;
    border: none;
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.music-btn:hover {
    background-color: #ffed4e;
    transform: scale(1.05);
}

.music-icon {
    margin-right: 5px;
    font-size: 20px;
}

/* 表单样式 */
.form-section {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.form-title {
    text-align: center;
    color: #c41e3a;
    margin-bottom: 20px;
    font-size: 24px;
}

.participant-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    color: #c41e3a;
    font-weight: bold;
    font-size: 16px;
}

.form-group input {
    padding: 10px;
    border: 1px solid #c41e3a;
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #ffd700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.submit-btn {
    background-color: #c41e3a;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.submit-btn:hover {
    background-color: #a81a31;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.form-message {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 页脚样式 */
.invitation-footer {
    text-align: center;
    font-size: 18px;
    color: #ffd700;
    padding: 10px;
    position: relative;
    z-index: 1;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .invitation-container {
        padding: 15px;
    }

    .invitation-title {
        font-size: 28px;
    }

    .invitation-subtitle {
        font-size: 18px;
    }

    .invitation-text {
        font-size: 20px;
    }

    .invitation-info {
        font-size: 18px;
    }

    .photo-frame {
        height: 300px;
    }

    .form-section {
        padding: 15px;
    }

    .form-title {
        font-size: 20px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .invitation-title {
        font-size: 24px;
    }

    .invitation-subtitle {
        font-size: 16px;
    }

    .invitation-text {
        font-size: 18px;
    }

    .invitation-info {
        font-size: 16px;
    }

    .photo-frame {
        height: 250px;
    }

    .lantern {
        width: 40px;
        height: 60px;
    }
}