body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin-top: 50px;
}
table {
    border-collapse: collapse;
}
td {
    width: 120px !important;
    height: 120px !important;
    min-width: 120px !important;
    min-height: 120px !important;
    max-width: 120px !important;
    max-height: 120px !important;
    border: 2px solid #333;
    text-align: center;
    vertical-align: middle;
    font-size: 14px;
    cursor: pointer;
    background-color: #fff;
    user-select: none;
    text-wrap: wrap;
    overflow-wrap: break-word;


}
td.free {
    background-color: #8bc34a;
    color: #fff;
    font-weight: bold;
}
td.selected {
    background-color: #ff9800;
    color: #fff;
}
td.disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.5;
}
#winMessage {
    margin-top: 20px;
    font-size: 24px;
    color: green;
    font-weight: bold;
}

.burger-icon {
    width: 40px;
    height: 40px;
    background: url('../img/burger.png') no-repeat center;
    background-size: contain;
    cursor: pointer;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    transition: filter 0.3s;
}

.burger-icon.white {
    filter: invert(1);
}

.side-nav {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #333;
    color: white;
    transition: left 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
}

.side-nav.open {
    left: 0;
}

.side-nav a {
    padding: 20px;
    text-decoration: none;
    color: white;
    border-bottom: 1px solid #444;
    transition: background 0.2s;
}

.side-nav a:hover {
    background-color: #444;
}

.ranking-container {
    max-width: 800px;
    margin: 2rem auto;
    font-family: 'Segoe UI', sans-serif;
    background: #f9fafb;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ranking-header, .ranking-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem 1rem;
    align-items: center;
}

.ranking-header {
    background: #e0f2fe;
    border-radius: 8px;
    font-weight: bold;
    color: #0369a1;
    margin-bottom: 0.5rem;
}

.ranking-row {
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}

.position {
    font-weight: bold;
    color: #1d4ed8;
}

.name {
    color: #111827;
}

.points, .games {
    text-align: center;
    color: #334155;
}

@media (max-width: 600px) {
    .ranking-header {
        display: none;
    }

    .ranking-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .ranking-row > div {
        margin: 2px 0;
        width: 100%;
    }

    .ranking-row .position::before {
        content: "Pozycja: ";
        font-weight: bold;
    }

    .ranking-row .name::before {
        content: "Gracz: ";
        font-weight: bold;
    }

    .ranking-row .points::before {
        content: "Punkty: ";
        font-weight: bold;
    }

    .ranking-row .games::before {
        content: "Gry: ";
        font-weight: bold;
    }

}

.side-nav {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.side-nav .logout-btn {
    margin-top: auto;
    padding: 10px;
    text-align: center;
    margin-bottom: 50px;
}

#date-history {
    width: 25%;
    margin-left: 37.5%;
    margin-bottom: 30px;
}

.select-wrapper {
    position: relative;
    display: inline-block;
    width: 250px;
}

#changeCategory {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 12px;
    background: #fff;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: border 0.2s, box-shadow 0.2s;
    margin-bottom: 30px;
}

#changeCategory:focus {
    border: 1px solid #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.3);
    outline: none;
}

.select-wrapper::after {
    content: "▼";
    font-size: 14px;
    color: #555;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

#game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    margin-left: 20%;
}

#game-content > div {
    width: 30%;
}
#game-content > table {
    width: auto;
}

@media(min-width: 768px) {
    #game-content {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }

    #game-content > table {
        order: 0;
    }

    #game-content > div {
        order: 1;
        width: auto;
        margin-left: 20px;
    }
}
