/********************** LEVEL BOARDS *****************************/
.level-board {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.level-board .title {
    display: flex;
    align-items: center;
    justify-content: center;
}

.level-board .title img {
    height: 1.7em;
    margin-right: 5px;
}

.level-board .illustration {
    max-width: 100%;
    margin-bottom: 25px;
}

/********************** LEVEL BAR *****************************/
.level-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 0 20px;
}

#level-bar {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 70px);
    justify-content: center;

    position: relative;
}

#level-bar .bar-box {
    height: 20px;
    position: relative;
}

#level-bar .bar-box.unfinished:not(:last-child) {
    border-right: 1.5px solid var(--gray);
}

#level-bar .bar-box:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}
#level-bar .bar-box:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

#level-bar .bar-box.unfinished {
    background-color: white;
}

#level-bar .bar-box.current {
    background-color: rgba(155, 89, 182, 0.5);
    background-color: color-mix(in srgb, var(--violet), transparent 50%);
    border-top: 1.5px solid var(--violet);
    border-bottom: 1.5px solid var(--violet);
    border-right: 1.5px solid var(--violet);
}

#level-bar .bar-box.current:first-child {
    border-left: 1.5px solid var(--violet);
}

#level-bar .bar-box.solved {
    background-color: var(--violet);
    border: 1.5px solid var(--violetHover);
}

/* when not the last .solved, avoid double border */
#level-bar .bar-box.solved:has(~.bar-box.solved) {
    border-right: none;
}

.white-screen #level-bar .bar-box.unfinished {
    background-color: var(--lightGray);
}

#level-circle {
    position: relative;
    top: 8px;

    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border-radius: 100%;

    background-color: white;

    background-position: 50% 60%;
    background-size: 75%;
}

.white-screen #level-circle {
    background-color: var(--lightGray);
}

#level-circle[data-level="0"] {
    background-image: url("https://www.umimeto.org/asset/global/img/badges/trophy-inactive.svg");
}

#level-circle[data-level="1"] {
    background-image: url("https://www.umimeto.org/asset/global/img/badges/trophies-numbered/trophy-1.svg");
}

#level-circle[data-level="2"] {
    background-image: url("https://www.umimeto.org/asset/global/img/badges/trophies-numbered/trophy-2.svg");
}

#level-circle[data-level="3"] {
    background-image: url("https://www.umimeto.org/asset/global/img/badges/trophies-numbered/trophy-3.svg");
}

#level-circle[data-level="4"] {
    background-image: url("https://www.umimeto.org/asset/global/img/badges/trophies-numbered/trophy-4.svg");
}

#level-circle[data-level="5"] {
    background-image: url("https://www.umimeto.org/asset/global/img/badges/trophies-numbered/trophy-5.svg");
}

#level-circle[data-level="6"] {
    background-image: url("https://www.umimeto.org/asset/global/img/badges/trophies-numbered/trophy-6.svg");
}

#level-circle[data-level="7"] {
    background-image: url("https://www.umimeto.org/asset/global/img/badges/trophies-numbered/trophy-7.svg");
}
