/* ==================================================
   index.css – ESTILOS UNIFICADOS PARA O PROJETO
   Inclui: cabeçalho, menu, certificado, rodapé
   ================================================== */

/* ---------- RESET E TEMA PRINCIPAL ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.bg-robotica {
  background: linear-gradient(145deg, #1a2b17 0%, #2c3e2b 100%);
  min-height: 100vh;
  color: #f0f3e8;
  font-family: "Inter", "Chakra Petch", monospace;
}

/* ---------- CABEÇALHO ROBÓTICO ---------- */
.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;
}

/* Responsividade do cabeçalho */
@media (max-width: 768px) {
  .titulo-principal {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
    white-space: normal;
    word-break: keep-all;
  }

  .titulo-principal::before {
    top: -4px;
    height: 6px;
  }

  .logo-rb,
  .logo-gn {
    max-height: 50px;
  }

  .subtitulo-chiclete {
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .titulo-principal {
    font-size: 0.6rem;
    padding: 0.3rem 0.6rem;
  }

  .logo-rb,
  .logo-gn {
    max-height: 40px;
  }

  .selo-sucata {
    font-size: 0.55rem;
    padding: 2px 8px;
  }
}

/* ---------- MENU GLASSMORPHISM ---------- */
.menu-robomestre {
  background: rgba(13, 31, 11, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid #ffb347;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.menu-robomestre .nav-link {
  color: #e9f5db;
  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: #ffb347;
  transition: transform 0.2s;
}

.menu-robomestre .nav-link:hover {
  color: #ffb347;
  text-shadow: 0 0 4px #ffb347;
  background: rgba(255, 180, 71, 0.15);
  transform: translateY(-2px);
}

.menu-robomestre .nav-link:hover i {
  transform: scale(1.1);
  color: #ffcc44;
}

.menu-robomestre .nav-link.active {
  color: #ffcc44;
  background: rgba(255, 180, 71, 0.25);
  text-shadow: 0 0 6px #ffb347;
  border-bottom: 2px solid #ffb347;
}

.menu-robomestre .navbar-toggler {
  border-color: #ffb347;
  background-color: rgba(0, 0, 0, 0.5);
  transition: all 0.2s;
}

.menu-robomestre .navbar-toggler:hover {
  background-color: rgba(255, 180, 71, 0.2);
  border-color: #ffcc44;
}

.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: #ffb347;
  font-family: "Press Start 2P", cursive;
  font-size: 0.9rem;
}

/* Responsividade do menu */
@media (max-width: 992px) {
  .menu-robomestre .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 768px) {
  .menu-robomestre .navbar-collapse {
    background: rgba(13, 31, 11, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 20px;
    margin-top: 12px;
    padding: 12px 0;
    border: 1px solid #ffb347;
  }

  .menu-robomestre .nav-link {
    justify-content: center;
    margin: 4px 12px;
  }
}

/* ---------- CARD ROBÔ (bg-robocard) ---------- */
.bg-robocard {
  background: rgba(20, 30, 15, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 48px 24px 48px 24px;
  border: 1px solid rgba(255, 180, 71, 0.3);
  box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.text-gradient {
  background: linear-gradient(135deg, #ffb347, #ffe0a3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- 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;
}

/* Responsividade do certificado */
@media (max-width: 992px) {
  .certificado-modelo {
    padding: 1rem !important;
  }

  .certificado-modelo h3 {
    font-size: 0.7rem;
  }

  .nome-aluno-destaque {
    font-size: 18px;
    padding: 8px;
  }
}

@media (max-width: 768px) {
  .bg-robocard {
    padding: 1rem !important;
  }

  .certificado-modelo {
    border-radius: 32px 16px 32px 16px !important;
  }

  .certificado-modelo p,
  .certificado-modelo .data-rodape {
    font-size: 0.7rem;
  }

  .assinatura-engracada {
    font-size: 0.6rem;
  }

  .btn-robotico-ano2 {
    font-size: 0.55rem;
    padding: 6px 12px;
  }

  .cadastro-alunos h4,
  .cadastro-alunos h5 {
    font-size: 0.7rem;
  }

  .lista-alunos li {
    font-size: 0.8rem;
  }
}

@media (max-width: 576px) {
  .certificado-modelo {
    padding: 0.8rem !important;
  }

  .nome-aluno-destaque {
    font-size: 16px;
  }

  .btn-robotico-ano2,
  .btn-outline-warning {
    width: 100%;
    text-align: center;
  }

  .cadastro-alunos .row .col-md-4,
  .cadastro-alunos .row .col-md-8 {
    margin-bottom: 8px;
  }
}

/* Estilos para impressão do certificado */
@media print {
  body.bg-robotica {
    background: white;
    padding: 0;
    margin: 0;
  }

  .bg-robocard {
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
  }

  .cadastro-alunos,
  .btn-robotico-ano2,
  .btn-outline-warning,
  .alert-info,
  .text-muted,
  footer,
  .certificado-preview>.text-muted,
  .certificado-preview>p:last-child {
    display: none !important;
  }

  .certificado-modelo {
    background: #fffef7 !important;
    border: 3px solid #ffb347 !important;
    box-shadow: none !important;
    border-radius: 20px !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 auto;
    width: 100%;
  }

  .certificado-modelo h3 {
    color: #ffb347 !important;
  }

  .nome-aluno-destaque {
    color: #2c5e1f !important;
    background: #d4b87a !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .linha-certificado {
    border-color: #ffb347 !important;
  }

  .data-rodape,
  .assinatura-engracada {
    color: #4a6e2c !important;
  }

  @page {
    size: A4;
    margin: 1.2cm;
  }

  .print-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .certificado-impressao {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 3px solid #ffb347;
    border-radius: 20px;
    padding: 15px;
    background: #fffef7;
  }
}

/* ---------- RODAPÉ ROBÓTICO ---------- */
.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;
}

/* Responsividade do rodapé */
@media (max-width: 768px) {
  .footer-robotico {
    font-size: 0.75rem;
    padding: 1.5rem 0;
  }

  .footer-logo {
    max-height: 50px;
  }

  .dev-nome {
    font-size: 0.7rem;
  }

  .dev-contato {
    font-size: 0.65rem;
  }

  .relatorio-bugs {
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .footer-logo {
    max-height: 40px;
  }

  .dev-nome {
    font-size: 0.6rem;
  }

  .dev-contato {
    font-size: 0.55rem;
  }

  .relatorio-bugs {
    font-size: 0.55rem;
  }
}

/* ---------- ANIMAÇÕES ---------- */
@keyframes piscaLed {

  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 5px #00ff00;
  }

  50% {
    opacity: 0.4;
    text-shadow: 0 0 15px #ffcc00;
  }
}

.pisca-alerta {
  animation: piscaLed 1s step-start infinite;
  color: #ffcc00;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.1rem 0.3rem;
  border-radius: 8px;
  display: inline-block;
}

@keyframes curtoCircuito {

  0%,
  100% {
    background-color: #2c3e2b;
  }

  10%,
  30%,
  50% {
    background-color: #ffcc00;
  }

  20%,
  40% {
    background-color: #ff6600;
  }
}

@keyframes reboot {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  30% {
    opacity: 0.5;
    transform: scale(0.98);
  }

  60% {
    opacity: 0;
    transform: scale(0.95);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes contadorPisca {

  0%,
  100% {
    background-color: rgba(0, 0, 0, 0.3);
    transform: scale(1);
  }

  50% {
    background-color: rgba(255, 180, 71, 0.5);
    transform: scale(1.05);
  }
}

#relatorioBugs.atualizando {
  animation: contadorPisca 0.3s ease-in-out;
}

/* ---------- CLASSES ADICIONAIS PARA O CONTEÚDO ---------- */
.bg-dark-code {
  background: #1e2a1a;
  padding: 1rem;
  border-radius: 8px;
  font-family: monospace;
  white-space: pre-wrap;
  color: #e9f5db;
}

.table-robomestre {
  background-color: #1e2a1a;
  color: #e9f5db;
}

.table-robomestre th,
.table-robomestre td {
  border-color: #ffb347;
}

.table-robomestre thead th {
  background: #2c3e2b;
  color: #ffb347;
}

/* ---------- SCROLLBAR ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #1a2b17;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #ffb347;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #ffcc44;
}

/* ---------- ALERTA ---------- */
.alert-info {
  background-color: #1e2a1a;
  border-color: #ffb347;
  color: #e9f5db;
}

.alert-info a {
  color: #ffb347;
}

/* ---------- ANIMAÇÕES TEMÁTICAS (certificado) ---------- */
@keyframes loopInfinitoAnim {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loop-infinito-icon {
  animation: loopInfinitoAnim 2s linear infinite;
  display: inline-block;
}

@keyframes piscaVariavel {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.05);
    background-color: #ffb347;
  }
}

.variavel-destacada {
  animation: piscaVariavel 1s ease-in-out infinite;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  display: inline-block;
}

@keyframes bugVibracao {

  0%,
  100% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-2px) rotate(-1deg);
  }

  75% {
    transform: translateX(2px) rotate(1deg);
  }
}

.bug-detectado {
  animation: bugVibracao 0.2s ease-in-out 3;
  background-color: #e74c3c20;
  border-left: 3px solid #e74c3c;
  padding-left: 0.5rem;
}