@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/* Reset and Base Styles */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: "Raleway", sans-serif;
    letter-spacing: 0.05em;
    background-color: #000; /* Fallback background */
}

/* Globe Container */
#globeViz {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Tooltip Styles */
#tooltip {
    position: absolute;
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #aaa;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    display: none;
    z-index: 1003; /* Above all interactive elements */
}

/* Playback Controls Container */
#playbackControls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1001; /* Above info panel */
    display: flex;
    gap: 10px;
}

/* Playback Buttons */
#playbackControls button {
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    color: #aaa;
    padding: 10px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 24px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
    transition-duration: 200ms;
}

#playbackControls button:hover {
    background-color: white;
    color: #000;
}

/* Expanded Info Panel */
#expandedInfo {
    position: absolute;
    top: 80px; /* Positioned below playback controls */
    left: 30px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 15px 20px;
    border-radius: 0;
    width: 300px;
    border-left: white 3px solid;
    display: none; /* Hidden by default */
    z-index: 1000; /* Below playbackControls */
    transition-duration: 100ms;
}

/* Info Panel Show State */
#expandedInfo.show {
    display: block;
}

/* Info Panel Header */
#expandedInfo h2 {
    margin: 10px 0 5px 0;
    font-size: 18px;
}

/* Info Panel Details */
#expandedInfo p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #aaa;
}

/* Info Panel Link */
#expandedInfo a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

#expandedInfo a:hover {
    text-decoration: underline;
}

/* Close Info Panel Button */
#closeInfo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 18px;
    cursor: pointer;
    transition: color 0.3s ease;
    transition-duration: 200ms;
}

#closeInfo:hover {
    color: #00d1ff;
}

/* Layer Controls Container */
#layerControls {
    position: absolute;
    bottom: 30px;
    left: 40px;
    z-index: 1001; /* Above info panel */
    display: flex;
    gap: 20px;
    overflow: visible;
}

/* Layer Toggle Icons */
#layerControls img {
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 1101;
    position: relative;
    transition-duration: 100ms
}

#layerLabels {
    position: fixed;
    bottom: 70px;
    left: 30px;
}
#layerLabels p {
    font-size: 14px;
    position: absolute;
    width: 200px;
    bottom: 0;
    display: block;
    transition-duration: 100ms;
} 
#layerLabels p#naturalDisasterIconLabel {
    color:  #e0a000;
    display: none;
}
#layerLabels p#geoPolIconLabel {
    color:  #ff1515;
    display: none;
}

#layerControls img:hover  {
    opacity: 0.5;
}


/* #geoPolIconLabel {
    color: #8AE000;
    visibility: hidden;
}
#naturalDisasterIconLabel {
    color: #ff1515;
    visibility: hidden;
}

/* #layerControls img#geoPolIcon:hover::after {
    content: 'hover!';
    color: #ff1515;
    position: fixed;
    top: 40px;
    left: 0px;
} */


/* Language Switcher */
#languageSwitcher {
    position: absolute;
    top: 20px;
    right: 80px;
    z-index: 1001;
    display: flex;
    gap: 15px;
}

#languageSwitcher button {
    background-color: rgba(0, 0, 0, 0.7);
    color: #aaa;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 14px;
    line-height: 30px;
    transition-duration: 200ms;
}

#languageSwitcher button:hover {
    background-color: white;
    color: #000;
}

/* Help Button */
#helpButton {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #aaa;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    z-index: 1002; /* Above all other elements except tooltip and playbackControls */
    transition: background-color 0.3s ease, transform 0.2s ease;
    transition-duration: 200ms;
}

#helpButton:hover {
    background-color: white;
    color: #000;
}

/* About Panel */
#aboutPanel {
    position: fixed;
    top: 0;
    right: -400px;  /* Hidden offscreen initially */
    width: 320px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    color: #aaa;
    padding: 20px;
    transition: right 0.5s ease;  /* Smooth sliding transition */
    z-index: 1000; /* Below helpButton */
    overflow-y: auto; /* Scroll if content exceeds height */
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.5);
}

/* About Panel Show State */
#aboutPanel.show {
    right: 0; /* Slide in */
}

/* Close About Panel Button */
#closeAbout {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #aaa;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
}

#closeAbout:hover {
    color: #00d1ff;
}

/* About Panel Title */
#aboutPanel h2 {
    margin-top: 80px; /* Space below the close button */
    font-size: 20px;
}

/* About Panel Text */
#aboutPanel p {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 10px;
}

/* Music Player */
#musicPlayer {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border-radius: 8px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

/* Album Art */
#albumArt {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
}

/* Track Info */
#trackInfo {
    flex-grow: 1;
}

#trackInfo a {
    color: #aaa;
    text-decoration: none;
    /* font-weight: bold; */
    font-size: 14px;
    margin: 0 5px 0 3px;
    transition-duration: 100ms;
}

#trackInfo a:hover {
    color: white;
}

/* Music Player Buttons */
#musicPlayer button {
    background-color: rgba(0, 0, 0, 0);
    border: none;
    font-size: 20px;
    line-height: 20px;
    margin-bottom: -2px;
    color: #aaa;
    cursor: pointer;
    transition-duration: 100ms;
    text-decoration: none;
}

#musicPlayer button:hover {
    color: white;
}

/* Volume Control (Appended by audioPlayer.js) */
#musicPlayer input[type="range"] {
    width: 100px;
    cursor: pointer;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    width: 100px;
    height: 100px;
    background: #ffffff88;
    border-radius: 50%;
    animation: ripple-animation 1s ease-out;
    pointer-events: none; /* Allow clicks to pass through */
    z-index: 1004; /* Above all other elements */
}

@keyframes ripple-animation {
    from {
        transform: scale(0);
        opacity: 0.5;
    }
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    /* Adjust playback controls for smaller screens */

    #expandedInfo {
        left: 0;
        top: 50px;
        width: calc(100% - 40px);
    }

    #expandedInfo h2 {
        font-size: 14px;
        margin: 0;
    }

    #expandedInfo p, #expandedInfo a {
        font-size: 12px;
        margin-bottom: 0.2em;
    }

    #playbackControls {
        top: 10px;
        left: 10px;
        gap: 8px;
    }

    #playbackControls button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    /* Adjust layer controls */
    #layerControls {
        bottom: 10px;
        left: 10px;
        gap: 8px;
    }

    #layerControls img {
        width: 35px;
        height: 35px;
    }

    /* Adjust help button */
    #helpButton {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    /* Adjust about panel width */
    #aboutPanel {
        width: 250px;
    }

    /* Adjust music player */
    #musicPlayer {
        bottom: 0;
        right: 0;
        padding: 8px 12px;
        gap: 8px;
    }

    #albumArt {
        width: 50px;
        height: 50px;
    }

    #languageSwitcher {
        top: 10px;
        right: 60px;
    }
    
    #languageSwitcher button {
        font-size: 12px;
        line-height: 24px;
    }

    #trackInfo a {
        font-size: 12px;
    }
    #trackInfo {
        width: 60px;
    }

    #musicPlayer button {
        font-size: 14px;
    }

    #layerLabels {
        bottom: 50px;
        left: 10px;
        display: none;
    }

    #layerLabels p {
        font-size: 12px;
    }
    
}
