* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', 'Dancing Script', 'Great Vibes', serif;
    overflow-x: hidden;
    height: 100vh;
}

.background {
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #ffb3d9 0%, #ff99cc 50%, #ff80b3 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 20px;
}

.wall-text {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3em;
    font-family: 'Dancing Script', cursive;
    color: #ff0066;
    text-shadow: 2px 2px 8px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 0, 102, 0.5);
    font-weight: 700;
    letter-spacing: 3px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.8;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.05);
    }
}

.envelope-container {
    perspective: 1200px;
    position: relative;
    z-index: 10;
}

.envelope {
    width: 450px;
    height: 320px;
    position: relative;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.envelope-front,
.envelope-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px 15px 8px 8px;
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 50%, #ad1457 100%);
}

.envelope-front {
    border: 4px solid #880e4f;
    box-shadow: 
        0 15px 40px rgba(233, 30, 99, 0.4),
        inset 0 0 30px rgba(255, 255, 255, 0.1);
    z-index: 2;
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 50%, #ad1457 100%);
}

.envelope-back {
    background: linear-gradient(135deg, #c2185b 0%, #ad1457 100%);
    border: 4px solid #880e4f;
    transform: rotateX(180deg);
    backface-visibility: hidden;
    border-radius: 15px 15px 8px 8px;
}

.envelope-flap {
    position: absolute;
    top: -5px;
    left: -5px;
    width: calc(100% + 10px);
    height: 55%;
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 50%, #ad1457 100%);
    border: 4px solid #880e4f;
    border-bottom: none;
    border-radius: 50% 50% 15px 15px;
    transform-origin: top center;
    transition: transform 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 3;
    box-shadow: 
        0 -8px 25px rgba(0, 0, 0, 0.3),
        inset 0 10px 20px rgba(255, 255, 255, 0.15);
}

.envelope-flap::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 50%;
}

.hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    padding: 25px;
    z-index: 1;
}

.heart {
    font-size: 2.5em;
    animation: floatRomantic 4s ease-in-out infinite;
    opacity: 0.9;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.5));
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.heart:nth-child(1) { animation-delay: 0s; }
.heart:nth-child(2) { animation-delay: 0.5s; }
.heart:nth-child(3) { animation-delay: 1s; }
.heart:nth-child(4) { animation-delay: 1.5s; }
.heart:nth-child(5) { animation-delay: 0.3s; }
.heart:nth-child(6) { animation-delay: 0.8s; }
.heart:nth-child(7) { animation-delay: 1.3s; }
.heart:nth-child(8) { animation-delay: 1.8s; }

@keyframes floatRomantic {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
        opacity: 0.9;
    }
    25% {
        transform: translateY(-8px) rotate(-5deg) scale(1.05);
        opacity: 1;
    }
    50% {
        transform: translateY(-15px) rotate(0deg) scale(1.1);
        opacity: 0.95;
    }
    75% {
        transform: translateY(-8px) rotate(5deg) scale(1.05);
        opacity: 1;
    }
}

