/* =======================================================
   STYLE.CSS - Saquarema 100 Q & Illustrated E-Book WebApp
   Aesthetic: Vibrant Poster Style (Pink & Yellow) + Claymorphic
   ======================================================= */

/* Importação de fontes */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&family=Outfit:wght@500;600;700;800;900&family=Caveat:wght@700&display=swap');

:root {
  --bg-app: linear-gradient(135deg, #FFD2E5 0%, #E6DCFF 100%);
  --bg-panel: #FAF7F4;
  --bg-card: #FFFFFF;
  
  --text-primary: #2D2544;
  --text-secondary: #6A5F8A;
  --text-muted: #A096C0;
  
  /* Cores Temáticas Poster & Claymorphic */
  --vibrant-pink: #FF006E;
  --vibrant-yellow: #FFDD00;
  --vibrant-green: #0BC475;
  --vibrant-purple: #734CEC;
  
  --purple-light: #A285F5;
  --purple-soft: #F1EEFD;
  --pink-soft: #FFF0F4;
  --yellow-soft: #FFFDF0;
  
  --blue: #2D82FE;
  --blue-soft: #EBF3FE;
  
  /* Fontes */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --font-handwritten: 'Caveat', cursive;
  
  /* Sombras Claymorphic 3D & Hard Shadows */
  --shadow-hard-black: 5px 5px 0px #000000;
  --shadow-hard-black-lg: 8px 8px 0px #000000;
  
  --shadow-clay-panel: 14px 14px 28px rgba(106, 95, 138, 0.08), 
                       -14px -14px 28px #FFFFFF, 
                       inset 0px -6px 8px rgba(0, 0, 0, 0.02), 
                       inset 0px 6px 8px #FFFFFF;

  --shadow-clay-card: 8px 8px 16px rgba(106, 95, 138, 0.04), 
                      -8px -8px 16px #FFFFFF, 
                      inset 0px -3px 6px rgba(0, 0, 0, 0.015), 
                      inset 0px 3px 6px #FFFFFF;

  --shadow-clay-card-hover: 12px 12px 24px rgba(106, 95, 138, 0.08), 
                            -12px -12px 24px #FFFFFF, 
                            inset 0px -4px 8px rgba(0, 0, 0, 0.02), 
                            inset 0px 4px 8px #FFFFFF;
                            
  --shadow-clay-input: inset 4px 4px 8px rgba(106, 95, 138, 0.06), 
                       inset -4px -4px 8px #FFFFFF;

  --shadow-clay-input-focus: inset 4px 4px 8px rgba(115, 76, 236, 0.1), 
                             inset -4px -4px 8px #FFFFFF,
                             0px 0px 0px 3px rgba(115, 76, 236, 0.2);
                            
  --shadow-clay-btn-purple: 0px 8px 16px rgba(115, 76, 236, 0.22), 
                            inset 0px -4px 8px rgba(0, 0, 0, 0.2), 
                            inset 0px 4px 8px rgba(255, 255, 255, 0.4);

  --shadow-clay-btn-purple-hover: 0px 10px 20px rgba(115, 76, 236, 0.3), 
                            inset 0px -4px 8px rgba(0, 0, 0, 0.25), 
                            inset 0px 4px 8px rgba(255, 255, 255, 0.45);
}

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

body {
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(115, 76, 236, 0.2);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--vibrant-purple);
}

/* =======================================================
   1. CAPA DA APOSTILA COM LOGIN (ESTILO POSTER VIBRANTE)
   ======================================================= */
.cover-wrapper {
  display: none;
  width: 100%;
  max-width: 960px;
  justify-content: center;
  align-items: center;
  z-index: 10;
  margin: 20px 0;
}

.cover-wrapper.active {
  display: flex;
}

.booklet-cover {
  width: 100%;
  background: var(--vibrant-pink);
  border-radius: 40px;
  box-shadow: 0 20px 40px rgba(230, 0, 103, 0.25), var(--shadow-hard-black-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 4px solid #000000;
  position: relative;
}

/* Linha decorativa tracejada superior */
.booklet-cover::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  height: 4px;
  border-top: 3px dashed rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

/* Cabeçalho da Capa */
.cover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px 10px 40px;
  width: 100%;
}

.guide-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--vibrant-yellow);
  color: #000000;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #000000;
  box-shadow: 2px 2px 0px #000000;
}

.guide-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 0.95;
}

