:root {
    --bg-color: #ffe6e6;
    --primary-color: #ff4d6d;
    --secondary-color: #ff8fa3;
    --text-color: #590d22;
    --btn-shadow: rgba(0, 0, 0, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    color: var(--text-color);
}

.container, .success-container, .minigame-container, .whack-a-mole-container {
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.hidden {
    display: none !important;
}

h1 {
    font-size: 3rem;
    margin-bottom: 30px;
    font-family: 'Pacifico', cursive;
    color: var(--primary-color);
    text-shadow: 2px 2px 0px rgba(255, 255, 255, 0.5);
}

.gif-container img {
    height: 150px;
    margin-bottom: 20px;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
    min-height: 100px; /* Ensure space for growing button */
}

.btn {
    padding: 15px 30px;
    font-size: 1.5rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 15px var(--btn-shadow);
}

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

.yes-btn:hover {
    transform: scale(1.05);
    background-color: #ff3355;
}

.no-btn {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    position: relative; /* Needed for movement */
    z-index: 10;
}

.no-btn:hover {
    background-color: var(--bg-color);
}

/* Minigame Styles */
.minigame-container h2 {
    color: var(--primary-color);
    font-family: 'Pacifico', cursive;
}

.cups-wrapper {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
    height: 200px;
    align-items: flex-end;
}

.cup-container {
    position: relative;
    width: 80px;
    height: 100px;
    cursor: pointer;
}

.cup {
    width: 80px;
    height: 100px;
    background: linear-gradient(135deg, #ff8fa3 0%, #ff4d6d 100%);
    border-radius: 10px 10px 40px 40px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    transition: transform 0.3s ease;
    border: 3px solid #ffccd5;
}

.ball {
    width: 50px;
    height: 50px;
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.cup.lifted {
    transform: translateY(-70px);
}

/* Floating Hearts Background Animation */
body::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 3.22l-.61-.6a5.5 5.5 0 0 0-7.78 7.77L10 18.78l8.39-8.4a5.5 5.5 0 0 0-7.78-7.77l-.61.61z' fill='%23ffccd5' opacity='0.4'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
    animation: floatingBackground 60s linear infinite;
}

@keyframes floatingBackground {
    from { background-position: 0 0; }
    to { background-position: 100% 100%; }
}

/* Whack a Mole Styles */
.whack-a-mole-container h2 {
    color: var(--primary-color);
    font-family: 'Pacifico', cursive;
    margin-bottom: 10px;
}

/* Fix for no text issue: ensure mole is hidden by default via overflow of parent */
.grid {
    width: 300px;
    height: 300px;
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    gap: 10px;
}

.hole {
    flex: 1 0 30%; /* 3 columns */
    height: 90px;
    position: relative;
    overflow: hidden;
    background-color: #ffccd5;
    border-radius: 50%;
    border-bottom: 5px solid #ff8fa3;
}

.hole::after {
    content: '';
    display: block;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><ellipse cx="50" cy="80" rx="40" ry="15" fill="%23590d22" opacity="0.2"/></svg>') no-repeat bottom center;
    background-size: 100%;
    width: 100%;
    height: 100%;
    position: absolute;
    z-index: 2;
    pointer-events: none;
}

.mole {
    width: 70%;
    height: 70%;
    position: absolute;
    top: 100%; /* Initially hidden below the hole */
    left: 15%;
    transition: top 0.4s;
    background-color: white;
    color: var(--primary-color);
    border: 3px solid var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    cursor: pointer;
    z-index: 1;
    user-select: none;
}

.hole.up .mole {
    top: 10%; /* Pop up */
}
