/* 
  Variáveis de cor para facilitar a manutenção do tema do site.
  Você pode mudar as cores aqui e elas serão aplicadas em todo o CSS.
*/
:root {
  --bg: #f5ece1;
  --accent: #f8c8dc;
  --message: #fff9c4;
  --gold: #e3b23c;
  --text: #4a3f35;
  --white: #ffffff;
}

/* Remove margens e paddings padrões e define box-sizing para todos os elementos */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Estilo base do corpo da página */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Cabeçalho do site */
header {
  background: var(--accent);
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
  font-size: 1.8rem;
}

/* Área principal do conteúdo */
main {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ------------------- QUIZ ------------------- */

/* Container do quiz */
#quiz {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  text-align: center;
}

#quiz h2 {
  margin-bottom: 1.5rem;
  color: var(--gold);
}

/* Grid das opções do quiz */
.options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

/* Botão de opção do quiz */
.opt-btn {
  background: var(--accent);
  border: none;
  border-radius: 0.5rem;
  padding: 1rem;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform .2s, box-shadow .2s;
}

.opt-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Mensagem de feedback do quiz */
#quiz-msg {
  margin-top: 1rem;
  min-height: 1.4rem;
  color: var(--text);
}

/* Botão de avançar no quiz */
#next-btn {
  margin-top: 1rem;
  background: var(--gold);
  color: var(--white);
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 2rem;
  cursor: pointer;
  font-size: 1rem;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform .2s, box-shadow .2s;
}

#next-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* ------------------- JOGO DO BOTÃO ------------------- */

/* Container do jogo do botão */
#game {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Botão que se move */
#moving-btn {
  position: absolute;
  padding: 1rem 2rem;
  background: var(--gold);
  color: var(--white);
  border: none;
  border-radius: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform .2s, box-shadow .2s;
}

#moving-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Mensagem de incentivo do jogo */
#encourage {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text);
  font-size: 1.1rem;
  text-align: center;
  opacity: 0;
  transition: opacity .3s;
}

/* ------------------- RODAPÉ ------------------- */
footer {
  background: var(--accent);
  text-align: center;
  padding: 1rem;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
}

/* ------------------- SLIDESHOW E MENSAGENS ------------------- */

/* Container do slideshow de fotos */
.slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--accent);
  z-index: 0;
}

/* Imagem do slideshow */
#slide {
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Grupos de mensagens laterais */
.mid-group {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  width: 200px;
}

.mid-left {
  left: 10%;
}

.mid-right {
  right: 10%;
}

/* Mensagens pequenas */
.note-text {
  margin: 0.5rem 0;
  padding: 0.7rem 1rem;
  border-radius: 1rem;
  text-align: center;
  font-size: 1rem;
  color: white;
  background: linear-gradient(135deg, #ff7eb3, #ff758c);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  animation: float 3s ease-in-out infinite alternate;
}

/* Mensagem central maior */
.mid-text {
  margin: 0.5rem 0;
  padding: 1rem;
  background: var(--message);
  color: #333;
  border-radius: 0.7rem;
  text-align: center;
  font-size: 1rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Mensagem principal no rodapé */
.message {
  position: fixed;
  bottom: 2rem;
  left: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  font-size: 3rem;
  z-index: 2;
  animation: pulse 2s ease-in-out infinite;
}

/* Animação de flutuação para as mensagens pequenas */
@keyframes float {
  to {
    transform: translateY(-8px);
  }
}

/* Animação de "pulso" para a mensagem principal */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

/* ------------------- RESPONSIVIDADE MELHORADA ------------------- */

/* Telas médias: tablets e notebooks pequenos */
@media (max-width: 900px) {
  #quiz {
    max-width: 95vw;
    padding: 1.2rem;
  }

  .slideshow {
    width: 100vw;
    height: 100vh;
    min-height: 250px;
    max-height: 100vw;
  }

  #slide {
    height: 100vh;
    min-height: 200px;
  }

  .mid-group {
    width: 150px;
  }

  .message {
    font-size: 2.2rem;
  }

  #moving-btn {
    font-size: 0.95rem;
    padding: 0.8rem 1.2rem;
  }
}

/* Telas grandes: desktops - Slideshow ocupa toda a altura da tela */
@media (min-width: 901px) {
  .slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--accent);
    z-index: 0;
    border-radius: 0;
  }

  #slide {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
  }
}

@media (min-width: 1200px) {
  #quiz {
    max-width: 500px;
    padding: 2.5rem;
  }

  .slideshow {
    width: 60vw;
    height: 100vh;
    left: 20vw;
    border-radius: 2rem;
  }

  .mid-group {
    width: 250px;
  }

  .message {
    font-size: 3.5rem;
  }
}

/* Grid do quiz adaptável */
@media (min-width: 601px) and (max-width: 900px) {
  .options {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Ajustes finos para botões e textos */
@media (max-width: 400px) {
  #quiz {
    padding: 0.7rem;
  }

  .opt-btn,
  #next-btn,
  #moving-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.7rem;
  }

  .note-text,
  .mid-text {
    font-size: 0.9rem;
    padding: 0.4rem 0.5rem;
  }
}

/* ------------------- RESPONSIVIDADE (CELULAR) ------------------- */
@media (max-width: 600px) {
  .page-slideshow {
    background: var(--accent) !important;
  }

  .options {
    grid-template-columns: 1fr;
  }

  #moving-btn {
    width: 85%;
    max-width: 200px;
    font-size: 1rem;
    padding: 0.7rem 1.2rem;
  }

  html,
  body {
    overflow: auto;
    height: auto;
  }

  .slideshow {
    position: relative;
    width: 100vw;
    height: 90vw;
    min-height: 220px;
    max-height: 95vw;
    top: 0;
    background-color: var(--accent);
  }

  #slide {
    height: 100%;
    min-height: 180px;
    background-size: cover;
  }

  .mid-group {
    display: none !important;
  }

  .mobile-notes {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    margin: 0.5rem 0;
  }

  .mobile-msg {
    display: none;
    width: 98%;
    max-width: none;
    font-size: 0.95rem;
    padding: 0.4rem 0.5rem;
    margin: 0.2rem 0;
    text-align: center;
    /* Os estilos visuais virão das classes .note-text ou .mid-text */
  }

  .mobile-msg.active {
    display: block;
  }

  .note-text,
  .mid-text {
    width: 98%;
    max-width: none;
    font-size: 0.9rem;
    padding: 0.4rem 0.5rem;
  }

  .message {
    font-size: 3rem;
    bottom: 0.5rem;
    position: static;
    margin-top: 5rem;
    text-align: center;
    width: 100%;
  }

  body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 100vh;
  }
}

/* Esconde as mensagens mobile-notes no desktop */
@media (min-width: 601px) {
  .mobile-notes {
    display: none !important;
  }
}

/* Responsividade extra para telas muito pequenas (ex: 320px) */
@media (max-width: 340px) {
  #quiz {
    padding: 0.3rem;
    max-width: 99vw;
  }

  .opt-btn,
  #next-btn,
  #moving-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.4rem;
  }

  .note-text,
  .mid-text {
    font-size: 0.75rem;
    padding: 0.2rem 0.3rem;
  }

  .message {
    font-size: 1rem;
  }
}