* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 28px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="text"] {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #764ba2;
    color: white;
}

.btn-secondary:hover {
    background: #653a8f;
}

.divider {
    text-align: center;
    color: #999;
    margin: 10px 0;
}

/* Game Page */
.game-container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.room-info {
    font-size: 18px;
    color: #667eea;
}

.btn-start {
    background: #28a745;
    color: white;
    padding: 8px 15px;
    font-size: 14px;
}

.btn-start:hover {
    background: #218838;
}

.players-list {
    margin-bottom: 15px;
}

.players-list h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.player {
    background: #f8f9fa;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    font-size: 14px;
}

.player.drawing {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.game-area {
    margin-bottom: 15px;
}

.word-display {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #667eea;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 8px;
    margin-bottom: 10px;
}

canvas {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    border: 3px solid #667eea;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    touch-action: none;
    background: white;
}

.drawing-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #ddd;
}

.color-btn:hover {
    transform: scale(1.1);
}

.btn-clear {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
}

.btn-clear:hover {
    background: #c82333;
}

.chat-area {
    margin-top: 15px;
}

.guesses {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.guess {
    padding: 5px;
    margin: 3px 0;
    font-size: 14px;
}

.guess.correct {
    background: #d4edda;
    color: #155724;
    border-radius: 5px;
    padding: 8px;
    font-weight: bold;
}

.guess-input {
    display: flex;
    gap: 10px;
}

.guess-input input {
    flex: 1;
}

.guess-input button {
    background: #667eea;
    color: white;
    padding: 10px 20px;
}

.guess-input button:hover {
    background: #5568d3;
}

@media (max-width: 600px) {
    .game-container {
        padding: 10px;
    }
    
    canvas {
        width: 100%;
        max-width: 100%;
    }
    
    .color-btn {
        width: 35px;
        height: 35px;
    }
}