/* Reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Full-page setup */
body, html {
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent scrolling */
    display: flex;
    justify-content: center;
    align-items: center;
    background: black;
}

/* Fullscreen background video */
#campfire-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#sound-toggle {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background: rgb(255, 217, 0); /* Nice gold color */
    border: none;
    cursor: pointer;
    width: 3rem;
    height: 3rem;
    border-radius: 50%; /* Makes it circular */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 12px rgb(255, 255, 255);
    animation: shimmer 2s infinite alternate; /* Faster & more noticeable */
}

/* Hidden panel with text */
#sound-toggle::after {
    content: "Listen to the campfire crackle";
    color: black;
    font-size: 1.1rem;
    font-family: "brandon-grotesque", sans-serif;
    font-weight: 400;
    white-space: nowrap;
    opacity: 0;
    position: absolute;
    left: 3.2rem;
}

/* Expands on hover */
#sound-toggle:hover {
    width: 12rem; /* Expands to reveal text */
    padding-right: 0.5rem;
    justify-content: left;
    background: rgb(255, 207, 49);
}

/* Show text on hover */
#sound-toggle:hover::after {
    opacity: 1;
}
/* Sound icon size */
#sound-toggle img {
    width: 1.8rem;
    height: auto;
}

#sound-toggle:hover img {
    margin-left: 0.6rem;
}

/* Hidden text next to the icon */
#sound-toggle span {
    color: black;
    white-space: nowrap;
    opacity: 0;
    margin-left: 0.5rem;
    transition: opacity 0.3s ease, margin-left 0.4s ease;
}

/* Expand on hover */
#sound-toggle:hover {
    width: 17.5rem; /* Expands to a smooth oval shape */
    border-radius: 2rem; /* Oval instead of circle */
    animation: bubble-pop 0.4s ease-out;
}

#sound-toggle:hover span {
    opacity: 1;
    margin-left: 0.5rem;
}

/* Home button on the right */
#home-button {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgb(255, 217, 0); /* Matching gold color */
    color: black;
    font-size: 1.2rem;
    font-family: "brandon-grotesque", sans-serif;
    font-weight: 700;
    border: none;
    cursor: pointer;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem; /* Oval shape */
    box-shadow: 0 0 12px rgb(255, 255, 255);
    animation: shimmer 2s infinite alternate;
    transition: all 0.3s ease;
}

/* Hover effect */
#home-button:hover {
    background: rgb(255, 207, 49); /* Slightly lighter gold */
    transform: scale(1.05);
    box-shadow: 0 0 25px rgb(255, 190, 11);
    animation: none;
    color: rgba(0, 0, 0, 0.774);
    border-radius: 1.2rem;
}


/* Bubble Pop Animation */
@keyframes bubble-pop {
    0% {
        opacity: 1;
        width: 3rem;
    }
    80% {
        width: 20rem;
    }
    100% {
        transform: scale(1);
    }
}

/* Stronger Shimmer Effect */
@keyframes shimmer {
    0% {
        box-shadow: 0 0 15px rgba(255, 217, 0, 0.8), 0 0 30px rgba(255, 217, 0, 0.5);
        background: linear-gradient(45deg, rgb(255, 217, 0), #ffe600);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 217, 0, 1), 0 0 40px rgba(255, 217, 0, 0.8);
        background: linear-gradient(45deg, #ffe600, rgb(255, 217, 0));
    }
    100% {
        box-shadow: 0 0 15px rgba(255, 217, 0, 0.8), 0 0 30px rgba(255, 217, 0, 0.5);
        background: linear-gradient(45deg, rgb(255, 217, 0), #ffe600);
    }
}

/* Default Home Button Icon (Hidden for Desktop) */
#home-button img {
    display: none;
    width: 1.7rem;
    height: auto;
}

/* Remove text hover effect for the sound button on mobile */
@media screen and (max-width: 768px) {
    #sound-toggle {
        top: 1rem;
        left: 1rem;
        width: 2.8rem;
        height: 2.8rem;
        transition: all 0.3s ease-in;
    }

    #sound-toggle:hover {
        width: 2.8rem; /* No expansion */
        animation: none;
        border-radius: 0.5rem;
    }

    #sound-toggle:hover img {
       margin-left: 0.5rem;
       animation: none;
    }

    #sound-toggle::after {
        display: none; /* Hide the text effect */
    }

    #sound-toggle span {
        display: none; /* Hide the text effect */
    }

    /* Make Home Button an Icon */
    #home-button {
        top: 1rem;
        right: 1rem;
        width: 2.8rem;
        height: 2.8rem;
        padding: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        color: transparent;
        box-shadow: 0 0 8px rgba(255, 217, 0, 0.6); /* Reduced glow */
        animation: shimmer-mobile 2s infinite alternate;
    }

    #home-button span {
        display: none; /* Hide text */
    }

    #home-button img {
        display: block; /* Show icon */
    }

    #home-button:hover {
        animation: none;
        border-radius: 0.5rem;
    }
}

/* Even smaller screens (phones) */
@media screen and (max-width: 480px) {
    #sound-toggle {
        top: 0.8rem;
        left: 0.8rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    #sound-toggle:hover {
        width: 2.5rem; /* No expansion */
        animation: none;
        border-radius: 0.5rem;
    }

    #sound-toggle img {
        width: 1.4rem;
    }

    #sound-toggle:hover img {
        margin-left: 0.5rem;
     }
 
     #sound-toggle::after {
         display: none; /* Hide the text effect */
     }
 
     #sound-toggle span {
         display: none; /* Hide the text effect */
     }

    /* Adjust Home button for small screens */
    #home-button {
        top: 0.8rem;
        right: 0.8rem;
        width: 2.5rem;
        height: 2.5rem;
    }

    #home-button img {
        width: 1.6rem;
    }

    #home-button:hover {
        animation: none;
        border-radius: 0.5rem;
    }
}

@keyframes shimmer-mobile {
    0% {
        box-shadow: 0 0 6px rgba(255, 217, 0, 0.5), 0 0 12px rgba(255, 217, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 10px rgba(255, 217, 0, 0.6), 0 0 15px rgba(255, 217, 0, 0.4);
    }
    100% {
        box-shadow: 0 0 6px rgba(255, 217, 0, 0.5), 0 0 12px rgba(255, 217, 0, 0.3);
    }
}