* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: #333;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    background-color: white;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    z-index: 10;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.right-sidebar {
    position: absolute;
    right: 0;
    top: 0;
    width: 280px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 10;
    overflow-y: auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #ff4500;
    font-size: 1.5rem;
    display: none;
}

.controls {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border: 2px solid #000;
    transform: scale(1.1);
}

.color-wheel-container {
    display: flex;
    justify-content: center;
    margin-top: 5px;
    width: 100%;
}

#color-wheel {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
    padding: 0;
}

.color-wheel-button {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, border-color 0.2s;
    background-color: white;
}

.color-wheel-button:hover {
    transform: scale(1.1);
}

.color-wheel-button.selected {
    border: 2px solid #000;
    transform: scale(1.1);
}

.color-wheel-button svg {
    width: 24px;
    height: 24px;
}

.info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    font-size: 14px;
}

#selected-color-display {
    display: flex;
    align-items: center;
    gap: 5px;
}

.color-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid #ccc;
}

.color-preview.eraser {
    background-color: #ffffff;
    background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd), 
                      linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd);
    background-size: 8px 8px;
    background-position: 0 0, 4px 4px;
    border: 1px solid #ccc;
}

.canvas-container {
    flex: 1;
    position: relative;
    width: calc(100% - 280px);
    height: 100%;
    overflow: hidden;
    background-color: #ddd;
    cursor: crosshair;
}

#pixel-canvas {
    position: absolute;
    background-color: #fff;
    image-rendering: pixelated;
    cursor: crosshair;
}

.hover-outline {
    position: absolute;
    border: 2px solid black;
    pointer-events: none;
    z-index: 2;
    box-sizing: border-box;
}

.zoom-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

button {
    background-color: #ff4500;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    background-color: #e03d00;
}

button.active {
    background-color: #333;
}

#delete-button {
    display: flex;
    align-items: center;
    gap: 5px;
}

#delete-button .eraser-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
}

#cooldown {
    font-weight: bold;
}

#cooldown.active {
    color: #ff4500;
}

.admin-panel {
    background-color: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.admin-panel.hidden {
    display: none;
}

.admin-panel h2 {
    font-size: 18px;
    color: #d9363e;
    margin-bottom: 15px;
    text-align: center;
}

.admin-command {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-command label {
    font-weight: bold;
    font-size: 14px;
}

.admin-command input[type="text"],
.admin-command input[type="number"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.admin-command button {
    background-color: #d9363e;
    color: white;
    padding: 10px;
    font-size: 14px;
}

.admin-command button:hover {
    background-color: #b82a31;
}

#admin-clear-all-btn {
    background-color: #ff4d4f;
}

#admin-clear-all-btn:hover {
    background-color: #d9363e;
}

.players-list {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    flex-shrink: 0;
}

.players-list h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #ff4500;
}

.active-players {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.player-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-size: cover;
    display: inline-block;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    padding: 5px 10px;
    background-color: #f5f5f5;
    border-radius: 15px;
}

.chat-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    max-height: 300px;
    flex-shrink: 0;
}

.chat-container h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #ff4500;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    max-height: 200px;
    padding: 5px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

.chat-message {
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 4px;
}

.chat-message-content {
    word-break: break-word;
}

.chat-message-info {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 2px;
}

.chat-message-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-size: cover;
}

.chat-message-username {
    font-weight: bold;
    font-size: 13px;
}

.chat-message-time {
    font-size: 11px;
    color: #777;
}

.chat-input-container {
    display: flex;
    gap: 5px;
}

.chat-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.chat-send-btn {
    padding: 8px 12px;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo {
    max-width: 200px;
    height: auto;
}

.status-logo {
    max-height: 30px;
    width: auto;
}

.status-bar {
    padding: 10px;
    background-color: white;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.music-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.music-controls button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    color: #ff4500;
}

.music-controls button:hover {
    background: none;
    color: #e03d00;
}

.pixel-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    z-index: 1000;
    max-width: 200px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tooltip-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid #fff;
    margin-left: 5px;
    vertical-align: middle;
}

.game-logs-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    max-height: 300px;
    flex-shrink: 0;
}

.game-logs-container h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #ff4500;
}

.game-logs {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    max-height: 200px;
    padding: 5px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #eee;
}

.log-entry {
    padding: 5px;
    margin-bottom: 5px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.log-entry-time {
    font-size: 11px;
    color: #777;
    margin-right: 5px;
}

.log-entry-place {
    color: #2196F3;
}

.log-entry-delete {
    color: #F44336;
}

.log-entry-admin {
    color: #9C27B0;
    font-weight: bold;
}