.letter {
    position: absolute;
    width: 92%;
    height: 88%;
    background: linear-gradient(to bottom, #fffef9 0%, #fffbf0 100%);
    border: 3px solid #ffb3d9;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 
        0 8px 30px rgba(233, 30, 99, 0.3),
        inset 0 0 50px rgba(255, 182, 193, 0.1);
    z-index: 1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(250px) scale(0.9);
    opacity: 0;
    transition: all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-content {
    text-align: center;
    width: 100%;
}

.message {
    font-size: 1.5em;
    font-family: 'Dancing Script', cursive;
    color: #8b1538;
    line-height: 2;
    font-weight: 600;
    word-spacing: 3px;
    letter-spacing: 1.5px;
    margin-bottom: 35px;
    text-shadow: 1px 1px 2px rgba(255, 182, 193, 0.3);
}

.buttons-container {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-top: 30px;
    align-items: center;
}

.yes-btn, .no-btn {
    padding: 18px 45px;
    font-size: 1.4em;
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
}

.yes-btn {
    background: linear-gradient(135deg, #ff0066 0%, #ff3399 50%, #ff66b3 100%);
    color: white;
    border-radius: 50px 50px 50px 15px;
    clip-path: polygon(
        0% 0%, 
        85% 0%, 
        100% 15%, 
        100% 85%, 
        100% 100%, 
        15% 100%, 
        0% 85%, 
        0% 15%
    );
    transform: rotate(-2deg);
}

.yes-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}

.yes-btn:hover::before {
    top: 50%;
    left: 50%;
}

.yes-btn:hover {
    transform: rotate(0deg) scale(1.15);
    box-shadow: 0 12px 35px rgba(255, 0, 102, 0.6);
}

.btn-heart {
    font-size: 1.3em;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.no-btn {
    background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
    color: #555;
    border-radius: 50px 50px 15px 50px;
    clip-path: polygon(
        15% 0%, 
        100% 0%, 
        100% 85%, 
        85% 100%, 
        0% 100%, 
        0% 15%
    );
    transform: rotate(2deg);
}

.no-btn:hover {
    transform: rotate(0deg) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Floating hearts in background */
#floating-hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 2em;
    opacity: 0.7;
    animation: floatUp 8s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) translateX(50px) rotate(360deg);
        opacity: 0;
    }
}

/* Couples Animation */
.couples-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(255, 179, 217, 0.98) 0%, rgba(255, 153, 204, 0.98) 50%, rgba(255, 128, 179, 0.98) 100%);
    overflow: hidden;
}

.couples-container.show {
    display: flex;
    animation: romanticFadeIn 1s ease;
}

