body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #fff0f3 0%, #ffd1dc 100%);
    font-family: 'Playfair Display', serif;
    color: #333;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 95%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
    text-align: center;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
}

.photo-frame {
    margin: 20px auto 40px;
    padding: 20px;
    background: linear-gradient(45deg, #fff6f8, #fff);
    box-shadow: 0 10px 30px rgba(255, 182, 193, 0.3);
    width: 90%;
    max-width: 400px;
    border-radius: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.photo-frame::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px solid rgba(255, 20, 147, 0.2);
    border-radius: 10px;
    pointer-events: none;
}

.photo-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 182, 193, 0.4);
}

.photo-container {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
}

.couple-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    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(255, 192, 203, 0.2), rgba(255, 20, 147, 0.1));
    pointer-events: none;
}

h1 {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #ff1493;
    margin: 0 0 40px;
    padding: 0 20px;
    text-shadow: 2px 2px 4px rgba(255, 20, 147, 0.2);
    word-wrap: break-word;
}

.poem {
    text-align: left;
    line-height: 1.8;
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    padding: 25px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 182, 193, 0.3);
    border: 1px solid rgba(255, 182, 193, 0.3);
    margin: 0 10px;
    overflow-x: hidden;
}

.poem p {
    margin: 0 0 25px;
    display: flex;
    flex-direction: row;
    gap: clamp(10px, 2vw, 20px);
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    padding: 0;
}

.poem p:last-child {
    margin-bottom: 0;
}

.poem p span {
    display: inline-block;
    color: #444;
    font-style: italic;
    position: relative;
    line-height: 1.6;
    margin: 5px 0;
}

.poem p span:last-child::after {
    content: '';
}

.ending {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    color: #ff1493;
    text-align: center;
    margin-top: 40px;
    text-shadow: 1px 1px 2px rgba(255, 20, 147, 0.2);
    line-height: 1.4;
}

.ending span::after {
    content: '' !important;
}

.hearts {
    display: flex;
    justify-content: center;
    gap: clamp(15px, 3vw, 20px);
    margin: 40px 0 20px;
    flex-wrap: wrap;
}

.heart {
    width: clamp(15px, 3vw, 20px);
    height: clamp(15px, 3vw, 20px);
    background: #ff1493;
    position: relative;
    transform: rotate(45deg);
    animation: heartbeat 1.5s ease-in-out infinite;
}

.heart:before,
.heart:after {
    content: '';
    width: 100%;
    height: 100%;
    background: #ff1493;
    border-radius: 50%;
    position: absolute;
}

.heart:before {
    top: -50%;
    left: 0;
}

.heart:after {
    top: 0;
    left: -50%;
}

.petal {
    position: fixed;
    top: -10%;
    pointer-events: none;
    z-index: 1000;
    animation: falling linear infinite;
    background-size: 100% 100%;
}

@keyframes heartbeat {
    0% { transform: rotate(45deg) scale(1); }
    25% { transform: rotate(45deg) scale(1.1); }
    50% { transform: rotate(45deg) scale(1); }
    75% { transform: rotate(45deg) scale(1.1); }
    100% { transform: rotate(45deg) scale(1); }
}

@keyframes falling {
    0% {
        transform: translate(0, -10%) rotate(0deg);
    }
    100% {
        transform: translate(100px, 1000%) rotate(360deg);
    }
}

@media (max-width: 600px) {
    .container {
        width: 100%;
        padding: 15px 0;
    }
    
    .photo-frame {
        padding: 15px;
        margin: 15px auto 30px;
    }
    
    .poem {
        padding: 20px 15px;
        margin: 0 10px;
    }
    
    .hearts {
        margin: 30px 0 15px;
    }
}

@media (max-width: 400px) {
    .poem {
        padding: 15px 12px;
    }
    
    .poem p {
        gap: 8px;
    }
    
    .poem p span::after {
        margin-left: 6px;
    }
}