body {
    display: flex;
    justify-content: flex-start;
    
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
    font-family: Arial, sans-serif;
}

.container {
    width: 60vw;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    
    align-items: center;
    background-image: url(tlo.jpg);
    background-repeat:no-repeat;
    background-position:center center;
}

#back-btn {
    top: 2%;
    right: 1%;
    font-size: 20px;
    color: black;
    border-radius: 20px;
    position: absolute;
    cursor: pointer;
    display: flex;
    background-color:burlywood;
    padding:2px 1px;
}

#diceCount {
    font-size: 20px;
    margin-bottom: 20px;
}

#diceContainer {
    display: grid;
    grid-template-columns: repeat(4, auto); /* Kolumny po 3 */
    grid-gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.cube {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 2s;
    border-radius:15px;
}

.face {
    width: 100px;
    height: 100px;
    position: absolute;
    background-color: #fff;
    border: 2px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    border-radius: 15px;
}

.front  { transform: rotateY(0deg) translateZ(50px); }
.back   { transform: rotateY(180deg) translateZ(50px); }
.left   { transform: rotateY(-90deg) translateZ(50px); }
.right  { transform: rotateY(90deg) translateZ(50px); }
.top    { transform: rotateX(90deg) translateZ(50px); }
.bottom { transform: rotateX(-90deg) translateZ(50px); }

#result {
    font-size: 1.5rem;
    margin-top: 20px;
}


table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ddd;
}

th, td {
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f4f4f4;
}

button, input {
    width: 200px; /* Ujednolicona szerokość */
    height: 50px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    text-align: center;
    border-radius:15px;
}

input {
    width: 50%; /* Możesz dostosować szerokość inputa */
    padding: 10px;
    font-size: 16px;
    border-radius: 15px;
}

#username, #submitButton {
    display: none;
}

@media (orientation: portrait) {
    .container {
        width: 100vw;
        height: auto;
        display: flex;
        position: center;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center start;
        background-image: url(tlo.jpg);
        background-size:cover;
        background-repeat: no-repeat;
        background-position: center center;
    }

    #h1 {
        margin-top: 2px;
        margin-bottom: 2px;
    }

    #back-btn {
        top: 0%;
        right: 1%;
        font-size: 15px;
        color: black;
        border-radius: 20px;
        position: absolute;
        cursor: pointer;
        display: flex;
    }

    #diceContainer {
        display: grid;
        grid-template-columns: repeat(3, auto); /* Kolumny po 3 */
        grid-gap: 10px;
        justify-content: center;
        margin-bottom: 2px;
    }

    .cube {
        width: 70px;
        height: 70px;
        position: relative;
        transform-style: preserve-3d;
        transition: transform 2s;
    }
    .face {
        width: 70px;
        height: 70px;
        position: absolute;
        background-color: #fff;
        border: 2px solid #333;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 2rem;
        border-radius: 15px;
    }

    .front {transform: rotateY(0deg) translateZ(35px);         }
    .back {        transform: rotateY(180deg) translateZ(35px);    }
    .left {        transform: rotateY(-90deg) translateZ(35px);    }
    .right {        transform: rotateY(90deg) translateZ(35px);    }
    .top {        transform: rotateX(90deg) translateZ(35px);    }
    .bottom {        transform: rotateX(-90deg) translateZ(35px);    }
    
    #diceCount {
        font-size: 20px;
        margin-bottom: 15px;
        margin-top: 20px;
    }

    button, input {
        width: 150px; /* Ujednolicona szerokość */
        height: 30px;
        margin-top: 15px;
        margin-bottom: 10px;
        font-size: 1.2rem;
        text-align: center;
        border-radius: 15px;
    }

    input {
        display:none;
        width: 70%; /* Możesz dostosować szerokość inputa */
        padding: 2px;
        font-size: 1.2rem;
    }

    #result {
        font-size: 1rem;
        margin-top: 2px;
    }

}
