body {
    font-family: 'FinkHeavy', Arial, sans-serif;
    background: url('assets/day-background.gif') no-repeat center center fixed;
    background-size: cover;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    position: relative;
    transition: background-image 0.5s ease-in-out;
}

.clicker-container {
    position: absolute; /* Use absolute positioning to allow movement */
    top: 70px; /* Initial top position */
    left: 30px; /* Initial left position */
    display: none; /* Hidden initially, but can be shown programmatically */
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    width: 300px; /* Doubled from 150px */
    height: 300px; /* Doubled from 150px */
}

.cps-counter {
    font-size: 1.2em;
    color: #000;
    margin-top: 10px;
    z-index: 1;
}

.cps-bubble {
    position: absolute;
    top: 270px; /* Position below the clicker container */
    left: 50%; /* Center horizontally within the container */
    transform: translateX(-50%); /* Center adjustment */
    padding: 10px 20px; /* Padding for bubble effect */
    border-radius: 50px; /* Rounded corners for a bubble look */
    font-size: 1.2em; /* Font size for visibility */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    z-index: 2; /* Ensure it sits above other content */
    cursor: default; /* Default cursor */
    transition: background-color 0.5s ease-in-out; /* Smooth transition for any future changes */
    background-color: #3d60e6; /* Default background for day */
    color: #a9baf9; /* Text color */
    border: 3px solid #a9baf9; /* Updated border color */
}

.clicker-box {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: visible;
    background-color: rgba(173, 216, 230, 0.8);
    transition: background-color 0.5s ease-in-out;
    z-index: 3; /* Above other elements */
}

.clicker-button {
    cursor: pointer;
    width: 160px; /* Doubled from 80px */
    height: auto; /* Maintain aspect ratio */
    transition: transform 0.2s;
    z-index: 4; /* Above the box */
}

.clicker-button:hover {
    transform: scale(1.2); /* Increased to maintain hover effect proportionality */
}

.clicker-button:active {
    transform: scale(1.0); /* Adjust active state scaling */
}

.rain-drop {
    position: absolute;
    width: 40px; /* Doubled from 20px */
    height: 40px; /* Maintain aspect ratio */
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
    background-image: url('assets/clicker.png');
    animation: fall linear infinite;
    border-radius: 50%;
    z-index: 1;
}

@keyframes fall {
    0% {
        top: -30px;
        left: 50%;
        transform: translateX(calc(var(--random-x) * 50%));
    }
    100% {
        top: 150px;
        transform: translateX(calc(var(--random-x) * 50%));
    }
}

/* Common container styles with fixed positioning */
.container {
    max-width: 1000px;
    width: 90%;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    background: rgba(173, 216, 230, 0.8);
    position: fixed; /* Fixed positioning to ensure consistent placement */
    transition: top 0.5s ease, left 0.5s ease, background-color 0.5s ease-in-out;
    /* Default positions for inactive state */
    top: 20.9vh; /* Use viewport units */
    left: 20.8vw; /* Use viewport units */
    overflow: hidden; /* Ensure the fill stays within the container */
}

@media only screen and (max-width: 1200px) {
    .container {
        left: 5vw;
        top: 10vh;
        width: 80%;
    }
    .shop-icon {
        width: 120px; /* Reduce size for smaller screens */
        height: 120px;
    }
    .reset-icon {
        width: 40px;
        height: 40px;
    }
}

@media only screen and (max-width: 768px) {
    .container {
        width: 95%;
        left: 2.5vw;
        top: 5vh;
        padding: 10px;
    }
    .shop-icon {
        width: 100px;
        height: 100px;
    }
    .reset-icon {
        width: 30px;
        height: 30px;
    }
    .tools {
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
    }
}

@media only screen and (max-width: 480px) {
    .container {
        width: 100%;
        left: 0;
        top: 2vh;
        padding: 5px;
    }
    .shop-icon {
        width: 80px;
        height: 80px;
    }
    .reset-icon {
        width: 20px;
        height: 20px;
    }
}


.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Position for when the clicker system is active */
.container-active {
    top: 170px !important; /* Manually set to your desired top position when active */
    left: 370px !important; /* Manually set to your desired left position when active */
}

.upgrade-container {
    width: 100%;
    max-width: 1040px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
    gap: 10px;
    background-color: rgba(173, 216, 230, 0.8);
    position: fixed; /* Use fixed positioning */
    top: 300px; /* Example position, adjust as needed */
    left: 50px; /* Example position, adjust as needed */
}

