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

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&family=Noto+Serif+JP:wght@200..900&display=swap');


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

.displayNone {
    display: none;
}
/* 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 */
}

#logo {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1001; /* Above info panel */
    width: 40px;
    height: 40px;
}
#logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
@media (hover: hover) {
    #logo:hover img {
        opacity: 0.6;
        transition-duration: 200ms;
    }
}
/* Playback Controls Container */
#playbackControls {
    position: absolute;
    top: 20px;
    left: 230px;
    z-index: 500; /* Above info panel */
    display: flex;
    gap: 15px;
}

/* Playback Buttons */
#playbackControls button {
    cursor: pointer;
    width: 40px;
    height: 40px;
    background-color: unset;
    padding: 0;
    border: none;
}

#playbackControls button img {
    width: 40px;
    height: 40px;
}

@media (hover: hover) {
    #playbackControls button img:hover {
        opacity: 0.5;
        transition-duration: 200ms;
    }
}

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

/* Expanded Info Panel */
#expandedInfo {
    position: absolute;
    top: 80px; /* Positioned below playback controls */
    left: 35px;
    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 #infoLink {
    color: white;
    text-decoration: none;
    font-weight: bold;
    margin: 10px 0 0 0;
    display: block;
}

#expandedInfo .cite-num {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: white 2px solid;
    color:white;
    font-weight: 700;
    font-size: 12px;
    text-align: center;
    margin: 0 0 0 3px;
    cursor: pointer;
    text-decoration: none;
}

#eventImg {
    width: 200px;
    height: auto;
    display: block;
}

@media (hover: hover) {
    #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;
}

@media (hover: hover) {
    #closeInfo:hover {
        color: white;
    }
}

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

#layerControls .v-line {
    width: 2px;
    height: 40px;
    display: inline-block;
    color: #666666;
    background-color: #666666;
}

/* 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: 100px;
}
#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;
}

@media (hover: hover) {
    #layerControls img:hover  {
        opacity: 0.5;
    }
}

#conflictList {
    position: absolute;
    bottom: 80px; 
    left: 35px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 15px 20px;
    border-radius: 0;
    width: 300px;
    height: 400px;
    max-height: calc(100% - 500px);
    border-left: white 3px solid;
    overflow: auto;
    display: none; /* Hidden by default */
    z-index: 1000; /* Below playbackControls */
    scrollbar-color: #444 #000;
}

#conflictList li {
    margin: 5px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #aaa;
    list-style: none;
    cursor: pointer;
}

@media (hover: hover) {
    #conflictList li:hover {
        font-weight: bold;
        color: white;
    }
}

/* Language Switcher */
#languageSwitcher {
    position: absolute;
    top: 20px;
    left: 20px;
    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;
    border: #666666 1px solid;
}

@media (hover: hover) {
    #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: #666666 1px solid;
    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;
    border: #666666 1px solid;
}

@media (hover: hover) {
    #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);
}

#aboutPanel::-webkit-scrollbar {
    display: none; 
}

/* 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;
}

@media (hover: hover) {
    #closeAbout:hover {
        color: #ff1515;
    }
}

/* 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: 901;
    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;
}

@media (hover: hover) {
    #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: 60px;
        width: calc(100% - 40px);
    }

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

    #logo {
        top: 10px;
        left: 10px;
        width: 35px;
        height: 35px;
    }

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

    #playbackControls {
        top: 10px;
        left: 65px;
        gap: 15px;
    }

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

    #playbackControls button img {
        width: 35px;
        height: 35px;
    }

    /* 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;
    }
    
}

@media (max-width: 500px) {
    #trackInfo, #volumeControl {
        display: none;
    }
    #eventImg {
        width: 100px;
    }
}
