:root {
    --primary-color: #2a9d8f;
    --secondary-color: #e9c46a;
    --background-color: #f4a261;
    --text-color: #ffffff;
    --correct-color: #264653;
    --incorrect-color: #e76f51;
    --font-family: 'Noto Sans', 'Cal Sans', 'Space Mono', system-ui, -apple-system, 'Segoe UI', Roboto, 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;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Adicione isto ao style.css */
#controls {
  margin-top: 16px;
  display: flex;
  justify-content: center; /* centraliza horizontalmente */
  align-items: center;
  width: 100%;
}


#body-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
}

@media (max-width: 900px) {
    #body-wrapper {
        flex-direction: column;
        align-items: center;
    }
}

#game-container {
    background-color: var(--primary-color);
    width: 100%;
    max-width: 500px;
    height: 90vh;
    max-height: 800px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: rgba(0,0,0,0.1);
}

h1 {
    font-size: 1.2rem;
}

#score-container {
    display: flex;
    align-items: center;
    background-color: var(--secondary-color);
    color: var(--correct-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.2rem;
}

#score-container img {
    width: 30px;
    margin-right: 0.5rem;
}

#game-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

#question-container {
    width: 70%;
    max-width: 250px;
    aspect-ratio: 1 / 1;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    margin-bottom: 2rem;
}

#question-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#options-container {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.option-btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    font-family: var(--font-family);
    font-weight: 600;
    background-color: var(--secondary-color);
    color: var(--correct-color);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.3s;
    box-shadow: 0 4px var(--correct-color);
    text-transform: uppercase;
}

.option-btn:hover {
    transform: translateY(-2px);
}

.option-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px var(--correct-color);
}

.option-btn.correct {
    background-color: #8ac926;
    color: white;
    box-shadow: 0 4px #5a8c2a;
}

.option-btn.incorrect {
    background-color: #e76f51;
    color: white;
    box-shadow: 0 4px #b55038;
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

#question-container .fallback-text {
    color: var(--correct-color);
    font-weight: 700;
    text-align: center;
}

footer {
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

#shop-btn {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    background-color: var(--incorrect-color);
    color: var(--text-color);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
    box-shadow: 0 4px #b55038;
}

#shop-btn:hover {
    background-color: #b55038;
    transform: translateY(-2px);
    box-shadow: 0 6px #b55038;
}

#shop-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px #b55038;
}

.hidden {
    display: none !important;
}

#feedback-overlay, #shop-overlay, #end-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

#feedback-box, #shop-modal, #end-game-box {
    background-color: var(--text-color);
    color: var(--correct-color);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    width: 90%;
    max-width: 400px;
}

#feedback-text {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
}

#next-level-btn, #restart-btn {
    padding: 0.8rem 2.5rem;
    font-size: 1.2rem;
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s;
}

#next-level-btn:hover, #restart-btn:hover {
    background-color: #248a7e;
}

#shop-modal {
    max-width: 500px;
    height: 90vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
}

.shop-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
}
.shop-header h2 {
    flex-grow: 1;
}

#shop-score-container {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
    position: absolute;
    left: 0;
}
#shop-score-container img {
    width: 30px;
    margin-right: 0.5rem;
}

#close-shop-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--correct-color);
    line-height: 1;
    position: absolute;
    right: 0;
    top: -10px;
}

#shop-items-container {
    flex-grow: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.shop-item {
    background: #f0f0f0;
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
}

.shop-item img {
    width: 100%;
    max-width: 80px;
    aspect-ratio: 1/1;
    object-fit: contain;
}

.shop-item p {
    font-weight: 600;
    margin: 0.5rem 0;
}

.buy-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background-color: var(--secondary-color);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.buy-btn img {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

.buy-btn.purchased {
    background-color: #8ac926;
    color: white;
    cursor: default;
}

#end-game-box p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

#sticker-collection-container {
    background-color: var(--primary-color);
    width: 100%;
    max-width: 350px;
    height: 90vh;
    max-height: 800px;
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    padding: 1rem 1.5rem;
}

#sticker-collection-container h2 {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

#sticker-collection {
    flex-grow: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    padding: 0.5rem;
    background-color: rgba(0,0,0,0.1);
    border-radius: 10px;
}

#sticker-collection::-webkit-scrollbar {
    width: 8px;
}

#sticker-collection::-webkit-scrollbar-thumb {
    background-color: var(--secondary-color);
    border-radius: 4px;
}

.sticker-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1/1;
}

.sticker-item img {
    width: 100%;
    object-fit: contain;
}

.empty-collection-text {
    grid-column: 1 / -1;
    text-align: center;
    align-self: center;
    padding: 1rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 900px) {
    #sticker-collection-container {
        max-width: 500px;
        height: auto;
        max-height: 400px;
    }
    #sticker-collection {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    }
}