.upgrade-container-active {
    top: 550px; /* Adjust as needed */
    left: 370px; /* Adjust as needed */
}

.upgrade-container-inactive {
    top: 550px; /* Adjust as needed */
    left: 370px; /* Adjust as needed */
}

/* Day/Night styles */
.container.day .upgrade-container {
    background-color: rgba(173, 216, 230, 0.8);
}

.container.night .upgrade-container {
    background-color: rgba(107, 113, 181, 0.8);
}

.container.default-position {
    margin-top: 200px;
}

.container.clicker-active-position {
    margin-top: -80px;
    transform: translateY(50px);
}

.points-container {
    position: fixed; /* Fixed position to stay at the top right even when scrolling */
    top: 22vh; /* Position 20% from the top of the viewport */
    right: 22vw; /* Position 10% from the right of the viewport */
    display: inline-block; /* Prevent the container from expanding to the full width */
    z-index: 1000; /* Ensure it stays above most other content */
}

.points {
    position: relative; /* Keeps the bubble in place relative to the container */
    display: inline-block; /* Keeps it inline with other content */
    padding: 10px 20px; /* Padding for bubble effect */
    border-radius: 50px; /* Rounded corners for a bubble look */
    font-size: 1.2em; /* Font size for visibility */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    background-color: #3d60e6; /* Default background for day */
    color: #a9baf9; /* Text color */
    transition: background-color 0.5s ease-in-out; /* Smooth transition for day/night */
    border: 3px solid #a9baf9; /* Updated border color */
    text-align: center; /* Center text */
}

.points-image {
    position: absolute;
    top: -4vh; /* Position the image above the bubble using viewport height */
    left: 50%;
    transform: translateX(-50%); /* Center the image horizontally */
    width: 3.4vw; /* Set the width of the image using viewport width */
    height: auto; /* Automatically adjust the height to maintain aspect ratio */
    pointer-events: none; /* Prevent the image from interfering with interactions */
    z-index: 9999; /* Higher z-index to appear on top of the bubble */
}


.task-container.day .points {
    background-color: rgba(173, 216, 230, 0.8); /* Light blue for day */
}

.task-container.night .points {
    background-color: rgba(107, 113, 181, 0.8); /* Darker blue for night */
}

.task {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 15px;
    border-radius: 50%;
    width: 130px;
    height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
    background-color: rgba(240, 255, 240, 0.8);
    color: #000;
    opacity: 0.9; /* Adjust this value for desired opacity */
    animation: float 5s ease-in-out infinite alternate;
    cursor: pointer;
    z-index: 3;
    border: 8px solid white; /* Add thick white border */
}

.task:hover {
    transform: scale(1.05) translateY(calc(-10px * (index - 2)));
    opacity: 1;
    border-color: #add8e6; /* Change border color to soft blue on hover */
}
        .task-miles {
            position: absolute;
            bottom: -15px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(173, 216, 230, 0.9);
            color: #000;
            padding: 5px 10px;
            border-radius: 15px;
            font-weight: bold;
            font-size: 0.8em;
            z-index: 3;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
        }

.miles-bubble {
    position: absolute;
    bottom: -20px; /* Position the bubble below the task */
    left: 50%;
    transform: translateX(-50%);
    background-color: white; /* Default white background */
    color: #000; /* Black text color */
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
    font-size: .9em; /* Slightly larger text size */
    z-index: 3;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2); /* Subtle shadow for depth */
    text-align: center;
    transition: background-color 0.2s ease; /* Transition only for background color */
}

.task:hover .miles-bubble {
    background-color: #add8e6; /* Change bubble color to soft blue on hover */
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(-5px, 5px);
    }
    50% {
        transform: translate(5px, -5px);
    }
    75% {
        transform: translate(-5px, -5px);
    }
    100% {
        transform: translate(5px, 5px);
    }
}

.task:nth-child(even) {
    animation-duration: 12s;
}

.task:nth-child(odd) {
    animation-duration: 10s;
}

.task span {
    margin-bottom: 10px;
    font-size: 1.1em;
    z-index: 1;
}
        .multiplier {
            position: fixed; /* Change to fixed to detach from parent */
            top: 0px; /* Adjust as needed */
            left: 10px; /* Adjust as needed */
            background-color: red;
            color: white;
            padding: 5px 10px;
            border-radius: 50%;
            font-weight: bold;
            font-size: 0.9em;
            z-index: 101;
            opacity: 1;
        }

