/* General Reset */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevents scrolling during zoom */
    font-family: 'Playfair Display', serif;
    background-color: #fce4ec; /* Light pink background */
}

/* --- Intro Screen --- */
#intro-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1.5s ease;
}

.flower-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#lily-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 2.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    /* TRANSFORM ORIGIN: Change these % to target the specific petal */
    /* 50% 50% is the center. 20% 80% is bottom left, etc. */
    transform-origin: 50% 50%; 
}

/* The class we add with JS to trigger the zoom */
.zoomed-in {
    transform: scale(15); /* Zooms in 15x */
}

.intro-text {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.intro-text h1 {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    margin: 0;
}

#start-btn {
    margin-top: 20px;
    padding: 10px 25px;
    font-size: 1.2rem;
    background: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    color: #d81b60;
    transition: transform 0.2s;
}

#start-btn:hover {
    transform: scale(1.1);
}

/* --- Question Screen --- */
#question-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1; /* Behind the flower initially */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 2s ease 1s; /* Delays appearance until zoom is done */
}

/* When active, bring to front and show */
#question-screen.active {
    opacity: 1;
    z-index: 10;
}

.card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    max-width: 400px;
}

#rizz-image {
    width: 140px;
    max-width: 60vw;
    margin: 0 auto 16px;
    display: none;
}

.hidden {
    display: none;
}

.buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

button {
    padding: 10px 30px;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 8px;
    border: none;
}

#yes-btn {
    background-color: #e91e63;
    color: white;
}

#no-btn {
    background-color: #ccc;
    color: black;
    position: relative; /* Needed for the dodging effect */
}

/* --- No Button Animations --- */
#no-animation-layer {
    position: fixed;
    inset: 0;
    z-index: 30;
    pointer-events: none;
}

.yes-burst {
    position: fixed;
    inset: 0;
    z-index: 40;
    pointer-events: none;
}

.heart-wave {
    position: absolute;
    width: 56px;
    height: 56px;
    background: url("heart.png") center/contain no-repeat;
    opacity: 0;
    filter: drop-shadow(0 6px 10px rgba(233, 30, 99, 0.35));
    animation: heartWave 2.6s ease-out forwards;
}

.heart-fall {
    position: absolute;
    width: 52px;
    height: 52px;
    background: url("heart.png") center/contain no-repeat;
    opacity: 0;
    filter: drop-shadow(0 6px 10px rgba(233, 30, 99, 0.35));
    animation: heartFall 2.4s ease-in forwards;
}

@keyframes heartWave {
    0% {
        opacity: 0;
        transform: translate(var(--x-start), var(--y-start)) scale(0.2) rotate(-10deg);
    }
    15% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--x-end), var(--y-end)) scale(1.1) rotate(12deg);
    }
}

@keyframes heartFall {
    0% {
        opacity: 0;
        transform: translate(var(--x-start), var(--y-start)) scale(0.35) rotate(-8deg);
    }
    10% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translate(var(--x-end), var(--y-end)) scale(1) rotate(6deg);
    }
}

body.yes-mode .card {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(233, 30, 99, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.no-pop {
    position: absolute;
    left: 50%;
    top: 50%;
    max-width: 70vw;
    max-height: 60vh;
    transform: translate(-50%, -50%) scale(0.2);
    opacity: 0;
    animation: noBounce 1.1s ease forwards;
}

@keyframes noBounce {
    0% {
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 0;
    }
    60% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
}
