/* ====================================
   GLOBAL STYLES & RESET
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ====================================
   FLOATING HEARTS BACKGROUND
   ==================================== */
.hearts-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 24px;
    opacity: 0;
    animation: floatUp 8s ease-in-out infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* ====================================
   MAIN CONTAINER
   ==================================== */
.container {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
    max-width: 600px;
    width: 100%;
}

/* ====================================
   GIFT BOX ANIMATION (PAGE 1)
   ==================================== */
.gift-box {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    animation: bounceIn 1s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.gift-box.open .gift-lid {
    animation: openLid 1s ease-out forwards;
    transform-origin: bottom;
}

@keyframes openLid {
    0% {
        transform: rotateX(0deg) translateY(0);
    }
    100% {
        transform: rotateX(-120deg) translateY(-50px);
    }
}

.gift-body {
    width: 200px;
    height: 140px;
    background: linear-gradient(135deg, #ff6b9d, #ffc3a0);
    border-radius: 10px;
    position: absolute;
    bottom: 0;
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.4);
}

.gift-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 100%;
    background: linear-gradient(135deg, #ff8fab, #ffd4ba);
}

.gift-body::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 30px;
    background: linear-gradient(135deg, #ff8fab, #ffd4ba);
}

.gift-lid {
    width: 210px;
    height: 60px;
    background: linear-gradient(135deg, #ff5e8a, #ffb08a);
    border-radius: 10px;
    position: absolute;
    top: -20px;
    left: -5px;
    box-shadow: 0 5px 20px rgba(255, 94, 138, 0.4);
    z-index: 2;
}

.bow {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
}

.bow::before,
.bow::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 40px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-radius: 50% 50% 0 50%;
    box-shadow: 0 3px 15px rgba(255, 215, 0, 0.5);
}

.bow::before {
    left: 0;
    transform: rotate(-45deg);
}

.bow::after {
    right: 0;
    transform: rotate(45deg) scaleX(-1);
}

/* ====================================
   PROPOSAL CONTENT (PAGE 1)
   ==================================== */
.proposal-content {
    opacity: 0;
    transform: scale(0.8);
    transition: all 1s ease;
}

.proposal-content.show {
    opacity: 1;
    transform: scale(1);
}

.main-title {
    font-size: 80px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.question {
    font-family: 'Pacifico', cursive;
    font-size: 36px;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
    line-height: 1.4;
}

/* ====================================
   BUTTONS
   ==================================== */
.buttons-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.btn {
    padding: 18px 45px;
    font-size: 22px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-yes {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
    position: relative;
    z-index: 1;
}

.btn-yes:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(245, 87, 108, 0.4);
}

.btn-no {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    position: relative;
    z-index: 1;
}

.btn-no:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(118, 75, 162, 0.4);
}

/* ====================================
   PAGE 2 - SECOND CHANCE
   ==================================== */
.page2-body {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.page2-container {
    max-width: 700px;
}

.sad-content {
    position: relative;
}

.sad-title {
    font-family: 'Pacifico', cursive;
    font-size: 42px;
    color: #764ba2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.sad-image {
    width: 300px;
    height: 300px;
    margin: 0 auto 30px;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: shakeSad 2s ease-in-out infinite;
}

@keyframes shakeSad {
    0%, 100% {
        transform: translateX(0) rotate(0deg);
    }
    25% {
        transform: translateX(-5px) rotate(-2deg);
    }
    75% {
        transform: translateX(5px) rotate(2deg);
    }
}

.sad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.second-chance {
    margin-top: 40px;
    position: relative;
}

.second-chance-text {
    font-family: 'Pacifico', cursive;
    font-size: 30px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 
                 0 4px 16px rgba(0, 0, 0, 0.5),
                 0 0 30px rgba(118, 75, 162, 0.8);
    margin-bottom: 30px;
    line-height: 1.5;
    background: rgba(118, 75, 162, 0.3);
    padding: 20px 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.hover-image {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 1000;
}

.hover-image.show {
    opacity: 1;
    animation: popIn 0.5s ease;
}

@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.hover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ====================================
   PAGE 3 - CELEBRATION
   ==================================== */
.celebration-body {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%);
    overflow: hidden;
}

#fireworksCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.celebration-hearts {
    z-index: 5;
}

.celebration-container {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.celebration-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 60px 40px;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: fadeInScale 1s ease;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.celebration-title {
    font-family: 'Pacifico', cursive;
    font-size: 64px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.5);
    margin-bottom: 20px;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.5);
    }
    50% {
        text-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.8);
    }
}