.tools {
    position: fixed;
    bottom: 0vh; /* Adjust position from the bottom of the viewport */
    left: 92vw; /* Adjust position from the left of the viewport */
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 5px; /* Reduce padding for smaller content space */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 200px; /* Set a fixed width */
    height: auto; /* Adjust height based on content */
    max-height: 300px; /* Set a max height */
    overflow-y: auto; /* Add scroll if content exceeds max height */
    display: flex;
    flex-direction: column;
}

/* Tools title style inside the tools container */
.tools-title {
    font-size: 1.5em; /* Adjust the font size as needed */
    margin-bottom: 0px; /* Add space below the tools title */
    text-align: center; /* Center the title within the tools container */
    font-weight: bold; /* Make the title bold */
    color: #ffd700 !important; /* Force the text color to yellow */
    -webkit-text-stroke: 1px #8b4513; /* Stroke for the title text */
}

.tools.day {
    background-color: #f9f9f9; /* Light background for day */
    color: #333; /* Dark text for day */
}

.tools.night {
    background-color: #333; /* Dark background for night */
    color: #f9f9f9; /* Light text for night */
}

.tools label {
    display: flex; /* Use flexbox to align the checkbox and label text */
    align-items: center; /* Align checkboxes and text vertically */
    margin-bottom: 10px;
    color: #000; /* Set the text color to yellow */
}

//catalogue
button {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px 5px;
    transition: background 0.2s, transform 0.2s;
}

button:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.reset-button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: background 0.2s, transform 0.2s;
}

.reset-button:hover {
    background: #d43c2c;
    transform: scale(1.1);
}

button.open-shop,
button.open-catalogue {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px 5px;
    transition: background 0.2s, transform 0.2s;
}

button.open-shop:hover,
button.open-catalogue:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px;
    background: #ff6347;
    color: white;
    border-radius: 5px;
    opacity: 1;
    transition: opacity 0.5s, top 0.5s;
    z-index: 2000;
}

.task.explode {
    animation: explode 0.5s forwards;
}

@keyframes explode {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

.title {
    position: fixed; /* Fixes the title at the top of the page */
    top: 13vh; /* Converted from 110px */
    left: 50%; /* Centers the title horizontally */
    transform: translateX(-50%); /* Ensures the title is perfectly centered */
    font-size: 2.2em; /* Font size */
    color: #ffd700; /* Title color */
    -webkit-text-stroke: 1px #8b4513; /* Stroke for the title text */
    z-index: 1000; /* Ensures the title stays on top of other elements */
    margin: 0; /* Remove any default margin */
    padding: 10px; /* Optional: Add padding */
    text-align: center; /* Center-align the text */
}

#shootingStar {
    position: fixed;
    width: 50px;
    height: 50px;
    display: none;
    cursor: pointer;
    z-index: 1000;
}

.sound-control {
    position: fixed;
    top: 10px;
    right: 10px;
    cursor: pointer;
    width: 30px;
    height: 30px;
}

.container.day,
.clicker-box.day,
.upgrade-container.day,
.tools.day {
    background-color: rgba(173, 216, 230, 0.5);
}

.container.night,
.clicker-box.night,
.upgrade-container.night,
.tools.night {
    background-color: rgba(107, 113, 181, 0.5);
}

.visit-streak {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(173, 216, 230, 0.8);
    color: #000;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    font-size: 1.2em;
    font-weight: bold;
    z-index: 100;
    margin: 0;
    transition: background-color 0.5s ease-in-out;
}

.container.night .visit-streak {
    background-color: rgba(107, 113, 181, 0.8);
}

/* Specific styles for Task Frenzy */
.frenzy-text {
    background-color: red;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    z-index: 2001;
}

.frenzy-timer-container {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
    color: #fff;
    font-size: 20px;
    z-index: 2000;
}

.frenzy-timer {
    color: white;
    font-size: 20px;
    font-weight: bold;
}

/* Multiplier bubble for Task Frenzy */
.multiplier-bubble {
    position: absolute;
    background: red;
    color: white;
    font-weight: bold;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    z-index: 200;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.8;
}

#floatingPresent {
    position: fixed;
    top: -100px;
    width: 80px;
    height: 80px;
    z-index: 1002;
    cursor: pointer;
    display: none;
    animation: floatAcross 20s linear infinite;
}

@keyframes floatAcross {
    0% {
        transform: translateX(0);
        top: 0;
    }
    100% {
        transform: translateX(100vw);
        top: 100px;
    }
}

