@font-face {
    font-family: "dots" ;
    src: url("../public/DotMatrix-OneRegular.otf");
}

*::-webkit-scrollbar {
    display: none;
}

* {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

body{
    background-color: black;
    font-family: "dots";
    overscroll-behavior: none;
    
}

header{
    position: fixed;
    top: 0;
    width: 100dvw;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1dvh;
    border-bottom: 0.5px solid white;
    height: 5dvh;
    background-color: black;
}

button{
    background-color: transparent;
    color: rgb(155, 155, 155);
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
}

button:hover{
    text-underline-offset: 8px;
    text-decoration: underline;
    color: white;
}

#main{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: scroll;
    height: 200dvh;
    width: 100dvw;
    overflow: hidden;
    overscroll-behavior: none;
}

.screen{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    width: 100dvw;
    scroll-snap-align: start;
}

/*--------- MAIN TITLE SCREEN ---------*/

#website_title{
    color: white;
    font-size: 20dvh;
    font-family: "dots";
    cursor: pointer;
}


/*--------- BETA 1 SCREEN ---------*/

#beta_1{
    flex-direction: column;
}

.slider-container{
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100dvw;
    border: 0.5px solid white;
    background-color: black;
}

/* Make canvas sliders touch-friendly */
.slider{
    touch-action: none; /* prevent scrolling while dragging */
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    width: 78dvw;
    margin-right: 2dvw;
}
.slider-name{
    color: white;
    font-size: 2dvh;
    text-align: right;
    align-self: right;
    width: 9dvw;
    margin-right:1dvw;
    

}

.slider-value{
    position: relative;
    color: white;
    font-size: 2dvh;
    text-align: left;
    width: 10dvw;

}

#sliders_container{
    position: absolute;
    bottom:0;
    display: flex;
    flex-direction: column;
    z-index: 1002; /* ensure sliders are above the WebGL canvas */
    pointer-events: auto;
}

#three_canvas{
    position: absolute;
    top: 0;
    left: 0;
    width: 100dvw;
    height: 100dvh;
    z-index: 0;
    pointer-events: auto;
    overflow: hidden;
}

#event_title{
    display: none;
}

#event_description{
    display: none;
}
#event_metadata{
    user-select: none;
    position: absolute;
    top: 0dvh;
     width: 25dvw;
    right: 0dvw;
    color: white;
    font-size: 2dvh;
    max-height: 200dvh;
    overflow-y: auto;
    padding: 1.5dvh;
    padding-top: 0;
    border: 0.5px solid white; 
    background-color: rgb(0, 0, 0); 
    z-index: 10;
    display: none;
    height: 80dvh;
    transition: height 0.3s ease;
}

#event_metadata.large{
    /* height: 100dvh;
    transition: height 0.3s ease; */
}

.event-entry{
    margin-bottom: 1.5dvh;
    padding: 1dvh;
    padding-left: 1.5dvh;
    display: flex;
    flex-direction: column;
}

.event-entry-header{
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 0.8dvh;
    font-size: 1.3dvh;
}

.event-number{
    color: #ffffff;
    margin-right: 0.5dvh;
}

.event-title-small{
    color: #ffffff;
}

.event-entry-data{
    display: flex;
    flex-direction: column;
    gap: 0.3dvh;
    font-size: 1dvh;
}

.event-field{
    display: flex;
    gap: 0.1dvh;
    flex-direction: column;
    padding-top: 2dvh;
    padding-bottom: 2dvh;
}

.event-field-label{
    color: #ffffff;
    min-width: 6dvw;
    font-size: 2dvh;
}

.event-field-value{
    color: #ffffff;
    word-break: break-word;
    flex: 1;
    font-size: 2dvh;
    font-weight: 300;
    padding-left: 30px;
}

.metadata-field{
    margin-bottom: 1dvh;
    padding: 0.5dvh 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.3);
}

.metadata-label{
    font-weight: bold;
    color: #cccccc;
}

.metadata-value{
    color: #ffffff;
    word-break: break-word;
}

/* Mobile-specific layout tweaks */
@media (max-width: 768px) {
    header{
        flex-direction: column;
        align-items: stretch;
        height: auto;
        padding: 1dvh 2vw;
        gap: 0.5dvh;
    }

    header > div{
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
        width: 100%;
    }

    header button{
        width: auto;
        flex: 1 1 auto;
        padding: 8px 10px;
        font-size: 2.2dvh;
    }

    /* Make event metadata sit centered at bottom and wider on mobile */
    #event_metadata{
        position: fixed;
        /* sit above sliders: sliders will be at ~2vh from bottom, metadata above them */
        top: 60dvh;
        width: 96dvw;
        left: 2dvw;
        height: 20dvh;
        padding: 1.2dvh;
        background: transparent; /* no solid background */
        -webkit-backdrop-filter: blur(8px);
        border: 0.5px solid rgba(255,255,255,0.06);
        background-color: rgba(0, 0, 0, 0.652);
        border: 0.5px solid white;
        font-size: 2.2dvh;
        z-index: 1001;

    }

    .event-entry{
        padding: 1dvh 0.5dvh;
    }

    /* Place sliders at the very bottom so metadata can sit above them */
    #sliders_container{
        bottom: 0;
        position: absolute;
        width: 100%;
        z-index: 1000;
        
    }

    #maintenace{
        top: auto;
        bottom: 25vh;
        transform: scale(0.8);
    }
    #connexion{
        top: auto;
        bottom: 25vh;   
        transform: scale(0.8);
    }
    #start_screen{
        width: 80dvw;
        top: auto;
        bottom: 25vh;  
        background-color: rgba(0, 0, 0, 0.652);
        height: 50dvh;
    }

    #website_title{
        font-size: 5dvh;
    }
}

#maintenace{
    top: 130vh;

    position: absolute;
    display: none;
    color: white;
    font-family: "dots";
    height: fit-content;
    width: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 5dvh;
    border: 0.5px solid white;
}

#connexion{
    top: 130vh;
    position: absolute;
    display: none;
    color: white;
    font-family: "dots";
    height: fit-content;
    width: fit-content;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 5dvh;
    border: 0.5px solid white;
}

#start_screen{
    top: 120dvh;
    position: absolute;
    display: flex;
    color: white;
    font-family: "dots";
    height: 50dvh;
    width: 70dvw;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    padding: 5dvh;
    border: 0.5px solid white;
    background-color: rgba(0, 0, 0, 0.652);
    overflow: scroll;

}

@keyframes blink-animation {
    0%, 100% { background-color: rgb(0, 0, 0); }
    50% { background-color: rgba(255, 255, 255, 0.223); }
}

.blink {
    /* animation: blink-animation 1s steps(10, start) infinite; */
}

#helper{
    position: fixed;
    bottom: 30dvh;
    right: 2dvw;
    z-index: 10000000;
    color: white;
    animation: blink-animation 1s steps(10, start) infinite;
    width: fit-content;
    height: fit-content;
    opacity: 0;
}

#scheme_button{
    position: fixed;
    top: 1dvh;
    left: 1dvw;
    z-index: 1000;
    background-color: transparent;
    color: rgb(155, 155, 155);
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
}

#scheme_button:hover{
    text-underline-offset: 8px;
    text-decoration: underline;
    color: white;
}

#scheme_canvas{
    position: fixed;
    top: 5dvh;
    left: 35dvw;
    width: 30dvw;
    height: auto;
    z-index: 1000000;
    overflow: hidden;
    background-color: black;
    border: 0.5px solid white;
    display: none;
}

#scheme_canvas.visibleScheme{
    display: block;
}