* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.game-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.hangman {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.hangman img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
}

.game-info {
    flex: 1;
    min-width: 300px;
}

.category-selector {
    margin-bottom: 20px;
}

.category-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.category-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.message {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
}

.message.win {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.message.lose {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.word-display {
    font-size: 28px;
    letter-spacing: 5px;
    text-align: center;
    margin: 20px 0;
    min-height: 40px;
}

.letter-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}

.letter-button {
    width: 100%;
    height: 40px;
    font-size: 18px;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.letter-button:hover:not(:disabled) {
    background-color: #f0f0f0;
}

.letter-button:disabled {
    cursor: not-allowed;
}

.letter-button.guessed.correct {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.letter-button.guessed.wrong {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.new-game-button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.new-game-button:hover {
    background-color: #2980b9;
}

footer {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }
    
    .hangman {
        order: 1;
    }
    
    .game-info {
        order: 2;
    }
}