.upgrade-container {
    width: 100%;
    max-width: 1040px;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    flex-wrap: wrap;
    gap: 10px;
    background-color: rgba(173, 216, 230, 0.8);
    display: none;
}

.upgrade {
    text-align: center;
    flex: 1;
    min-width: 100px;
    position: relative;
}

.upgrade img {
    width: 60px;
    cursor: pointer;
    transition: transform 0.2s;
}

.upgrade img:hover {
    transform: scale(1.1);
}

.upgrade span {
    display: block;
    margin-top: 5px;
    font-size: 0.9em;
    color: #000;
    line-height: 1.2;
}

.upgrade strong {
    font-weight: bold;
    color: #3498db;
}

.upgrade .counter {
    position: absolute;
    top: -10px;
    right: 10px;
    background-color: red;
    color: white;
    padding: 2px 5px;
    border-radius: 50%;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 2;
}

.unavailable-upgrade {
    opacity: 0.5;
    cursor: not-allowed;
}

.unavailable-upgrade img {
    pointer-events: none;
}

.unavailable-upgrade span {
    color: #888;
}

.orbit-container {
    position: absolute;
    top: 40%; /* Center the container vertically */
    left: 40%; /* Center the container horizontally */
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
    pointer-events: none;
    overflow: visible;
    z-index: 3;
}

.orbit-image {
    position: absolute;
    width: 45px; /* Double size for orbiting images */
    height: 45px;
    opacity: 0;
    animation: orbit 5s infinite linear, fade 5s infinite alternate;
    border-radius: 50%;
    pointer-events: none;
}

@keyframes orbit {
    0% {
        transform: rotate(calc(var(--i) * 45deg)) translateX(120px) rotate(calc(var(--i) * -45deg));
    }
    100% {
        transform: rotate(calc(var(--i) * 45deg + 360deg)) translateX(120px) rotate(calc(var(--i) * -45deg - 360deg));
    }
}

@keyframes fade {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

.button-container {
    position: fixed;
    bottom: 6vh; /* Converted from 50px */
    right: 86.4vw; /* Converted from 1533px */
    z-index: 100;
    display: flex;
    gap: 0.52vw; /* Converted from 10px */
}

.tasks {
    display: flex;
    justify-content: center; /* Center tasks within the container */
    gap: 20px; /* Space between tasks */
    margin-top: 70px; /* Increase space from the top of the task container */
    position: relative;
    z-index: 2;
    flex-wrap: wrap;
}

.task-details {
    height: 30px;
    background-color: rgba(173, 216, 230, 0.8);
    color: #000;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.3em;
    text-align: center;
    margin-top: 40px; /* Increased margin for more space below tasks */
    transition: background-color 0.5s ease-in-out;
}
        .task-details.night {
            background-color: rgba(107, 113, 181, 0.8);
        }

.action-button {
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: transform 0.2s;
}

.action-button:hover {
    transform: scale(1.1);
}
.shop-icon-container {
    position: fixed;
    top: 50vh; /* Converted from 400px */
    left: 4%; /* Responsive, no change needed */
    transform: translateX(-50%);
    z-index: 101;
}
        .shop-icon {
            width: 150px;
            height: 150px;
            cursor: pointer;
            transition: transform 0.2s;
        }
        .shop-icon:hover {
            transform: scale(1.2);
        }
.reset-icon-container {
    position: fixed;
    top: 23vh; /* Position 25% from the top of the viewport */
    right: 71.5vw; /* Position 20% from the right of the viewport */
    z-index: 102;
}

.reset-icon {
    width: 50px; /* Maintain the fixed size of the image */
    height: 50px; /* Maintain the fixed height as well */
    cursor: pointer;
    transition: transform 0.2s;
}
        .reset-icon:hover {
            transform: scale(1.1);
        }
.reshuffle-icon-container {
    position: fixed;
    top: 23vh; /* Position 25% from the top of the viewport */
    left: 22vw; /* Position 20% from the left of the viewport */
    z-index: 1000;
}

.reshuffle-icon {
    width: 50px; /* Maintain the fixed size of the image */
    height: 50px; /* Maintain the fixed height as well */
    cursor: pointer;
    transition: transform 0.2s;
}
        .reshuffle-icon:hover {
            transform: scale(1.1);
        }

#fishing-tourney {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    pointer-events: none; /* Allow clicks on fish */
}

#event-notification {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2001;
    pointer-events: none;
}

.event-text {
    background: yellow;
    color: black;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    z-index: 2001;
}

