body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
    background-color: #f0f8ff;
    color: #333;
    text-align: center;
    overflow-x: hidden;
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

p {
    font-size: 0.9rem;
    margin-top: 0;
    padding: 0 10px;
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    height: 50vh;
    min-height: 300px;
    margin-bottom: 20px;
    background-color: transparent;
    overflow: hidden; /* Evita que letras fujam e criem barras de rolagem */
    border-radius: 10px;
}

#alien-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50%;
    max-width: 325px;
    min-width: 180px;
    z-index: 9;
}

#alien-image {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none; /* Impede que a imagem roube o clique da letra */
}

#alien-mouth-target {
    /* Posicionado e dimensionado em relação ao wrapper */
    position: absolute;
    width: 50%;
    height: 35%;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px dashed transparent;
    border-radius: 50%;
    transition: border-color 0.3s, background-color 0.3s;
    z-index: 10;
}

#alien-mouth-target.over {
    border-color: #007bff;
    background-color: rgba(0, 123, 255, 0.2);
}

#draggable-letters-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
	z-index: 20;
}

#progress-alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 800px;
    border: 1px solid #ccc;
}

.progress-letter {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    color: #aaa;
    transition: background-color 0.3s, color 0.3s;
}

.progress-letter.correct {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.letter {
    position: absolute;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: grab;
    user-select: none;
    background-color: #f9f9f9;
    transition: background-color 0.3s, color 0.3s, opacity 0.3s;
    touch-action: none; /* CRÍTICO: Impede rolagem de tela no mobile ao arrastar */
}

.letter.dragging {
    opacity: 0.8;
    transform: scale(1.1);
    cursor: grabbing;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.letter.correct {
    background-color: #28a745;
    color: white;
    cursor: default;
    opacity: 0;
    pointer-events: none;
}

.letter.incorrect {
    animation: shake 0.5s;
    background-color: #dc3545;
    color: white;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

#win-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    text-align: center;
    z-index: 100;
    width: 80%;
    max-width: 300px;
}

#win-message.hidden {
    display: none;
}

#restart-button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    margin-top: 10px;
}

#restart-button:hover {
    background-color: #0056b3;
}