.guide-bottom {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 16px;
  color: #000000;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}

/* Logotipo Resumix */
.booklet-cover .resumix-logo {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 32px;
  color: #FFFFFF;
}

.booklet-cover .logo-x {
  color: var(--vibrant-yellow);
  font-size: 36px;
}

/* Layout Principal da Capa */
.cover-main-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  padding: 10px 40px 30px 40px;
  align-items: center;
}

/* Painel Esquerdo */
.cover-left-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

.badge-edital {
  background: var(--vibrant-yellow);
  color: #000000;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 8px;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0px #000000;
}

/* Títulos Estilo Skewed Poster */
.title-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.title-container h1 {
  font-family: var(--font-title);
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -1px;
}

.main-title {
  color: #FFFFFF;
  font-size: 36px;
  background: #000000;
  padding: 6px 16px;
  width: fit-content;
  transform: rotate(-1.5deg);
  border: 2px solid #FFFFFF;
}

.sub-title {
  color: var(--vibrant-green);
  font-size: 36px;
  background: #000000;
  padding: 6px 16px;
  width: fit-content;
  transform: rotate(1deg);
  border: 2px solid #FFFFFF;
  margin-left: 10px;
}

.subject-title {
  color: var(--vibrant-yellow);
  font-size: 58px;
  text-shadow: 4px 4px 0px #000000, -2px -2px 0px #000000, 2px -2px 0px #000000, -2px 2px 0px #000000;
  letter-spacing: -2px !important;
  margin-top: 10px;
}

.year-badge {
  background: var(--vibrant-purple);
  color: #FFFFFF;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 24px;
  padding: 4px 16px;
  border-radius: 12px;
  border: 2px solid #000000;
  box-shadow: 3px 3px 0px #000000;
  width: fit-content;
  transform: rotate(-3deg);
  margin-left: 20px;
  margin-top: -5px;
}

.cover-description {
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
  max-width: 440px;
  margin-bottom: 5px;
}

/* Área de Ilustração AI */
.cover-illustration-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 220px;
  background: #FFFFFF;
  border-radius: 24px;
  border: 3.5px solid #000000;
  box-shadow: var(--shadow-hard-black);
  overflow: hidden;
  margin-top: 10px;
}

.cover-illust-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Elementos de decoração flutuantes */
.paper-plane-decor {
  position: absolute;
  top: 15px;
  left: 20px;
  font-size: 28px;
  transform: rotate(-15deg);
  animation: floatPlane 3s ease-in-out infinite;
}

.star-decor-1 {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 24px;
  animation: spinStar 6s linear infinite;
}

.star-decor-2 {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 20px;
  animation: floatPlane 4s ease-in-out infinite;
}

/* Painel Direito (Formulário Estilizado como Etiqueta de Caderno Escolar) */
.cover-right-panel {
  display: flex;
  justify-content: center;
}

.student-label-card {
  background: #FFFFFF !important;
  border-radius: 20px !important;
  padding: 35px 28px !important;
  width: 100%;
  max-width: 380px;
  border: 3.5px solid #000000 !important;
  box-shadow: 6px 6px 0px #000000 !important;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(#d3cfcc 1.5px, transparent 1.5px) !important;
  background-size: 20px 20px !important;
}

.student-label-card::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 2.5px;
  background: rgba(255, 0, 110, 0.4);
}

.student-label-card .form-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 22px;
  color: #000000;
  border-bottom: 2.5px dashed #000000;
  padding-bottom: 8px;
  text-align: center;
  margin-bottom: 15px;
}

.student-label-card .input-group label {
  font-family: var(--font-handwritten);
  font-size: 20px;
  font-weight: 700;
  color: var(--vibrant-purple);
  text-transform: none;
  margin-bottom: -4px;
}

.student-label-card .input-group input {
  border: none !important;
  border-bottom: 2.5px solid #000000 !important;
  border-radius: 0px !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  padding: 8px 4px !important;
}

.student-label-card .input-group input:focus {
  border-bottom-color: var(--vibrant-pink) !important;
}

/* Botão de Acesso Estilizado e Refinado */
.btn-start {
  background: var(--vibrant-yellow) !important;
  color: #000000 !important;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 15px;
  padding: 14px 20px !important;
  border-radius: 16px !important;
  border: 3.5px solid #000000 !important;
  box-shadow: 4px 4px 0px #000000 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.btn-start::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: 0.5s;
}

.btn-start:hover::after {
  left: 100%;
}

.btn-start:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 6px 6px 0px #000000 !important;
  background: #FFF32B !important;
}

.btn-start:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0px #000000 !important;
}