.fishing-tourney-timer {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    font-size: 20px;
    margin-top: 10px;
    text-align: center;
    cursor: pointer; /* Ensure cursor indicates clickability */
}

.fish {
    position: absolute;
    width: 50px;
    height: auto;
    cursor: pointer;
    pointer-events: auto;
    animation: wiggle 1s infinite;
    z-index: 2000;
    transition: opacity 0.5s ease-out;
    transition: transform 0.5s ease-in-out;
}

.fish.golden-shine {
    animation: shineEffect 0.5s forwards;
    filter: drop-shadow(0 0 20px gold) brightness(1.5);
    transform: scale(1.2); /* Enlarge to indicate activation */
    z-index: 10; /* Ensure the effect appears above other elements */
    animation: wiggle 1s infinite ease-in-out;
}

@keyframes shineEffect {
    0% { filter: drop-shadow(0 0 10px gold); }
    50% { filter: drop-shadow(0 0 30px gold); }
    100% { filter: drop-shadow(0 0 10px gold); }
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.fish.clicked {
    animation: fadeOut 0.5s forwards;
    filter: brightness(1.5);
}

/* Styles for miles popup */
.miles-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    color: black; /* Default color for regular fish */
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    font-weight: bold;
    font-size: 16px;
    pointer-events: none; /* Ensure the bubble itself is not clickable */
    z-index: 20; /* Ensure popups are on top */
    transition: all 0.5s ease-in-out;
    transform: translate(-50%, -50%);
    animation: fadeOut 1s forwards; /* Fade out animation */
}

/* Base style for all miles popups */
.miles-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    font-weight: bold;
    font-size: 16px;
    pointer-events: none;
    z-index: 20;
    transition: all 0.5s ease-in-out;
    transform: translate(-50%, -50%);
    animation: fadeOut 1s forwards;
}

/* Styling for the gold fish popup */
.miles-popup.gold {
    color: darkgoldenrod; /* Color for golden fish popups */
}

/* Styling for regular fish popup */
.miles-popup.regular {
    color: black; /* Default color for regular fish */
}

/* Animation for fading out the popup */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.bug {
    position: absolute;
    width: 50px;
    height: auto;
    cursor: pointer;
    pointer-events: auto;
    animation: wiggle 1s infinite;
    z-index: 2000;
    transition: opacity 0.5s ease-out;
}

// CSS for the shine effect
@keyframes shineEffect {
    0% { filter: drop-shadow(0 0 10px gold); }
    50% { filter: drop-shadow(0 0 30px gold); }
    100% { filter: drop-shadow(0 0 10px gold); }
}

.bug.golden-shine {
    filter: drop-shadow(0 0 10px gold);
    animation: shineEffect 1s infinite;
    animation: wiggle 1s infinite;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.bug.clicked {
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.5); }
}

.bug-miles-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.8); /* Background with slight transparency */
    color: green;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    font-weight: bold;
    font-size: 16px;
    animation: fadeOut 1s forwards;
    transition: all 0.5s ease-in-out;
    z-index: 1000;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.miles-popup {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    color: green;
    font-weight: bold;
    font-size: 18px;
    border-radius: 5px;
    padding: 5px 10px;
    pointer-events: none;
    opacity: 1;
    animation: popupFade 1s forwards;
    z-index: 2002;
}

