
.chessboard-wrapper {
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 840px;
    margin: 20px auto;
    box-sizing: border-box;
}

.chessboard-title {
    font-size: 25px;
    color: #bababa;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chessboard-main-title {
    font-size: 30px;
    color: #fff;
    margin: 30px 0 20px 0;
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@media (min-height: 599.3px) {
    .chessboard-title {
        font-size: 30px;
    }
    .chessboard-main-title {
        font-size: 40px;
    }
}

.chessboard {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
    width: 100%;
    aspect-ratio: 1 / 1;
    container-type: inline-size;
}

/* Varianta: Winners (hnědo-žlutá) */
.chessboard-wrapper.winners {
    background-color: #4a4030;
    border: 4px solid #322b1f;
}
.winners .square.light { background-color: #f0d9b5; }
.winners .square.dark { background-color: #b58863; }

/* Varianta: Losers (temné, umrlčí tóny) */
.chessboard-wrapper.losers {
    background-color: #2a2a2a;
    border: 4px solid #1a1a1a;
}
.losers .square.light { background-color: #aaaaaa; }
.losers .square.dark { background-color: #777777; }

/* Varianta: Personal (modrá) */
.chessboard-wrapper.personal {
    background-color: #1a2a3a;
    border: 4px solid #0d1a26;
}
.personal .square.light { background-color: #97b2c7; }
.personal .square.dark { background-color: #546f82; }

.square {
    overflow: hidden;
}

.square img {
    max-width: 80%;
    max-height: 65%;
    object-fit: contain;
    display: block;
}

.square .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.9em;
    color: #333;
    font-weight: bold;
    box-sizing: border-box;
    padding: 2px;
}

@container (max-width: 400px) {
    .square .content {
        font-size: 0.7em;
    }
}

/* Tooltip styly */
.chess-tooltip {
    position: absolute;
    z-index: 1000;
    background: #262421;
    color: #bababa;
    border: 1px solid #3c3934;
    border-radius: 3px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    padding: 10px;
    width: 250px;
    display: none;
}

.chess-tooltip.visible {
    display: block;
}

.chess-tooltip h2 {
    font-size: 1.2em;
    margin-bottom: 10px;
    border-bottom: 1px solid #3c3934;
    padding-bottom: 5px;
}

.chess-tooltip ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chess-tooltip li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    font-size: 1.05em;
}

.chess-tooltip a {
    color: #d5d5d5;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.chess-tooltip a:hover {
    color: #fff;
}

.chess-tooltip .uflair {
    height: 1.2em;
    margin-left: 4px;
}

/* Tabulka ovládání polí pod šachovnicí */
.player-control-table-wrapper {
    margin: 10px auto 40px auto;
    max-width: 840px;
    width: 100%;
    background: #262421;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.player-control-table {
    width: 100%;
    border-collapse: collapse;
    color: #bababa;
    font-size: 1.05em;
}

.player-control-table th {
    background: #3c3934;
    padding: 10px;
    text-align: left;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

.player-control-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #3c3934;
}

.player-control-table tr:last-child td {
    border-bottom: none;
}

.player-control-table tr:hover {
    background: #2e2c29;
}

.player-control-table .user-link:hover {
    color: #fff !important;
}