/* =======================================================
   FAIXA DE RECURSOS AMARELA - 4 COLUNAS
   ======================================================= */
.cover-features-bar {
  background: var(--vibrant-yellow);
  border-top: 4px solid #000000;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
}

.feature-item {
  padding: 18px 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-right: 3px solid #000000;
}

.feature-item:last-child {
  border-right: none;
}

.feature-icon {
  font-size: 20px;
  background: #FFFFFF;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #000000;
  flex-shrink: 0;
}

.feature-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-meta strong {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 900;
  color: #000000;
  text-transform: uppercase;
}

.feature-meta span {
  font-size: 9px;
  font-weight: 700;
  color: #333333;
  line-height: 1.25;
}

/* Barra preta rodapé */
.cover-footer-black {
  background: #000000;
  color: #FFFFFF;
  text-align: center;
  padding: 10px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 2px;
}

/* =======================================================
   2. ABAS DE NAVEGAÇÃO SUPERIOR (TABS)
   ======================================================= */
.tab-navigation {
  display: flex;
  background: var(--bg-card);
  padding: 6px;
  border-radius: 18px;
  border: 2.5px solid #000000;
  box-shadow: var(--shadow-clay-card);
  gap: 6px;
}

.tab-btn {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 13px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  padding: 10px 20px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: var(--purple-soft);
  color: var(--vibrant-purple);
}

.tab-btn.active {
  background: var(--vibrant-purple);
  color: #FFFFFF;
  box-shadow: var(--shadow-clay-btn-purple);
}

/* =======================================================
   3. LEITOR DE E-BOOK (APOSTILA DIGITAL)
   ======================================================= */
.ebook-layout {
  display: none;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.ebook-layout.active {
  display: grid;
}

/* Sidebar de Capítulos */
.ebook-sidebar {
  background: var(--bg-card);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow-clay-card);
  border: 2.5px solid #000000;
  transition: left 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.sidebar-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  color: var(--text-primary);
  border-bottom: 2.5px solid var(--purple-soft);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.sidebar-header-mobile {
  display: none; /* Ocultado no desktop */
}

.chapters-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-panel);
  border: 2px solid transparent;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.chapter-btn:hover {
  background: #FFFFFF;
  box-shadow: var(--shadow-clay-card);
  color: var(--vibrant-purple);
  transform: translateX(2px);
}

.chapter-btn.active {
  background: var(--purple-soft);
  color: var(--vibrant-purple);
  border-color: var(--purple-light);
  font-weight: 800;
}

/* Controles Mobile dentro do Drawer */
.sidebar-mobile-controls {
  display: none; /* Ocultado no desktop */
}

/* Fundo desfocado para o drawer mobile */
.sidebar-overlay {
  display: none;
}

/* Leitor da Apostila */
.ebook-reader-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Cabeçalho Compacto Mobile */
.reader-mobile-header {
  display: none; /* Ocultado no desktop */
}

/* BARRA DE CONTROLE DO LEITOR */
.ebook-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 12px 20px;
  border: 2.5px solid #000000;
  box-shadow: var(--shadow-clay-card);
  gap: 15px;
  flex-wrap: wrap;
}

/* Caixa de Busca */
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-panel);
  border: 2px solid #000000;
  border-radius: 12px;
  padding: 6px 12px;
  flex: 1;
  min-width: 160px;
}

.search-box input {
  background: transparent;
  border: none;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  width: 100%;
  color: var(--text-primary);
}

.search-box input:focus {
  outline: none;
}

.btn-clear-search {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
}

.btn-clear-search:hover {
  color: var(--vibrant-pink);
}

/* Realce da pesquisa no texto */
mark.search-highlight {
  background: var(--vibrant-yellow);
  color: #000000;
  font-weight: 800;
  border-radius: 4px;
  padding: 0 2px;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

/* Temas de Cor */
.reader-themes {
  display: flex;
  gap: 6px;
  background: var(--bg-panel);
  padding: 4px;
  border-radius: 12px;
  border: 2px solid #000000;
}

.theme-btn {
  border: none;
  padding: 8px 14px;
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
}

.theme-btn.active {
  background: #FFFFFF;
  color: #000000;
  box-shadow: 2px 2px 0px #000000;
  border: 1.5px solid #000000;
}

/* Botão Favorito */
.bookmark-btn {
  background: var(--bg-panel);
  border: 2.5px solid #000000;
  padding: 8px 14px;
  border-radius: 12px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-primary);
  box-shadow: 2px 2px 0px #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.bookmark-btn:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0px #000000;
}

