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

body {
    font-family: 'Noto Serif SC', 'Playfair Display', serif;
    background: #000;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景图层 - 支持用户自定义背景图 */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('./images/background.jpg') center/cover;
    z-index: 0;
}

.background-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(255, 240, 240, 0.95) 0%,
        rgba(255, 235, 235, 0.92) 30%,
        rgba(252, 230, 235, 0.95) 70%,
        rgba(255, 240, 245, 0.97) 100%
    );
}

/* 主容器 */
.container {
    position: relative;
    z-index: 2;
    max-width: 420px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
}

/* 顶部标题区域 */
.header-section {
    padding: 60px 30px 40px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 235, 235, 0.2) 0%, transparent 100%);
}

/* 藤蔓装饰元素 */
.vine-decoration {
    margin: 25px auto;
    width: 200px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vine-decoration.elegant {
    width: 160px;
}

.vine-svg, .blessing-vine, .divider-svg {
    width: 100%;
    height: 100%;
    color: #b8860b;
    opacity: 0.9;
}

.leaf-group path {
    animation: leafSway 4s ease-in-out infinite;
}

.leaf-group path:nth-child(2) {
    animation-delay: -1s;
}

.leaf-group path:nth-child(3) {
    animation-delay: -2s;
}

.leaf-group path:nth-child(4) {
    animation-delay: -3s;
}

@keyframes leafSway {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(2deg); }
    75% { transform: rotate(-2deg); }
}

.main-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 600;
    color: #3c2415;
    margin: 20px 0 15px;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-title .heart {
    color: #d4af37;
    font-size: 0.8em;
    margin: 0 8px;
    animation: heartPulse 2s ease-in-out infinite;
}

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

.wedding-date {
    font-family: 'Noto Serif SC', serif;
    font-size: 18px;
    color: #8b7355;
    font-weight: 400;
    letter-spacing: 2px;
    margin-top: 10px;
}

/* 照片展示区域 */
.photo-section {
    margin: 60px 20px;
    position: relative;
}

.photo-frame {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1);
    background: #fff;
    padding: 20px;
}

/* 藤蔓边框装饰 */
.vine-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.corner-vine {
    position: absolute;
    width: 60px;
    height: 60px;
    color: #d4af37;
    opacity: 0.8;
}

.corner-vine.top-left {
    top: -5px;
    left: -5px;
}

.corner-vine.top-right {
    top: -5px;
    right: -5px;
    transform: scaleX(-1);
}

.corner-vine.bottom-left {
    bottom: -5px;
    left: -5px;
    transform: scaleY(-1);
}

.corner-vine.bottom-right {
    bottom: -5px;
    right: -5px;
    transform: scale(-1, -1);
}

.photo-frame::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    background: linear-gradient(45deg, #E0BFB8, #F3D7CA, #E0BFB8);
    border-radius: 20px;
    padding: 3px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: subtract;
    opacity: 0.4;
    z-index: 0;
}

.photo-container {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #f8f8f8;
    aspect-ratio: 4/3;
    z-index: 2;
}

.couple-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.couple-image:hover {
    transform: scale(1.03);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 35px 25px 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.photo-caption {
    color: white;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 1.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    font-family: 'Noto Serif SC', serif;
}

/* 邀请文案区域 */
.invitation-section {
    padding: 70px 30px;
    text-align: center;
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.12) 0%, 
        rgba(255, 255, 255, 0.25) 50%, 
        rgba(255, 255, 255, 0.12) 100%);
    backdrop-filter: blur(15px);
    margin: 50px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.invitation-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #d4af37, transparent, #d4af37);
    border-radius: 32px;
    z-index: -1;
    opacity: 0.3;
}

.invitation-title {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    font-weight: 500;
    color: #b8860b;
    margin-bottom: 35px;
    font-style: italic;
    letter-spacing: 3px;
}

.invitation-text .main-text {
    font-size: 19px;
    color: #3c2415;
    line-height: 2;
    margin: 12px 0;
    font-weight: 400;
    letter-spacing: 1px;
    font-family: 'Noto Serif SC', serif;
}