@keyframes popupFade {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* Style for click multiplier effect */
.clicker-button.multiplier-active {
    border: 2px solid gold;
    box-shadow: 0 0 10px gold;
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* Style for losing miles effect */
.miles-lost {
    color: red;
    animation: flash 0.5s 1;
}

@keyframes flash {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Style for Rover's Shop Button */
.rovers-shop-icon-container {
    position: fixed;
    top: 83vh; /* Converted from 670px */
    left: 4%; /* Center horizontally, already responsive */
    transform: translateX(-50%); /* Adjust for true centering */
    cursor: pointer;
    z-index: 1000;
}

.rovers-shop-icon {
    width: 150px; /* Adjust size as needed */
    transition: transform 0.2s;
}

.rovers-shop-icon:hover {
    transform: scale(1.1);
}

/* Style for Inventory Button */
.inventory-icon-container {
    position: fixed;
    bottom: 15%; /* Adjust vertical position from the bottom of the viewport */
    right: 91.6%; /* Adjust horizontal position from the right of the viewport */
    cursor: pointer;
    z-index: 1000; /* Ensure it appears above other elements */
}

.inventory-icon {
    width: 150px; /* Maintain fixed size of the icon */
    height: auto; /* Maintain aspect ratio */
    transition: transform 0.2s;
}

.inventory-icon:hover {
    transform: scale(1.1); /* Slightly increase size on hover for effect */
}

/* General styling for pop-up sections */
.shop-section, .inventory-section {
    position: fixed;
    top: 40%; /* Adjust the vertical position */
    left: 90%; /* Adjust the horizontal position */
    transform: translate(-50%, -50%); /* Centers the window based on top and left */
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 330px;
    width: 90%;
    max-height: 80%;
    overflow-y: auto;
    display: none;
    opacity: 0.95; /* Slight opacity for background effect */
    color: #fff; /* Ensure text is visible over the background */
}

/* Specific background image for Rover's Shop without opacity */
.shop-section {
    background-image: url('assets/rovers-shop-background.png'); /* Path to Rover's Shop background image */
    color: #fff; /* Ensure text is visible over the image */
    /* Removed opacity: 0.95; */
}

/* CSS for Rover's Shop title */
.shop-header h2 {
    color: #ff0000; /* Red color for the title */
}

/* Specific background image for Inventory */
.inventory-section {
    background-image: url('assets/inventory-background.png'); /* Path to Inventory background image */
}

/* Style for headers with close buttons */
.shop-header, .inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 15px;
}

/* Changed title text color for Rover's Shop */
.shop-header h2 {
    margin: 0;
    font-size: 24px;
    color: #ff0000; /* Red title text for Rover's Shop */
}

/* Style for shop items */
.shop-item {
    position: relative; /* Position relative for the tooltip */
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
    margin-bottom: 10px;
}

.shop-item:hover {
    background: #f1f1f1;
}

/* Tooltip styling */
.shop-item .tooltip, .inventory-item .tooltip {
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.shop-item:hover .tooltip, .inventory-item:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Show the tooltip on hover */
.shop-item:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Style for inventory items */
.inventory-item {
    position: relative; /* Position relative for the tooltip */
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
    margin-bottom: 10px;
}

.inventory-item:hover {
    background: #f1f1f1;
}

/* Tooltip styling for inventory */
.inventory-item .tooltip {
    visibility: hidden; /* Initially hidden */
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 100%; /* Position above the inventory item */
    left: 50%;
    transform: translateX(-50%);
    width: 200px; /* Set a width for the tooltip */
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none; /* Prevent interaction with the tooltip */
}

/* Show the tooltip on hover */
.inventory-item:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Checkbox styling in inventory */
.inventory-item label {
    cursor: pointer;
}

.inventory-item input[type="checkbox"] {
    margin-left: 10px;
}

/* Styling for headers with close buttons */
.shop-header, .inventory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.shop-header h2, .inventory-header h2 {
    margin: 0;
    font-size: 24px;
    color: #fff; /* Ensure header text is visible */
}

/* Close button styling */
.close-button {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #fff; /* Ensure close button is visible */
    transition: color 0.3s;
}

.close-button:hover {
    color: #ddd;
}

/* Style for shop and inventory items */
.shop-items, .inventory-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.shop-item, .inventory-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
}

.shop-item:hover, .inventory-item:hover {
    background: #f1f1f1;
}

.shop-item img, .inventory-item img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

.shop-item span, .inventory-item span {
    flex-grow: 1;
    color: #555;
}

/* Style for the buy button in the shop */
.shop-item button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.shop-item button:hover {
    background: #45a049;
}

.shop-item button[disabled] {
    background: gray;
    cursor: not-allowed;
}

/* Checkbox styling in inventory */
.inventory-item label {
    cursor: pointer;
}

.inventory-item input[type="checkbox"] {
    margin-left: 10px;
}

/* Style for click multiplier bubble */
.click-multiplier-bubble {
    position: absolute;
    background-color: green;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    animation: bubbleUp 1s ease-out forwards;
    transform: translate(-50%, -50%);
}

/* Style for miles lost bubble */
.miles-lost-bubble {
    position: absolute;
    background-color: red;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    animation: bubbleUp 1s ease-out forwards;
    transform: translate(-50%, -50%);
}

/* Animation for bubbles */
@keyframes bubbleUp {
    from {
        transform: translate(-50%, -50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -50%) translateY(-50px);
        opacity: 0;
    }
}

/* Style for purchased shop items */
.shop-item.purchased {
    opacity: 0.5; /* Dim the item */
    pointer-events: none; /* Disable interaction */
}

.shop-item button[disabled] {
    background-color: gray;
    cursor: not-allowed;
}

.inventory-item label {
    color: #008000; /* Change this to your desired color, e.g., green */
    font-weight: bold; /* Optional: make it bold for emphasis */
    font-size: 14px; /* Adjust font size as needed */
    margin-left: 10px; /* Optional: add spacing */
}

/* Add this CSS to your style.css or within a <style> tag */
.fortune-orb {
    width: 50px; /* Adjust size as needed */
    height: 50px;
    position: absolute;
    animation: fadeIn 1s ease-in forwards, fadeOut 1s ease-out 9s forwards; /* Fade in and fade out */
    cursor: pointer; /* Change cursor to pointer on hover */
    z-index: 1000; /* Ensure it appears above other elements */
    pointer-events: auto; /* Allow clicking */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Add this CSS to your style.css or within a <style> tag */
.coin {
    width: 100px;
    height: 100px;
    background-image: url('assets/coin.png'); /* Image of a coin */
    background-size: cover;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* Ensure it appears above other elements */
}

@keyframes flipCoin {
    0% {
        transform: rotateY(0deg) translate(-50%, -50%);
    }
    50% {
        transform: rotateY(1800deg) translate(-50%, -50%);
    }
    100% {
        transform: rotateY(3600deg) translate(-50%, -50%);
    }
}

.bubble {
    transition: transform 0.5s ease, background-color 0.5s ease;
}

.multiplier-x5 {
    background-color: rgba(255, 215, 0, 0.8); /* A golden background */
    transform: scale(1.2); /* Enlarge the bubble */
    color: white;
    font-weight: bold;
}

.task.holiday-task {
    background-color: rgba(255, 215, 0, 0.8); /* Example: Golden background */
    border-color: gold;
}

.task.holiday-task img {
    border-radius: 50%; /* Circular images for holiday tasks */
    box-shadow: 0 0 10px rgba(255, 223, 0, 0.8);
}

#milestones-button {
    position: fixed;
    bottom: 15vh;
    right: 82vw;
    border: none; /* Remove the default button border */
    background: transparent; /* Remove any background */
    cursor: pointer;
    padding: 0; /* Remove default padding */
    z-index: 1000; /* Ensure the button is above other content */
}

#milestones-button img {
    width: 60px;  /* Adjust the size of the button image */
    height: 60px; /* Adjust the size of the button image */
}

/* Fine-tune with additional offset if needed */
#milestones-button {
    top: auto;   /* Auto, since we're positioning from the bottom */
    left: auto;  /* Auto, since we're positioning from the right */
}

