* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #2c2c2c;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background-color: #181818;
    min-height: 72px;
    padding: 12px 24px;
    color: #fff;
    border-bottom: 3px solid #4d4d4d;
}
header a {
    color: #fff;
    text-decoration: none;
}
footer {
    text-align: center;
    color: #fff;
    margin-bottom: 10px;
}












.tierlist-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 40px 20px;
}

#tierlists-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2px;
    width: 100%;
}

.create-tierlist {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(1100px, 100%);
    height: 100px;
    border: 2px dashed #777;
    border-radius: 8px;
    color: #aaa;
    background-color: #555;
    font-size: 48px;
    cursor: pointer;
}

.create-tierlist:hover {
    color: #fff;
    background-color: #666;
}

.tierlist {
    width: min(1100px, 100%);
    border: 2px solid #181818;
}

.tier-row {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    align-items: stretch;
    min-height: 100px;
}

.tier-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    box-sizing: border-box;
    padding: 8px;

    color: #fff;
    background-color: red;
}

.tier-label-editor {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;

    color: #fff;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    outline: none;
}

.tier-label-editor:empty::before {
    content: attr(data-placeholder);
    color: #fff;
    opacity: 0.75;
}

.tier-games {
    display: flex;
    flex: 1;
    min-height: 100px;
    background-color: #222;
    padding: 8px;
    gap: 8px;
    flex-wrap: wrap;
    align-content: flex-start;
    min-width: 0;
    position: relative;
}
.delete-tier {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
}

.delete-tier:hover {
    color: #dc3545;
}

.tier-games .game-card {
    flex: 0 0 80px;
    width: 80px;
}

.tier-games .game-card img {
    width: 80px;
    height: 80px;
}

.games-pool {
    width: min(1100px, 100%);
    margin: 40px auto 0;
    padding: 20px;
    background-color: #181818;
    border: 1px solid #444;
}

.games-pool h2 {
    margin: 0 0 16px;
    color: white;
    font-size: 24px;
    text-align: center;
}

.games-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    width: 100%;
}

.game-card {
    width: 100%;
    min-width: 0;
    cursor: grab;
}

.game-card.is-dragging {
    opacity: 0.45;
    cursor: grabbing;
}

.game-card:active {
    cursor: grabbing;
}

.game-card img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

.game-card span {
    display: block;
    overflow: hidden;
    margin-top: 6px;
    color: #fff;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}










.public-tierlist {
    width: min(1100px, 100%);
    margin-bottom: 32px;
}

.public-tierlist-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: #fff;
    background-color: #181818;
    border: 2px solid #181818;
}

.public-tierlist-header h2 {
    margin: 0;
    font-size: 24px;
}

.public-tierlist-header span {
    color: #aaa;
    font-size: 16px;
}






.user-stats {
    width: min(1100px, 100%);
    margin: 32px auto;
    color: #fff;
    border-bottom: 5px solid #fff;
}
.user-name {
    display: flex;
    align-items: center;
    justify-content: space-around;
}
.tierlist-counter {
    text-align: center;
    margin: 32px 0;
}






.delete-button,
.edit-button {
    padding: 0;
    border: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
    font-size: inherit;
}

.delete-button:hover,
.edit-button:hover {
    color: #dc3545;
}




.profile-menu-button,
.go-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 24px;
}
