@import url('https://fonts.googleapis.com/css2?family=Gruppo&display=swap');

/* General reset */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: "Gruppo", sans-serif;
}

#all {
    position: relative;
    width: 100%;
    height: 100%;
    background: url('../img/bg.jpg') no-repeat;
    background-size: cover;
    text-align: center;
}


/* header */
header {
    padding-top: 80px;
}

h1 {
    width: 665px;
    max-width: 90%;
    height: 91px;
    margin: 0 auto;
    background: url('../img/carbon_grooves.png') no-repeat center center;
    background-size: contain;
}

h1 span {
    position: absolute;
    visibility: hidden;
}

header h2 {
    max-width: 90%;
    margin: 20px auto 0 auto;
    color: #fff;
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* UI */
#bt-start, #ico-loading {
    position:absolute;
    top: max(calc(100vh / 2 - 54px), 250px);
    margin-left: -45px;
}

#bt-start {
    cursor: pointer;
    transition: filter 0.3s ease-in-out;
}

#bt-restart {
    z-index: 20;
    position:absolute;
    bottom: 50px;
    right: 50px;
    width: 60px;
    cursor: pointer;
    transition: filter 0.3s ease-in-out;
}

#bt-start:hover, #bt-restart:hover {
    filter: drop-shadow(0 0 3px rgba(128, 0, 128, 1)) drop-shadow(0 0 15px rgba(128, 0, 255, 1));
}

#country-select {
    position: absolute;
    bottom: 50px;
    width: 100%;
    text-align: center;
}

select#country {
    font-size: 1em;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #BF57CD;
}

#bt-info {
    z-index: 20;
    position:absolute;
    bottom: 50px;
    right: 50px;
    cursor: pointer;
    transition: filter 0.3s ease-in-out;
}

#bt-info:hover {
    filter: drop-shadow(0 0 15px rgba(128, 0, 255, 1));
}


/* UI: visualization */
#ui-visualization {
    transition: opacity 2s ease-in-out;
    opacity: 1;

    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

#ui-visualization.uiHidden {
    opacity: 0;
}

#panel-info {
    z-index: 1;
    position: fixed;
    display: flex;
    gap: 1rem;
    padding: 1rem;
    box-sizing: border-box;
    text-align: left;
    width: 80%;
    height: 28rem;
    bottom: -28rem;
    left: 10%;
    overflow-y: auto;
    border: solid #BF57CD;
    border-width: 2px 2px 0 2px;
    background-color: black;
    color: white;
    transition: bottom 0.3s ease-in-out;
}

#panel-info.open {
    bottom: 0;
}

.col-left {
    flex: 0 0 calc(30% - 0.5rem);
}

.col-right {
    flex: 0 0 calc(70% - 0.5rem);
}

.col-left p {
    font-size: 1.1em;
}

#panel-info h2 {
    margin-top: 0;
    text-align: center;
}

#panel-info .member-wrap {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

#panel-info .member {
    box-sizing: border-box;
    flex: 1 1 calc(33.333% - 1rem);
    background: #1d1d1d;
    padding: 1rem 1rem 0 1rem;
    border: 1px solid #6d6d6d;
}

#panel-info .member h3 {
    margin: 0;
    font-size: 1em;
}

#panel-info .member .url {
    margin-top: 0;
}


#panel-info .member h3 i {
    display: block;
    font-weight: normal;
    font-size: .9em;
}

#panel-info  a {
    font-size: .9em;
    color: #f082ff;
    text-decoration: none;
}

#panel-info a:hover {
    text-decoration: underline;
}

#visualization-heading {
    z-index: 100;
    position: absolute;
    top: 10vh;
    left: 10%;
    right: 0;
    border-top-left-radius: 3rem;
    border-bottom-left-radius: 3rem;
    padding: 1em;
    font-family: "Gruppo", sans-serif;
    font-size: 2rem;
    text-align: left;
    line-height: 2rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fef5ff;
    opacity: 0;
}

#visualization-heading.animate {
    animation: fadeInSlideOut 6s ease-in-out forwards;
}

@keyframes fadeInSlideOut {
    0% {
        opacity: 0;
        transform: translateX(0);
    }
    20% {
        opacity: 1;
        transform: translateX(0);
    }
    60% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 1;
        transform: translateX(100%);
    }
}




/* Mobile popup */
#mobile-warning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
    z-index: 9999;
}

#mobile-warning button {
    margin-top: 20px;
    padding: 10px 20px;
    border: none;
    background-color: #6a1b9a;
    color: white;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#mobile-warning button:hover {
    background-color: #8e24aa;
}






/* Responsive */
@media (max-width: 1200px) {
    .col-left {
        flex: 0 0 calc(50% - 0.5rem);
    }
    
    .col-right {
        flex: 0 0 calc(50% - 0.5rem);
    }

    #panel-info .member-wrap {
        flex-direction: column; /* Stack columns vertically */
        gap: 0.5rem; /* Adjust gap for smaller widths */
    }

    #panel-info .member {
        flex: 0 0 100%; /* Ensure each column takes full width */
        min-width: 0; /* Reset min-width */
    }

    #bt-info, #bt-restart {
        width: 30px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 720px) {
    
    header h2 {
        font-size: 1.6rem;
    }

    #panel-info {
        display: block; /* removes flex */
    }
}

@media (max-width: 400px) {
    
    header h2 {
        font-size: 1.4rem;
    }
}