* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdf8f8;
    overflow: hidden;
    position: relative;
}

.container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ============ GIFT SECTION ============ */
.gift-section {
    text-align: center;
    z-index: 10;
    transition: all 0.6s ease;
}

.title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: #2c2c2c;
    margin-bottom: 0.5rem;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: #666;
    margin-bottom: 3rem;
    font-weight: 300;
}

.gift-box {
    position: relative;
    width: clamp(160px, 25vw, 240px);
    height: clamp(180px, 28vw, 260px);
    margin: 0 auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gift-box:hover {
    transform: translateY(-5px);
}

.gift-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 70%;
    background: #e8b4b8;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.gift-lid {
    position: absolute;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 105%;
    height: 22%;
    background: #d49499;
    border-radius: 4px 4px 2px 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.6s ease;
}

.gift-bow {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: #c77d83;
    border-radius: 50%;
}

.gift-bow::before,
.gift-bow::after {
    content: '';
    position: absolute;
    width: 35px;
    height: 35px;
    background: #c77d83;
    border-radius: 50%;
    top: 8px;
}

.gift-bow::before {
    left: -30px;
}

.gift-bow::after {
    right: -30px;
}

.gift-shine {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Explosion Animation */
.gift-box.explode .gift-lid {
    transform: translateX(-50%) translateY(-200px) rotate(25deg);
    opacity: 0;
}

.gift-box.explode .gift-body {
    transform: translateX(-50%) scale(0.9);
    opacity: 0;
}

.hint {
    margin-top: 2.5rem;
    color: #999;
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    font-weight: 300;
}

/* ============ MESSAGE SECTION ============ */
.message-section {
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.6s ease;
    padding: 1.5rem;
}

.message-section.show {
    z-index: 500;
    opacity: 1;
    transform: scale(1);
}

.message-card {
    background: #fff;
    border-radius: 8px;
    padding: clamp(2.5rem, 5vw, 3.5rem);
    max-width: 560px;
    width: 90%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.message-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    color: #2c2c2c;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    font-weight: 400;
}

.message-text {
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    color: #555;
    line-height: 1.75;
    margin-bottom: 2rem;
    font-weight: 300;
}

.message-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.signature {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: #666;
    font-style: italic;
    font-weight: 400;
}

/* ============ HEARTS ANIMATION ============ */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.heart {
    position: absolute;
    font-size: 1.2rem;
    animation: heartExplode 2s ease-out forwards;
    pointer-events: none;
}

@keyframes heartExplode {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    50% {
        opacity: 0.9;
    }

    100% {
        transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1);
        opacity: 0;
    }
}

.floating-heart {
    position: absolute;
    bottom: -50px;
    animation: floatUp 8s linear forwards;
    pointer-events: none;
    font-size: 1rem;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }

    10% {
        opacity: 0.3;
    }

    90% {
        opacity: 0.3;
    }

    100% {
        transform: translateY(-100vh) translateX(30px);
        opacity: 0;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .message-card {
        padding: 2rem 1.5rem;
    }

    .title {
        font-size: 1.8rem;
    }

    .gift-box {
        width: 180px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .subtitle {
        font-size: 0.95rem;
    }

    .message-text {
        font-size: 0.95rem;
    }

    .gift-box {
        width: 150px;
        height: 170px;
    }
}