* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5e6e0;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== CLOSED CARD (ENVELOPE) ===== */
.card-envelope {
    position: relative;
    width: clamp(280px, 80vw, 420px);
    height: clamp(220px, 60vh, 320px);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    perspective: 1000px;
}

.card-envelope:hover {
    transform: scale(1.05);
}

.card-envelope.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.3);
}

.envelope-front {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.envelope-body {
    position: absolute;
    width: 100%;
    height: 85%;
    background: linear-gradient(135deg, #ff8888 0%, #ff9999 100%);
    bottom: 0;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.envelope-body::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.15);
}

.envelope-flap {
    position: absolute;
    top: -2%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: clamp(140px, 25vw, 210px) solid transparent;
    border-right: clamp(140px, 25vw, 210px) solid transparent;
    border-top: clamp(120px, 21vh, 180px) solid #d63857;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.3));
    transition: all 0.5s ease;
    z-index: 3;
    cursor: pointer;
}

.card-envelope:hover .envelope-flap {
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.3));
}

.envelope-letter {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    z-index: 2;
    opacity: 0.9;
}

.letter-peek {
    background: #fffacd;
    padding: clamp(8px, 2vw, 12px) clamp(10px, 3vw, 15px);
    border-radius: 5px;
    border: 2px dashed #333;
    text-align: center;
}

.letter-peek p {
    font-size: clamp(12px, 2vw, 16px);
    font-weight: bold;
    color: #003d82;
    margin: 0;
    font-style: italic;
    letter-spacing: 1.5px;
}

.envelope-heart {
    position: absolute;
    top: 3%;
    right: 5%;
    font-size: clamp(24px, 6vw, 36px);
    animation: pulse 1.5s ease-in-out infinite;
    z-index: 4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* ===== OPEN CARD ===== */
.card-open {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease 0.3s;
    z-index: 5;
}

.card-open.visible {
    opacity: 1;
    pointer-events: auto;
}

.card-container {
    perspective: 1000px;
    width: clamp(280px, 75vw, 400px);
    height: clamp(220px, 60vh, 300px);
}

.card-content {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffb6c1 0%, #ffc0cb 100%);
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: clamp(15px, 3vw, 25px);
    animation: cardFlip 0.6s ease-out;
}

@keyframes cardFlip {
    0% {
        opacity: 0;
        transform: rotateY(90deg) scale(0.3);
    }
    100% {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
    }
}

.letter {
    background: white;
    padding: clamp(15px, 5vw, 30px);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: slideIn 0.6s ease-out 0.2s both;
    flex: 0 1 auto;
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.letter p {
    font-size: clamp(18px, 4vw, 32px);
    font-weight: bold;
    color: #ff1493;
    margin: 0.5rem 0;
    letter-spacing: 2px;
    line-height: 1.4;
}

/* ===== BUTTON ===== */
.procced {
    margin-top: 10px;
    animation: slideIn 0.6s ease-out 0.4s both;
}

.procced button {
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    color: white;
    border: none;
    padding: clamp(10px, 2vw, 15px) clamp(20px, 4vw, 30px);
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4);
    letter-spacing: 1px;
}

.procced button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.6);
}

.procced button:active {
    transform: translateY(0);
}

/* ===== LINK BUTTON ===== */
.proceed-btn {
    display: inline-block;
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    color: white;
    text-decoration: none;
    padding: clamp(10px, 2vw, 15px) clamp(20px, 4vw, 30px);
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.4);
    letter-spacing: 1px;
}

.proceed-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.6);
}

.proceed-btn:active {
    transform: translateY(0);
}

/* ===== CLOUDS ===== */
.clouds-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    pointer-events: none;
    z-index: 18;
}

.cloud {
    position: absolute;
    top: 20px;
    background: white;
    border-radius: 100px;
    opacity: 0.85;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.cloud::before,
.cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 100px;
}

.cloud-1 {
    width: clamp(80px, 15vw, 120px);
    height: clamp(40px, 10vw, 60px);
    left: 20%;
    animation: cloudFloat 8s ease-in-out infinite;
}

.cloud-1::before {
    width: clamp(40px, 8vw, 60px);
    height: clamp(40px, 8vw, 60px);
    top: calc(-1 * clamp(15px, 5vw, 25px));
    left: clamp(5px, 2vw, 10px);
}

.cloud-1::after {
    width: clamp(50px, 10vw, 80px);
    height: clamp(35px, 7vw, 50px);
    top: calc(-1 * clamp(12px, 4vw, 20px));
    right: clamp(5px, 2vw, 10px);
}

