/* --- 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; }

/* --- QUADRO DE RESULTADOS (SCORE BOARD) --- */
#results-summary {
    max-width: 900px;
    margin: 30px auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.summary-item {
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
}
.summary-correct {
    background-color: #c8e6c9;
    border: 3px solid #4caf50;
}
.summary-incorrect {
    background-color: #ffccbc;
    border: 3px solid #f44336;
}
.summary-title {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    color: #333;
}
.summary-question {
    font-size: 1.2em;
    margin: 0 0 15px 0;
    color: #555;
}
.summary-explanation {
    margin: 0;
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2em;
    color: #111;
}

/* --- ESTILOS PARA O JOGO DE ORDENAR (SISTEMA SOLAR) --- */
.order-box {
    min-height: 80px; 
    background-color: #e8eaf6; 
    border: 4px dashed #3f51b5;
    border-radius: 15px; 
    padding: 15px; 
    display: flex; 
    flex-wrap: wrap;
    justify-content: center; 
    align-items: center; 
    margin-bottom: 20px;
}
.order-box-title {
    font-size: 1.3em;
    color: #1a237e;
    margin-bottom: 5px;
    font-weight: bold;
}
.btn-order-item {
    background-color: #3f51b5; 
    color: white; 
    border: none; 
    padding: 15px 20px;
    font-size: 1.2em; 
    border-radius: 10px; 
    cursor: pointer; 
    margin: 5px;
    font-weight: bold; 
    transition: transform 0.1s; 
    box-shadow: 0px 5px 0px #1a237e;
}
.btn-order-item:hover { transform: translateY(-2px); }
.btn-order-item:active { transform: translateY(5px); box-shadow: 0px 0px 0px #1a237e; }
.btn-order-item:disabled { cursor: not-allowed; opacity: 0.7; transform: none; box-shadow: 0px 5px 0px #1a237e; }

/* --- SOPA DE LETRAS --- */
.ws-layout { display: flex; flex-direction: row; gap: 30px; flex-wrap: wrap; justify-content: center; align-items: flex-start; width: 100%; margin-top: 10px; }
.ws-grid { display: grid; gap: 3px; background-color: #3f51b5; padding: 6px; border-radius: 12px; user-select: none; box-shadow: 0px 6px 0px #1a237e; }
.ws-cell { width: 35px; height: 35px; background-color: white; display: flex; justify-content: center; align-items: center; font-size: 1.3em; font-weight: bold; cursor: pointer; border-radius: 6px; transition: background 0.2s, transform 0.1s; color: #333; }
.ws-cell:active { transform: scale(0.9); }
.ws-cell.selected { background-color: #ffeb3b; color: #e65100; border: 2px solid #f57f17; box-sizing: border-box; }
.ws-cell.found { background-color: #4caf50; color: white; border: none; }
.ws-word-list { display: flex; flex-direction: column; gap: 10px; background: #e8eaf6; padding: 20px; border-radius: 15px; border: 4px solid #3f51b5; min-width: 200px; }
.ws-word { padding: 10px 15px; border-radius: 8px; background: white; text-align: center; font-weight: bold; font-size: 1.2em; color: #1a237e; transition: all 0.3s; box-shadow: 0px 3px 6px rgba(0,0,0,0.1); }
.ws-word.found { text-decoration: line-through; background: #c8e6c9; color: #2e7d32; box-shadow: none; opacity: 0.7; }

/* --- ESTILOS PALAVRAS CRUZADAS --- */
.cw-layout { display: flex; flex-direction: column; gap: 20px; align-items: center; width: 100%; }
@media(min-width: 900px) { .cw-layout { flex-direction: row; align-items: stretch; } }
.cw-clues { flex: 1; display: flex; flex-direction: column; gap: 10px; width: 100%; max-height: 500px; overflow-y: auto; padding-right: 10px;}
.cw-clue-row { display: flex; flex-direction: column; background: white; padding: 10px 15px; border-radius: 10px; box-shadow: 0 3px 6px rgba(0,0,0,0.1); border-left: 5px solid #3f51b5;}
.cw-clue-text { font-size: 1.1em; font-weight: bold; color: #1a237e; margin-bottom: 8px; text-align: left; }
.cw-clue-input { font-size: 1.2em; padding: 10px; border: 2px solid #3f51b5; border-radius: 8px; width: 100%; box-sizing: border-box; text-transform: uppercase; font-weight:bold; }
.cw-board-container { flex: 1.5; background: #e8eaf6; border-radius: 15px; padding: 20px; display: flex; justify-content: center; align-items: center; position: relative; min-height: 450px; box-shadow: inset 0px 4px 8px rgba(0,0,0,0.1); overflow: auto;}
.cw-grid { position: relative; }
.cw-cell { position: absolute; width: 32px; height: 32px; background: white; border: 2px solid #555; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1.3em; text-transform: uppercase; box-sizing: border-box; transition: all 0.6s; color: transparent; border-radius: 4px; box-shadow: 1px 1px 3px rgba(0,0,0,0.2);}
.cw-cell.revealed { color: #e91e63; background: #fff9c4; border-color: #f57f17; transform: scale(1.05); }
.cw-image { position: absolute; width: 45px; height: 45px; object-fit: contain; transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275); opacity: 0; transform: scale(0); z-index: 10; filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));}
.cw-image.revealed { opacity: 1; transform: scale(1.2); }

/* --- INTERRUPTOR MODO TESTE --- */
.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #4caf50; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: #e91e63; }
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* --- FEEDBACK NEUTRO (MODO TESTE) --- */
.neutral { background-color: #eeeeee; color: #333; border: 3px solid #9e9e9e; }

/* --- ESTILOS DO ESQUEMA VISUAL (SISTEMA SOLAR) --- */
@keyframes twinkle { 0% { opacity: 0.2; } 50% { opacity: 1; } 100% { opacity: 0.2; } }
.star { position: absolute; background: white; border-radius: 50%; animation: twinkle infinite alternate; }

.diagram-layout { display: flex; flex-direction: column; gap: 20px; width: 100%; }
@media(min-width: 800px) { .diagram-layout { flex-direction: row; } }

.diagram-space { 
    flex: 1.5; 
    /* AQUI ESTÁ A CORREÇÃO: Fica azul luminoso perto do Sol e vai escurecendo para Preto no topo! */
    background: linear-gradient(to top, #3949ab, #000000); 
    position: relative; 
    border-radius: 15px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column-reverse; 
    padding: 20px 10px; 
    box-shadow: inset 0 0 20px rgba(0,0,0,0.8); 
    min-height: 600px; 
    border: 4px solid #3f51b5;
}
.diagram-bank { flex: 1; display: flex; flex-direction: column; gap: 10px; background: #e8eaf6; padding: 20px; border-radius: 15px; border: 4px solid #3f51b5;}
.planet-row { display: flex; align-items: center; justify-content: center; width: 100%; margin-bottom: 10px; position: relative; z-index: 2; }
.planet-line { flex-grow: 1; border-bottom: 2px dashed rgba(255,255,255,0.5); margin: 0 15px; z-index: 1; }
.planet-box { width: 140px; height: 45px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: bold; cursor: pointer; font-size: 1.2em; transition: 0.2s; z-index: 2;}
.planet-box.empty { border: 2px dashed rgba(255,255,255,0.5); background: rgba(255,255,255,0.1); color: transparent; }
.planet-box.empty:hover { background: rgba(255,255,255,0.3); }
.planet-box.filled { border: 2px solid white; background: #ffb300; color: #3e2723; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
.sun-container { text-align: center; margin-bottom: -40px; z-index: 2; position: relative; margin-top: 20px;}
.sun-img { width: 250px; filter: drop-shadow(0px -10px 20px rgba(255,152,0,0.8)); }