/* General Styles */
body {
    height: 100vh;
    overflow-x: hidden;
    background-image: linear-gradient(to right, #2c5364, #203a43, #0f2027, #203a43, #2c5364);
    /* background-image: linear-gradient(to right, #ff00ff, #ff7700); */
    /* background-image: linear-gradient(to right, #009ffd, #2a2a72, #009ffd); */
    /* background-image: linear-gradient(to right, #ff7eb3, #ff758c, #ff7eb3); */

    user-select: none;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

/* Login Page */
.login_body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login_container {
    width: 50%;
    max-width: 400px;
    padding: 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.login_container label {
    font-size: 2em;
    color: white;
    margin-bottom: 0.5em;
}

.login_container input {
    height: 3em;
    width: 100%;
    font-size: 1.5em;
    border-radius: 30px;
    border: 1px solid black;
    text-align: center;
}

/* Game Page */
#status, #word, .textContainer * {
    text-align: center;
    color: white;
}

.game-container {
    display: grid;
    grid-template-columns: 1fr 3fr 2fr;
    gap: 1em;
    width: 100vw;
    height: 100vh;
    padding: 1em;
    
}

.players-container {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    max-width: 15vw;
    padding: 1em;
    color: white;
    h2 {
        margin-left: 20px;
    }
}
#player_list {
    display: flex;
    flex-direction: column;
    gap: 0.8em;
    padding: 1em;
    overflow-y: auto;
}

.player {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 0.8em 1em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s;
}

.player:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.player h5 {
    margin: 0;
    font-size: 1.2em;
}

.player span {
    font-size: 1em;
    font-weight: normal;
    color: #eee;
}

.canvas-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5em;
}

#canvas {
    width: 100%;
    max-width: 50vw;
    height: 60vh;
    max-height: 100vh;
    aspect-ratio: 16 / 9;
    background-color: white;
    border: 2px solid black;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.chat-container {
    display: flex;
    max-height: 90vh;
    max-width: 30vw;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1em;
    color: white;
}

.chat {
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    border-radius: 20px;
    border: 1px solid black;
    flex-grow: 1;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.8);
    padding: 1em;
    color: black;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

.chat::-webkit-scrollbar {
    display: none;
}

.message {
    max-width: 80%;
    border-radius: 10px;
    padding: 10px;
    border: 1px solid black;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    background-color: lightgray;

    span {
        font-size: 1em;
        font-style: italic;
        color: rgba(0, 0, 0, 0.567);
    }
}

.myMessage {
    align-self: flex-end;
    background-color: lightblue;
    border: 1px solid #b1dfbb;
}

#messageInput {
    margin-top: 10px;
    height: 2em;
    width: 100%;
    border-radius: 30px;
    text-align: center;
    border: 1px solid black;
}

.error {
    color: red;
    text-align: center;
}

.options {
    display: flex;
    border-radius: 10px;
    width: fit-content; 
    visibility: hidden; 
    gap: 1em;
}

.options .current-color {
    height: 50px;
    width: 50px;
    background-color: black;
}

.options .row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2em;
    justify-content: center;
}

.options button {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 1em;
    border: 2px solid #ccc;
    background-clip: padding-box;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s;
}

.line-width button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
}

.options button:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.options .clear {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    padding: 1em;
    border-radius: 8px;
    font-size: 1.2em;
    background: #ffebeb;
}

.options .clear:hover {
    background: #ffcccc;
    transform: scale(1.05);
}


/* Responsive Design */
@media (max-width: 768px) {
    .options {
        flex-wrap: wrap;
        justify-content: center;
    }
}
