/* --- FUNDO E TIPOGRAFIA GERAL --- */
body { font-family: 'Comic Sans MS', 'Arial Rounded MT Bold', Arial, sans-serif; background-color: #e0f7fa; color: #333; text-align: center; margin: 0; padding: 20px; }
#quiz-container { background-color: #ffffff; border-radius: 20px; box-shadow: 0px 8px 20px rgba(0,0,0,0.15); max-width: 1100px; margin: 0 auto; padding: 40px; border: 5px solid #4dd0e1; }
h1 { color: #ff9800; font-size: 3em; margin-bottom: 20px; margin-top: 0; text-shadow: 2px 2px #fff3e0; }

/* --- MENU PRINCIPAL --- */
#menu-screen { display: block; }
.menu-title { font-size: 2em; color: #1565c0; margin-bottom: 40px; }
.subject-container { display: flex; justify-content: center; gap: 40px; margin-top: 20px; flex-wrap: wrap; }
.btn-subject { background-color: #9c27b0; color: white; border: none; padding: 40px 50px; font-size: 2em; border-radius: 20px; cursor: pointer; transition: background-color 0.3s, transform 0.2s; font-family: inherit; font-weight: bold; box-shadow: 0px 6px 0px #7b1fa2; }
.btn-subject:hover { background-color: #ba68c8; transform: translateY(-5px); box-shadow: 0px 11px 0px #7b1fa2; }
.btn-subject:active { transform: translateY(5px); box-shadow: 0px 0px 0px #7b1fa2; }
.math-color { background-color: #e91e63; box-shadow: 0px 6px 0px #c2185b; }
.math-color:hover { background-color: #f06292; box-shadow: 0px 11px 0px #c2185b; }

/* --- ECRÃ DO QUIZ --- */
#quiz-screen { display: none; }
.question { font-size: 1.8em; color: #1565c0; margin: 10px 0 30px 0; font-weight: bold; }
.content-wrapper { display: flex; flex-direction: row; justify-content: center; align-items: stretch; gap: 40px; margin-bottom: 20px; }
.media-container { flex: 1; display: flex; justify-content: center; align-items: center; background-color: #f5f5f5; border-radius: 15px; border: 4px solid #ccc; padding: 10px; box-shadow: inset 0px 4px 8px rgba(0,0,0,0.1); }
video, img { width: 100%; max-height: 450px; border-radius: 10px; object-fit: cover; }
svg { width: 100%; height: auto; max-height: 380px; }
.options-container { flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 20px; }

.btn-option { width: 100%; background-color: #81c784; color: white; border: none; padding: 25px; font-size: 1.6em; border-radius: 15px; cursor: pointer; transition: background-color 0.3s, transform 0.1s; font-family: inherit; font-weight: bold; text-align: left; padding-left: 30px; box-shadow: 0px 4px 8px rgba(0,0,0,0.2); }
.btn-option:hover { background-color: #66bb6a; transform: scale(1.02); }
.btn-option:disabled { cursor: not-allowed; opacity: 0.8; transform: none; }

/* --- CAIXAS DE ESCRITA E MULTIPLAS --- */
.input-answer { font-size: 2.5em; padding: 20px; border-radius: 15px; border: 5px solid #e91e63; text-align: center; width: 100%; box-sizing: border-box; font-family: inherit; color: #333; background-color: #fce4ec; }
.multi-input-row { display: flex; align-items: center; justify-content: center; gap: 10px; background-color: #fff3e0; padding: 15px; border-radius: 15px; border: 3px solid #ff9800; font-size: 1.8em; font-weight: bold; color: #e65100; margin-bottom: 10px; width: 100%;}
.multi-input-box { width: 100px; padding: 10px; font-size: 1em; border: 3px solid #ff9800; border-radius: 10px;}

/* --- CAIXAS DE FRAÇÃO --- */
.fraction-container { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; margin: 10px 0; background-color: #f3e5f5; padding: 30px; border-radius: 20px; border: 4px solid #ab47bc; box-shadow: 0px 4px 10px rgba(0,0,0,0.1); width: 100%; box-sizing: border-box;}
.fraction-input { font-size: 2.5em; width: 100px; text-align: center; border: 4px solid #8e24aa; border-radius: 10px; background-color: #fff; padding: 10px; font-family: inherit; color: #333; font-weight: bold; }
.fraction-input::-webkit-outer-spin-button, .fraction-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fraction-line { width: 120px; height: 8px; background-color: #8e24aa; border-radius: 4px; }

.btn-confirm { background-color: #ff9800; color: white; border: none; padding: 25px; font-size: 1.6em; border-radius: 15px; cursor: pointer; font-weight: bold; font-family: inherit; transition: transform 0.1s; box-shadow: 0px 4px 8px rgba(0,0,0,0.2); width: 100%;}
.btn-confirm:hover { background-color: #fb8c00; transform: scale(1.02); }

/* --- FEEDBACK E NAVEGAÇÃO --- */
#feedback-box { display: none; margin-top: 20px; padding: 25px; border-radius: 15px; font-size: 1.6em; text-align: center; line-height: 1.5; }
.correct { background-color: #c8e6c9; color: #2e7d32; border: 2px solid #a5d6a7; }
.incorrect { background-color: #ffccbc; color: #d84315; border: 2px solid #ffab91; }

.btn-next { background-color: #29b6f6; color: white; border: none; padding: 15px 40px; font-size: 1.6em; border-radius: 15px; cursor: pointer; margin-top: 25px; display: none; font-family: inherit; font-weight: bold; }
.btn-next:hover { background-color: #03a9f4; }
#score-screen { display: none; }