.bookmark-btn.active {
  background: var(--pink-soft);
  color: var(--vibrant-pink);
  border-color: var(--vibrant-pink);
  box-shadow: 2px 2px 0px var(--vibrant-pink);
}

/* Área de Leitura Principal */
.ebook-reader {
  background: var(--bg-card);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow-clay-card);
  border: 2.5px solid #000000;
  min-height: 520px;
  max-height: 680px;
  overflow-y: auto;
  transition: background 0.3s ease, color 0.3s ease;
}

/* Estilos de Contraste do Leitor */
.ebook-reader.theme-sepia {
  background: #F5EFEB !important;
  color: #4C3C31 !important;
}

.ebook-reader.theme-sepia p, 
.ebook-reader.theme-sepia h2, 
.ebook-reader.theme-sepia h3, 
.ebook-reader.theme-sepia ul, 
.ebook-reader.theme-sepia ol {
  color: #4C3C31 !important;
}

.ebook-reader.theme-sepia h3 {
  color: #8C593B !important;
}

.ebook-reader.theme-sepia blockquote.didatic-quote {
  background: #EADDCB !important;
  border-left-color: #8C593B !important;
  color: #4C3C31 !important;
}

.ebook-reader.theme-dark {
  background: #1B1826 !important;
  color: #D3CFE3 !important;
}

.ebook-reader.theme-dark p, 
.ebook-reader.theme-dark h2, 
.ebook-reader.theme-dark h3, 
.ebook-reader.theme-dark ul, 
.ebook-reader.theme-dark ol {
  color: #D3CFE3 !important;
}

.ebook-reader.theme-dark h3 {
  color: var(--purple-light) !important;
}

.ebook-reader.theme-dark blockquote.didatic-quote {
  background: #252236 !important;
  border-left-color: var(--vibrant-pink) !important;
  color: #E2DFEB !important;
}

.ebook-reader.theme-dark .mental-map-card {
  background: #252236 !important;
  border-color: var(--vibrant-yellow) !important;
}

.ebook-reader.theme-dark .mental-map-card h4 {
  color: var(--vibrant-yellow) !important;
}

.ebook-reader.theme-dark .mental-map-card p, 
.ebook-reader.theme-dark .mental-map-card ul {
  color: #E2DFEB !important;
}

/* Imagem e legenda da ilustração do e-book */
.ebook-illustration-box {
  width: 100%;
  margin-bottom: 24px;
  border-radius: 20px;
  border: 2.5px solid #000000;
  overflow: hidden;
  box-shadow: var(--shadow-clay-card);
  background: var(--bg-panel);
}

.ebook-illustration-box img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  display: block;
}

.ebook-illustration-caption {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
  padding: 8px 16px;
  background: #FFFFFF;
  border-top: 2px solid #000000;
  text-align: center;
}

/* Conteúdo tipográfico da apostila */
.ebook-reader h2 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 26px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.ebook-reader h3 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
  color: var(--vibrant-purple);
  margin-top: 24px;
  margin-bottom: 12px;
}

.ebook-reader p {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 16px;
  font-weight: 600;
}

.ebook-reader ul, .ebook-reader ol {
  margin-left: 20px;
  margin-bottom: 16px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ebook-reader blockquote.didatic-quote {
  background: var(--pink-soft);
  border-left: 4px solid var(--vibrant-pink);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-primary);
  font-style: italic;
  font-weight: 700;
  margin-bottom: 18px;
}

/* Estilo do Mapa Mental */
.mental-map-card {
  background: var(--yellow-soft);
  border: 2.5px solid var(--vibrant-yellow);
  padding: 18px;
  border-radius: 20px;
  box-shadow: 4px 4px 0px #000000;
  margin: 20px 0;
}

.mental-map-card h4 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  color: #A36B00;
  margin-bottom: 10px;
}

.mental-map-card p, .mental-map-card ul {
  font-size: 13px !important;
  color: #5C4113 !important;
  margin-bottom: 8px !important;
}

.mental-map-card.visual-highlight {
  background: var(--purple-soft);
  border-color: var(--purple-light);
  box-shadow: 4px 4px 0px var(--vibrant-purple);
}

.mental-map-card.visual-highlight h4 {
  color: var(--vibrant-purple);
}

.mental-map-card.visual-highlight p {
  color: var(--text-secondary) !important;
}

/* Caixa de Personalidade */
.personality-box {
  background: var(--bg-panel);
  border: 2px solid #000000;
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-clay-card);
}

