#gameScreen {
    flex-direction: column;
    background: #0a0a0a;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid #222;
}

#gameInfo {
    font-size: 1.2rem;
    font-weight: 600;
}

#timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3a86ff;
}

.game-area {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#gameCanvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #333;
    border-radius: 8px;
    background: #111;
}

.game-sidebar {
    position: fixed;
    right: 20px;
    top: 80px;
    bottom: 20px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.scoreboard, .chat {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #222;
    border-radius: 12px;
    padding: 1rem;
    backdrop-filter: blur(10px);
}

.scoreboard {
    flex: 0 0 auto;
    max-height: 40%;
    overflow-y: auto;
}

.scoreboard h3, .chat h3 {
    margin-bottom: 1rem;
    color: #3a86ff;
    text-align: center;
}

#scoreList {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.score-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: all 0.3s;
}

.score-entry.leader {
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.5);
}

.score-entry .player-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-entry .player-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.score-entry .score {
    font-weight: bold;
    color: #3a86ff;
}

.chat {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#chatMessages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-message {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    word-wrap: break-word;
}

.chat-message .sender {
    font-weight: bold;
    margin-right: 0.5rem;
}

#chatInput {
    width: 100%;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
}

#chatInput:focus {
    outline: none;
    border-color: #3a86ff;
}

/* Game-specific styles */

/* Territory Control */
.territory-grid {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.territory-cell {
    position: absolute;
    transition: background-color 0.3s;
}

/* Cursor Tag */
.tag-indicator {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #ff006e;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.1); }
}

/* Maze Race */
.maze-cell {
    stroke: #444;
    stroke-width: 2;
}

.maze-wall {
    fill: #222;
}

.maze-path {
    fill: #0a0a0a;
}

.maze-start {
    fill: #3a86ff;
}

.maze-end {
    fill: #ff006e;
}

.maze-player {
    transition: all 0.1s ease-out;
}

/* Battle Arena */
.obstacle {
    fill: #ff4444;
    opacity: 0.8;
}

.powerup {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.health-bar {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 2px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: #44ff44;
    transition: width 0.3s;
}

/* Drawing Duel */
.drawing-tools {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #222;
}

.tool-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #444;
    border-radius: 8px;
    background: #1a1a1a;
    color: white;
    cursor: none;
    transition: all 0.3s;
}

.tool-btn.active {
    border-color: #3a86ff;
    background: #3a86ff;
}

.tool-btn:hover {
    transform: scale(1.1);
}

.word-display {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem 2rem;
    border-radius: 12px;
    border: 2px solid #3a86ff;
}

.guess-input {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

.guess-input input {
    padding: 0.75rem 1.5rem;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #333;
    border-radius: 8px;
    color: white;
}

.guess-input button {
    padding: 0.75rem 2rem;
    background: linear-gradient(45deg, #3a86ff, #8338ec);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: none;
}

/* Responsive */
@media (max-width: 1200px) {
    .game-sidebar {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .game-sidebar {
        position: static;
        width: 100%;
        flex-direction: row;
        padding: 1rem;
        height: 200px;
    }
    
    .scoreboard, .chat {
        width: 50%;
        height: 100%;
    }
    
    #gameCanvas {
        max-width: 90vw;
        max-height: 60vh;
    }
}