/* --- Custom Styles --- */
body {
    font-family: 'Fredoka', sans-serif;
    background: transparent;
    padding: 10px;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

/* Main Card */
.game-card {
    background: #ecfdf5;
    /* Emerald 50 */
    border: 8px solid #059669;
    /* Emerald 600 */
    border-radius: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

/* Leaf Background Pattern */
.bg-leaf {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(#a7f3d0 15%, transparent 16%),
        radial-gradient(#a7f3d0 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    opacity: 0.4;
    pointer-events: none;
}

/* The Ladybird SVG Container */
.ladybird-container {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@media (max-width: 500px) {
    .ladybird-container {
        width: 280px;
        height: 280px;
    }
}

/* Wings Interaction */
.wing {
    cursor: pointer;
    transition: filter 0.2s;
    fill: #f43f5e;
    /* Rose 500 */
}

.wing:hover {
    filter: brightness(1.1);
}

.wing:active {
    filter: brightness(0.9);
}

/* Spots */
.spot {
    position: absolute;
    width: 36px;
    height: 36px;
    background: #1e293b;
    border-radius: 50%;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.2);
    transform: scale(0);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    cursor: pointer;
}

.spot.placed {
    transform: scale(1);
}

.spot:hover {
    background: #334155;
    transform: scale(1.1);
}

/* Animations */
.pop-in {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* UI Elements */
.btn-action {
    transition: all 0.1s;
    border-bottom-width: 4px;
}

.btn-action:active {
    transform: translateY(2px);
    border-bottom-width: 0px;
    margin-top: 2px;
    /* Prevent layout shift */
}

.btn-action:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    border-bottom-width: 4px;
}

.pulse-text {
    animation: pulseText 0.2s ease-in-out;
}

@keyframes pulseText {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
        color: #059669;
    }

    100% {
        transform: scale(1);
    }
}