.personality-box strong {
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 800;
  color: var(--vibrant-purple);
}

.personality-box p {
  font-size: 13px !important;
  margin-top: 4px;
  margin-bottom: 0 !important;
}

/* Rodapé do Ebook */
.ebook-reader-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 12px 20px;
  border: 2.5px solid #000000;
  box-shadow: var(--shadow-clay-card);
}

.chapter-progress-text {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 13px;
  color: var(--text-secondary);
}

/* =======================================================
   4. SIMULADO DE 100 QUESTÕES
   ======================================================= */
.app-container {
  display: none;
  width: 100%;
  max-width: 1100px;
  flex-direction: column;
  gap: 20px;
  z-index: 10;
}

.app-container.active {
  display: flex;
}

/* Header do App */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-panel);
  border-radius: 24px;
  padding: 14px 24px;
  box-shadow: var(--shadow-clay-card);
  border: 2.5px solid #000000;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-meta {
  display: flex;
  flex-direction: column;
  border-left: 2.5px solid var(--vibrant-purple);
  padding-left: 14px;
}

.app-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  color: var(--text-primary);
}

.app-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-info {
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-exit {
  background: var(--pink-soft);
  color: var(--vibrant-pink);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 12px;
  border: 2px solid #000000;
  padding: 6px 14px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 2px 2px 0px #000000;
}

.btn-exit:hover {
  background: var(--vibrant-pink);
  color: #FFFFFF;
  transform: translateY(-1px);
}

/* Layout em duas colunas */
.simulator-layout {
  display: none;
  grid-template-columns: 1fr 360px;
  gap: 20px;
  align-items: start;
}

.simulator-layout.active {
  display: grid;
}

/* Coluna da esquerda (Questão) */
.question-column {
  display: flex;
  flex-direction: column;
}

.question-card {
  background: var(--bg-card);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow-clay-card);
  border: 2.5px solid #000000;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 2.5px solid var(--purple-soft);
  padding-bottom: 14px;
}

.question-number-badge {
  background: var(--purple-soft);
  color: var(--vibrant-purple);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 12px;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0px #000000;
}

.question-tags {
  display: flex;
  gap: 8px;
}

.category-badge {
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-badge {
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 8px;
}

.question-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  font-weight: 700;
  white-space: pre-line;
}

/* Opções de Resposta */
.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-panel);
  border-radius: 18px;
  padding: 12px 18px;
  cursor: pointer;
  border: 2.5px solid #000000;
  text-align: left;
  box-shadow: 3px 3px 0px #000000;
  transition: all 0.2s ease;
}

.option-card:hover {
  background: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 5px 5px 0px #000000;
}

.option-letter-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000000;
}

.option-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex: 1;
}

/* Estados da Opção */
.option-card.correct {
  background: var(--green-soft);
  border-color: var(--green-light);
  box-shadow: 4px 4px 0px var(--green);
}

.option-card.correct .option-letter-badge {
  background: var(--green);
  color: #FFFFFF;
  border-color: var(--green-light);
}

.option-card.incorrect {
  background: var(--pink-soft);
  border-color: var(--pink-light);
  box-shadow: 4px 4px 0px var(--vibrant-pink);
}

.option-card.incorrect .option-letter-badge {
  background: var(--vibrant-pink);
  color: #FFFFFF;
  border-color: var(--pink-light);
}

.option-card.disabled {
  pointer-events: none;
  opacity: 0.8;
}

/* Explicação da Questão */
.explanation-container {
  background: var(--purple-soft);
  border-radius: 20px;
  padding: 18px;
  border-left: 6px solid var(--vibrant-purple);
  border-top: 2px solid #000000;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: var(--shadow-clay-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  animation: slideDown 0.3s ease-out;
}

.explanation-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.explanation-header h4 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  color: var(--vibrant-purple);
}

.explanation-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre-line;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 6px;
  font-weight: 600;
}

/* Ações no rodapé da questão */
.question-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  border-top: 2.5px solid var(--purple-soft);
  padding-top: 18px;
}

.btn-primary, .btn-secondary {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  border: 2px solid #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--vibrant-purple);
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: 14px;
  box-shadow: 3px 3px 0px #000000;
}

.btn-primary:hover {
  background: #5731D0;
  transform: translateY(-2px);
  box-shadow: 5px 5px 0px #000000;
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--text-secondary);
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: 3px 3px 0px #000000;
}

