:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #2ecc71;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

main {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.game-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 20px;
}

.hint {
    background-color: var(--light-color);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    width: 100%;
}

.hangman-drawing {
    width: 250px;
    height: 250px;
    margin-bottom: 20px;
    position: relative;
}

.hangman-drawing svg {
    width: 100%;
    height: 100%;
}

.word-display {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.letter-box {
    width: 40px;
    height: 40px;
    border-bottom: 3px solid var(--dark-color);
    margin: 0 5px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
}

.keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    max-width: 500px;
}

.key {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.key:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.key.used {
    background-color: var(--dark-color);
    opacity: 0.5;
    cursor: not-allowed;
}

.key.correct {
    background-color: var(--success-color);
}

.key.wrong {
    background-color: var(--danger-color);
}

.message {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.success {
    color: var(--success-color);
}

.danger {
    color: var(--danger-color);
}

.new-game-btn {
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.new-game-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.category-selector {
    margin-bottom: 20px;
    width: 100%;
    max-width: 300px;
}

select {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--dark-color);
    background-color: white;
    font-size: 16px;
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }
    
    .letter-box {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    
    .key {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}