html {
    padding: 0;
    margin: 0;
    font-family: "AnimeAce", sans-serif;
}

body {
    padding: 0;
    margin: 0;
}
#lang_button {
    position: absolute;
    width: 75px;
    right: 0px;
}

div#bg-container {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    z-index: -1;
}

img#bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

div#board {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    aspect-ratio: 978 / 625;
}

img#board-image {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: -1;
}

div#teams-list {
    position: relative;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 5%;
    width: 85%;
    height: 70%;
}

div.teams-item {
    width: 20%;
    height: auto;
    position: relative;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.18, 0.89, 0.26, 1.97);
}

div.teams-item:hover {
    transform: scale(1.05);
}

div.teams-item img {
    width: 100%;
    height: auto;
}

.team-icons {
    position: absolute;
    top: 20%;
    right: 0;
}

div.teams-item p {
    position: absolute;
    top: 3%;
    left: 50%;
    margin: 0;
    padding: 0;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    transform: translateX(-50%);
    color: #000;
    font-weight: normal;
}


#popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.815) 31.73%, rgba(0, 0, 0, 0.64) 70.25%, rgba(0, 0, 0, 0.226) 100%);

}

#popup.active {
    display: flex;
}

#popup-list {
    position: relative;
    max-height: 95vh;
    max-width: 95vw;
    aspect-ratio: 532 / 825;
    width: min(95vw, calc(95vh * 532 / 825));
    height: min(95vh, calc(95vw * 825 / 532));
    display: flex;
    justify-content: center;
    align-items: center;
}

#poster-content {
    position: relative;
    max-height: 95vh;
    max-width: 95vw;
    aspect-ratio: 532 / 825;
    width: min(95vw, calc(95vh * 532 / 825));
    height: min(95vh, calc(95vw * 825 / 532));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

#poster-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
}


#close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 30px;
    height: auto;
    cursor: pointer;
    z-index: 2;
}

#poster-title {
    position: relative;
    z-index: 3;
    margin: 45px 30px 20px 30px;
    color: #2c2c2c;
    /* to be changed later */
    text-align: center;
    width: calc(100% - 60px);
    font-size: 2.5em;
    font-weight: bold;
}

#poster-subtitle {
    position: relative;
    z-index: 3;
    margin: -10px 30px 10px 30px;
    color: #555;
    /* to be changed later */
    text-align: center;
    width: calc(100% - 60px);
    font-size: 1.25em;
    font-weight: normal;
}

#poster-body {
    position: relative;
    z-index: 3;
    color: #4a4a4a;
    /* to be changed later */
    margin: 0 30px 45px 30px;
    width: calc(100% - 60px);
    overflow-y: auto;
    overflow-x: hidden;
    text-align: left;
}

#poster-body::-webkit-scrollbar {
    width: 8px;
}

#poster-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

#poster-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

#poster-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.members-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    width: 100%;
    align-items: stretch;
}

.member-item {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.18, 0.89, 0.26, 1.97);
    border-radius: 6px;
    font-size: 1em;
    word-wrap: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    text-align: center;
    line-height: 1.3;
    height: 42px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.member-item .captain-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: #2c2c2c;
    /* to be changed later */
    font-size: 0.75em;
    font-weight: bold;
    flex: 0 0 auto;
}

.member-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1a1a1a;
    /* to be changed later */
    font-weight: bold;
    transform: translateX(5px);
}

.member-item:last-child {
    border-bottom: none;
}

#headshot {
    max-width: 100%;
}

.member-details {
    /* text-align: center; */
    padding: 20px 0;
}

.member-details .quote {
    font-style: italic;
    margin: 20px 0;
    line-height: 1.8;
    font-size: 1.15em;
    color: #2c2c2c;
    /* to be changed later */
}

.member-details .teams {
    margin-top: 30px;
    font-size: 1em;
    color: #555;
    /* to be changed later */
    padding: 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}


/* freaking phone */
@media (pointer: coarse) {
  .teams-item:hover {
    transform: none;
  }
  .member-item:hover {
    transform: none;
  }
}

@media (orientation: portrait) {
    div#board {
        height: 90%;
        aspect-ratio: 373 / 694;
        width: auto;
    }
    div#teams-list {
        top: 1%;
        align-content: space-evenly;
        justify-content: space-evenly;
        height: 89.34%;
        width: 95%;
        gap: 0%;
    }
    div.teams-item {
        width: 35%;
    }

    #poster-title {
        font-size: 4.5em;
        margin-bottom: 40px;
        margin-top: 8%;
    }
    #poster-subtitle {
        font-size: 3em;
    }
    #poster-body {
        margin-bottom: 65px;
    }
    #close-btn {
        width: 8%;
    }
    .member-item {
        font-size: 2em;
        height: fit-content;
    }
    .member-item .captain-badge {
        width: 40px;
        height: 40px;
        font-size: 0.75em;
    }
    .member-details {
        padding: 0px 40px;
    }
    .member-details .quote {
        font-size: 2.5em;
    }
    .member-details .teams {
        font-size: 2em;
    }

}