.cloud-1::before {
    width: clamp(40px, 8vw, 60px);
    height: clamp(40px, 8vw, 60px);
    top: calc(-1 * clamp(15px, 5vw, 25px));
    left: clamp(5px, 2vw, 10px);
}

.cloud-1::after {
    width: clamp(50px, 10vw, 80px);
    height: clamp(35px, 7vw, 50px);
    top: calc(-1 * clamp(12px, 4vw, 20px));
    right: clamp(5px, 2vw, 10px);
}

.cloud-2 {
    width: clamp(70px, 13vw, 100px);
    height: clamp(35px, 8vw, 50px);
    right: 15%;
    top: clamp(30px, 8vh, 50px);
    animation: cloudFloat 10s ease-in-out infinite reverse;
}

.cloud-2::before {
    width: clamp(35px, 7vw, 50px);
    height: clamp(35px, 7vw, 50px);
    top: calc(-1 * clamp(12px, 4vw, 20px));
    left: clamp(10px, 2vw, 15px);
}

.cloud-2::after {
    width: clamp(40px, 8vw, 60px);
    height: clamp(30px, 6vw, 45px);
    top: calc(-1 * clamp(10px, 3vw, 15px));
    right: clamp(3px, 1vw, 5px);
}

.cloud-3 {
    width: clamp(90px, 17vw, 130px);
    height: clamp(45px, 11vw, 65px);
    left: 40%;
    top: clamp(60px, 12vh, 80px);
    animation: cloudFloat 12s ease-in-out infinite;
}

.cloud-3::before {
    width: clamp(50px, 9vw, 70px);
    height: clamp(50px, 9vw, 70px);
    top: calc(-1 * clamp(18px, 6vw, 28px));
    left: clamp(15px, 3vw, 20px);
}

.cloud-3::after {
    width: clamp(60px, 12vw, 90px);
    height: clamp(45px, 8vw, 60px);
    top: calc(-1 * clamp(15px, 5vw, 25px));
    right: clamp(10px, 2vw, 15px);
}

.cloud-4 {
    width: clamp(75px, 14vw, 110px);
    height: clamp(40px, 9vw, 55px);
    right: 25%;
    top: clamp(10px, 5vh, 30px);
    animation: cloudFloat 15s ease-in-out infinite reverse;
}

.cloud-4::before {
    width: clamp(45px, 8vw, 65px);
    height: clamp(45px, 8vw, 65px);
    top: calc(-1 * clamp(16px, 5vw, 24px));
    left: clamp(12px, 2vw, 18px);
}

.cloud-4::after {
    width: clamp(55px, 11vw, 80px);
    height: clamp(40px, 7vw, 55px);
    top: calc(-1 * clamp(13px, 4vw, 20px));
    right: clamp(8px, 2vw, 12px);
}

.cloud-5 {
    width: clamp(65px, 12vw, 95px);
    height: clamp(35px, 8vw, 48px);
    left: 60%;
    top: clamp(45px, 10vh, 65px);
    animation: cloudFloat 11s ease-in-out infinite reverse;
}

.cloud-5::before {
    width: clamp(38px, 7vw, 55px);
    height: clamp(38px, 7vw, 55px);
    top: calc(-1 * clamp(14px, 5vw, 22px));
    left: clamp(8px, 2vw, 12px);
}

.cloud-5::after {
    width: clamp(48px, 9vw, 70px);
    height: clamp(35px, 6vw, 48px);
    top: calc(-1 * clamp(12px, 4vw, 18px));
    right: clamp(6px, 1vw, 10px);
}

@keyframes cloudFloat {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(30px);
    }
}

/* ===== FALLING ROSES ===== */
.roses-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 15;
}

.rose {
    position: absolute;
    font-size: 32px;
    animation: roseFall 4s linear forwards;
    top: 100px;
}

@keyframes roseFall {
    0% {
        top: 100px;
        opacity: 1;
        transform: translateX(0) rotateZ(0deg);
    }
    100% {
        top: 100vh;
        opacity: 0;
        transform: translateX(var(--drift, 0)) rotateZ(360deg);
    }
}

/* ===== FLOATING HEARTS ===== */
.hearts-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 20;
}

.heart {
    position: absolute;
    font-size: 24px;
    animation: heartFloat 2s ease-in forwards, heartFade 2s ease-in forwards;
}

@keyframes heartFloat {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(var(--tx, 0)) scale(0);
        opacity: 0;
    }
}

@keyframes heartFade {
    0% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.heart.burst {
    animation: heartBurst 0.6s ease-out forwards;
}

@keyframes heartBurst {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}