#achievements-button {
    position: fixed;
    bottom: 13vh;
    right: 85vw;
    border: none;
    background: transparent;
    cursor: pointer;
}

#achievements-button img {
    width: 100px;
    height: 100px;
}

/* CSS for shake animation */
.shake {
    animation: shake 0.7s infinite;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-2px);
    }
    50% {
        transform: translateX(2px);
    }
    75% {
        transform: translateX(-2px);
    }
}

.achievement {
    width: calc(30% - 20px); /* Adjust this value to make rectangles thinner */
    margin: 10px;
    background-color: rgba(250, 250, 210, 0.8); /* Light yellow with opacity */
    border: 2px solid rgba(245, 222, 179, 0.8); /* Wheat color with opacity */
    border-radius: 10px;
    padding: 5px; /* Reduce padding to make it more compact */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    height: 20px; /* Adjusted height for compactness */
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}


/* Ensure the shaking image doesn't interfere with clicks */
#achievements-button img {
    pointer-events: none; /* Ensure the shake animation doesn't block clicks */
}

.phone-container {
    position: absolute; /* Fixed position relative to the viewport */
    flex-direction: column;
    bottom: 3vh; /* Adjust the distance from the bottom of the viewport */
    right: 81vw; /* Adjust the distance from the right of the viewport */
    align-items: center;
    width: 180px; /* Set the width of the container */
    max-width: 180px;
    height: 250px; /* Set the height of the container */
    background-color: rgba(255, 255, 255, 0.8); /* Slightly opaque white background */
    border-radius: 60px; /* Increase the border-radius to make it more oval */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    margin: auto;
}