.celebration-subtitle {
    font-family: 'Pacifico', cursive;
    font-size: 42px;
    color: #ff6b9d;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

.celebration-photo {
    width: 320px;
    height: 320px;
    margin: 30px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 10px solid rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5), 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: photoReveal 1.5s ease-out, photoGlow 3s ease-in-out infinite;
}

@keyframes photoReveal {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    60% {
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes photoGlow {
    0%, 100% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.5), 0 15px 50px rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 215, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 60px rgba(255, 215, 0, 0.8), 0 15px 50px rgba(255, 107, 157, 0.5);
        border-color: rgba(255, 107, 157, 0.8);
    }
}

.celebration-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.celebration-message {
    margin: 30px 0;
}

.celebration-message p {
    font-size: 24px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 15px 0;
    font-weight: 300;
}

.hearts-burst {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.burst-heart {
    font-size: 40px;
    animation: burstAnimation 2s ease-in-out infinite;
    display: inline-block;
}

.burst-heart:nth-child(1) { animation-delay: 0s; }
.burst-heart:nth-child(2) { animation-delay: 0.2s; }
.burst-heart:nth-child(3) { animation-delay: 0.4s; }
.burst-heart:nth-child(4) { animation-delay: 0.6s; }
.burst-heart:nth-child(5) { animation-delay: 0.8s; }
.burst-heart:nth-child(6) { animation-delay: 1s; }
.burst-heart:nth-child(7) { animation-delay: 1.2s; }
.burst-heart:nth-child(8) { animation-delay: 1.4s; }

@keyframes burstAnimation {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.3) rotate(180deg);
    }
}

.btn-replay {
    background: linear-gradient(135deg, #ffd700, #ff6b9d);
    color: white;
    margin-top: 30px;
}

.btn-replay:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 107, 157, 0.5);
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */
@media (max-width: 768px) {
    .question {
        font-size: 28px;
    }

    .sad-title {
        font-size: 32px;
    }

    .second-chance-text {
        font-size: 24px;
    }

    .btn {
        padding: 15px 35px;
        font-size: 18px;
    }

    .gift-box {
        width: 150px;
        height: 150px;
    }

    .gift-body {
        width: 150px;
        height: 105px;
    }

    .gift-lid {
        width: 158px;
        height: 45px;
    }

    .sad-image,
    .hover-image {
        width: 240px;
        height: 240px;
    }

    .celebration-title {
        font-size: 48px;
    }

    .celebration-subtitle {
        font-size: 32px;
    }

    .celebration-photo {
        width: 260px;
        height: 260px;
    }

    .celebration-message p {
        font-size: 20px;
    }

    .celebration-content {
        padding: 40px 25px;
    }
}

@media (max-width: 480px) {
    .question {
        font-size: 24px;
    }

    .sad-title {
        font-size: 26px;
    }

    .second-chance-text {
        font-size: 20px;
    }

    .buttons-container {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .main-title {
        font-size: 60px;
    }

    .celebration-title {
        font-size: 40px;
    }

    .celebration-subtitle {
        font-size: 26px;
    }

    .celebration-photo {
        width: 220px;
        height: 220px;
        border-width: 6px;
    }

    .burst-heart {
        font-size: 32px;
    }
}