/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif SC', serif;
    background: linear-gradient(135deg, #2d5016 0%, #3e6b1f 25%, #4a7c23 50%, #5d8f2a 75%, #6ba32f 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 磨砂玻璃基础样式 */
.glass-effect {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* 背景动画 - 飘落的叶子 */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.leaf {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #7cb342, #8bc34a);
    border-radius: 0 100% 0 100%;
    animation: fall linear infinite;
    opacity: 0.7;
}

.leaf::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 15px;
    background: #4a7c23;
    transform: translate(-50%, -50%) rotate(45deg);
}

.leaf-1 {
    left: 10%;
    animation-duration: 8s;
    animation-delay: 0s;
}

.leaf-2 {
    left: 30%;
    animation-duration: 10s;
    animation-delay: 2s;
}

.leaf-3 {
    left: 50%;
    animation-duration: 12s;
    animation-delay: 4s;
}

.leaf-4 {
    left: 70%;
    animation-duration: 9s;
    animation-delay: 1s;
}

.leaf-5 {
    left: 90%;
    animation-duration: 11s;
    animation-delay: 3s;
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* 主容器 */
.container {
    position: relative;
    z-index: 2;
    min-height: 100vh;
}

/* 封面页样式 */
.cover-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.cover-section.active {
    opacity: 1;
    transform: translateY(0);
}

.cover-content {
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 40px;
}

.forest-frame {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 25px;
    padding: 60px 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.forest-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
}

.forest-frame::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(180deg); }
}

