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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #ffeef8 0%, #ffe5f1 25%, #ffd6e8 50%, #ffc9e3 75%, #ffb8db 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* ===== FLOATING HEARTS BACKGROUND ===== */
.hearts-background {
    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 infinite;
}

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

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

/* ===== SCREEN TRANSITIONS ===== */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.screen.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

/* ===== FADE IN ANIMATION ===== */
.fade-in {
    animation: fadeInScale 1s ease forwards;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ===== CARD (SCREEN 1) ===== */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 60px 40px;
    box-shadow: 
        0 20px 60px rgba(255, 105, 180, 0.25),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    text-align: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.card-header {
    margin-bottom: 50px;
}

.heart-icon {
    font-size: 80px;
    margin-bottom: 20px;
    display: inline-block;
    animation: heartBeat 1.5s ease infinite;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.main-question {
    font-family: 'Playfair Display', serif;
    font-size: 48px;
    font-weight: 700;
    color: #d81b60;
    margin-bottom: 16px;
    line-height: 1.2;
}

.sub-question {
    font-family: 'Dancing Script', cursive;
    font-size: 28px;
    font-weight: 500;
    color: #ec407a;
    line-height: 1.4;
}

/* ===== BUTTONS ===== */
.buttons-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.btn {
    border: none;
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 20px;
    font-weight: 600;
    padding: 20px 40px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn:active {
    transform: scale(0.95);
}

/* YES BUTTON */
.btn-yes {
    background: linear-gradient(135deg, #ff4d8d 0%, #ff1744 100%);
    color: white;
    box-shadow: 
        0 8px 24px rgba(255, 77, 141, 0.4),
        0 4px 12px rgba(255, 23, 68, 0.3);
}

.btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(255, 77, 141, 0.5),
        0 6px 16px rgba(255, 23, 68, 0.4);
}

.btn-yes::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-yes:hover::before {
    left: 100%;
}

.btn-icon {
    font-size: 24px;
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* NO BUTTON */
.btn-no {
    background: #f5f5f5;
    color: #757575;
    font-size: 16px;
    padding: 14px 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-no:hover {
    background: #eeeeee;
    transform: translateY(-1px);
}

.btn-no.hide {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

/* NO BUTTON - MOVING STATE */
.btn-no.moving {
    position: fixed;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* ===== PLAYFUL MESSAGE ===== */
.playful-message {
    color: #d81b60;
    font-size: 18px;
    font-weight: 500;
    min-height: 28px;
    animation: fadeSlideIn 0.5s ease;
}

@keyframes fadeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== CELEBRATION SCREEN ===== */
.celebration-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    padding: 60px 40px;
    box-shadow: 
        0 30px 80px rgba(255, 105, 180, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    text-align: center;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.celebration-content {
    position: relative;
    z-index: 2;
}

.celebration-title {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    font-weight: 700;
    color: #d81b60;
    margin-bottom: 40px;
    animation: celebrationBounce 1s ease;
}

@keyframes celebrationBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-10deg);
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* ===== LOVE LETTER ===== */
.love-letter {
    background: linear-gradient(135deg, #fff5f8 0%, #ffe8f0 100%);
    border-left: 4px solid #ff4d8d;
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 40px;
    text-align: left;
    box-shadow: 0 8px 24px rgba(255, 105, 180, 0.15);
    animation: letterSlideIn 1s ease 0.3s backwards;
}

@keyframes letterSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.letter-greeting {
    font-family: 'Dancing Script', cursive;
    font-size: 24px;
    color: #d81b60;
    margin-bottom: 16px;
}

.letter-body {
    font-size: 17px;
    line-height: 1.8;
    color: #424242;
    margin-bottom: 20px;
}

.letter-signature {
    font-family: 'Dancing Script', cursive;
    font-size: 20px;
    color: #ec407a;
    text-align: right;
}

/* ===== PHOTO SECTION ===== */
.photo-section {
    margin-bottom: 40px;
    animation: photoZoomIn 1s ease 0.6s backwards;
}

@keyframes photoZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.photo-frame {
    position: relative;
    display: inline-block;
    background: white;
    padding: 16px;
    border-radius: 20px;
    box-shadow: 
        0 12px 40px rgba(255, 105, 180, 0.2),
        0 0 0 1px rgba(255, 182, 193, 0.3);
    transition: transform 0.4s ease;
}

.photo-frame:hover {
    transform: scale(1.03) rotate(2deg);
}

.couple-photo {
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.photo-label {
    font-family: 'Dancing Script', cursive;
    font-size: 22px;
    color: #d81b60;
    margin-top: 12px;
    font-weight: 600;
}

/* ===== FINAL MESSAGE ===== */
.final-message {
    margin-bottom: 40px;
    animation: finalFadeIn 1s ease 0.9s backwards;
}

@keyframes finalFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.final-text {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 600;
    color: #d81b60;
    margin-bottom: 16px;
    line-height: 1.4;
}

.final-emoji {
    font-size: 36px;
}

/* ===== MUSIC BUTTON ===== */
.btn-music {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: white;
    font-size: 18px;
    padding: 18px 36px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 
        0 8px 24px rgba(156, 39, 176, 0.4),
        0 4px 12px rgba(123, 31, 162, 0.3);
}

.btn-music:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 32px rgba(156, 39, 176, 0.5),
        0 6px 16px rgba(123, 31, 162, 0.4);
}

.music-icon {
    font-size: 24px;
}

.btn-music.playing .music-icon {
    animation: musicPulse 1s ease infinite;
}

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

/* ===== CONFETTI ===== */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 32px;
}

.confetti-piece {
    position: absolute;
    width: 12px;
    height: 12px;
    top: -20px;
    opacity: 1;
}

.confetti-piece::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 2px;
}

@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 600px) {
    .card, .celebration-card {
        padding: 40px 28px;
        border-radius: 24px;
    }
    
    .heart-icon {
        font-size: 64px;
    }
    
    .main-question {
        font-size: 38px;
    }
    
    .sub-question {
        font-size: 24px;
    }
    
    .btn {
        font-size: 18px;
        padding: 18px 32px;
    }
    
    .btn-no {
        font-size: 15px;
        padding: 12px 24px;
    }
    
    .celebration-title {
        font-size: 40px;
    }
    
    .love-letter {
        padding: 24px;
    }
    
    .letter-greeting {
        font-size: 20px;
    }
    
    .letter-body {
        font-size: 16px;
    }
    
    .letter-signature {
        font-size: 18px;
    }
    
    .final-text {
        font-size: 22px;
    }
    
    .final-emoji {
        font-size: 32px;
    }
    
    .couple-photo {
        max-width: 100%;
        max-height: 320px;
    }
    
    .btn-music {
        font-size: 16px;
        padding: 16px 28px;
    }
}

@media (max-width: 400px) {
    .card, .celebration-card {
        padding: 32px 20px;
    }
    
    .main-question {
        font-size: 32px;
    }
    
    .sub-question {
        font-size: 20px;
    }
    
    .celebration-title {
        font-size: 34px;
    }
    
    .love-letter {
        padding: 20px;
    }
    
    .letter-body {
        font-size: 15px;
    }
}