:root {
    --primary-color: #2a9d8f;
    --secondary-color: #e9c46a;
    --background-color: #f4a261;
    --text-color: #264653;
    --danger-color: #e76f51;
    --light-color: #ffffff;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

h1, h2 {
    font-family: 'Fredoka One', cursive;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 1rem;
}

#app-container {
    width: 100%;
    max-width: 800px;
    background: var(--light-color);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    overflow: hidden;
}

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

.screen.active {
    display: flex;
}

/* Tela Inicial */
#home-screen p {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

#total-score-display {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: 'Fredoka One', cursive;
}

.game-selection {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-card {
    background-color: var(--primary-color);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 150px;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.game-card img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--light-color);
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 3px solid var(--secondary-color);
}

.game-card h2 {
    font-size: 1.2rem;
    color: var(--light-color);
    margin: 0;
}

/* Botões */
button, .button {
    font-family: 'Fredoka One', cursive;
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
    display: inline-block;
}

button:hover {
    background-color: #d4b05a;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}


.back-btn {
    align-self: flex-start;
    margin-bottom: 1rem;
    background-color: var(--danger-color);
    color: var(--light-color);
}
.back-btn:hover {
    background-color: #d0604a;
}


/* Jogo 1 - Quiz */
#game1-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}
#g1-movie-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    border: 5px solid var(--primary-color);
}
#g1-question {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
}
.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    width: 100%;
    max-width: 500px;
}
.option-btn {
    padding: 1rem;
}
.option-btn.correct {
    background-color: #2ecc71;
    color: white;
}
.option-btn.wrong {
    background-color: #e74c3c;
    color: white;
}
#g1-next-btn { display: none; margin-top: 1rem; }

.score-display {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 1rem;
    font-family: 'Fredoka One', cursive;
}


/* Jogo 2 - Forca */
#game2-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
}
#g2-instructions {
    text-align: center;
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
    max-width: 400px;
}
#g2-movie-image {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 10px;
}
#g2-chances {
    font-size: 1.5rem;
}
#g2-word {
    font-size: 2rem;
    letter-spacing: 0.5rem;
    margin: 1rem 0;
    text-transform: uppercase;
}
#g2-word .letter {
    display: inline-block;
    border-bottom: 3px solid var(--text-color);
    width: 25px;
    text-align: center;
    margin: 0 5px;
    min-height: 35px;
}
#g2-keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    max-width: 600px;
}
.key {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    padding: 0;
}
#g2-next-btn { display: none; margin-top: 1rem; }


/* Jogo 3 - Pistas */
#game3-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 500px;
}
#g3-clues {
    align-self: stretch;
}
.clue {
    background-color: #f0f0f0;
    padding: 0.8rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
}
#g3-input-area {
    display: flex;
    width: 100%;
    gap: 0.5rem;
}
#g3-answer-input {
    flex-grow: 1;
    padding: 0.8rem;
    border: 2px solid #ccc;
    border-radius: 25px;
    font-size: 1rem;
}
#g3-feedback {
    font-weight: bold;
    min-height: 24px;
}
#g3-next-btn { display: none; }


@media (min-width: 600px) {
    .options-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}