.main-title {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    letter-spacing: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

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

.groom, .bride {
    font-size: 2.2rem;
    font-weight: 500;
    letter-spacing: 4px;
}

.heart-divider {
    color: #ff6b9d;
    font-size: 1.8rem;
    animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    letter-spacing: 2px;
}

.open-invitation {
    background: linear-gradient(45deg, #7cb342, #8bc34a);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    font-family: 'Noto Serif SC', serif;
    letter-spacing: 2px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.open-invitation:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    background: linear-gradient(45deg, #8bc34a, #9ccc65);
}

/* 邀请函主内容 */
.invitation-section {
    display: none;
    min-height: 100vh;
    padding: 40px 20px;
    animation: fadeInUp 1s ease;
}

.invitation-section.active {
    display: block;
}

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

.invitation-content {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.invitation-content:hover {
    transform: translateY(-2px);
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.2);
}

.invitation-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #7cb342, #8bc34a, #9ccc65, #aed581);
}

/* 装饰元素 */
.top-decoration, .bottom-decoration {
    text-align: center;
    margin: 20px 0;
}

.branch-left, .branch-right, .branch-bottom {
    display: inline-block;
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #7cb342, transparent);
    position: relative;
}

.branch-left::before, .branch-right::before, .branch-bottom::before {
    content: '🌿';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
}

/* 照片区域 */
.photo-section {
    text-align: center;
    margin: 40px 0;
}

.photo-frame {
    display: inline-block;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
}

.couple-photo {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.photo-frame:hover .couple-photo {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(124, 179, 66, 0.1), rgba(156, 204, 101, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-frame:hover .photo-overlay {
    opacity: 1;
}

/* 邀请文字 */
.invitation-text {
    text-align: center;
    margin: 50px 0;
    color: #2d5016;
}

.invitation-title {
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 30px;
    color: #4a7c23;
    letter-spacing: 4px;
}

.couple-names-main {
    margin: 30px 0;
}

.groom-name, .bride-name {
    font-size: 2rem;
    font-weight: 500;
    color: #2d5016;
    letter-spacing: 3px;
}

.connector {
    font-size: 1.5rem;
    margin: 0 20px;
    color: #7cb342;
}

.invitation-message {
    line-height: 2;
    font-size: 1.1rem;
    color: #4a4a4a;
    max-width: 500px;
    margin: 0 auto;
}

.invitation-message p {
    margin-bottom: 10px;
}

/* 婚礼详情 */
.wedding-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.detail-item {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid #7cb342;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.detail-item:nth-child(1),
.detail-item:nth-child(2) {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    border-left: 4px solid #7cb342 !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 1);
    border-left: 4px solid #8bc34a;
}

.detail-item:nth-child(1):hover,
.detail-item:nth-child(2):hover {
    background: rgba(255, 255, 255, 1) !important;
    border-left: 4px solid #8bc34a !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12) !important;
}

/* 移除复杂的shimmer效果 */
.detail-item::before {
    display: none;
}

.detail-item i {
    font-size: 2rem;
    color: #7cb342;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.detail-item:hover i {
    transform: scale(1.05);
    color: #8bc34a;
}

.detail-item h3 {
    font-size: 1.3rem;
    color: #2d5016;
    margin-bottom: 10px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.detail-item:hover h3 {
    color: #1a2f0c;
}

.detail-item p {
    font-size: 1.1rem;
    color: #4a4a4a;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.detail-item:hover p {
    color: #333;
}

.lunar-date, .venue-detail {
    font-size: 0.9rem;
    color: #7cb342;
    font-style: italic;
    transition: all 0.3s ease;
}

.detail-item:hover .lunar-date,
.detail-item:hover .venue-detail {
    color: #8bc34a;
}

/* 倒计时 */
.countdown-section {
    text-align: center;
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(135deg, #7cb342, #8bc34a);
    border-radius: 20px;
    color: white;
}

.countdown-section h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.time-unit {
    text-align: center;
    min-width: 80px;
}

.time-unit .number {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.time-unit .label {
    font-size: 1rem;
    opacity: 0.9;
    letter-spacing: 1px;
}

/* 交互提示 */
.interaction-hint {
    color: #7cb342;
    font-style: italic;
    opacity: 0.8;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
}

/* 可展开地图 */
.expandable-map {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 30px 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    opacity: 0;
}

.expandable-map.active {
    max-height: 600px;
    opacity: 1;
    padding: 30px;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.map-header h3 {
    color: #2d5016;
    font-size: 1.5rem;
    margin: 0;
}

.close-map {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d5016;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-map:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.interactive-map-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.map-display {
    position: relative;
    height: 300px;
    background: linear-gradient(135deg, #e8f5e8, #d4f2d4);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
}

.map-circle {
    position: absolute;
    background: #7cb342;
    border-radius: 50%;
    opacity: 0.4;
}

.map-line {
    position: absolute;
    height: 2px;
    background: #8bc34a;
    opacity: 0.3;
}

.map-landmark {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.landmark-pin {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, #ff4757, #ff6b7d);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

.landmark-pin i {
    color: white;
    font-size: 20px;
    transform: rotate(45deg);
}

.landmark-info h4 {
    color: #2d5016;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.landmark-info p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.hall-name {
    color: #7cb342;
    font-weight: 600;
    font-size: 1rem;
    display: block;
    margin-top: 8px;
}

.map-plants {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.6;
}

.map-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px 0;
}

.nav-button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #2d5016;
    padding: 16px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Noto Serif SC', serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 智能导航按钮 - 突出显示 */
.nav-smart {
    grid-column: 1 / -1;
    background: #7cb342;
    color: white;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
}

.nav-smart:hover {
    background: #8bc34a;
    color: white;
}

.nav-smart i {
    color: white;
}

/* 其他按钮保持简洁风格 */
.nav-amap i {
    color: #7cb342;
}

.nav-baidu i {
    color: #2196F3;
}

.nav-apple i {
    color: #555;
}

.nav-huawei i {
    color: #f44336;
}

.nav-button i {
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-button span {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 移除所有复杂的动画和渐变效果 */
.nav-button::before {
    display: none;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .map-actions {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 15px 0;
    }
    
    .nav-smart {
        grid-column: 1;
        margin-bottom: 6px;
    }
    
    .nav-button {
        padding: 12px 14px;
        font-size: 0.85rem;
        min-height: 48px; /* 确保触摸目标足够大 */
        justify-content: flex-start; /* 左对齐，更适合手机 */
    }
    
    .nav-button i {
        font-size: 1.1rem;
        width: 18px;
    }
    
    .nav-button span {
        font-weight: 500;
        flex: 1;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .map-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-smart {
        grid-column: 1 / -1;
    }
}

/* 日历交互卡片特殊样式 */
.calendar-interactive {
    background: rgba(124, 179, 66, 0.15);
    border-left: 5px solid #7cb342;
    position: relative;
    overflow: hidden;
}

.calendar-interactive::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(124, 179, 66, 0.1), rgba(139, 195, 74, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calendar-interactive:hover::before {
    opacity: 1;
}

.calendar-interactive:hover {
    background: rgba(124, 179, 66, 0.25);
    border-left: 5px solid #8bc34a;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(124, 179, 66, 0.2);
}

.calendar-interactive .fas.fa-calendar-plus {
    color: #7cb342;
    transition: all 0.3s ease;
}

.calendar-interactive:hover .fas.fa-calendar-plus {
    color: #8bc34a;
    transform: scale(1.1);
}

.wedding-time {
    font-size: 1.2rem;
    font-weight: 600;
    color: #7cb342;
    margin: 5px 0 !important;
}

/* 新增动画效果 */
.heart, .petal {
    position: absolute;
    font-size: 20px;
    animation: fallAndSway 10s linear infinite;
    opacity: 0.8;
    pointer-events: none;
}

.heart-1 { left: 15%; animation-delay: 0s; }
.heart-2 { left: 50%; animation-delay: 3s; }
.heart-3 { left: 85%; animation-delay: 6s; }

.petal-1 { left: 10%; animation-delay: 1s; font-size: 16px; }
.petal-2 { left: 30%; animation-delay: 4s; font-size: 18px; }
.petal-3 { left: 70%; animation-delay: 7s; font-size: 14px; }
.petal-4 { left: 90%; animation-delay: 2s; font-size: 20px; }

@keyframes fallAndSway {
    0% {
        transform: translateY(-100px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* 音乐控制 */
.music-control {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
}

.music-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.music-control.playing {
    background: rgba(124, 179, 66, 0.3);
}

#music-icon {
    animation: none;
}

.music-control.playing #music-icon {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 粒子效果 */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(124, 179, 66, 0.6);
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { 
        transform: translateY(0) scale(0);
        opacity: 0;
    }
    50% { 
        transform: translateY(-50px) scale(1);
        opacity: 1;
    }
}

/* 照片交互 */
.interactive-photo {
    cursor: pointer;
    position: relative;
}

.photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
}

.interactive-photo:hover .photo-overlay {
    opacity: 1;
}

.photo-overlay-content {
    text-align: center;
    color: white;
}

.photo-overlay-content i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* 照片模态框 */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.photo-modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 90%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.photo-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 2001;
}

#modalPhoto {
    max-width: 60%;
    height: auto;
    border-radius: 15px;
}

.photo-info {
    color: white;
    flex: 1;
}

.photo-info h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.photo-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.photo-action-btn {
    background: rgba(124, 179, 66, 0.8);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.photo-action-btn:hover {
    background: rgba(124, 179, 66, 1);
    transform: translateY(-2px);
}

/* 倒计时交互 */
.interactive-countdown {
    cursor: pointer;
    position: relative;
}

.countdown-hint {
    opacity: 0.7;
    font-style: italic;
    margin-top: 10px;
    display: block;
    text-align: center;
}

.click-stats {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.click-counter, .gift-info {
    text-align: center;
    flex: 1;
    padding: 0 10px;
}

.counter-label, .gift-label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.counter-number, .gift-number {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #7cb342;
    font-family: 'Courier New', monospace;
}

.gift-number {
    color: #ff6b6b;
}

.view-codes-container {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.view-codes-btn {
    background: linear-gradient(45deg, #8B4513, #CD853F);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.view-codes-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.4);
    background: linear-gradient(45deg, #A0522D, #DEB887);
}

/* 爱情故事 */
.love-story {
    margin: 30px 0;
    border-radius: 25px;
    padding: 30px;
    transition: all 0.3s ease;
}

.story-title {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #2d5016;
    margin: 0 0 20px 0;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.story-title:hover {
    color: #7cb342;
}

.story-arrow {
    transition: transform 0.3s ease;
}

.story-title.active .story-arrow {
    transform: rotate(180deg);
}

.story-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.story-content.active {
    max-height: 1000px; /* 增加高度限制以支持更多内容 */
}

.story-timeline {
    position: relative;
    padding-left: 30px;
}

.story-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #7cb342, #8bc34a);
}

.story-item {
    position: relative;
    margin-bottom: 30px;
    animation: slideInLeft 0.6s ease forwards;
    opacity: 0;
}

.story-item::before {
    content: '';
    position: absolute;
    left: -23px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #7cb342;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.story-date {
    color: #7cb342;
    font-weight: 600;
    font-size: 0.9rem;
}

.story-text {
    color: #2d5016;
    font-size: 1.1rem;
    margin-top: 5px;
}

.story-description {
    color: #666;
    font-size: 0.9rem;
    margin-top: 8px;
    font-style: italic;
    line-height: 1.4;
}

/* 故事照片样式 */
.story-photos {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.story-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #7cb342;
    box-shadow: 0 2px 8px rgba(124, 179, 66, 0.2);
}

.story-photo:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(124, 179, 66, 0.4);
    border-color: #8bc34a;
}

.story-photo:active {
    transform: scale(0.95);
}

.photo-indicator {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
    opacity: 0.8;
    font-style: italic;
}

/* 照片画廊模态框样式 */
.photo-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.photo-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.photo-gallery-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
}

/* 画廊头部 */
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    position: relative;
    z-index: 2;
}

.gallery-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.photo-counter {
    background: rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.gallery-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 画廊主体 */
.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

.gallery-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-height: 70vh;
    max-width: 90%;
}

.gallery-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.gallery-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    display: none;
}

/* 导航按钮 */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 2;
}

.gallery-prev {
    left: 20px;
}

.gallery-next {
    right: 20px;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* 画廊底部 */
.gallery-footer {
    padding: 20px 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    text-align: center;
    position: relative;
    z-index: 2;
}

.gallery-footer p {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    opacity: 0.9;
}

.gallery-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.gallery-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 缩略图导航 */
.gallery-thumbnails {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    max-width: 90%;
    overflow-x: auto;
    scrollbar-width: none;
    z-index: 3;
}

.gallery-thumbnails::-webkit-scrollbar {
    display: none;
}

.gallery-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.gallery-thumbnail.active {
    border-color: #7cb342;
    transform: scale(1.1);
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-thumbnail:hover img {
    transform: scale(1.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gallery-header {
        padding: 15px 20px;
    }
    
    .gallery-header h3 {
        font-size: 1.2rem;
    }
    
    .gallery-main {
        padding: 10px;
    }
    
    .gallery-nav {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .gallery-prev {
        left: 10px;
    }
    
    .gallery-next {
        right: 10px;
    }
    
    .gallery-footer {
        padding: 15px 20px;
    }
    
    .gallery-actions {
        gap: 10px;
    }
    
    .gallery-action-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .gallery-thumbnails {
        bottom: 70px;
        padding: 10px 15px;
        gap: 8px;
    }
    
    .gallery-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .photo-counter {
        padding: 3px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .gallery-header {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .gallery-header h3 {
        font-size: 1rem;
    }
    
    .gallery-nav {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .gallery-thumbnails {
        display: none; /* 在很小的屏幕上隐藏缩略图 */
    }
    
    .gallery-footer p {
        font-size: 1rem;
    }
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
}

/* 祝福留言 */
.blessing-section {
    margin: 30px 0;
    border-radius: 25px;
    padding: 30px;
}

.blessing-form {
    margin-bottom: 30px;
}

.blessing-input, .blessing-textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(124, 179, 66, 0.3);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.8);
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.blessing-textarea {
    min-height: 100px;
    resize: vertical;
}

.blessing-input:focus, .blessing-textarea:focus {
    outline: none;
    border-color: #7cb342;
    box-shadow: 0 0 10px rgba(124, 179, 66, 0.3);
}

.blessing-button {
    background: linear-gradient(45deg, #7cb342, #8bc34a);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Noto Serif SC', serif;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.blessing-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 179, 66, 0.4);
}

.blessing-list {
    max-height: 300px;
    overflow-y: auto;
}

.blessing-item {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    animation: fadeInUp 0.5s ease;
}

.blessing-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.blessing-name {
    font-weight: 600;
    color: #2d5016;
}

.blessing-time {
    color: #7cb342;
    font-size: 0.9rem;
}

.blessing-text {
    color: #4a4a4a;
    line-height: 1.6;
}

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

/* 分享功能 */
.share-section {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.share-button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.share-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.share-menu {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    min-width: 120px;
}

.share-menu.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

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

.share-option {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d5016;
}

.share-option:hover {
    background: rgba(124, 179, 66, 0.2);
}

/* 主题切换 */
.theme-switcher {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
}

.theme-switcher:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* 夜间模式 */
body.dark-theme {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 25%, #0f3460 50%, #0e4b99 75%, #2e8b57 100%);
}

.dark-theme .glass-effect {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.dark-theme .invitation-content {
    background: rgba(255, 255, 255, 0.15);
}

.dark-theme .detail-item {
    background: rgba(255, 255, 255, 0.1);
}

/* 夜间模式文字配色修复 */
.dark-theme .invitation-text,
.dark-theme .invitation-title,
.dark-theme .groom-name,
.dark-theme .bride-name,
.dark-theme .detail-item h3,
.dark-theme .detail-item p,
.dark-theme .story-title,
.dark-theme .story-text,
.dark-theme .story-date {
    color: #ffffff !important;
}

.dark-theme .invitation-message,
.dark-theme .invitation-message p {
    color: #e0e0e0 !important;
}

.dark-theme .connector {
    color: #8bc34a !important;
}

.dark-theme .detail-item {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.dark-theme .detail-item:hover {
    background: rgba(255, 255, 255, 0.25) !important;
}

.dark-theme .lunar-date,
.dark-theme .venue-detail {
    color: #aed581 !important;
}

.dark-theme .story-description {
    color: #b0b0b0 !important;
}

.dark-theme .love-story {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-theme .click-stats {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark-theme .counter-label,
.dark-theme .gift-label {
    color: #d0d0d0 !important;
}

.dark-theme .expandable-map {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.dark-theme .map-header h3 {
    color: #ffffff !important;
}

.dark-theme .close-map {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.2);
}

.dark-theme .nav-button {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
}

.dark-theme .nav-button:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff !important;
}

.dark-theme .nav-smart {
    background: #7cb342;
    color: white !important;
}

.dark-theme .photo-info h3,
.dark-theme .photo-info p {
    color: #ffffff !important;
}

/* 夜间模式祝福区域配色修复 */
.dark-theme .blessing-section h3 {
    color: #ffffff !important;
}

.dark-theme .blessing-item {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.dark-theme .blessing-name {
    color: #ffffff !important;
}

.dark-theme .blessing-time {
    color: #aed581 !important;
}

.dark-theme .blessing-text {
    color: #e0e0e0 !important;
}

.dark-theme .blessing-input,
.dark-theme .blessing-textarea {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.dark-theme .blessing-input::placeholder,
.dark-theme .blessing-textarea::placeholder {
    color: #b0b0b0 !important;
}

.dark-theme .blessing-input:focus,
.dark-theme .blessing-textarea:focus {
    border-color: #8bc34a !important;
    box-shadow: 0 0 10px rgba(139, 195, 74, 0.4) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
        letter-spacing: 4px;
    }
    
    .couple-names {
        flex-direction: column;
        gap: 10px;
    }
    
    .groom, .bride {
        font-size: 1.8rem;
    }
    
    .invitation-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .invitation-title {
        font-size: 2rem;
    }
    
    .groom-name, .bride-name {
        font-size: 1.5rem;
    }
    
    .countdown {
        gap: 15px;
    }
    
    .time-unit .number {
        font-size: 2rem;
    }
    
    .click-stats {
        padding: 15px;
    }
    
    .stats-row {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .click-counter, .gift-info {
        padding: 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }
    
    .view-codes-btn {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    .interactive-map-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .map-display {
        height: 250px;
    }
    
    .map-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .nav-button {
        padding: 12px 14px;
        font-size: 0.85rem;
        min-height: 46px;
    }
    
    .nav-smart {
        grid-column: 1 / -1;
        margin-bottom: 6px;
    }
}

@media (max-width: 480px) {
    .forest-frame {
        padding: 40px 20px;
    }
    
    .main-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }
    
    .invitation-content {
        padding: 20px 15px;
    }
    
    .wedding-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .detail-item {
        padding: 20px;
    }
    
    /* 超小屏幕地图按钮优化 */
    .interactive-map-container {
        padding: 12px;
    }
    
    .map-display {
        height: 180px;
    }
    
    .map-actions {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 12px 0;
    }
    
    .nav-button {
        padding: 10px 12px;
        font-size: 0.8rem;
        min-height: 44px;
        border-radius: 6px;
    }
    
    .nav-button i {
        font-size: 1rem;
        width: 16px;
    }
    
    .nav-button span {
        font-size: 0.8rem;
    }
    
    .nav-smart {
        margin-bottom: 4px;
        font-size: 0.85rem;
        padding: 12px 14px;
    }
}

/* 新增动画效果 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px) translateY(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(5px) translateY(2px); }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* 点击计数器样式 */
#clickCounter {
    animation: pulse 2s infinite;
}

#clickCounter:hover {
    background: rgba(124, 179, 66, 0.1) !important;
    border-color: rgba(124, 179, 66, 0.5) !important;
}

/* 炉石传说风格动画 */
@keyframes goldenSparkle {
    0% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    100% {
        opacity: 0;
        transform: scale(0) rotate(360deg);
    }
}

@keyframes legendaryShake {
    0%, 100% { transform: translateX(0) translateY(0); }
    10% { transform: translateX(-8px) translateY(-4px); }
    20% { transform: translateX(8px) translateY(4px); }
    30% { transform: translateX(-6px) translateY(-2px); }
    40% { transform: translateX(6px) translateY(2px); }
    50% { transform: translateX(-4px) translateY(-1px); }
    60% { transform: translateX(4px) translateY(1px); }
    70% { transform: translateX(-2px) translateY(0px); }
    80% { transform: translateX(2px) translateY(0px); }
    90% { transform: translateX(-1px) translateY(0px); }
}

/* 金色传说特效动画 */
@keyframes legendaryHalo {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
        box-shadow: 0 0 0 #FFD700, inset 0 0 0 #FFD700;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
        box-shadow: 0 0 50px #FFD700, inset 0 0 50px #FFD700;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 0.3;
        box-shadow: 0 0 30px #FFD700, inset 0 0 30px #FFD700;
    }
}

@keyframes rotateBeam {
    0% {
        transform: rotate(0deg) scale(0);
        opacity: 0;
    }
    25% {
        transform: rotate(90deg) scale(1);
        opacity: 1;
    }
    75% {
        transform: rotate(270deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) scale(0);
        opacity: 0;
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.5) rotate(180deg);
    }
}

/* 特效提示动画 */
@keyframes effectNotification {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1.1);
    }
    25% {
        transform: translateX(-50%) translateY(0) scale(1);
    }
    85% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px) scale(0.8);
    }
}

/* 获奖弹窗动画 */
@keyframes giftWinAppear {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(2deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-20px) scale(1.1);
    }
    60% {
        transform: translateY(-10px) scale(1.05);
    }
}

/* 优化兑换码弹窗样式 */
.gift-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.4s ease;
}

.gift-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 600px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: giftModalAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(124, 179, 66, 0.3);
}

@keyframes giftModalAppear {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #7cb342, #8bc34a);
    color: white;
    padding: 25px 30px;
    border-radius: 25px 25px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.modal-header h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 1;
    position: relative;
}

.modal-header .close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1;
    position: relative;
    backdrop-filter: blur(10px);
}

.modal-header .close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.modal-body {
    padding: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

/* 兑换码卡片样式 */
.gift-code-card {
    background: linear-gradient(135deg, #fff 0%, #f1f8e9 100%);
    border: 2px solid #7cb342;
    border-radius: 15px;
    padding: 20px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(124, 179, 66, 0.1);
}

.gift-code-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(124, 179, 66, 0.2);
    border-color: #8bc34a;
}

.gift-code-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(124, 179, 66, 0.1), transparent);
    transition: left 0.6s ease;
}

.gift-code-card:hover::before {
    left: 100%;
}

.gift-code-text {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    color: #2d5016;
    text-align: center;
    letter-spacing: 3px;
    margin: 10px 0;
    position: relative;
    z-index: 1;
}

.gift-action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.gift-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.4s ease;
}

.gift-action-btn:hover::before {
    left: 100%;
}

.gift-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-copy {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.btn-download {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.btn-qr {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state .empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-state h3 {
    color: #7cb342;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.empty-state p {
    color: #999;
    line-height: 1.6;
}

/* 互动次数动画优化 */
#clickCounter {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

#clickCounter.updating {
    animation: numberPop 0.6s ease;
}

@keyframes numberPop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        color: #FFD700;
        text-shadow: 0 0 10px #FFD700;
    }
    100% {
        transform: scale(1);
    }
}

/* 礼品剩余数量动画 */
#remainingGifts {
    transition: all 0.3s ease;
}

#remainingGifts.low-stock {
    animation: lowStockPulse 2s ease-in-out infinite;
}

@keyframes lowStockPulse {
    0%, 100% {
        transform: scale(1);
        color: #ff9800;
    }
    50% {
        transform: scale(1.05);
        color: #ff5722;
        text-shadow: 0 0 8px #ff9800;
    }
}

/* 性能优化 */
.effect-container,
.effect-container * {
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .gift-modal-content {
        width: 95%;
        margin: 20px;
        border-radius: 20px;
    }
    
    .modal-header {
        padding: 20px;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .gift-code-text {
        font-size: 16px;
        letter-spacing: 2px;
    }
    
    .gift-action-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    /* 减少移动端特效强度以提升性能 */
    .effect-container {
        transform: scale(0.8);
    }
}

/* 基础动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes lightSweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes giftBoxAppear {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes giftPulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.1);
        filter: brightness(1.2) drop-shadow(0 0 20px #FFD700);
    }
}