body {
    background-color: #ebebeb;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: "Comic Sans MS", cursive, sans-serif;
}

#piškovrky {
    width: 100%;
    max-width: 1100px;
    margin: auto;
}

/* --- MENU --- */
#menu {
    display: block;
    text-align: center;
    padding: 1rem;
}

.nadpis {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.select {
    border: solid black 5px;
    background-color: #c0c0c0;
    border-radius: 20px;
    margin: 2rem auto;
    padding: 1.5rem;
    max-width: 500px;
}

.napis {
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.moznosti {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.moznost, .moznost1 {
    display: flex;
    justify-content: center;
    align-items: center;
}

.moznost1 { 
    width: 120px;
    height: 120px;
    border-radius: 20px;
    font-size: 1.8rem;
    border: solid black 5px;
    background-color: #ebebeb;
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: bold;
}

#pvpmode {
    background-color: #3a6ea5;
}

.playt {
    display: flex;
    justify-content: center;
}

.play {
    font-family: cursive;
    font-size: 1.8rem;
    background-color: #ffffff;
    border: solid 5px;
    border-radius: 20px;
    padding: 0.5rem 2rem;
    transition: all 0.2s ease;
    cursor: pointer;
    font-weight: bold;
}

.play:hover, .moznost1:hover, .zpet:hover, .dalsikolo:hover {
    background-color: #3a6ea5;
    transform: scale(1.05);
}

/* --- HRA --- */
#hra {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

.bod {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    border: solid black 5px;
    border-radius: 15px;
    width: 100%;
    max-width: 350px;
    padding: 1rem;
    background-color: #c0c0c0;
    order: -1;
    box-sizing: border-box;
}

.pocetkol {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    gap: 10px;
}

.body {
    font-size: 1.2rem;
    background-color: #ffede1;
    border: solid black 5px;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    width: 80%;
    display: flex;
    justify-content: center;
    font-weight: bold;
}

#bodyO {
    background-color: #004e98;
    color: white;
}

#bod1, #pocetO {
    color: white;
}

#bod2, #pocetX {
    color: black;
}

.tlacitka {
    display: flex;
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.dalsikolo, .zpet {
    font-family: cursive;
    font-size: 1.2rem;
    border: solid black 5px;
    border-radius: 20px;
    background-color: #ffffff;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    font-weight: bold;
}

#playbutton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Herní deska --- */
.deska {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1;
}

.deskahry {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 5px;
    border: 5px solid black;
    border-radius: 15px;
    padding: 5px;
    background-color: black;
    box-sizing: border-box;
}

.rada {
    display: flex;
    flex: 1;
    gap: 5px;
}

.pole {
    display: flex;
    background-color: #ebebeb;
    flex: 1;
    justify-content: center;
    align-items: center;
    font-size: clamp(3rem, 15vw, 6rem);
    color: black;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.pole:hover {
    background-color: #ffffff;
}

.pole, p, button {
    font-family: "Comic Sans MS", cursive, sans-serif;
}

/* --- RESPONZIVITA (Tablet a PC) --- */
@media (min-width: 768px) {
    #hra {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 3rem;
    }

    .bod {
        order: 0;
        max-width: 300px;
    }
}
