.centered-form {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.centered-form > label {
    margin-bottom: 8px;
}

.centered-form > button {
    margin-top: 16px;
}

.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 0 16px 0;
    height: 100%;
}

.nav-bar {
    display: flex;
    height: 32px;
}

.nav-bar > div {
    flex-grow: 1;
    background-color: var(--bg-color-accent-strong);
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-bar > div > a {
    text-decoration: none;
    color: var(--text-color-on-accent-strong);
}

.nav-bar > div.active > a {
    color: var(--text-color-on-accent-strong-selected);
}

#decks {
    padding: 16px;
}

#card-details {
    z-index: 100;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

#card-details > div {
    background-color: var(--bg-color-accent);
    border-radius: 16px;
    padding: 16px;
    width: 400px;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color2);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

#card-details > div > img {
    height: 75px;
    aspect-ratio: 5 / 6;
}

#card-details > div > .card-details-unit {
    width: 100%;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#open-chest {
    z-index: 100;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

#open-chest > div {
    background-color: var(--bg-color-accent);
    border-radius: 16px;
    padding: 16px;
    width: 600px;
    height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color2);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

#decks > .tabs {
    display: flex;
}

#decks > .tabs > button {
    flex-grow: 1;
    background-color: var(--bg-color-ui);
    color: var(--text-color);
}

#decks > .tabs > button.selected {
    background-color: var(--bg-color-ui-selected);
}

#decks > .deck {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 0 auto;
    max-width: 350px;
}

.cards-pool {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cards-pool.not-owned img {
    filter: grayscale(100%);
}

.cards-container > .card {
    position: relative;
    height: 75px;
    aspect-ratio: 5 / 6;
}

.cards-container > .card.empty {
    border: 1px solid var(--border-color2);
    border-radius: 6px;
}

.cards-container > .card > * {
    position: absolute;
}

.cards-container > .card > img {
    width: 100%;
    height: 100%;
}

.cards-container > .card > .card-count {
    backdrop-filter: blur(4px) saturate(10%) brightness(0.6);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color2);
    color: #fff;
    width: 90%;
    left: 5%;
    height: 16px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    overflow: hidden;
}

.cards-container > .card > .card-level {
    backdrop-filter: blur(4px) saturate(10%) brightness(0.6);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color2);
    color: #fff;
    width: 16px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    right: 0;
    bottom: 0;
}

.history-matches-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 16px;
}

.history-matches-list > div {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color2);
    margin: 4px;
    padding: 4px;
}

.history-matches-list > div > div:nth-child(1) {
    display: flex;
    flex-direction: row;
}

.history-matches-list > div > div:nth-child(1) > div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.history-matches-list > div > div:nth-child(1) > div:nth-child(1),
.history-matches-list > div > div:nth-child(1) > div:nth-child(3) {
    flex: 1;
    font-weight: bold;
}

.history-matches-list > div > div:nth-child(2) {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.history-matches-list > div > div:nth-child(3) {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 16px;
}

.chests-list > div {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color2);
    margin: 4px;
    padding: 4px;
}

.chests-list > div > div:nth-child(1) {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.chests-list > div > div:nth-child(2) {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