.btn-secondary:hover {
  background: var(--bg-panel);
  transform: translateY(-2px);
  box-shadow: 5px 5px 0px #000000;
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 1px 1px 0px #000000 !important;
}

/* Coluna da Direita (Dashboard) */
.dashboard-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.stat-card, .navigation-card {
  background: var(--bg-card);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow-clay-card);
  border: 2.5px solid #000000;
}

.stat-card-title, .navigation-title {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 16px;
}

/* Rendimento Grid */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: 16px;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0px #000000;
}

.stat-item.hit { background: var(--green-soft); color: var(--green); }
.stat-item.miss { background: var(--pink-soft); color: var(--vibrant-pink); }
.stat-item.answered { background: var(--blue-soft); color: var(--blue); }
.stat-item.accuracy { background: var(--yellow-soft); color: #C27400; }

.stat-icon {
  font-size: 16px;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 10px;
  font-weight: 800;
  opacity: 0.8;
}

.stat-item strong {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
}

/* Barra de Progresso */
.progress-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
}

.progress-bar-bg {
  height: 10px;
  background: var(--bg-panel);
  border-radius: 99px;
  overflow: hidden;
  border: 2px solid #000000;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-light) 0%, var(--vibrant-purple) 100%);
  border-radius: 99px;
}

/* Cronômetro */
.timer-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-panel);
  padding: 12px 16px;
  border-radius: 16px;
  border: 2px solid #000000;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.timer-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-icon {
  font-size: 18px;
}

.timer-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
}

.timer-info strong {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.btn-timer-reset {
  background: transparent;
  border: none;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.6;
}

.btn-timer-reset:hover {
  opacity: 1;
}

/* Cartão de Respostas - Grelha 100 Botões */
.navigation-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.navigation-title {
  margin-bottom: 0;
}

.btn-toggle-view {
  background: var(--bg-panel);
  border: 2px solid #000000;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.btn-toggle-view:hover {
  background: var(--purple-soft);
  color: var(--vibrant-purple);
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-bar select {
  flex: 1;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  padding: 6px 8px;
  border-radius: 10px;
  border: 2px solid #000000;
  background: var(--bg-panel);
  color: var(--text-secondary);
  cursor: pointer;
}

.filter-bar select:focus {
  outline: none;
  background: #FFFFFF;
}

.questions-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
  margin-bottom: 12px;
}

.questions-grid.compact {
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}

/* Botão de Questão */
.q-btn {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 2px solid #000000;
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 2px 0px #000000;
  transition: all 0.15s ease;
}

.q-btn:hover {
  background: #FFFFFF;
  color: var(--vibrant-purple);
  transform: translateY(-1px);
}

.q-btn.active {
  background: #FFFFFF;
  color: var(--blue);
  box-shadow: 0 0 0 2.5px var(--blue);
  transform: scale(1.08);
}

.q-btn.correct {
  background: var(--green);
  color: #FFFFFF;
}

.q-btn.incorrect {
  background: var(--vibrant-pink);
  color: #FFFFFF;
}

/* Legendas */
.legend-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  border-top: 2px dashed var(--purple-soft);
  padding-top: 12px;
  margin-bottom: 16px;
}

.legend-item {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  border: 1px solid #000000;
}

.legend-dot.unanswered { background: var(--bg-panel); }
.legend-dot.correct { background: var(--green); }
.legend-dot.incorrect { background: var(--vibrant-pink); }
.legend-dot.active { border: 1.5px solid var(--blue); background: #FFFFFF; }

/* Ações do Navegador */
.navigation-actions {
  display: flex;
  gap: 8px;
}

.btn-reset {
  flex: 1;
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 12px;
  border: 2px solid #000000;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0px #000000;
}

.btn-reset:hover {
  background: var(--pink-soft);
  color: var(--vibrant-pink);
}

.btn-finish {
  flex: 1.5;
  background: var(--green);
  color: #FFFFFF;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 12px;
  border: 2px solid #000000;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 2px 2px 0px #000000;
}

.btn-finish:hover {
  background: #09a260;
  transform: translateY(-1px);
  box-shadow: 3px 3px 0px #000000;
}

/* =======================================================
   5. RESULT MODAL OVERLAY (EXPANDIDO)
   ======================================================= */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 37, 68, 0.4);
  backdrop-filter: blur(8px);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.result-modal-expanded {
  max-width: 660px !important;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px !important;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  width: 100%;
}

.modal-icon {
  font-size: 48px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--yellow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #000000;
  box-shadow: 3px 3px 0px #000000;
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 24px;
  color: #000000;
}

.modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 700;
}

.modal-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}

.modal-stat {
  background: var(--bg-panel);
  padding: 10px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2px solid #000000;
  box-shadow: 2px 2px 0px #000000;
}

.modal-stat .label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.modal-stat strong {
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 900;
  color: var(--text-primary);
}

/* Painel de Matérias */
.category-breakdown-container {
  width: 100%;
  text-align: left;
  border: 2.5px solid #000000;
  border-radius: 20px;
  padding: 16px;
  background: var(--bg-panel);
  box-shadow: var(--shadow-clay-card);
}

.category-breakdown-container h4 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  color: #000000;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.category-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cat-breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cat-breakdown-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 800;
}

.cat-breakdown-label {
  color: var(--text-primary);
}

.cat-breakdown-score {
  color: var(--vibrant-purple);
}

.cat-progress-bg {
  height: 8px;
  background: #FFFFFF;
  border: 1.5px solid #000000;
  border-radius: 99px;
  overflow: hidden;
}

.cat-progress-fill {
  height: 100%;
  background: var(--vibrant-purple);
  border-radius: 99px;
}

.result-message {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--vibrant-purple);
  background: var(--purple-soft);
  padding: 12px 18px;
  border-radius: 14px;
  line-height: 1.5;
  border: 2.5px solid var(--purple-light);
  width: 100%;
}

/* Painel de Gabarito Expandido */
.review-gabarito-container {
  width: 100%;
  text-align: left;
  border: 2.5px solid #000000;
  border-radius: 20px;
  padding: 16px;
  background: #FFFFFF;
}

.review-gabarito-container h4 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  color: #000000;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.review-sub {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 700;
  margin-bottom: 12px;
}

.review-gabarito-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 6px;
}

.review-q-item {
  border: 2px solid #000000;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-panel);
}

.review-q-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  background: #FFFFFF;
}

.review-q-header:hover {
  background: var(--purple-soft);
}

.review-q-badge {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  color: #FFFFFF;
  border: 1.5px solid #000000;
}

.review-q-badge.correct { background: var(--vibrant-green); }
.review-q-badge.incorrect { background: var(--vibrant-pink); }

.review-q-body {
  display: none;
  padding: 14px;
  border-top: 2px solid #000000;
  background: var(--bg-panel);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-primary);
}

.review-q-body.active {
  display: block;
}

.review-q-text {
  font-weight: 700;
  margin-bottom: 8px;
}

.review-q-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
  font-weight: 700;
}

.review-q-opt {
  padding: 4px 8px;
  border-radius: 6px;
}

.review-q-opt.selected-correct {
  background: var(--green-soft);
  color: var(--green);
}

.review-q-opt.selected-incorrect {
  background: var(--pink-soft);
  color: var(--vibrant-pink);
}

.review-q-opt.correct-revealed {
  background: var(--green-soft);
  color: var(--green);
  border: 1px dashed var(--green);
}

