@font-face {
    font-family: 'Roboto';
    src: url('../font/Roboto-Regular.ttf');
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    color: white;

    /* thx https://stackoverflow.com/a/29517547/10945188 */
    background: url('../media/background_fallback.png') no-repeat center center fixed;
    background-size: cover;
    background-position: center;
    
    text-align: center;
}

#loading_screen {
    min-height: 100%;
    background-color: white;
    transition: opacity 0.6s linear;
}

.centered_element {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-right: 0%;
    transform: translate(-50%, -50%);
}

/* thx https://www.w3schools.com/howto/howto_css_fullscreen_video.asp */
#background_video {
    position: absolute;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    opacity: 0;
    transition: opacity 0.6s linear;
    z-index: -999;
}

img {
    max-width: 100%;
    height: auto;
    pointer-events: none;
}

#language_suggestion {
    position: absolute;
    left: 6px;
    top: 6px;
    margin: 6px;
}

#contents {
    opacity: 0;
    transition: opacity 1s linear;
}

#description_window {
    display: none;
    background-color: black;
    opacity: 0.8;
    width: 95%;
    height: 95%;
    border-radius: 10px;
}

#description {
    width: 95%;
    height: 95%;
    text-align: left;
    padding: 5px;
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-color: #0b4f4a #5f9e98;
    scrollbar-width: thin;
}

#close-button {
    right: 5px;
    top: 5px;
    z-index: 999;
}

/* thx https://codepen.io/MarioDesigns/pen/woJgeo */
@keyframes float {
	0% {
		transform: translatey(-20px);
	}
	50% {
		transform: translatey(-40px);
	}
	100% {
		transform: translatey(-20px);
	}
}

#logo {
    transform: translatey(-40px);
    animation: float 6s ease-in-out infinite;
}

#server_selector {
    display: grid;
    gap: 16px;
    min-height: 0;
}

.server_card {
    height: 15vh;
    display: flex;
    align-items: center;
    gap: 16px;
}

.server_card img {
    height: 15vh;
}

#footer {
    position: absolute;
    color: #D3D3D3;
    bottom: 15px;
    left: 20%;
    right: 20%;
}

a {
    color: #D3D3D3
}

@media (min-width: 512px) {
    img {
        max-width: 80%;
    }
    
    #language_suggestion {
        left: 12px;
        top: 12px;
        margin: 12px;
    }
}

@media (min-width: 999px) {
    img {
        max-width: 70%;
    }
    
    #language_suggestion {
        left: 20px;
        top: 20px;
        margin: 20px;
    }
    
    #server_selector {
        grid-template-columns: 1fr 1fr 1fr 1fr;
    }
    
    .server_card {
        flex-direction: column;
        text-align: center;
    }

    #description_window {
        width: 50%;
        height: 80%;
        padding: 30px;
        border-radius: 20px;
    }
}
