/* Base Styles and Typography */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #ff8e8e;
    --bg-color: #ffe6e6;
    --text-color: #4a4a4a;
    --card-bg: #ffffff;
    --shadow: 0 10px 30px rgba(255, 107, 107, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(#ffcccc 1px, transparent 1px);
    background-size: 20px 20px;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Floating Hearts Background Animation */
.background-floating-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Card Styling */
.card-container {
    position: relative;
    z-index: 10;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    /* Ensure no transform creates a new stacking context for fixed children unintentionally if we didn't move it */
}

.card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    transition: transform 0.3s ease;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
}

.heart-decoration {
    position: absolute;
    font-size: 2rem;
    animation: bounce 2s infinite ease-in-out;
}

.top-left { top: -15px; left: -10px; transform: rotate(-15deg); }
.top-right { top: -15px; right: -10px; transform: rotate(15deg); animation-delay: 1s; }

/* Text Styling */
.card-title {
    font-family: 'Pacifico', cursive;
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.card-question {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 30px;
    font-weight: 600;
}

/* Buttons */
.buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    position: relative;
    min-height: 60px; 
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 100; /* High z-index to stay on top */
}

.btn-yes {
    background-color: var(--primary-color);
    color: white;
}

.btn-yes:hover {
    background-color: #ff5252;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(255, 82, 82, 0.3);
}

.btn-no {
    background-color: #f0f0f0;
    color: #888;
    position: relative; 
}

/* Success State */
.hidden {
    display: none;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

#result-message {
    margin-top: 20px;
}

#result-message h2 {
    color: var(--primary-color);
    font-family: 'Pacifico', cursive;
    font-size: 2rem;
    margin-bottom: 15px;
}

.gift-box {
    font-size: 4rem;
    animation: shake 1.5s infinite;
    cursor: pointer;
    display: inline-block;
    margin-top: 10px;
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50% { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}

@keyframes fadeIn {
    to { opacity: 1; display: block; }
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

/* New Shake Animation for No Button */
@keyframes shake-horizontal {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.btn-no.shaking {
    animation: shake-horizontal 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

/* Special effects for mobile/desktop no button */
.btn-no.grayed-out {
    background-color: #e0e0e0;
    color: #ccc;
    cursor: not-allowed;
    /* pointer-events: none; REMOVED to allow "trying" to click it */
}

.btn-no.vanished {
    opacity: 0;
    pointer-events: none;
}

/* Decoy Buttons */
.decoy-btn {
    position: fixed;
    background-color: #f0f0f0;
    color: #888;
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    pointer-events: none; /* Just visual */
    z-index: 50;
    opacity: 0.7;
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* Glitch Effect */
@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    20% { transform: skew(-20deg); }
    40% { transform: skew(20deg); }
    60% { transform: skew(-10deg); }
    80% { transform: skew(10deg); }
    100% { transform: skew(0deg); }
}

@keyframes glitch-color {
    0% { background-color: #f0f0f0; color: #888; }
    25% { background-color: #ff00ff; color: white; }
    50% { background-color: #00ffff; color: black; }
    75% { background-color: #ffff00; color: black; }
    100% { background-color: #f0f0f0; color: #888; }
}

.btn-no.glitch {
    animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both,
               glitch-color 0.3s steps(5) both;
}

/* Spin Effect */
@keyframes spin-crazy {
    0% { transform: rotate(0deg) scale(var(--btn-scale, 1)); }
    100% { transform: rotate(1080deg) scale(var(--btn-scale, 1)); }
}

.btn-no.spinning {
    animation: spin-crazy 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

/* Falling Effect */
@keyframes fall-off {
    0% { transform: translateY(0) rotate(0deg) scale(var(--btn-scale, 1)); opacity: 1; }
    100% { transform: translateY(200px) rotate(45deg) scale(var(--btn-scale, 1)); opacity: 0; }
}

.btn-no.falling {
    animation: fall-off 0.5s ease-in forwards;
}

/* Ghost Effect */
@keyframes ghost-fade {
    0% { opacity: 1; }
    40% { opacity: 0; }
    60% { opacity: 0; }
    100% { opacity: 1; }
}

.btn-no.ghost-mode {
    animation: ghost-fade 1s ease-in-out;
}
