/* ==================================================
   a3bim1.css
   União fiel de todos os modelos CSS dos anexos.
   ================================================== */

/* ========== VARIÁVEIS GLOBAIS ========== */
:root {
  --robot-green: #4a7c3f;
  --robot-dark: #1e2a1a;
  --robot-bg: #0d1f0b;
  --robot-card: #2c3e2b;
  --robot-gold: #ffb347;
  --robot-glow: #ffcc44;
  --robot-danger: #e74c3c;
  --robot-text: #e9f5db;
  --robot-text-claro: #ebf0eb;
  --robot-purple: #8e44ad;
  --robot-cyan: #1abc9c;
  --robot-pink: #e84393;
  --robot-blue: #3498db;
}

/* ========== RESET E BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.bg-robotica {
  background: linear-gradient(135deg, #0a1f0a 0%, #0d2a0a 100%);
  font-family: "Inter", "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  color: var(--robot-text);
  min-height: 100vh;
}

/* ========== CABEÇALHO ROBÓTICO ========== */
.bg-robotica {
  background: linear-gradient(145deg, #1a2b17 0%, #2c3e2b 100%);
  min-height: 100vh;
  color: #f0f3e8;
  font-family: "Inter", "Chakra Petch", monospace;
}

.cabecalho-robotico {
  background: #0c140b;
  background-image: repeating-linear-gradient(45deg,
      #2a3b24 0px,
      #2a3b24 2px,
      #1b2a18 2px,
      #1b2a18 8px);
  padding: 1rem 0;
  border-bottom: 5px solid #9bbc7b;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.cabecalho-rebelde {
  border-bottom-color: #ffb347;
  position: relative;
  overflow: hidden;
}

.cabecalho-rebelde::before {
  content: "⚠️ BUG ZONE ⚠️";
  position: absolute;
  bottom: 5px;
  right: 10px;
  font-size: 0.6rem;
  opacity: 0.3;
  font-family: monospace;
  white-space: nowrap;
  pointer-events: none;
}

.logo-rb,
.logo-gn {
  max-height: 70px;
  width: auto;
  filter: drop-shadow(2px 2px 6px black);
  transition: transform 0.2s ease;
  border-radius: 12px;
}

.logo-rb:hover,
.logo-gn:hover {
  transform: scale(1.05);
}

.titulo-principal {
  font-family: "Press Start 2P", cursive;
  font-size: 1.95rem;
  letter-spacing: 2px;
  color: #e9f5db;
  background: linear-gradient(135deg, #1a2b17 0%, #2c3e2b 100%);
  display: inline-block;
  padding: 0.6rem 1.8rem;
  border-radius: 60px;
  position: relative;
  text-transform: uppercase;
  border: 2px solid #ffb347;
  box-shadow:
    0 0 0 2px #1a2b17,
    0 0 0 4px #ffb347,
    0 4px 15px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  text-shadow: 2px 2px 0 #3d5a2b;
  backdrop-filter: blur(2px);
  white-space: nowrap;
}

.titulo-principal::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 20%;
  width: 60%;
  height: 12px;
  background: repeating-linear-gradient(90deg,
      rgba(255, 220, 150, 0.6) 0px,
      rgba(255, 220, 150, 0.6) 8px,
      rgba(200, 170, 100, 0.4) 8px,
      rgba(200, 170, 100, 0.4) 16px);
  border-radius: 20px;
  filter: blur(1px);
  pointer-events: none;
}

.titulo-principal::after {
  content: "⬤";
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-size: 0.7rem;
  color: #ffb347;
  text-shadow: 0 0 3px #000;
  pointer-events: none;
}

.titulo-principal .parafuso-esquerda {
  position: absolute;
  bottom: -6px;
  left: -6px;
  font-size: 0.7rem;
  color: #ffb347;
  text-shadow: 0 0 3px #000;
  pointer-events: none;
}

.titulo-principal:hover {
  transform: translateY(-2px);
  border-color: #ffcc44;
  box-shadow:
    0 0 0 2px #1a2b17,
    0 0 0 4px #ffcc44,
    0 6px 20px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, #2a3b24 0%, #1a2b17 100%);
}

.glitch-text {
  font-family: "Press Start 2P", monospace;
  letter-spacing: 1px;
}

.subtitulo-chiclete {
  font-family: "Chakra Petch", monospace;
  font-size: 0.85rem;
  color: #ffcc88;
  margin-top: 0.5rem;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0 #1a2b17;
}

.selo-sucata {
  background: #1e1e1e;
  color: #ffcc44;
  padding: 4px 12px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-family: monospace;
  border-left: 3px solid #ff9900;
  letter-spacing: 1px;
}

/* ========== MENU GLASSMORPHISM ========== */
.menu-robomestre {
  background: rgba(13, 31, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--robot-gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.menu-robomestre .nav-link {
  color: var(--robot-text);
  font-family: "Chakra Petch", monospace;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 40px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-robomestre .nav-link i {
  font-size: 1.1rem;
  color: var(--robot-gold);
  transition: transform 0.2s;
}

.menu-robomestre .nav-link:hover {
  color: var(--robot-gold);
  text-shadow: 0 0 4px var(--robot-gold);
  background: rgba(255, 180, 71, 0.15);
  transform: translateY(-2px);
}

.menu-robomestre .nav-link:hover i {
  transform: scale(1.1);
  color: var(--robot-glow);
}

.menu-robomestre .nav-link.active {
  color: var(--robot-glow);
  background: rgba(255, 180, 71, 0.25);
  text-shadow: 0 0 6px var(--robot-gold);
  border-bottom: 2px solid var(--robot-gold);
}

.menu-robomestre .navbar-toggler {
  border-color: var(--robot-gold);
  background-color: rgba(0, 0, 0, 0.5);
}

.menu-robomestre .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffb347' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.menu-robomestre .navbar-brand {
  color: var(--robot-gold);
  font-family: "Press Start 2P", cursive;
  font-size: 0.9rem;
}

/* ========== CARDS GLOBAIS ========== */
.bg-robocard {
  background: linear-gradient(145deg, var(--robot-card), var(--robot-dark));
  border: 1px solid var(--robot-gold);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  color: #ebf0eb;
}

.text-gradient {
  background: linear-gradient(135deg, var(--robot-gold), #ffe0a3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.alert-warning {
  background-color: rgba(255, 180, 71, 0.2) !important;
  border-color: var(--robot-gold) !important;
  color: var(--robot-text-claro) !important;
}

/* ========== PROJETO HEADER ========== */
.projeto-header {
  background: linear-gradient(90deg, var(--robot-dark) 0%, #2a3b24 100%);
  border-left: 8px solid var(--robot-gold);
  border-radius: 20px;
  padding: 12px 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.projeto-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--robot-gold);
  text-shadow: 2px 2px 0 #1e2a1a;
  font-size: 1.4rem;
  margin-bottom: 0;
}

.badge-projeto {
  background: var(--robot-danger);
  color: white;
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: bold;
  display: inline-block;
  text-transform: uppercase;
  box-shadow: 0 2px 0 #8b1a1a;
}

/* ========== TABELAS ROBÓTICAS ========== */
.table-robotica {
  background: rgba(30, 42, 26, 0.85);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(4px);
  color: var(--robot-text);
}

.table-robotica th,
.table-robotica td {
  vertical-align: middle;
  padding: 12px 8px;
  border-color: #4a7c3f;
}

.table-robotica thead th {
  background: var(--robot-dark);
  color: var(--robot-gold);
  font-family: "Chakra Petch", monospace;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.table-robotica tbody tr:hover {
  background: rgba(74, 124, 63, 0.3);
  transition: 0.2s;
}

/* ========== PLANOS DE AULA ========== */
.accordion-item {
  background: transparent;
  border: none;
  margin-bottom: 16px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.accordion-header {
  background: linear-gradient(135deg, #1e2a1a, #2a3b24);
}

.accordion-button {
  background: #627454;
  color: #ffb347;
  font-weight: bold;
  font-family: "Chakra Petch", monospace;
  border: none;
  border-radius: 0;
  padding: 16px 24px;
  font-size: 1rem;
}

.accordion-button:not(.collapsed) {
  background: #7f9470;
  color: #ffcc44;
  box-shadow: none;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: #ffb347;
}

.accordion-body {
  background: #0d1f0b;
  padding: 24px;
  border-top: 2px solid #ffb347;
}

.semana-card-completo {
  background: #505e45;
  border-radius: 24px;
  padding: 20px;
}

.semana-card-completo h5 {
  color: #ffb347;
  margin-top: 20px;
  margin-bottom: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  border-left: 4px solid #ffb347;
  padding-left: 12px;
}

.semana-card-completo h5:first-of-type {
  margin-top: 0;
}

.semana-card-completo ul,
.semana-card-completo p {
  margin-bottom: 16px;
  line-height: 1.5;
}

.check-concluido {
  background: #1e2a1a;
  padding: 4px 12px;
  border-radius: 40px;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.check-concluido:hover {
  background: #2c3e2b;
}

.check-concluido input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #ffb347;
}

.materiais-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.material-badge {
  background: #2c3e2b;
  padding: 6px 12px;
  border-radius: 40px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-left: 2px solid #ffb347;
  color: #ebf0eb;
}

.material-badge i {
  font-size: 0.9rem;
}

.tabela-criterios-semana {
  background: #0a0f08;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
}

.tabela-criterios-semana thead {
  background: #2c3e2b;
  color: #ffb347;
}

.tabela-criterios-semana th,
.tabela-criterios-semana td {
  padding: 10px 12px;
  border-color: #4a7c3f;
  vertical-align: middle;
}

.tabela-criterios-semana td {
  color: #ebf0eb;
}

.tabela-criterios-semana tbody tr:hover {
  background: #1e2a1a;
}

.minuto-item {
  display: flex;
  margin-bottom: 16px;
  background: #0a0f08;
  border-radius: 20px;
  overflow: hidden;
  border-left: 4px solid #ffb347;
}

.minuto-tempo {
  background: #2c3e2b;
  padding: 10px 16px;
  font-weight: bold;
  font-family: "Press Start 2P", cursive;
  font-size: 0.7rem;
  min-width: 100px;
  text-align: center;
  color: #ffb347;
}

.minuto-descricao {
  padding: 10px 16px;
  flex: 1;
  line-height: 1.4;
  color: #ebf0eb;
}

.frase-do-dia {
  background: linear-gradient(135deg, #2c3e2b, #1e2a1a);
  border-radius: 20px;
  padding: 12px 20px;
  margin-top: 20px;
  text-align: center;
  font-style: italic;
  border: 1px dashed #ffb347;
  color: #ebf0eb;
}

.frase-do-dia i {
  color: #ffb347;
  margin-right: 8px;
}

code {
  background: #1e2a1a;
  padding: 2px 6px;
  border-radius: 8px;
  color: #ffb347;
  font-family: monospace;
}

/* ========== RODAPÉ ========== */
.footer-robotico {
  background: #0c140b;
  background-image: repeating-linear-gradient(45deg,
      #2a3b24 0px,
      #2a3b24 2px,
      #1b2a18 2px,
      #1b2a18 8px);
  border-top: 5px solid #9bbc7b;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  padding: 2rem 0 1rem;
  margin-top: 3rem;
}

.footer-rebelde {
  border-top-color: #ffb347;
}

.footer-rebelde::before {
  content: "⚠️ BUG ZONE ⚠️";
  position: absolute;
  bottom: 5px;
  right: 10px;
  font-size: 0.6rem;
  opacity: 0.3;
  font-family: monospace;
  white-space: nowrap;
  pointer-events: none;
}

.footer-logo {
  max-height: 70px;
  width: auto;
  filter: drop-shadow(2px 2px 6px black);
  transition: transform 0.2s ease;
  border-radius: 16px;
}

.footer-logo:hover {
  transform: scale(1.05);
}

.dev-nome {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  font-family: "Chakra Petch", monospace;
  color: #ebf0eb;
}

.dev-contato {
  font-size: 0.8rem;
}

.dev-contato a {
  color: #ebf0eb;
  text-decoration: none;
  transition:
    color 0.2s,
    text-shadow 0.2s;
  font-family: monospace;
}

.dev-contato a:hover {
  color: #ffb347;
  text-decoration: underline;
  text-shadow: 0 0 4px rgba(255, 180, 71, 0.5);
}

.relatorio-bugs {
  border-top: 1px dashed #ffb347;
  padding-top: 0.8rem;
  font-family: monospace;
  font-size: 0.75rem;
  color: #ffcc88;
  letter-spacing: 0.5px;
}

/* ========== CERTIFICADO ========== */
.certificado-preview {
  background: transparent;
}

.certificado-modelo {
  font-family: "Courier New", "Press Start 2P", monospace;
  background: #0d1f0b !important;
  border: 3px double rgba(155, 188, 123, 0.9) !important;
  border-radius: 48px 24px 48px 24px !important;
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.3);
  text-align: center;
  padding: 1.5rem;
}

.certificado-modelo h3 {
  font-family: "Press Start 2P", cursive;
  font-size: 0.9rem;
  color: #ffb347;
  margin-bottom: 1rem;
}

.nome-aluno-destaque {
  font-size: 22px;
  display: block;
  margin: 15px 0;
  color: #2c5e1f;
  background: #d4b87a !important;
  padding: 12px;
  border-radius: 40px;
  font-weight: bold;
  word-break: break-word;
}

.certificado-modelo p {
  color: #e9f5db;
  line-height: 1.4;
}

.certificado-modelo .data-rodape,
.certificado-modelo .assinatura-engracada {
  color: #e9f5db;
  font-size: 0.8rem;
}

.linha-certificado {
  border-color: #ffb347;
  margin: 15px 0;
}

.cadastro-alunos {
  background: #1e2a1a !important;
  border-radius: 32px;
  border-left: 5px solid #ffb347;
}

.cadastro-alunos h4,
.cadastro-alunos h5 {
  color: #ffb347;
  font-family: "Press Start 2P", cursive;
  font-size: 0.8rem;
}

.lista-alunos {
  list-style: none;
  padding-left: 0;
}

.lista-alunos li {
  background: #2c3e2b;
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ebf0eb;
  font-weight: 500;
  transition: all 0.2s;
}

.lista-alunos li:hover {
  background: #3a5538;
  transform: translateX(5px);
}

.btn-selecionar-aluno {
  background: #ffb34720;
  border: 1px solid #ffb347;
  color: #ffb347;
  border-radius: 40px;
  padding: 4px 12px;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.btn-selecionar-aluno:hover {
  background: #ffb347;
  color: #1e2a1a;
  transform: scale(1.05);
}

.btn-robotico-ano2 {
  background: linear-gradient(95deg, #ffb347, #ff8c00);
  border: none;
  color: #1e2a1a;
  font-weight: bold;
  padding: 8px 20px;
  border-radius: 60px;
  transition: all 0.3s;
  font-family: "Press Start 2P", cursive;
  font-size: 0.65rem;
}

.btn-robotico-ano2:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: 0 0 12px #ffb347;
  background: linear-gradient(95deg, #ffa01e, #ff7000);
  color: white;
}

.btn-robotico-ano2:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-outline-warning {
  border: 2px solid #ffb347;
  color: #ffb347;
  border-radius: 60px;
  font-weight: bold;
  background: transparent;
  transition: all 0.2s;
}

.btn-outline-warning:hover:not(:disabled) {
  background: #ffb347;
  color: #1e2a1a;
}

/* ========== FECHAMENTO ========== */
.card.bg-light.border-warning {
  background-color: #2c3e2b !important;
  color: #2c3e2b;
}

.card.bg-light.border-warning .card-title {
  color: #e67e22;
  font-weight: bold;
}

.card.bg-light.border-warning h6 {
  color: #ebf0eb;
  font-weight: bold;
}

.card.bg-light.border-warning li {
  color: #ebf0eb;
}

.card.bg-light.border-warning p {
  color: #ebf0eb;
}

/* ================================================================
   ========== ESTILOS DO JOGO REPITA COMIGO (VERSÃO MELHORADA) ==========
   ================================================================ */

/* --- Container principal do jogo --- */
#jogoRepitaComigo {
  position: relative;
}

#jogoRepitaComigo .desafio-card {
  background: linear-gradient(145deg, #1e2a1a, #0a0f08);
  border-left: 6px solid #ffb347;
  border-radius: 16px;
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 180, 71, 0.1);
  position: relative;
  overflow: hidden;
}

#jogoRepitaComigo .desafio-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%,
      rgba(255, 180, 71, 0.05),
      transparent 60%);
  pointer-events: none;
}

#jogoRepitaComigo .desafio-card h4 {
  font-family: "Press Start 2P", cursive;
  font-size: 0.7rem;
  color: #ffcc88;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#jogoRepitaComigo .desafio-card #desafioAlvo {
  font-family: "Press Start 2P", cursive;
  font-size: 1.2rem;
  color: #ffcc44;
  text-shadow: 0 0 20px rgba(255, 204, 68, 0.3);
  padding: 10px 0;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#jogoRepitaComigo .algoritmo-card {
  background: linear-gradient(145deg, #0a0f08, #1e2a1a);
  border-right: 6px solid #ffb347;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

#jogoRepitaComigo .algoritmo-card h5 {
  font-family: "Press Start 2P", cursive;
  font-size: 0.65rem;
  color: #ffcc88;
}

/* --- Área do algoritmo --- */
#areaAlgoritmo {
  background: #0a0f08;
  border: 2px solid #2c3e2b;
  font-size: 0.9rem;
  color: #ebf0eb;
  min-height: 120px;
  border-radius: 12px;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
  padding: 8px;
}

#areaAlgoritmo:focus-within {
  border-color: #ffb347;
  box-shadow: 0 0 20px rgba(255, 180, 71, 0.15);
}

#areaAlgoritmo .text-muted {
  color: #5a6a5a !important;
  font-size: 0.85rem;
  width: 100%;
  text-align: center;
  padding: 20px 0;
}

#areaAlgoritmo .badge {
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 40px;
  transition: all 0.2s ease;
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgePop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

#areaAlgoritmo .badge.bg-info {
  background: linear-gradient(145deg, #2980b9, #3498db) !important;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Loop containers --- */
.loop-container {
  border: 2px solid #ffb347;
  border-radius: 12px;
  background: #1a2b17;
  padding: 10px 14px;
  margin-bottom: 8px;
  width: 100%;
  transition: all 0.3s ease;
  animation: loopAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes loopAppear {
  0% {
    transform: scale(0.9) translateY(-10px);
    opacity: 0;
  }

  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.loop-container:hover {
  box-shadow: 0 0 30px rgba(255, 180, 71, 0.1);
}

.loop-container .badge.bg-warning {
  background: linear-gradient(145deg, #ffb347, #ff8c00) !important;
  color: #1e2a1a;
  font-family: "Press Start 2P", cursive;
  font-size: 0.55rem;
  padding: 6px 12px;
}

.loop-container .badge.bg-info.text-dark {
  background: linear-gradient(145deg, #1abc9c, #16a085) !important;
  color: #fff !important;
}

.loop-filhos {
  min-height: 30px;
  padding: 4px 0;
}

.loop-filhos .badge {
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.loop-container .btn-remover-loop {
  opacity: 0.6;
  transition: all 0.2s ease;
  border-radius: 40px;
  padding: 2px 10px;
  font-size: 0.7rem;
}

.loop-container .btn-remover-loop:hover {
  opacity: 1;
  transform: scale(1.1);
}

/* --- Botões inline do loop em edição --- */
.btn-add-ao-loop {
  background: rgba(46, 204, 113, 0.15);
  border: 2px solid #2ecc71;
  color: #2ecc71;
  border-radius: 40px;
  padding: 4px 16px;
  font-size: 0.7rem;
  font-weight: bold;
  transition: all 0.2s ease;
  font-family: "Chakra Petch", monospace;
}

.btn-add-ao-loop:hover {
  background: #2ecc71;
  color: #1e2a1a;
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.btn-add-ao-loop:active {
  transform: scale(0.95);
}

.btn-fechar-loop-inline {
  background: linear-gradient(145deg, #27ae60, #2ecc71);
  border: none;
  color: #fff;
  border-radius: 40px;
  padding: 4px 16px;
  font-size: 0.7rem;
  font-weight: bold;
  transition: all 0.2s ease;
  font-family: "Chakra Petch", monospace;
}

.btn-fechar-loop-inline:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.btn-fechar-loop-inline:active {
  transform: scale(0.95);
}

.btn-cancelar-loop-inline {
  background: linear-gradient(145deg, #c0392b, #e74c3c);
  border: none;
  color: #fff;
  border-radius: 40px;
  padding: 4px 16px;
  font-size: 0.7rem;
  font-weight: bold;
  transition: all 0.2s ease;
  font-family: "Chakra Petch", monospace;
}

.btn-cancelar-loop-inline:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-cancelar-loop-inline:active {
  transform: scale(0.95);
}

/* --- Cartões de comando --- */
.cartao-cmd {
  background: linear-gradient(145deg, #2c3e2b, #1e2a1a);
  border: 2px solid #4a7c3f;
  border-radius: 60px;
  padding: 10px 22px;
  font-weight: bold;
  color: #ebf0eb;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: "Chakra Petch", monospace;
  position: relative;
  overflow: hidden;
}

.cartao-cmd::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.05),
      transparent);
  transition: left 0.5s ease;
}

.cartao-cmd:hover::before {
  left: 100%;
}

.cartao-cmd:hover {
  background: linear-gradient(145deg, #ffb347, #ff8c00);
  color: #1e2a1a;
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 8px 30px rgba(255, 180, 71, 0.35);
  border-color: #ffb347;
}

.cartao-cmd:active {
  transform: scale(0.95) translateY(0);
}

.cartao-cmd.especial {
  background: linear-gradient(145deg, #6c3483, #8e44ad);
  border-color: #a569c9;
  color: #ffcc44;
  box-shadow: 0 0 20px rgba(142, 68, 173, 0.2);
}

.cartao-cmd.especial:hover {
  background: linear-gradient(145deg, #8e44ad, #a569c9);
  border-color: #ffcc44;
  box-shadow: 0 8px 30px rgba(142, 68, 173, 0.4);
}

.cartao-cmd.especial.btn-loop-ativo {
  background: linear-gradient(145deg, #e67e22, #f39c12);
  border-color: #f1c40f;
  color: #fff;
  animation: pulseLoop 0.8s ease-in-out infinite alternate;
  box-shadow: 0 0 40px rgba(241, 196, 15, 0.3);
}

/* Modo loop ativo nos cartões de ação */
.cartao-cmd:not(.especial).modo-loop-ativo {
  border-color: #ffcc44;
  background: linear-gradient(145deg, #3a4a35, #2a3b24);
  box-shadow: 0 0 30px rgba(255, 204, 68, 0.2);
  animation: pulseAcao 1.2s ease-in-out infinite alternate;
}

@keyframes pulseAcao {
  0% {
    box-shadow: 0 0 10px rgba(255, 204, 68, 0.1);
    transform: scale(1);
  }

  100% {
    box-shadow: 0 0 35px rgba(255, 204, 68, 0.3);
    transform: scale(1.02);
  }
}

@keyframes pulseLoop {
  0% {
    box-shadow: 0 0 15px rgba(230, 126, 34, 0.3);
  }

  100% {
    box-shadow: 0 0 45px rgba(241, 196, 15, 0.6);
  }
}

/* --- Botões executar e próximo --- */
.btn-executar-jogo {
  background: linear-gradient(145deg, #27ae60, #2ecc71);
  border: none;
  border-radius: 60px;
  padding: 12px 32px;
  font-weight: bold;
  color: #fff;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: "Press Start 2P", cursive;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.2);
}

.btn-executar-jogo:hover {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 8px 35px rgba(46, 204, 113, 0.4);
}

.btn-executar-jogo:active {
  transform: scale(0.95) translateY(0);
}

.btn-proximo-jogo {
  background: linear-gradient(145deg, #2471a3, #3498db);
  border: none;
  border-radius: 60px;
  padding: 12px 32px;
  font-weight: bold;
  color: #fff;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: "Press Start 2P", cursive;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.btn-proximo-jogo:hover:not(:disabled) {
  transform: scale(1.05) translateY(-3px);
  box-shadow: 0 8px 35px rgba(52, 152, 219, 0.4);
}

.btn-proximo-jogo:active:not(:disabled) {
  transform: scale(0.95) translateY(0);
}

.btn-proximo-jogo:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-limpar-jogo {
  background: linear-gradient(145deg, #c0392b, #e74c3c);
  border: none;
  border-radius: 60px;
  padding: 8px 20px;
  font-weight: bold;
  color: #fff;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: "Chakra Petch", monospace;
  font-size: 0.7rem;
}

.btn-limpar-jogo:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

/* --- Status do loop --- */
#statusLoop .alert {
  border-radius: 12px;
  font-size: 0.9rem;
  background: rgba(255, 180, 71, 0.15) !important;
  border: 2px solid #ffb347 !important;
  color: #ffcc88 !important;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

  0%,
  100% {
    border-color: #ffb347;
  }

  50% {
    border-color: #ffcc44;
    box-shadow: 0 0 30px rgba(255, 204, 68, 0.1);
  }
}

#statusLoop .badge.bg-dark {
  background: #1e2a1a !important;
  color: #ffcc44 !important;
}

/* --- Barra de progresso do jogo --- */
#barraProgressoJogo {
  background: linear-gradient(90deg, #ffb347, #ffcc44, #ffb347);
  background-size: 200% 100%;
  animation: progressShine 2s linear infinite;
  height: 12px;
  border-radius: 20px;
  transition: width 0.5s ease;
}

@keyframes progressShine {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

/* --- Feedback messages --- */
#feedbackMsg {
  border-radius: 12px;
  font-family: "Chakra Petch", monospace;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 12px 16px;
}

#feedbackMsg.alert-success {
  background: rgba(46, 204, 113, 0.2) !important;
  border-color: #2ecc71 !important;
  color: #a8e6cf !important;
}

#feedbackMsg.alert-danger {
  background: rgba(231, 76, 60, 0.2) !important;
  border-color: #e74c3c !important;
  color: #f5b7b1 !important;
}

#feedbackMsg.alert-warning {
  background: rgba(255, 180, 71, 0.2) !important;
  border-color: #ffb347 !important;
  color: #ffcc88 !important;
}

#feedbackMsg.alert-info {
  background: rgba(52, 152, 219, 0.2) !important;
  border-color: #3498db !important;
  color: #85c1e9 !important;
}

/* --- Pontuação --- */
#pontuacao {
  font-family: "Press Start 2P", cursive;
  font-size: 2rem;
  padding: 4px 16px;
  background: linear-gradient(145deg, #ffb347, #ff8c00);
  color: #1e2a1a;
  border-radius: 12px;
  min-width: 60px;
  display: inline-block;
  text-align: center;
}

#acertos {
  font-family: "Press Start 2P", cursive;
  font-size: 0.65rem;
  padding: 6px 16px;
}

/* ================================================================
   ========== SELETOR DE LOOP (sem pop-up) ==========
   ================================================================ */

.seletor-loop-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

.seletor-loop-card {
  background: linear-gradient(145deg, #1e2a1a, #0d1f0b);
  border: 3px solid #ffb347;
  border-radius: 32px;
  padding: 35px 40px 30px;
  max-width: 440px;
  width: 92%;
  text-align: center;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.9),
    0 0 60px rgba(255, 180, 71, 0.05);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  0% {
    transform: scale(0.7) rotate(-5deg);
    opacity: 0;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.seletor-loop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.seletor-loop-titulo {
  font-family: "Press Start 2P", cursive;
  font-size: 0.9rem;
  color: #ffb347;
  text-shadow: 2px 2px 0 #1e2a1a;
}

.seletor-loop-fechar {
  background: none;
  border: none;
  color: #e74c3c;
  font-size: 1.6rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0 10px;
  font-weight: bold;
}

.seletor-loop-fechar:hover {
  transform: scale(1.2) rotate(90deg);
}

.seletor-loop-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 20px 0 15px;
}

.seletor-loop-numero {
  background: linear-gradient(145deg, #2c3e2b, #1e2a1a);
  border: 2px solid #4a7c3f;
  border-radius: 16px;
  padding: 14px 0;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ebf0eb;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: "Press Start 2P", cursive;
}

.seletor-loop-numero:hover {
  background: linear-gradient(145deg, #ffb347, #ff8c00);
  color: #1e2a1a;
  transform: scale(1.12) translateY(-4px);
  border-color: #ffb347;
  box-shadow: 0 10px 35px rgba(255, 180, 71, 0.35);
}

.seletor-loop-numero:active {
  transform: scale(0.92) translateY(0);
}

.seletor-loop-numero:nth-child(5n + 1) {
  border-color: #e74c3c;
}

.seletor-loop-numero:nth-child(5n + 2) {
  border-color: #f39c12;
}

.seletor-loop-numero:nth-child(5n + 3) {
  border-color: #2ecc71;
}

.seletor-loop-numero:nth-child(5n + 4) {
  border-color: #3498db;
}

.seletor-loop-numero:nth-child(5n + 5) {
  border-color: #9b59b6;
}

.seletor-loop-numero:hover {
  border-color: #ffb347 !important;
}

.seletor-loop-footer {
  margin-top: 15px;
  color: #5a7a5a;
  font-size: 0.7rem;
  font-family: "Chakra Petch", monospace;
}

/* --- Responsividade do seletor --- */
@media (max-width: 480px) {
  .seletor-loop-card {
    padding: 22px 18px;
    max-width: 340px;
  }

  .seletor-loop-titulo {
    font-size: 0.7rem;
  }

  .seletor-loop-grid {
    gap: 8px;
  }

  .seletor-loop-numero {
    padding: 12px 0;
    font-size: 1.1rem;
    border-radius: 12px;
  }
}

@media (max-width: 360px) {
  .seletor-loop-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
  }

  .seletor-loop-numero {
    padding: 10px 0;
    font-size: 0.9rem;
    border-radius: 10px;
  }

  .seletor-loop-card {
    padding: 16px 12px;
    max-width: 300px;
  }
}

/* --- Responsividade geral do jogo --- */
@media (max-width: 768px) {
  #jogoRepitaComigo .desafio-card {
    border-left: 4px solid #ffb347;
  }

  #jogoRepitaComigo .algoritmo-card {
    border-right: 4px solid #ffb347;
  }

  .cartao-cmd {
    padding: 6px 14px;
    font-size: 0.75rem;
  }

  .btn-executar-jogo,
  .btn-proximo-jogo {
    padding: 8px 20px;
    font-size: 0.55rem;
  }

  #areaAlgoritmo {
    min-height: 80px;
    font-size: 0.75rem;
  }

  .loop-container .d-flex {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .btn-add-ao-loop,
  .btn-fechar-loop-inline,
  .btn-cancelar-loop-inline {
    font-size: 0.6rem;
    padding: 3px 12px;
  }

  #desafioAlvo {
    font-size: 0.9rem !important;
  }
}

@media (max-width: 480px) {
  .cartao-cmd {
    padding: 4px 10px;
    font-size: 0.65rem;
  }

  .btn-executar-jogo,
  .btn-proximo-jogo {
    padding: 6px 14px;
    font-size: 0.5rem;
  }

  #areaAlgoritmo .badge {
    font-size: 0.6rem;
    padding: 4px 10px;
  }
}

#areaAlgoritmo .text-muted {
  color: #ebf0eb !important;
}

/* ==================================================
   ESTILOS DE IMPRESSÃO - PLANOS DE AULA
   ================================================== */
@media print {

  /* Oculta elementos não essenciais */
  .cabecalho-robotico,
  .menu-robomestre,
  footer,
  #jogo,
  #certificado,
  #fechamento,
  .btn-robotico-ano2,
  .check-concluido,
  .btn-remover-loop,
  .btn-add-ao-loop,
  .btn-fechar-loop-inline,
  .btn-cancelar-loop-inline,
  #btnImprimirPlanos {
    display: none !important;
  }

  /* Garante que todos os accordions fiquem abertos */
  .accordion-collapse {
    display: block !important;
    height: auto !important;
    visibility: visible !important;
  }

  .accordion-button {
    background: #2c3e2b !important;
    color: #ffb347 !important;
    border: 1px solid #4a7c3f !important;
    page-break-after: avoid;
  }

  .accordion-body {
    background: #0d1f0b !important;
    color: #ebf0eb !important;
    border: 1px solid #4a7c3f !important;
    border-top: none !important;
    page-break-inside: avoid;
  }

  /* Melhora a legibilidade */
  body {
    background: white !important;
    color: black !important;
    font-size: 12pt;
  }

  .bg-robotica {
    background: white !important;
  }

  .bg-robocard {
    background: #f5f5f0 !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    color: #1a1a1a !important;
  }

  .semana-card-completo {
    background: #fafaf5 !important;
    padding: 12px !important;
    color: #1a1a1a !important;
  }

  .projeto-header {
    background: #e8e8e0 !important;
    border-left-color: #b8860b !important;
  }

  .projeto-header h2 {
    color: #3d5a2b !important;
    text-shadow: none !important;
  }

  .badge-projeto {
    background: #b8860b !important;
    color: white !important;
  }

  .table-robotica {
    background: white !important;
    border: 1px solid #999 !important;
  }

  .table-robotica th,
  .table-robotica td {
    border-color: #999 !important;
    color: #1a1a1a !important;
  }

  .table-robotica thead th {
    background: #3d5a2b !important;
    color: white !important;
  }

  .table-robotica tbody tr:hover {
    background: transparent !important;
  }

  .minuto-item {
    border-left-color: #b8860b !important;
    background: #f0f0eb !important;
  }

  .minuto-tempo {
    background: #3d5a2b !important;
    color: white !important;
  }

  .minuto-descricao {
    color: #1a1a1a !important;
  }

  .frase-do-dia {
    background: #e8e8e0 !important;
    border: 1px dashed #b8860b !important;
    color: #1a1a1a !important;
  }

  .material-badge {
    background: #e0e0d8 !important;
    color: #1a1a1a !important;
    border-left-color: #b8860b !important;
  }

  .tabela-criterios-semana {
    background: white !important;
  }

  .tabela-criterios-semana thead {
    background: #3d5a2b !important;
    color: white !important;
  }

  .tabela-criterios-semana td {
    color: #1a1a1a !important;
  }

  .tabela-criterios-semana tbody tr:hover {
    background: transparent !important;
  }

  .bg-robocard {
    background: #fafaf5 !important;
    border: 1px solid #ccc !important;
  }

  .alert-warning {
    background: #fff3cd !important;
    border-color: #ffeeba !important;
    color: #856404 !important;
  }

  .accordion-button:not(.collapsed) {
    background: #4a7c3f !important;
    color: white !important;
  }

  .accordion-button::after {
    display: none !important;
  }

  code {
    background: #f0f0eb !important;
    color: #b22222 !important;
  }

  .semana-card-completo h5 {
    color: #3d5a2b !important;
    border-left-color: #b8860b !important;
  }

  .semana-card-completo ul,
  .semana-card-completo p {
    color: #1a1a1a !important;
  }

  .loop-container {
    border-color: #b8860b !important;
    background: #f0f0eb !important;
  }

  .loop-container .badge.bg-warning {
    background: #b8860b !important;
    color: white !important;
  }

  .loop-filhos .badge {
    background: #4a7c3f !important;
    color: white !important;
  }

  .btn-add-ao-loop,
  .btn-fechar-loop-inline,
  .btn-cancelar-loop-inline {
    display: none !important;
  }

  .progress {
    display: none !important;
  }

  /* Força quebra de página entre semanas, se necessário */
  .accordion-item {
    page-break-inside: avoid;
    margin-bottom: 20px !important;
  }
}