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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f0ff 0%, #e6d5ff 100%);
    color: #4a2970;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

/* 标题样式 */
.header {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 3rem;
    color: #6a1b9a;
    text-shadow: 2px 2px 4px rgba(106, 27, 154, 0.2);
    margin: 0 1rem;
    position: relative;
    display: inline-block;
}

.heart-icon {
    color: #e91e63;
    animation: heartbeat 1.5s infinite;
    display: inline-block;
    transform-origin: center;
}

.hearts {
    display: flex;
    flex-direction: column;
}

.hearts i {
    color: #e91e63;
    margin: 0.3rem;
    opacity: 0.7;
}

.heart1 {
    animation: float 3s ease-in-out infinite;
    font-size: 1.2rem;
}

.heart2 {
    animation: float 4s ease-in-out infinite 0.5s;
    font-size: 1rem;
}

.heart3 {
    animation: float 5s ease-in-out infinite 1s;
    font-size: 0.8rem;
}

/* 日期和计时器样式 */
.love-date {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(106, 27, 154, 0.1);
}

.love-date p {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.highlight {
    color: #9c27b0;
    font-weight: bold;
    background: linear-gradient(120deg, #e1bee7, #ce93d8);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    padding: 0 0.5rem;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(145deg, #9c27b0, #7b1fa2);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(156, 39, 176, 0.3);
    min-width: 80px;
}

.time-block span:first-child {
    font-size: 2.5rem;
    font-weight: bold;
}

.time-label {
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* 恋爱宣言样式 */
.love-declaration {
    margin-bottom: 3rem;
}

.paper {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(106, 27, 154, 0.15);
    position: relative;
    transform: rotate(-1deg);
    transition: transform 0.3s ease;
}

.paper:hover {
    transform: rotate(0deg) scale(1.02);
}

.paper::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background-color: #f3e5f5;
    border-radius: 50%;
    box-shadow: 0 0 0 5px #e1bee7;
    z-index: -1;
}

.paper h2 {
    text-align: center;
    color: #6a1b9a;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.paper p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #4a2970;
    text-align: justify;
}

/* 照片墙样式 */
.gallery {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.photo-frame {
    perspective: 1000px;
}

.polaroid {
    background-color: white;
    padding: 1rem 1rem 2.5rem 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: rotate(var(--rotate, -2deg));
    transition: all 0.3s ease;
    max-width: 250px;
}

.photo-frame:nth-child(2) .polaroid {
    --rotate: 2deg;
}

.photo-frame:nth-child(3) .polaroid {
    --rotate: -1deg;
}

.polaroid:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 10px 25px rgba(106, 27, 154, 0.2);
    z-index: 1;
}

.photo {
    width: 100%;
    height: 200px;
    background-color: #e1bee7;
    margin-bottom: 1rem;
    background-size: cover;
    background-position: center;
    border: 1px solid #f3e5f5;
}

.photo1 {
    background-image: url('https://via.placeholder.com/250x200/9c27b0/ffffff?text=照片1');
}

.photo2 {
    background-image: url('https://via.placeholder.com/250x200/7b1fa2/ffffff?text=照片2');
}

.photo3 {
    background-image: url('https://via.placeholder.com/250x200/6a1b9a/ffffff?text=照片3');
}

.caption {
    text-align: center;
    font-size: 1rem;
    color: #6a1b9a;
}

/* 浮动元素 */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.floating-element {
    position: absolute;
    color: rgba(156, 39, 176, 0.2);
    font-size: 2rem;
    animation: float 10s ease-in-out infinite;
}

.element1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.element2 {
    top: 20%;
    right: 10%;
    animation-delay: 2s;
}

.element3 {
    bottom: 30%;
    left: 15%;
    animation-delay: 4s;
}

.element4 {
    bottom: 10%;
    right: 20%;
    animation-delay: 6s;
}

.element5 {
    top: 50%;
    left: 50%;
    animation-delay: 8s;
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 2rem;
    background-color: rgba(106, 27, 154, 0.1);
    color: #6a1b9a;
    font-size: 1.2rem;
    margin-top: 2rem;
}

/* 动画效果 */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    .timer {
        flex-wrap: wrap;
    }
    
    .time-block {
        min-width: 70px;
        padding: 0.8rem 1rem;
    }
    
    .time-block span:first-child {
        font-size: 2rem;
    }
    
    .gallery {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .love-date p {
        font-size: 1.2rem;
    }
    
    .time-block {
        min-width: 60px;
        padding: 0.6rem 0.8rem;
    }
    
    .time-block span:first-child {
        font-size: 1.5rem;
    }
    
    .paper h2 {
        font-size: 1.5rem;
    }
    
    .paper p {
        font-size: 1rem;
    }
}