@keyframes romanticFadeIn {
    0% {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    100% {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.celebration-title {
    font-family: 'Dancing Script', cursive;
    font-size: 4em;
    color: #ff0066;
    font-weight: 700;
    text-shadow: 3px 3px 8px rgba(255, 255, 255, 0.9), 0 0 30px rgba(255, 0, 102, 0.6);
    margin-bottom: 30px;
    animation: titleAppear 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s backwards;
    letter-spacing: 3px;
}

@keyframes titleAppear {
    0% {
        transform: translateY(-50px) scale(0);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.couple-wrapper {
    display: flex;
    align-items: center;
    gap: 60px;
    animation: elegantSlideIn 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes elegantSlideIn {
    0% {
        transform: translateY(150px) scale(0.8);
        opacity: 0;
    }
    60% {
        transform: translateY(-10px) scale(1.05);
        opacity: 0.9;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.person {
    text-align: center;
    animation: gentleFloat 3s ease-in-out infinite;
    background: rgba(255, 255, 255, 0.3);
    padding: 40px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 40px rgba(233, 30, 99, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.person:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 50px rgba(233, 30, 99, 0.5);
}

.person.groom {
    animation-delay: 0s;
}

.person.bride {
    animation-delay: 0.4s;
}

@keyframes gentleFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(2deg);
    }
}

.person-emoji {
    font-size: 10em;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 15px rgba(255, 0, 102, 0.4));
    animation: emojiGlow 2s ease-in-out infinite;
}

@keyframes emojiGlow {
    0%, 100% {
        filter: drop-shadow(0 5px 15px rgba(255, 0, 102, 0.4));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 8px 25px rgba(255, 0, 102, 0.7));
        transform: scale(1.05);
    }
}

.person-name {
    font-size: 3em;
    font-family: 'Dancing Script', cursive;
    color: #ff0066;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(255, 255, 255, 0.9), 0 0 20px rgba(255, 0, 102, 0.5);
    margin-bottom: 10px;
}

.person-title {
    font-size: 1.5em;
    font-family: 'Dancing Script', cursive;
    color: #c2185b;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(255, 255, 255, 0.8);
}

.heart-between {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.heart-ring {
    font-size: 3em;
    animation: ringSpin 2s ease-in-out infinite;
    filter: drop-shadow(0 3px 10px rgba(255, 215, 0, 0.6));
}

@keyframes ringSpin {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
}

.heart-main {
    font-size: 5em;
    animation: heartPulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 5px 20px rgba(255, 0, 102, 0.6));
}

@keyframes heartPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 5px 20px rgba(255, 0, 102, 0.6));
    }
    50% {
        transform: scale(1.3);
        filter: drop-shadow(0 8px 30px rgba(255, 0, 102, 0.9));
    }
}

.forever-text {
    font-family: 'Dancing Script', cursive;
    font-size: 3em;
    color: #ff0066;
    font-weight: 700;
    text-shadow: 2px 2px 6px rgba(255, 255, 255, 0.9), 0 0 25px rgba(255, 0, 102, 0.5);
    margin-top: 40px;
    animation: foreverAppear 1s ease 1.5s backwards;
    letter-spacing: 2px;
}

@keyframes foreverAppear {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No Response Popup */
.no-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.no-popup-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.no-popup-box {
    background: #dc143c;
    border: 5px solid #8b0000;
    border-radius: 20px;
    padding: 50px 80px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0);
    animation: popupOpen 0.5s ease forwards;
}

@keyframes popupOpen {
    0% {
        transform: scale(0) rotate(-180deg);
    }
    50% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.no-popup-content {
    text-align: center;
}

.no-message {
    font-size: 4em;
    color: white;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-20px);
    }
    75% {
        transform: translateX(20px);
    }
}

/* Envelope opened state */
.envelope.opened .envelope-flap {
    transform: rotateX(-175deg) translateZ(10px);
}

.envelope.opened .letter {
    transform: translate(-50%, -50%) translateY(0) scale(1);
    opacity: 1;
    z-index: 4;
    animation: letterAppear 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes letterAppear {
    0% {
        transform: translate(-50%, -50%) translateY(250px) scale(0.8);
        opacity: 0;
    }
    60% {
        transform: translate(-50%, -50%) translateY(-10px) scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) translateY(0) scale(1);
        opacity: 1;
    }
}

.envelope.opened {
    transform: scale(1.15);
}

/* Hover effect */
.envelope:not(.opened):hover {
    transform: scale(1.08) translateY(-5px);
}

.envelope:not(.opened):hover .envelope-flap {
    transform: rotateX(-8deg);
    box-shadow: 
        0 -10px 30px rgba(233, 30, 99, 0.4),
        inset 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* Responsive design */
@media (max-width: 768px) {
    .envelope {
        width: 320px;
        height: 240px;
    }
    
    .wall-text {
        font-size: 2em;
        top: 20px;
        font-family: 'Dancing Script', cursive;
    }
    
    .message {
        font-size: 1.2em;
        font-family: 'Dancing Script', cursive;
    }
    
    .letter {
        padding: 25px;
    }
    
    .yes-btn, .no-btn {
        padding: 14px 32px;
        font-size: 1.2em;
        font-family: 'Dancing Script', cursive;
    }
    
    .celebration-title {
        font-size: 2.5em;
    }
    
    .person {
        padding: 25px;
    }
    
    .person-emoji {
        font-size: 6em;
    }
    
    .person-name {
        font-size: 2em;
        font-family: 'Dancing Script', cursive;
    }
    
    .person-title {
        font-size: 1.2em;
    }
    
    .heart-ring {
        font-size: 2em;
    }
    
    .heart-main {
        font-size: 3em;
    }
    
    .couple-wrapper {
        gap: 30px;
        flex-direction: column;
    }
    
    .forever-text {
        font-size: 2em;
    }
    
    .no-message {
        font-size: 3em;
        font-family: 'Dancing Script', cursive;
    }
    
    .no-popup-box {
        padding: 40px 60px;
    }
}