.phone-container button {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.phone-container img {
    width: 50px; /* Adjust size of icons */
    height: 50px;
    margin-bottom: 10px; /* Space between icons */
}

.time-display {
    font-size: 16px; /* Adjust the size as needed */
    color: grey; /* Set the font color to grey */
    text-align: center; /* Center the text horizontally */
    padding: 10px 0; /* Add some padding to position it nicely at the top */
    width: 100%; /* Make sure it spans the full width of the container */
}

.icon-name-display {
    font-size: 14px; /* Adjust size as needed */
    color: black; /* Set the font color to black */
    text-align: center; /* Center the text horizontally */
    margin-top: 5px; /* Space between time and icon name */
    width: 100%;
    min-height: 20px; /* Ensure space is reserved even when no icon is hovered */
    margin-bottom: 10px; /* Space between icon name and icons */
}

/* Style for Upgrades Shop Button */
.upgrades-shop-icon-container {
    position: fixed;
    bottom: 150px; /* Adjust vertical position */
    left: 4%; /* Adjust horizontal position */
    cursor: pointer;
    z-index: 1000;
}

.upgrades-shop-icon {
    width: 150px;
    height: 150px;
    transition: transform 0.2s;
}

.upgrades-shop-icon:hover {
    transform: scale(1.1);
}

/* Style for Upgrades Shop Section */
#upgrades-shop {
    background-image: url('assets/upgrades-shop-background.png'); /* Background image for the shop */
    color: #fff; /* Ensure text visibility */
    opacity: 0.95; /* Slight opacity for background effect */
}

/* Reuse existing shop item styles */

@media only screen and (max-width: 768px) {
    .container {
        width: 95%;
        left: 2.5vw;
        top: 5vh;
        padding: 10px;
    }
    .shop-icon {
        width: 100px;
        height: 100px;
    }
    .reset-icon {
        width: 30px;
        height: 30px;
    }
    .tools {
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
    }
}

@media only screen and (max-width: 480px) {
    .container {
        width: 100%;
        left: 0;
        top: 2vh;
        padding: 5px;
    }
    .shop-icon {
        width: 80px;
        height: 80px;
    }
    .reset-icon {
        width: 20px;
        height: 20px;
    }
}

/* === Android / Mobile Portrait Layout === */
@media (max-width: 768px) {

    /* Phone: bottom-left */
    .phone-container {
        position: fixed;
        bottom: 10px;
        left: 10px;
        right: auto;
        top: auto;
        margin: 0;
        width: 150px;
        max-width: 45vw;
        height: auto;
        border-radius: 40px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        z-index: 1000;
    }

    /* Tools: bottom-right */
    .tools {
        position: fixed;
        bottom: 10px;
        right: 10px;
        left: auto;
        top: auto;
        transform: none;
        width: 170px;
        max-height: 40vh;
        overflow-y: auto;
        z-index: 1000;
    }

    /* Reset icon – keep it visible but out of the way */
    .reset-icon-container {
        position: fixed;
        top: 10px;
        right: 10px;
        left: auto;
        bottom: auto;
        z-index: 1000;
    }

    /* Shop / Inventory / Black Market:
       vertical stack on the right side above the tools */
    .shop-icon-container,
    .inventory-icon-container,
    .rovers-shop-icon-container {
        position: fixed;
        right: 10px;
        left: auto;
        transform: none;
        z-index: 1000;
    }

    /* Order from bottom → top (you can swap the bottom values if you want another order) */
    .shop-icon-container {
        bottom: 150px;   /* just above tools */
    }

    .inventory-icon-container {
        bottom: 220px;
    }

    .rovers-shop-icon-container {
        bottom: 290px;   /* highest of the three */
    }

    /* Slightly smaller icons on mobile */
    .shop-icon,
    .inventory-icon,
    .rovers-shop-icon,
    .reset-icon {
        width: 60px;
        height: 60px;
    }

    /* Make sure the main stuff doesn’t overlap horribly */
    body {
        display: block;
        margin: 0;
        padding: 0;
        background-attachment: scroll;
    }

    .title {
        position: static;
        transform: none;
        margin: 10px auto 5px;
        text-align: center;
        font-size: 1.4rem;
    }

    .container {
        position: static;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 10px;
    }

    /* Tasks: 5 in a row, no wrapping */
    .tasks {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 6px;
        margin-top: 16px;
    }

    .task {
        width: 60px;
        height: 60px;
        padding: 4px;
        border-radius: 50%;
    }

    .task span {
        font-size: 0.55rem;
        text-align: center;
    }

    .miles-bubble {
        bottom: -12px;
        font-size: 0.55rem;
        padding: 3px 5px;
    }

    .task-details {
        margin-top: 8px;
        font-size: 0.75rem;
        text-align: center;
    }
}