/* 藤蔓分割线 */
.divider-vine {
    margin: 35px auto;
    width: 120px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sub-text {
    font-size: 16px;
    color: #8b7355;
    line-height: 1.8;
    font-weight: 300;
    letter-spacing: 0.8px;
    margin: 8px 0;
}

/* 婚礼详情区域 */
.wedding-details {
    padding: 50px 20px;
}

.details-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.detail-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 35px 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    transition: all 0.4s ease;
    position: relative;
}

.detail-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, #d4af37, transparent, #d4af37);
    border-radius: 25px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.detail-card:hover::before {
    opacity: 0.3;
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18);
}

.detail-icon {
    width: 55px;
    height: 55px;
    border-radius: 18px;
    background: linear-gradient(135deg, #d4af37, #f4c842);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
    color: white;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.35);
}

.detail-icon svg {
    width: 26px;
    height: 26px;
}

.detail-content h3 {
    font-size: 19px;
    color: #3c2415;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
}

.detail-main {
    font-size: 17px;
    color: #5d4e37;
    font-weight: 500;
    margin: 5px 0;
}

.detail-sub {
    font-size: 14px;
    color: #8b7355;
    font-weight: 300;
}

/* 祝福区域 */
.blessing-section {
    padding: 70px 30px 90px;
    text-align: center;
}

.blessing-content {
    background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0.18) 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        rgba(255, 255, 255, 0.18) 100%);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    padding: 50px 35px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
}

.blessing-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #d4af37, transparent, #d4af37);
    border-radius: 32px;
    z-index: -1;
    opacity: 0.25;
}

.blessing-text {
    font-size: 19px;
    color: #3c2415;
    line-height: 2;
    margin: 15px 0;
    font-weight: 400;
    letter-spacing: 1px;
    font-family: 'Noto Serif SC', serif;
}

.blessing-note {
    font-size: 15px;
    color: #8b7355;
    font-weight: 300;
    margin-top: 25px;
    letter-spacing: 0.5px;
}

/* 浮动装饰粒子 */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.floating-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #d4af37, transparent);
    border-radius: 50%;
    opacity: 0.6;
    animation: floatUp linear infinite;
}

.floating-particle:nth-child(1) {
    left: 15%;
    animation-duration: 12s;
    animation-delay: 0s;
}

.floating-particle:nth-child(2) {
    left: 35%;
    animation-duration: 15s;
    animation-delay: -3s;
}

.floating-particle:nth-child(3) {
    left: 55%;
    animation-duration: 11s;
    animation-delay: -6s;
}

.floating-particle:nth-child(4) {
    left: 75%;
    animation-duration: 14s;
    animation-delay: -2s;
}

.floating-particle:nth-child(5) {
    left: 25%;
    animation-duration: 13s;
    animation-delay: -5s;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
        transform: translateY(90vh) scale(1) rotate(45deg);
    }
    90% {
        opacity: 0.6;
        transform: translateY(10vh) scale(1) rotate(315deg);
    }
    100% {
        transform: translateY(-10vh) scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 375px) {
    .container {
        max-width: 100%;
    }
    
    .header-section {
        padding: 50px 20px 30px;
    }
    
    .main-title {
        font-size: 32px;
    }
    
    .photo-section {
        margin: 50px 15px;
    }
    
    .invitation-section {
        margin: 40px 15px;
        padding: 60px 25px;
    }
    
    .wedding-details {
        padding: 40px 15px;
    }
    
    .detail-card {
        padding: 30px 25px;
    }
    
    .vine-decoration {
        width: 160px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 500px;
    }
    
    .main-title {
        font-size: 42px;
    }
    
    .details-container {
        flex-direction: row;
        gap: 25px;
    }
    
    .detail-card {
        flex: 1;
        flex-direction: column;
        text-align: center;
    }
    
    .detail-icon {
        margin-right: 0;
        margin-bottom: 20px;
    }
    
    .vine-decoration {
        width: 240px;
    }
    
    .vine-decoration.elegant {
        width: 200px;
    }
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 减少动画（性能优化） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-elements {
        display: none;
    }
    
    .leaf-group path {
        animation: none;
    }
}