:root {
    --primary-color: #4a90e2;
    --secondary-color: #50e3c2;
    --background-color: #f0f8ff;
    --text-color: #333;
    --white: #fff;
    --correct-color: #28a745;
    --incorrect-color: #dc3545;
    --font-family: 'Poppins', sans-serif;
}

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

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

.container {
    width: 100%;
    max-width: 800px;
    background-color: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    overflow: hidden;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.screen.active {
    display: flex;
}

/* Tela Inicial */
#home-screen h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.logo {
    width: 150px;
    height: 150px;
    margin-bottom: 1rem;
}

.total-score-container {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    background-color: #e7f3ff;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 200px;
}

.menu-button, .action-button, .home-button {
    padding: 0;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background: none;
}

.menu-button img {
    width: 100%;
    display: block;
}

.menu-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Telas de Jogo */
header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

header h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.home-button {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
}

.score-container {
    font-size: 1.2rem;
    font-weight: 600;
    background-color: #e7f3ff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
}

.feedback {
    min-height: 24px;
    margin: 1rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.feedback.correct {
    color: var(--correct-color);
}

.feedback.incorrect {
    color: var(--incorrect-color);
}

.action-button {
    background-color: var(--secondary-color);
    color: var(--white);
    width: 100%;
    max-width: 300px;
    padding: 1rem;
}

.action-button:hover {
    filter: brightness(1.1);
}

/* Jogo 1 */
#game-1-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
#game-1-image {
    max-width: 100%;
    height: 250px;
    object-fit: contain;
    border-radius: 10px;
    border: 3px solid #eee;
    padding: 0.5rem;
}
#game-1-input {
    width: 100%;
    max-width: 300px;
    padding: 0.8rem;
    border-radius: 10px;
    border: 2px solid #ccc;
    font-size: 1rem;
    text-align: center;
}

/* Jogo 2 */
#game-2-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.word-display {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--primary-color);
    background-color: #e7f3ff;
    padding: 1rem 2rem;
    border-radius: 10px;
}
.image-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    width: 100%;
    margin-top: 1rem;
}
.image-options img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border: 3px solid #ccc;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s;
    padding: 0.5rem;
}
.image-options img:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}
.image-options img.selected {
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px var(--secondary-color);
}


/* Jogo 3 */
#game-3-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
}
#word-search-container {
    padding: 0.5rem;
    background: #e7f3ff;
    border-radius: 10px;
}
#word-search-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    user-select: none;
}
.grid-cell {
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.grid-cell.selected {
    background-color: var(--secondary-color);
    color: var(--white);
}
.grid-cell.found {
    background-color: var(--primary-color);
    color: var(--white);
}
#word-search-list-container {
    width: 100%;
    max-width: 400px;
}
#word-search-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: center;
    font-size: 1.1rem;
}
#word-search-list li.found {
    text-decoration: line-through;
    color: #aaa;
}

/* Mobile adjustments */
@media (max-width: 600px) {
    body {
        padding: 0.5rem;
    }
    .container {
        padding: 1rem;
    }
    #home-screen h1 {
        font-size: 2rem;
    }
    header h2 {
        font-size: 1.2rem;
    }
    .grid-cell {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    .word-display {
        font-size: 2rem;
    }
}