body {
    font-family: 'Rajdhani', sans-serif;
    background-color: violet;
    width: 100vw;
    margin: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

.hidden {
    display: none;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.main-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-style: italic;
    min-height: inherit;
    width: 100%;
    max-width: 700px;
}

.main-section form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

}

.main-section h1 {
    font-size: 2.4em;
    max-width: 60vw;
    text-align: center;
}

h2 {
    text-align: center;
}

.btn-main, .btn-main:focus {
    outline: 0;
    border-radius: 10px;
    background-color: #a610a6;
    margin: 10px auto;
    height: 40px;
    width: 130px;
    font-weight: bolder;
}

.btn-main a {
    text-decoration: none;
    color: black;
}

.loader {
    border: 5px solid #e1b8fc;
    border-top: 5px solid #690569;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1500ms linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.game-id-div {
    width: 250px;
    display: flex;
    justify-content: center;
}

.game-data-input {
    height: 40px;
    width: 150px;
    border-radius: 25px;
    border: 2px solid #c006c0;
    padding: 5px 15px;
    font-size: 1.5em;
    text-align: center;
}

.game-data-input:focus {
    outline: 2px solid #ffc6ff;
}

.game-data-input::placeholder {
    font-size: 0.75em;
}

.error-message {
    position: absolute;
    color: darkred;
    width: 150px;
    text-align: center;
    bottom: 20px;
}

.game-info-div {
    border-radius: 25px;
    background-color: #d139d1;
    padding: 10px;
    font-weight: 500;
}

.board {
    display: flex;
    margin: 20px;
    max-width: 700px;
    max-height: 700px;

}

.board-table {
    border-radius: 20px;
    background-color: #943094;
    width: 100%;
    height: 100%;
}

.board-table, .board-table td {
    border: 3px solid #520152;
}

.board-table td {
    border-radius: 50px;
    padding: 1em;
}

.empty-ball {
    background-color: violet;
}

.ball-hover {
    background-color: #520152;
}

.btn-div {
    display: flex;
    justify-content: space-between;
    width: 90vw;
    max-width: 700px;
    flex-direction: row-reverse;
}

.result-heading {
    font-size: 2rem;
}

table.game-header {
    position: absolute;
    z-index: 2;
    top: 0;
    width: 90%;
    padding: 20px;
    font-size: 2rem;
    font-weight: 900;
    border-spacing: 5px;
    table-layout: fixed;
}

.game-header .player {
    text-align: left;
}

.game-header .opponent {
    text-align: right;
}

.game-header-nicknames > td {
    text-overflow: ellipsis;
    max-width: 35vw;
    overflow: hidden;
    padding: 0 5px;
}

.game-header-wins {
    padding: 0 5px;
    font-size: 2.5rem;
    text-shadow: -1px 0 black, 0 2px black, 2px 0 black, 0 -1px black;
}

.pick-color-div {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pick-color-div .color {
    display: inline-block;
    width: 40px;
    height: 40px;
    margin: 5px;
    border: 2px solid #c006c0;
    border-radius: 10px;
}

.pick-color-div .color:not(.picked-player):not(.picked-opponent):hover {
    opacity: 0.5;
    cursor: pointer;
}

.pick-color-div .color.picked-player, .pick-color-div .color.picked-opponent {
    font-size: 4rem;
    display: inline-block;
    color: hsl(317, 100%, 54%);
    border: hsl(317, 100%, 54%) 0.125em solid;
    box-shadow: inset 0 0 0.5em 0 rgba(255, 255, 255, 0.46), 0 0 0.5em 0 hsl(317, 100%, 54%);

}

.color-blue {
    background-color: blue;
}

.color-orange {
    background-color: #ff8200;
}

.color-cyan {
    background-color: cyan;
}

.color-magenta {
    background-color: magenta;
}

.color-green {
    background-color: springgreen;
}

@media screen and (max-width: 530px) {
    .main-section h1 {
        font-size: 1.8em;
    }

    .main-section h2 {
        font-size: 1.3em;
    }

    .main-section p, .main-section ol {
        font-size: 1.2em;
    }

}

.manual-section {
    display: flex;
    align-items: center;
    flex-direction: column;
    margin: 0 20px;
}

.manual-section h2 {
    align-self: flex-start;
}

p {
    width: 100%;
}

p, ol {
    font-size: 1.3rem;
    align-self: flex-start;
    margin: 15px 0;
}

ol {
    padding-left: 20px;
}

/* Simple scrollbar */
*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.1);
}

*::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

*::-webkit-scrollbar-thumb:active {
    background: rgba(0, 0, 0, 0.9);
}

td.last-put-ball, td.winning-ball{
    border: 3px solid #f8aef8;
    box-shadow: inset 0 0 0.5em 0 rgba(255, 255, 255, 0.46), 0 0 0.5em 0 hsl(317, 100%, 54%);
}