body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Fondo oscuro profundo */
    background-color: #121212; 
    color: #e0e0e0;
    margin: 0;
    padding: 20px;
}

h1 {
    /* Color de título más suave que el blanco puro */
    color: #ffffff;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px;
    width: 100%;
    /* Fondo de contenedor gris oscuro */
    background: #1e1e1e;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.5);
}

canvas {
    /* Fondo del ahorcado ligeramente más claro que el contenedor */
    background: #252525;
    border: 2px solid #444;
    border-radius: 8px;
}

#word-display {
    font-size: 2rem;
    letter-spacing: 10px;
    margin: 20px 0;
    font-weight: bold;
    /* Color de la palabra en azul neón o blanco brillante */
    color: #70a1ff;
    text-transform: uppercase;
}

#keyboard {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    max-width: 500px;
    width: 100%;
    margin-top: 20px;
}

.btn-letter {
    padding: 12px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    /* Azul más vibrante para destacar en el fondo oscuro */
    background-color: #3742fa;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-letter:hover:not(:disabled) {
    background-color: #5352ed;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.btn-letter:disabled {
    /* Teclas usadas en un gris apagado */
    background-color: #333;
    color: #666;
    cursor: not-allowed;
    opacity: 0.5;
}

#message {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 15px;
    height: 35px;
}

/* Colores de estado con mejor contraste para fondo oscuro */
.win { color: #2ed573; }
.lose { color: #ff4757; }

#reset-btn {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #2ecc71;
    color: #121212; /* Texto oscuro sobre botón brillante */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

#reset-btn:hover {
    background-color: #55efc4;
}
