body {
    font-family: Arial, sans-serif;
    background-color: #242424;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100dvh;
    margin: 0;
    overflow: hidden;
}
.container {
    position: fixed;
    inset: 6px;
    background: rgb(245, 245, 245);
    border: 1px solid #cdcdcd;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.header {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: left;
    align-items: left;
    font-weight: bold;
    background-color: #e6e6e6;
    padding: 6px;
    border-radius: 8px;
    border: 1px solid #cdcdcd;
}
.title {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}
#usernameDisplay {
    max-width: fit-content;
    font-size: 14px;
    color: #666;
}

.clickable {
    cursor: pointer;
}
.users-info {
    position: absolute;
    right: 1rem;
}

.user-list {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

#userCount:hover+.user-list,
.user-list:hover {
    display: block;
}

.user-list div {
    padding: 3px 0;
    white-space: nowrap;
}
.canvas-container {
    position: relative;
    max-width: 512px;
    max-height: 512px;
    margin: 0 auto;
    margin-top: 20px; /* Adds 20px space above */
    overflow: hidden;
    border: 1px solid #ccc;
    background-color: white;
}
#pixelCanvas {
    transform-origin: top left;
    image-rendering: pixelated;
    width: 100%;
    height: 100%;
}
.controls {
    margin-top: 10px;
    text-align: center;
}
.color-picker {
    margin: 10px 0;
}
.color-option {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 0 5px;
    cursor: pointer;
    border: 1px solid #ccc;
}
.selected {
    border: 2px solid #007bff;
}
.tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    pointer-events: none; /* Prevents interfering with mouse events */
    z-index: 1000; /* Ensures it’s on top */
    display: none; /* Hidden by default */
}
.timer {
    position: absolute;
    bottom: 5px; /* 5px from bottom */
    right: 5px; /* 5px from right */
    background-color: rgba(200, 200, 200, 0.7); /* White, slightly transparente */
    color: black;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 16px;
    font-style: bold;
    z-index: 10; /* Above canvas content */
    display: none; /* Hidden by default */
    transition: background-color 0.3s ease; /* Smooth color change */
}
.timer.flash {
    background-color: rgba(255, 0, 0, 0.9); /* Red flash */
}