/* === Variáveis Globais === */
:root {
  --cor-primaria: #f9c74f;    /* amarelo */
  --cor-secundaria: #90be6d;  /* verde */
  --cor-terciaria: #f9844a;   /* laranja */
  --cor-fundo: #fffaf0;
  --cor-texto: #333;
  --font-family: 'Comic Sans MS', cursive, sans-serif;
}

/* === Reset Básico === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(135deg, var(--cor-fundo), #d3e4cd);
  color: var(--cor-texto);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

/* === Header === */
.header {
  background-color: var(--cor-primaria);
  width: 100%;
  max-width: 1200px;
  padding: 1.5rem 2rem;
  border-radius: 0 0 30px 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.title {
  font-size: 3rem;
  color: white;
  text-shadow: 0 0 10px #f9c74f, 0 0 30px #f9844a;
  animation: brilho 3.5s ease-in-out infinite;
  margin-bottom: 0.5rem;
}

.axé-counter {
  font-weight: 700;
  font-size: 1.5rem;
  background: #fff7b0;
  color: #3b3b3b;
  padding: 0.3rem 1.2rem;
  border-radius: 50px;
  box-shadow: 0 0 15px #f9c74faa;
  display: inline-block;
}

/* === Menu === */
.menu-principal {
  background-color: var(--cor-secundaria);
  width: 100%;
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  border-radius: 25px;
  box-shadow: 0 4px 10px #607d3540;
}

.menu-btn,
.calendar-btn {
  background: white;
  border: none;
  border-radius: 18px;
  padding: 1rem 1.5rem;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--cor-texto);
  box-shadow: 0 4px 12px #6e8f4570;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.menu-btn:hover,
.calendar-btn:hover {
  background-color: var(--cor-terciaria);
  color: white;
  transform: scale(1.05);
}

.menu-btn[aria-pressed="true"] {
  background-color: var(--cor-terciaria);
  color: white;
}

/* === Conteúdo Principal === */
.main-container {
  width: 100%;
  max-width: 1200px;
  background: white;
  border-radius: 30px;
  padding: 2rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* === Sessões === */
.sessao {
  display: none;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.sessao.ativa {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* === Títulos === */
h2,
h3 {
  font-size: 2rem;
  text-align: center;
  color: var(--cor-secundaria);
  text-shadow: 0 0 5px #90be6d55;
  margin-bottom: 1rem;
}

/* === Grade dos Joguinhos === */
.grid-jogos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 1rem;
}

/* === Cartões dos Joguinhos === */
.card-jogo {
  --cor-fundo: var(--cor-primaria);
  background-color: var(--cor-fundo);
  color: white;
  font-weight: bold;
  font-size: 1.3rem;
  padding: 2rem 1rem;
  border-radius: 20px;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.card-jogo span {
  display: block;
  font-weight: 700;
  font-size: 1.2rem;
  user-select: none;
}

/* Ícone maior */
.card-jogo::before {
  content: attr(data-emoji);
  font-size: 2.8rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* Brilho sutil em movimento */
.card-jogo::after {
  content: '';
  position: absolute;
  width: 160%;
  height: 160%;
  background: rgba(255, 255, 255, 0.15);
  top: -50%;
  left: -50%;
  transform: rotate(25deg);
  animation: brilhoPassante 4s linear infinite;
  pointer-events: none;
}

.card-jogo:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

/* Animação brilho passante */
@keyframes brilhoPassante {
  0% {
    transform: rotate(25deg) translateX(-100%);
  }
  100% {
    transform: rotate(25deg) translateX(200%);
  }
}

/* === Historinhas e Dicionário === */
.lista-historias,
.lista-dicionario,
.historias-desbloqueadas,
.dicionario-desbloqueado {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.historia,
.dicionario-item {
  background: #fef9e7;
  padding: 1.2rem;
  border-radius: 18px;
  text-align: center;
  font-weight: bold;
  color: #555;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
  text-decoration: none;
}

.historia:hover,
.dicionario-item:hover {
  background: #f9c74f;
  color: white;
  transform: translateY(-4px);
}

/* === Separador === */
hr {
  border: none;
  height: 3px;
  background: var(--cor-secundaria);
  border-radius: 10px;
  width: 80%;
  margin: 2rem auto;
}

/* === Toasts === */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.toast {
  background-color: var(--cor-secundaria);
  color: white;
  padding: 1rem 1.5rem;
  margin-top: 1rem;
  border-radius: 20px;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateX(100%);
  animation-fill-mode: forwards;
}

.toast.show {
  animation: toastIn 0.4s forwards;
}

.toast.hide {
  animation: toastOut 0.4s forwards;
}

@keyframes toastIn {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* === Animação de brilho no título === */
@keyframes brilho {
  0%,
  100% {
    text-shadow: 0 0 6px #f9c74f, 0 0 18px #f9844a, 0 0 25px #f9844a;
  }
  50% {
    text-shadow: 0 0 14px #f9c74f, 0 0 30px #f9844a, 0 0 40px #f9844a;
  }
}

/* === Responsivo === */
@media (max-width: 768px) {
  .title {
    font-size: 2.4rem;
  }

  .axé-counter {
    font-size: 1.2rem;
  }

  .menu-principal {
    flex-direction: column;
    align-items: center;
  }

  .menu-btn,
  .calendar-btn {
    width: 100%;
    text-align: center;
  }

  .main-container {
    padding: 1.5rem;
  }

  /* Joguinhos 2 colunas no mobile */
  .grid-jogos {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .card-jogo {
    font-size: 1rem;
    padding: 1.5rem 0.5rem;
    max-width: 100%;
  }

  /* Historinhas e dicionário em 1 coluna no mobile */
  .lista-historias,
  .lista-dicionario,
  .historias-desbloqueadas,
  .dicionario-desbloqueado {
    grid-template-columns: 1fr;
  }
}
.footer-anuncio {
  background: #2e4a1f; /* verde escuro, pode ajustar */
  color: white;
  padding: 2rem 1rem;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  box-shadow: 0 -3px 10px rgba(0,0,0,0.3);
}

.container-cards {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.card-anuncio {
  background: #4caf50;
  flex: 1 1 280px;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  outline-offset: 4px;
}

.card-anuncio:hover,
.card-anuncio:focus {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
  background: #66bb6a;
}

.card-anuncio img {
  width: 100%;
  max-width: 180px;
  height: auto;
  margin-bottom: 1rem;
  border-radius: 10px;
  user-select: none;
  pointer-events: none;
}

.card-anuncio h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.card-anuncio p {
  font-size: 1rem;
  line-height: 1.3;
  margin: 0;
}

/* Responsivo */
@media (max-width: 700px) {
  .container-cards {
    flex-direction: column;
    gap: 1rem;
  }
  .card-anuncio {
    max-width: 90vw;
    margin: 0 auto;
  }
}
.tutorial-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.tutorial-popup.active {
  display: flex;
}

.tutorial-content {
  background: #fff8e1;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  font-family: 'Comic Sans MS', cursive, sans-serif;
  animation: aparecer 0.4s ease;
}

.tutorial-content h2 {
  color: #bf360c;
}

.tutorial-content p {
  color: #4e342e;
  margin: 10px 0;
}

.tutorial-content button {
  margin-top: 16px;
  padding: 8px 16px;
  background: #ff7043;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}

@keyframes aparecer {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.header-status {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.tutorial-header-btn {
  background: #ffffff;
  color: #3b3b3b;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

.tutorial-header-btn:hover {
  background: var(--cor-terciaria);
  color: white;
  transform: scale(1.05);
}

@media (max-width: 700px) {
  .header-content {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .header-status {
    justify-content: center;
  }
}
.header-arcoiris {
  width: 100%;
  padding: 2rem 1rem;
  background: linear-gradient(270deg, #f9c74f, #90be6d, #577590, #f9844a, #f94144, #f9c74f);
  background-size: 1200% 1200%;
  animation: arcoirisBg 20s ease infinite;
  border-radius: 0 0 40px 40px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 100;
  text-align: center;
}

@keyframes arcoirisBg {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}

.header-glow {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.title-glow {
  font-size: 3.2rem;
  color: white;
  text-shadow: 0 0 10px #fff, 0 0 20px #ffcc00, 0 0 30px #ff6699;
  animation: brilhoGlow 3s infinite ease-in-out;
}

@keyframes brilhoGlow {
  0%, 100% {
    text-shadow: 0 0 10px #fff, 0 0 20px #ffcc00, 0 0 30px #ff6699;
  }
  50% {
    text-shadow: 0 0 20px #fff, 0 0 30px #ffe600, 0 0 50px #ff00cc;
  }
}

.header-status-glow {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.axé-counter-glow {
  font-size: 1.6rem;
  font-weight: bold;
  background: #fffbe6;
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  box-shadow: 0 0 10px #ffe082;
  color: #5e4600;
  animation: flutuar 3s ease-in-out infinite;
}

.tutorial-btn-glow {
  padding: 0.6rem 1.4rem;
  background: #ffffff;
  border: 2px solid #f9c74f;
  border-radius: 20px;
  font-weight: bold;
  font-size: 1.1rem;
  color: #5e4600;
  cursor: pointer;
  box-shadow: 0 0 12px #ffd54f;
  transition: all 0.3s ease;
  animation: flutuar 4s ease-in-out infinite;
}

.tutorial-btn-glow:hover {
  background: #f9844a;
  color: white;
  transform: scale(1.05);
}

@keyframes flutuar {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Responsivo */
@media (max-width: 768px) {
  .title-glow {
    font-size: 2.3rem;
  }
  .axé-counter-glow {
    font-size: 1.2rem;
  }
  .tutorial-btn-glow {
    font-size: 1rem;
  }
}
.footer-anuncio {
  background: linear-gradient(135deg, #f9f4e7, #cce7e8);
  padding: 2rem 1rem;
  box-shadow: inset 0 0 10px #a7c1b7;
  border-top: 3px solid #6ca0a9;
  margin-top: 3rem;
}

.container-cards {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.card-anuncio {
  background: white;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgb(108 160 169 / 0.25);
  flex: 1 1 280px;
  max-width: 300px;
  cursor: pointer;
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  outline-offset: 4px;
}

.card-anuncio:hover,
.card-anuncio:focus {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgb(108 160 169 / 0.45);
  outline: none;
}

.card-anuncio img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  object-fit: cover;
  aspect-ratio: 16 / 9;
}

.card-anuncio h3 {
  margin: 0 0 0.4rem;
  font-size: 1.2rem;
  color: #3a6b6f;
  font-weight: 700;
  text-align: center;
  font-family: 'Comic Sans MS', cursive, sans-serif;
}

.card-anuncio p {
  margin: 0;
  font-size: 0.95rem;
  color: #617d7f;
  text-align: center;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  line-height: 1.3;
}

/* Mobile */
@media (max-width: 600px) {
  .container-cards {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .card-anuncio {
    max-width: 90vw;
  }
}
.footer-anuncio {
  background: #fff8e1;
  padding: 2rem 1rem;
  margin-top: 2rem;
  width: 100%;
}

.container-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.card-anuncio {
  background: #fffde7;
  border-radius: 16px;
  padding: 1rem;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-anuncio:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.card-anuncio h3 {
  margin: 0.5rem 0 0.3rem;
  font-size: 1.2rem;
  color: #3a1a00;
}

.card-anuncio p {
  margin: 0;
  font-size: 0.95rem;
  color: #5c3a00;
}

.img-anuncio {
  width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  margin-bottom: 0.5rem;
}


/* === Melhorias de Responsividade Mobile === */
@media (max-width: 768px) {
  body {
    padding: 0.5rem;
  }

  .header-arcoiris {
    padding: 1rem;
    border-radius: 0 0 20px 20px;
  }

  .title-glow {
    font-size: 2rem;
  }

  .header-status-glow {
    flex-direction: column;
    gap: 0.5rem;
  }

  .menu-principal {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem;
  }

  .menu-btn, .calendar-btn {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    min-width: auto;
  }

  .grid-jogos {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
  }

  .card-jogo {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .lista-historias, .lista-dicionario {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .card-historia, .card-dicionario {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .container-cards {
    flex-direction: column;
    align-items: center;
  }

  .card-anuncio {
    max-width: 100%;
    width: 100%;
  }

  .img-anuncio {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .title-glow {
    font-size: 1.5rem;
  }

  .grid-jogos {
    grid-template-columns: 1fr;
  }

  .menu-principal {
    flex-direction: column;
  }

  .menu-btn, .calendar-btn {
    width: 100%;
    text-align: center;
  }
}

/* === Melhorias de Acessibilidade === */
.card-jogo:focus,
.card-historia:focus,
.card-dicionario:focus,
.menu-btn:focus,
.calendar-btn:focus {
  outline: 3px solid #4a90e2;
  outline-offset: 2px;
}

.card-jogo:focus-visible,
.card-historia:focus-visible,
.card-dicionario:focus-visible {
  transform: scale(1.05);
}

/* Melhor contraste para texto */
.card-jogo span,
.card-historia h3,
.card-dicionario h3 {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Animações reduzidas para usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  .card-jogo,
  .card-historia,
  .card-dicionario,
  .menu-btn,
  .calendar-btn {
    transition: none;
  }

  .title-glow {
    animation: none;
  }
}


/* === Estilos para Histórias Completas === */
.historia-completa {
  background: linear-gradient(135deg, #fff9e6, #f0f8ff);
  border-radius: 15px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-left: 5px solid var(--cor-primaria);
}

.historia-completa h3 {
  color: #4a5568;
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.historia-completa p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #2d3748;
  font-size: 1rem;
  text-align: justify;
}

.historia-completa p:last-child {
  margin-bottom: 0;
  background: rgba(249, 199, 79, 0.2);
  padding: 1rem;
  border-radius: 10px;
  border-left: 3px solid var(--cor-primaria);
}

.historia-completa strong {
  color: #2b6cb0;
  font-weight: bold;
}

/* Responsividade para histórias completas */
@media (max-width: 768px) {
  .historia-completa {
    padding: 1rem;
    margin: 0.5rem 0;
  }

  .historia-completa h3 {
    font-size: 1.1rem;
  }

  .historia-completa p {
    font-size: 0.9rem;
  }
}

.card-anuncio img {
  width: 100%;
  max-width: 300px;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  aspect-ratio: auto;
  margin-bottom: 0.75rem;
}