/* ==================================================
   a2index.css – ESTILOS COMPLETOS PARA O 2º ANO
   Baseado nos arquivos: modelo_cabecalho.css, modelo_rodape.css,
   modelo_certificado.css, modelo_index.css, modelo_menu_bim.css
   ================================================== */

/* ---------- 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;
}

/* ---------- 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;
  padding: 1rem 0;
}
.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);
  transition: all 0.3s ease;
  border-radius: 48px 24px 48px 24px;
}
.text-gradient {
  background: linear-gradient(135deg, var(--robot-gold), #ffe0a3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.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 {
  font-family: "Press Start 2P", cursive;
  font-size: 1.4rem;
  color: var(--robot-gold);
  text-shadow: 2px 2px 0 #1e2a1a;
  margin-bottom: 0;
}
.badge-projeto {
  background: var(--robot-danger);
  color: white;
  padding: 6px 14px;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 2px 0 #8b1a1a;
}
.selo-sucata {
  background: repeating-linear-gradient(45deg, var(--robot-gold), var(--robot-gold) 10px, #ff8c00 10px, #ff8c00 20px);
  color: #1e2a1a;
  padding: 4px 12px;
  border-radius: 40px;
  font-family: "Press Start 2P", cursive;
  font-size: 0.6rem;
  font-weight: bold;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ---------- CABEÇALHO ---------- */
.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; }
.cabecalho-rebelde::before {
  content: "⚠️ BUG ZONE ⚠️";
  position: absolute;
  bottom: 5px;
  right: 10px;
  font-size: 0.6rem;
  opacity: 0.3;
  font-family: monospace;
  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;
  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);
  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);
}
.titulo-principal::after {
  content: "⬤";
  position: absolute;
  bottom: -6px;
  right: -6px;
  font-size: 0.7rem;
  color: #ffb347;
}
.titulo-principal .parafuso-esquerda {
  position: absolute;
  bottom: -6px;
  left: -6px;
  font-size: 0.7rem;
  color: #ffb347;
}
.glitch-text { font-family: "Press Start 2P", monospace; animation: glitch 3s infinite; }
@keyframes glitch {
  0%,100% { text-shadow: none; }
  2%,8% { text-shadow: -2px 0 #ff00ff, 2px 0 #00ffff; }
  5% { text-shadow: 2px 0 #ff00ff, -2px 0 #00ffff; }
}
.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;
}

/* ---------- 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);
}
.menu-robomestre .nav-link {
  color: var(--robot-text);
  font-family: "Chakra Petch", monospace;
  font-weight: 600;
  border-radius: 40px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.menu-robomestre .nav-link:hover, .menu-robomestre .nav-link.active {
  color: var(--robot-gold);
  text-shadow: 0 0 4px var(--robot-gold);
  background: rgba(255, 180, 71, 0.15);
}
.navbar-toggler { border-color: var(--robot-gold); background-color: rgba(0,0,0,0.5); }

/* ---------- 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);
  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;
  pointer-events: none;
}
.footer-logo { max-height: 70px; width: auto; filter: drop-shadow(2px 2px 6px black); transition: transform 0.2s; border-radius: 16px; }
.footer-logo:hover { transform: scale(1.05); }
.dev-nome { font-size: 0.85rem; font-weight: 500; font-family: "Chakra Petch", monospace; color: #ebf0eb; }
.dev-contato a { color: #ebf0eb; text-decoration: none; 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; }

/* ---------- 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;
}
.certificado-modelo p { color: #e9f5db; line-height: 1.4; }
.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; }
.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;
  padding: 8px 20px;
  transition: all 0.2s;
}
.btn-outline-warning:hover:not(:disabled) { background: #ffb347; color: #1e2a1a; }

/* ---------- TABELAS ROBÓTICAS ---------- */
.table-robotica {
  background: rgba(30, 42, 26, 0.85);
  border-radius: 20px;
  overflow: hidden;
  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; }
.table-robotica tbody tr:hover { background: rgba(74, 124, 63, 0.3); }

/* ---------- ANIMAÇÕES ---------- */
@keyframes flutuarSuave {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}
.flutuar { animation: flutuarSuave 3s ease-in-out infinite; }

/* ---------- RESPONSIVIDADE ---------- */
@media (max-width: 768px) {
  .titulo-principal { font-size: 0.75rem; padding: 0.4rem 0.8rem; white-space: normal; }
  .logo-rb, .logo-gn { max-height: 50px; }
  .subtitulo-chiclete { font-size: 0.6rem; }
  .projeto-header h2 { font-size: 1rem; }
  .menu-robomestre .navbar-collapse { background: rgba(13,31,11,0.95); border-radius: 20px; margin-top: 12px; padding: 12px 0; border: 1px solid var(--robot-gold); }
  .footer-robotico { font-size: 0.75rem; }
  .footer-logo { max-height: 50px; }
}
@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; }
}
