:root {
    --alabaster: #d8e2dc;
    --powder: #ffe5d9;
    --pastelPink: #ffcad4;
    --cherry: #f4acb7;
    --dusty: #9d8189;
    --shadow: 2px 2px var(--dusty);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--powder);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: var(--alabaster);
    font-size: 3rem;
    margin: 20px 0;
    text-shadow: var(--shadow);
    font-family: "Cherry Bomb One", sans-serif;
    font-weight: 400;
    font-size: 120px;
    font-style: normal;
}

div.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    background: #FFF1EB;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 500px;
    margin: 40px auto;
}

div.welcome-message h3 {
    color: var(--alabaster);
    text-shadow: var(--shadow);
    font-size: 3rem;
    margin-top: 0;
    margin-bottom: 10px;
    font-family: "Cherry Bomb One", sans-serif;
}

div.welcome-message p {
    font-size: 1.1rem;
    margin: 5px 0;
}

div.welcome-message .sub-text {
    font-size: 0.9rem;
    margin-top: 15px;
    font-style: italic;
}

form#formUsername {
    background: var(--alabaster);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    /* border */
}

button#startBtn {
    background-color: var(--dusty);
    border-radius: 4px;
    padding: 8px;
}

input#username,
input#msg {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
}

input#username:focus,
input#msg:focus {
    border-color: var(--dusty);
}

div.game-container {
    display: flex;
    gap: 20px;
    max-width: 1000px;
    margin-top: 20px;
}

div.canvas-area {
    background: var(--alabaster);
    padding: 15px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    gap: 15px;
}

button#logoutBtn {
    align-items: flex-start;
    background-color: #9d8189;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    transition: background 0.2s;
}

canvas#paintCanvas {
    background-color: white;
    cursor: crosshair;
    border-radius: 10px;
    border: 2px solid #eee;
}

div.score-bar {
    margin-bottom: 10px;
    padding: 5px;
    background: #ECF1EE;
    border-radius: 8px;
}

div.chat-area {
    /* width: 300px; */
    display: flex;
    flex-direction: column;
    background: #FAD6DC;
    border-radius: 15px;
    padding: 15px;
    box-shadow: var(--shadow);
}

div#chatbox {
    height: 350px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background-color: #FBE2E6;
    border-radius: 10px;
    border: 2px solid #eee;
    border-bottom: 2px solid #f1f2f6;
}

.textMessage {
    background: var(--alabaster);
    padding: 10px;
    border-radius: 15px 15px 15px 2px;
    max-width: 80%;
    position: relative;
    font-size: 0.9rem;
}

.textMessage.other {
    align-self: flex-end;
    background: #B9A4AA;
    border-radius: 15px 15px 2px 15px;
}

.username {
    font-weight: bold;
    font-size: 0.7rem;
    margin-bottom: 3px;
    display: block;
}

time {
    font-size: 0.6rem;
    color: #383838;
}

#formMessage {
    display: flex;
    margin-top: 10px;
    gap: 5px;
}

#formMessage input[type="text"] {
    flex-grow: 1;
}

.hidden {
    display: none;
}

.scoreboard-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 150px;
    overflow-y: auto;
    padding: 5px;
}

.score-row {
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ddd;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
}

span.player-name {
    font-weight: 500;
    color: var(--dusty);
    font-size: 0.9rem;
}

span.player-score {
    color: var(--dusty);
    background-color: var(--powder);
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    min-width: 45px;
    text-align: center;
}