/* Custom styles */
body {
    font-family: 'Inter', sans-serif; /* Use Inter font */
    user-select: none; /* Prevent text selection during rapid clicking */
    overscroll-behavior: none; /* Prevent pull-to-refresh */
    overflow-y: scroll; /* Always show vertical scroll bar */
    background-attachment: fixed; /* Fix the background in place */
}

/* Enhanced specificity to prevent frog button movement */
#frog-button,
#frog-button:active,
#frog-button:hover,
#frog-button:focus {
    transform: translate(-50%, -50%) !important;
    transition: none !important;
}

/* Style for disabled buttons */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Ensure high contrast for accessibility */
.high-contrast {
     text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Basic Fly Styling */
.fly {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #333;
    border-radius: 50%;
    pointer-events: none; /* Flies shouldn't interfere with clicks */
    opacity: 0.8;
    /* Basic wing imitation */
    box-shadow: -3px -1px 0 0px #aaa, 3px -1px 0 0px #aaa;
}

/* New Fly Sprite Styling */
.fly-sprite {
    position: absolute;
    width: 30px; /* Increased from 16px */
    height: 30px; /* Increased from 16px */
    pointer-events: none; /* Flies shouldn't interfere with clicks */
    opacity: 0.8;
    z-index: 1;
    /* Small animation to make flies look like they're flapping wings */
    animation: fly-wiggle 0.5s infinite alternate;
}

@keyframes fly-wiggle {
    from {
        transform: rotate(-5deg) scale(1);
    }
    to {
        transform: rotate(5deg) scale(1.1);
    }
}

/* Golden Fly Styling */
.golden-fly {
    position: absolute;
    width: 36px;
    height: 36px;
    pointer-events: auto;
    cursor: pointer;
    z-index: 5; /* Higher than regular flies but lower than UI */
    animation: golden-fly-glow 1s infinite alternate;
}

@keyframes golden-fly-glow {
    from {
        transform: scale(1);
        filter: drop-shadow(0 0 5px gold);
    }
    to {
        transform: scale(1.1);
        filter: drop-shadow(0 0 10px gold);
    }
}

/* Lily Pad Visual Styling */
.lilypad-visual {
    position: absolute;
    width: 4rem; /* Tailwind w-16 equivalent */
    height: 4rem; /* Tailwind h-16 equivalent */
    pointer-events: none;
    opacity: 0.75;
    animation: float 5s infinite ease-in-out alternate;
}

/* Helper Frog Visual Styling */
.helper-frog-visual {
    position: absolute;
    width: 3rem; /* Tailwind w-12 equivalent */
    height: 3rem; /* Tailwind h-12 equivalent */
    pointer-events: none;
    animation: hop 2s infinite ease-in-out;
}

/* Floating animation for lily pads */
@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-10px) rotate(5deg);
    }
}

/* Hopping animation for helper frogs */
@keyframes hop {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Pulse effect for buttons */
.bg-green-500, .bg-emerald-500, .bg-blue-500, .bg-purple-500, .bg-yellow-500 {
    position: relative;
    overflow: hidden;
}

.bg-green-500::after, .bg-emerald-500::after, .bg-blue-500::after, .bg-purple-500::after, .bg-yellow-500::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
}

button:not(:disabled):hover::after {
    opacity: 1;
}

/* Add vertical scrolling for long menus */
#prestige-menu, #achievements-menu {
    max-height: 85vh; /* Limit height to 85% of the viewport */
    overflow-y: auto; /* Enable vertical scrolling */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Achievement styling */
.achievement-locked {
    background-color: rgba(229, 231, 235, 0.8);
    opacity: 0.6;
    filter: grayscale(0.8);
    transition: all 0.3s ease;
}

.achievement-unlocked {
    background-color: rgba(167, 243, 208, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.achievement-unlocked:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.achievement-claimed {
    background-color: rgba(243, 244, 246, 0.8);
    transition: all 0.3s ease;
}

/* Remove bobbing animation for the frog image */
#frog-image {
    animation: none; /* Remove the bobbing animation */
}

/* Keep the bobbing animation definition for other elements that might use it */
@keyframes bob {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Draggable Elements */
.drag-handle {
    display: flex;
    justify-content: center;
    padding: 4px;
    margin-bottom: 6px;
    border-radius: 4px;
    background-color: rgba(157, 193, 131, 0.3);
    cursor: move;
}

.drag-handle:hover {
    background-color: rgba(157, 193, 131, 0.6);
}

.dragging {
    opacity: 0.9;
    user-select: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
    transition: none !important;
}

/* Make the main game box absolute positioned so it can be moved */
.absolute-box {
    position: absolute !important;
    margin: 0 !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    transition: box-shadow 0.3s ease;
}

.absolute-box.dragging {
    transition: none !important;
    transform: none;
}

.absolute-box:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}