:root {
    --primary-color: #4a90e2;
    --secondary-color: #50e3c2;
    --background-color: #f0f4f8;
    --text-color: #333;
    --white: #fff;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

#game-container {
    background: var(--white);
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 750px;
    max-height: 98vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Estilo do Contador */
#score-container {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
    background: #eef5ff;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    align-self: center;
}

h1 {
    font-size: 1.4rem;
    margin: 0.3rem 0;
    color: var(--primary-color);
}

h2 {
    font-size: 1.1rem;
    margin: 0.3rem 0;
    color: var(--primary-color);
}

.instructions {
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: #666;
}

#puzzle-area, #choices-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.8rem;
}

.puzzle-item, .choice-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.puzzle-item img, .choice-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background-color: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 0.3rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.choice-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    border-color: var(--primary-color);
}

.puzzle-item input {
    width: 40px;
    height: 40px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 2px solid #ccc;
    border-radius: 8px;
    outline: none;
}

#formed-word-container {
    margin: 0.5rem 0;
}

#formed-word {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    height: 45px;
}

.letter-box {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    background-color: var(--secondary-color);
    border-radius: 6px;
    border-bottom: 3px solid #48c9b0;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s, transform 0.3s;
}

.letter-box.visible {
    opacity: 1;
    transform: scale(1);
}

.hidden {
    display: none !important;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    width: 80%;
    max-width: 300px;
}

@media (max-height: 600px) or (max-width: 600px) {
    h1 { font-size: 1.2rem; }
    .puzzle-item img, .choice-item img {
        width: 60px;
        height: 60px;
    }
    .puzzle-item input, .letter-box {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
}