* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #000;
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 600px;
    padding: 30px;
    text-align: center;
    color: #000;
}

header {
    margin-bottom: 20px;
}

.game-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.game-name {
    font-size: 3.5rem;
    font-weight: bold;
    color: #00aa00;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.game-subtitle {
    font-size: 1.2rem;
    color: #555;
    font-style: italic;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #555;
}

.hangman-container {
    margin: 20px auto;
    height: 220px;
    position: relative;
}

.hangman-drawing {
    width: 180px;
    height: 200px;
    margin: 0 auto;
    position: relative;
}

/* Partes del ahorcado */
.base { height: 10px; width: 150px; background: #000; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); }
.post { height: 180px; width: 10px; background: #000; position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); }
.beam { height: 10px; width: 100px; background: #000; position: absolute; top: 30px; left: 50%; transform: translateX(-50%); }
.rope { height: 30px; width: 5px; background: #000; position: absolute; top: 40px; left: 50%; transform: translateX(-50%); }

/* Partes del muñeco - Versión mejorada y centrada */
.head { 
    height: 40px; 
    width: 40px; 
    border-radius: 50%; 
    border: 5px solid #000; 
    position: absolute; 
    top: 70px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: none; 
}
.body { 
    height: 60px; 
    width: 5px; 
    background: #000; 
    position: absolute; 
    top: 110px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: none; 
}
.left-arm { 
    height: 5px; 
    width: 30px; 
    background: #000; 
    position: absolute; 
    top: 120px; 
    left: calc(50% - 15px); 
    transform: rotate(30deg); 
    transform-origin: right center; 
    display: none; 
}
.right-arm { 
    height: 5px; 
    width: 30px; 
    background: #000; 
    position: absolute; 
    top: 120px; 
    left: calc(50% - 15px); 
    transform: rotate(-30deg); 
    transform-origin: left center; 
    display: none; 
}
.left-leg { 
    height: 5px; 
    width: 30px; 
    background: #000; 
    position: absolute; 
    top: 165px; 
    left: calc(50% - 15px); 
    transform: rotate(30deg); 
    transform-origin: right center; 
    display: none; 
}
.right-leg { 
    height: 5px; 
    width: 30px; 
    background: #000; 
    position: absolute; 
    top: 165px; 
    left: calc(50% - 15px); 
    transform: rotate(-30deg); 
    transform-origin: left center; 
    display: none; 
}

.word-display {
    font-size: 2rem;
    letter-spacing: 10px;
    margin: 30px 0;
    min-height: 50px;
    font-weight: bold;
    color: #000;
}

.keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.letter-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid #000;
    border-radius: 5px;
    background-color: #fff;
    color: #000;
    cursor: pointer;
    transition: all 0.2s;
}

.letter-btn:hover:not(:disabled) {
    background-color: #00aa00;
    color: #fff;
    transform: translateY(-2px);
}

.letter-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.correct {
    background-color: #00aa00;
    color: #fff;
    border-color: #00aa00;
}

.incorrect {
    background-color: #ff3333;
    color: #fff;
    border-color: #ff3333;
}

.message {
    font-size: 1.5rem;
    margin: 20px 0;
    min-height: 40px;
    color: #00aa00;
    font-weight: bold;
}

.btn {
    padding: 12px 25px;
    font-size: 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s;
}

.play-btn {
    background-color: #00aa00;
    color: white;
}

.play-btn:hover {
    background-color: #008800;
    transform: scale(1.05);
}

.hint-btn {
    background-color: #555;
    color: white;
}

.hint-btn:hover:not(:disabled) {
    background-color: #333;
    transform: scale(1.05);
}

.hint-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.progress-bar {
    height: 10px;
    background-color: #ccc;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #00aa00;
    width: 0%;
    transition: width 0.5s;
}

.win-counter {
    font-size: 1.2rem;
    color: #00aa00;
    font-weight: bold;
    margin-top: 15px;
}

.instructions {
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
    color: #000;
}

.instructions h2 {
    color: #00aa00;
    margin-bottom: 10px;
}

.instructions p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.instructions ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.hint-counter {
    font-size: 1.2rem;
    color: #00aa00;
    font-weight: bold;
    margin-top: 10px;
}

/* Responsive para móviles */
@media (max-width: 600px) {
    .letter-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .word-display {
        font-size: 1.5rem;
        letter-spacing: 5px;
    }
    
    .hangman-drawing {
        transform: scale(0.8);
    }
    
    .game-name {
        font-size: 2.8rem;
    }
}

/* Modal de introducción */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 100;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    color: #000;
}

.modal h2 {
    color: #00aa00;
    margin-bottom: 20px;
}

.modal-btn {
    padding: 12px 25px;
    font-size: 1.2rem;
    background-color: #00aa00;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.modal-btn:hover {
    background-color: #008800;
    transform: scale(1.05);
}

.level-indicator {
    font-size: 1.2rem;
    color: #00aa00;
    font-weight: bold;
    margin: 10px 0;
}