@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Montserrat:wght@400;600&display=swap');

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    background: radial-gradient(circle at center, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    transition: background 1s ease;
    /* Smooth transition for sad mode */
}

.hearts-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.heart {
    position: absolute;
    bottom: -50px;
    background-color: rgba(255, 255, 255, 0.4);
    display: inline-block;
    height: 30px;
    width: 30px;
    margin: 0 10px;
    transform: rotate(45deg);
    animation: float 6s ease-in infinite;
}

.heart:before,
.heart:after {
    content: "";
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: inherit;
    border-radius: 50%;
}

.heart:before {
    top: -15px;
    left: 0;
}

.heart:after {
    left: -15px;
    top: 0;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(45deg) scale(0.8);
        opacity: 0;
    }

    50% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-110vh) rotate(45deg) scale(1.2);
        opacity: 0;
    }
}

.card {
    position: relative;
    z-index: 10;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 40px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

h1 {
    font-family: 'Great Vibes', cursive;
    color: #e91e63;
    font-size: 3.5rem;
    margin-bottom: 30px;
    margin-top: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    transition: color 0.5s ease;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    min-height: 60px;
    position: relative;
    /* Context for bars */
    /* Space for buttons */
}

button {
    padding: 12px 30px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#yesBtn {
    background-color: #4CAF50;
    color: white;
}

#yesBtn:hover {
    background-color: #45a049;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

#noBtn {
    background-color: #f44336;
    color: white;
    position: relative;
    /* Needed for absolute positioning calculation later if we change it */
    z-index: 100;
    /* Ensure it stays above the card */
    transition: left 0.4s ease-out, top 0.4s ease-out, background-color 0.3s, transform 0.3s;
    /* Smooth movement specific transitions */
}

/* We will switch #noBtn to absolute positioning via JS when first hovered, 
   but initially it can be static or relative in the flex container.
   However, simpler to keep it relative until interaction. */

.hidden {
    display: none !important;
}

#message {
    font-size: 2rem;
    color: #d81b60;
    font-weight: bold;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Image container specific for the yes state if we want gifs */
.gif-container {
    margin-top: 20px;
}

.gif-container img {
    max-width: 100%;
    border-radius: 10px;
}

/* Explosion effect for the No button */
@keyframes explode {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.explode {
    animation: explode 0.5s ease-out forwards;
    pointer-events: none;
    /* Prevent further interaction */
}

/* Sad Mode Styles */
body.sad-mode {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    background: radial-gradient(circle at center, #4b6cb7 0%, #182848 100%);
}

body.sad-mode h1 {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Rain Effect */
.rain {
    position: absolute;
    top: -20px;
    background-color: rgba(255, 255, 255, 0.6);
    display: inline-block;
    height: 20px;
    width: 2px;
    margin: 0 5px;
    animation: fall linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-10vh);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(110vh);
        opacity: 0;
    }
}

/* Hell Mode Styles */
body.hell-mode {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    background: radial-gradient(circle at center, #ff0844 0%, #ffb199 100%);
}

#daysInput {
    outline: none;
    transition: box-shadow 0.3s;
}

#daysInput:focus {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

body.hell-mode h1 {
    color: #fff;
    text-shadow: 2px 2px 0px #000;
}

.hell-emoji {
    position: absolute;
    bottom: -50px;
    font-size: 2rem;
    display: inline-block;
    opacity: 0.7;
    animation: rise 3s ease-in infinite;
}

@keyframes rise {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-110vh) scale(1.5);
        opacity: 0;
    }
}

/* Pause animations if needed? No. */

/* Puzzle Elements */
#mouse-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 20;
    display: flex;
    align-items: flex-end;
}

#mouse {
    font-size: 4rem;
    cursor: pointer;
    transition: transform 0.2s;
}

#mouse:hover {
    transform: scale(1.1);
}

#speech-bubble {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    padding: 10px 15px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-size: 1rem;
    margin-bottom: 10px;
    width: 200px;
    color: #333;
}

#speech-bubble:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 20px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: white transparent transparent;
}

#plate {
    font-size: 3rem;
    margin-left: 10px;
}

#cheese {
    position: absolute;
    font-size: 2.5rem;
    z-index: 5;
    /* Lower than card (10) so it hides behind it */
    top: 50%;
    /* Initial pos, script will center it behind card */
    left: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    transition: transform 0.1s, opacity 0.3s;
    opacity: 0;
    /* Hidden initially, revealed by JS on card drag */
    pointer-events: none;
    /* Can't grab until revealed */
}

#cheese.is-dragging {
    cursor: grabbing;
    z-index: 1000;
}

#key {
    position: absolute;
    font-size: 3rem;
    z-index: 1000;
    cursor: grab;
    /* Position will be set by JS on plate */
}

/* Button Bars */
.bars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-evenly;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    /* Match button radius */
    pointer-events: all;
    /* Block clicks */
    z-index: 200;
    /* Above button text */
    overflow: hidden;
    cursor: not-allowed;
}

.bars span {
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #7f8c8d, #bdc3c7);
    box-shadow: 1px 0 2px rgba(0, 0, 0, 0.5);
}

/* Draggable Card classes */
.card.draggable {
    cursor: grab;
}

.card.draggable:active {
    cursor: grabbing;
}

/* Void Mode Styles */
body.void-mode {
    background: #000000;
    /* Pure black */
    background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
}

body.void-mode h1 {
    color: #666;
    text-shadow: none;
    font-family: 'Montserrat', sans-serif;
    /* Scary rigid font? */
}

.skull-emoji {
    position: absolute;
    bottom: -50px;
    font-size: 2rem;
    display: inline-block;
    opacity: 0.5;
    animation: rise 4s linear infinite;
    /* Slower, creepier rise */
    filter: grayscale(100%);
}