/* ===========================
   Variáveis
=========================== */
:root {
  --header-h: 100px;
  --brand: #e7904c;
  --bg-main: #fce7ef;
  --highlight: #5a3fc6;
  --text: #333333;

  /* Adicionando variáveis de design system */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.18);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

/* ===========================
   Seção Jogo de Cartas
=========================== */
#jogo-card {
  min-height: calc(100vh - var(--header-h));
  background: linear-gradient(135deg, var(--bg-main) 0%, rgba(252, 231, 239, 0.6) 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#jogo-card h2 {
  color: var(--highlight);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 20px;
  font-weight: 700;
  /* Adicionando animação de entrada */
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#cabecalho {
  color: var(--text);
  font-size: 1.15rem;
  margin-bottom: 40px;
  max-width: 700px;
  line-height: 1.8;
  text-align: center;
  animation: fadeInUp 0.6s ease-out 0.1s both;
}

#card-container {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 40px 0;
}

.card {
  width: 300px;
  height: 380px;
  position: relative;
  transform-style: preserve-3d;
  /* Melhorando transição do flip */
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
}

.card:hover {
  transform: rotateY(180deg);
  box-shadow: var(--shadow-xl);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1.2rem;
  padding: 28px;
  text-align: center;
  line-height: 1.6;
  color: white;
  /* Adicionando gradiente sutil */
  background: linear-gradient(135deg, var(--highlight) 0%, #7c5fd9 100%);
}

.card-front {
  background: linear-gradient(135deg, var(--highlight) 0%, #7c5fd9 100%);
}

.card-back {
  background: linear-gradient(135deg, var(--brand) 0%, #ff9d5c 100%);
  transform: rotateY(180deg);
}

.verdadeiro {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
}

.falso {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
}

/* ===========================
   Separador de Seções
=========================== */
.section-separator {
  width: 85%;
  max-width: 900px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--highlight), transparent);
  margin: 0 auto;
  opacity: 0.5;
  /* Adicionando animação */
  animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.5;
  }
}

/* ===========================
   Título Perguntas
=========================== */
#perguntas-titulo {
  text-align: center;
  padding: 80px 24px 32px;
  background: linear-gradient(135deg, var(--bg-main) 0%, rgba(252, 231, 239, 0.6) 100%);
}

#perguntas-titulo h2 {
  color: var(--highlight);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 16px;
  font-weight: 700;
}

#perguntas-titulo p {
  color: var(--text);
  font-size: 1.15rem;
  opacity: 0.85;
  line-height: 1.6;
}

/* ===========================
   Cards de Respostas
=========================== */
#cards-respostas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  padding: 60px 24px;
  min-height: 80vh;
  background: linear-gradient(135deg, var(--bg-main) 0%, rgba(252, 231, 239, 0.6) 100%);
  max-width: 1400px;
  margin: 0 auto;
}

.card_ngl_link {
  text-align: center;
  font-weight: 600;
  /* Melhorando sombra e transição */
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: white;
}

.card_ngl_link:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
}

.top {
  color: white;
  background: linear-gradient(135deg, #ec1187 0%, #ff8d10 100%);
  padding: 20px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.bottom {
  padding: 32px 24px;
  background: rgba(255, 255, 255, 0.95);
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.7;
}

.respostas {
  text-align: left;
  padding: 28px;
  color: white;
  background: linear-gradient(135deg, var(--highlight) 0%, #7c5fd9 100%);
}

.resposta-titulo {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.95;
}

.resposta-texto {
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
}

/* Adicionando informação de quem criou */
.created-by {
  font-size: 0.85rem;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  opacity: 0.8;
  font-style: italic;
}

/* ===========================
   Animações Scroll Reveal
=========================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Responsividade
=========================== */
@media (max-width: 1024px) {
  #jogo-card h2 {
    font-size: 1.8rem;
  }

  #cabecalho {
    font-size: 1.05rem;
    max-width: 600px;
  }

  #cards-respostas {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }
}

@media (max-width: 768px) {
  #jogo-card {
    padding: 40px 20px;
  }

  #jogo-card h2 {
    font-size: 1.6rem;
  }

  #cabecalho {
    font-size: 1rem;
    max-width: 95%;
  }

  .card {
    width: 250px;
    height: 320px;
  }

  .card-front,
  .card-back {
    font-size: 1.05rem;
    padding: 20px;
  }

  #cards-respostas {
    grid-template-columns: 1fr;
    padding: 40px 20px;
    gap: 24px;
  }

  #perguntas-titulo {
    padding: 60px 20px 24px;
  }
}

@media (max-width: 480px) {
  :root {
    --header-h: 80px;
  }

  #jogo-card {
    padding: 32px 16px;
  }

  #jogo-card h2 {
    font-size: 1.4rem;
  }

  #cabecalho {
    font-size: 0.95rem;
  }

  .card {
    width: 180px;
    height: 240px;
  }

  .card-front,
  .card-back {
    font-size: 0.95rem;
    padding: 16px;
  }

  #cards-respostas {
    padding: 32px 16px;
    grid-template-columns: 1fr;
  }

  .top {
    padding: 16px;
    font-size: 0.95rem;
  }

  .bottom {
    padding: 24px 20px;
    font-size: 1rem;
  }

  .respostas {
    padding: 20px;
  }

  .resposta-titulo {
    font-size: 1rem;
  }

  .resposta-texto {
    font-size: 0.95rem;
  }
}

/* ===========================
   Paginação
=========================== */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 16px 12px 48px;
  flex-wrap: wrap;
}

.pagination .page-btn {
  background: white;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.pagination .page-btn[disabled] {
  opacity: 0.5;
  cursor: default;
}

.pagination .page-number.active {
  background: var(--highlight);
  color: white;
  border-color: transparent;
}

.pagination .page-info {
  font-weight: 600;
  padding: 6px 10px;
  color: var(--text);
}

@media (max-width: 480px) {
  .pagination { gap: 10px; padding-bottom: 32px }
  .pagination .page-btn { padding: 10px 14px }
}