.review-q-exp {
  background: #FFFFFF;
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 4px solid var(--vibrant-purple);
  margin-top: 6px;
  font-size: 11px;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.btn-whatsapp {
  width: 100%;
  background: #25D366;
  color: #FFFFFF;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 14px;
  border: 2px solid #000000;
  padding: 14px;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 4px 4px 0px #000000;
  transition: all 0.2s ease;
}

.btn-whatsapp:hover {
  background: #20ba59;
  transform: translateY(-2px);
  box-shadow: 5px 5px 0px #000000;
}

/* =======================================================
   6. ANIMATIONS & RESPONSIVIDADE
   ======================================================= */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-scale-up {
  animation: scaleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes floatPlane {
  0%, 100% { transform: translateY(0) rotate(-15deg); }
  50% { transform: translateY(-8px) rotate(-10deg); }
}

@keyframes spinStar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* =======================================================
   7. RESPONSIVIDADE ADICIONAL & MOBILE DRAWER FIXES
   ======================================================= */
@media (max-width: 900px) {
  .cover-main-content {
    grid-template-columns: 1fr;
    padding: 10px 24px 24px 24px;
  }
  
  .cover-left-panel {
    align-items: center;
    text-align: center;
  }
  
  /* Faixa de Recursos ajustada para 4 colunas em grid 2x2 */
  .cover-features-bar {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .feature-item {
    border-bottom: 2px solid #000000;
    border-right: 3px solid #000000;
  }
  
  .feature-item:nth-child(2), .feature-item:nth-child(4) {
    border-right: none;
  }
  
  .feature-item:nth-child(3), .feature-item:nth-child(4) {
    border-bottom: none;
  }
  
  /* Oculta os controles de leitura no topo no mobile */
  .ebook-controls {
    display: none !important;
  }
  
  /* Exibe o cabeçalho compacto de leitura mobile */
  .reader-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 2.5px solid #000000;
    border-radius: 18px;
    padding: 10px 16px;
    box-shadow: var(--shadow-clay-card);
    margin-bottom: 12px;
  }
  
  .btn-menu-toggle-main {
    background: var(--vibrant-purple);
    color: #FFFFFF;
    border: 2px solid #000000;
    padding: 8px 16px;
    border-radius: 12px;
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 2px 2px 0px #000000;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
  }
  
  .btn-menu-toggle-main:hover {
    background: #5731D0;
    transform: translateY(-1px);
    box-shadow: 3px 3px 0px #000000;
  }
  
  .btn-menu-toggle-main:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 0px #000000;
  }
  
  /* Gaveta do Menu Sanduíche Mobile com Controles Internos */
  .sidebar-header-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2.5px solid var(--purple-soft);
    padding-bottom: 10px;
  }
  
  .btn-close-sidebar {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
  }
  
  .btn-close-sidebar:hover {
    color: var(--vibrant-pink);
  }
  
  /* Exibe os controles dentro do menu sanduíche */
  .sidebar-mobile-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    background: var(--bg-panel);
    border: 2px solid #000000;
    border-radius: 20px;
    padding: 16px;
    box-shadow: var(--shadow-clay-card);
  }
  
  .sidebar-control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }
  
  .sidebar-control-group label {
    font-family: var(--font-title);
    font-size: 11px;
    font-weight: 850;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 2px;
  }
  
  .sidebar-control-group .search-box {
    background: #FFFFFF;
  }
  
  .sidebar-control-group .bookmark-btn {
    width: 100%;
  }
  
  .sidebar-control-group .reader-themes {
    background: #FFFFFF;
  }
  
  .sidebar-chapters-title {
    font-family: var(--font-title);
    font-weight: 850;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 2.5px solid var(--purple-soft);
    padding-bottom: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
    display: block !important;
  }
  
  .ebook-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 290px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 210;
    border-right: 3px solid #000000;
    border-radius: 0 28px 28px 0;
    box-shadow: 10px 0px 40px rgba(0, 0, 0, 0.15);
    padding: 24px;
    overflow-y: auto;
  }
  
  .ebook-sidebar.open {
    left: 0;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 37, 68, 0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
  }
  
  .sidebar-overlay.active {
    display: block;
  }
  
  .chapters-nav {
    flex-direction: column !important;
    max-height: none;
    overflow-y: visible;
  }
  
  .chapter-btn {
    width: 100% !important;
    text-align: left !important;
  }
  
  .ebook-layout {
    grid-template-columns: 1fr;
  }
  
  .simulator-layout {
    grid-template-columns: 1fr;
  }
  
  .modal-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  body {
    padding: 10px;
  }
  
  .cover-header {
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }
  
  .main-title { font-size: 26px; }
  .sub-title { font-size: 26px; }
  .subject-title { font-size: 42px; }
  
  .cover-features-bar {
    grid-template-columns: 1fr;
  }
  
  .feature-item {
    border-right: none;
    border-bottom: 2px solid #000000;
  }
  
  .feature-item:last-child {
    border-bottom: none;
  }
  
  .app-header {
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }
  
  .header-left {
    flex-direction: column;
    gap: 8px;
  }
  
  .app-meta {
    border-left: none;
    padding-left: 0;
  }
  
  .tab-navigation {
    width: 100%;
    justify-content: center;
  }
  
  .tab-btn {
    padding: 8px 12px;
    font-size: 11px;
    flex: 1;
    justify-content: center;
  }
  
  .header-right {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .btn-exit {
    width: 100%;
  }
  
  .ebook-reader {
    padding: 20px;
  }
  
  .ebook-reader h2 {
    font-size: 20px;
  }
  
  .ebook-reader-footer {
    flex-direction: row;
    gap: 8px;
    justify-content: space-between;
    padding: 10px;
  }
  
  .ebook-reader-footer .btn-primary, 
  .ebook-reader-footer .btn-secondary {
    font-size: 11px;
    padding: 8px 12px;
  }
  
  .chapter-progress-text {
    font-size: 11px;
  }
  
  .question-card {
    padding: 18px;
  }
  
  .questions-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}
