/* ============================================================
   FiLabb — fiLab.css
   Preloader / Página de entrada
   ============================================================ */

/* --- Reset & Base ------------------------------------------ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg-app);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Segoe UI', system-ui, Arial, sans-serif;
  overflow: hidden;
}

/* --- Canvas de vectores no fundo --------------------------- */
#vcanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.12;
}

/* --- Partículas flutuantes ---------------------------------- */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  animation: float linear infinite;
}

@keyframes float {
  0%   { transform: translateY(100vh) rotate(0deg);   opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.3; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* --- Conteúdo principal ------------------------------------ */
.main-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 24px;
}

/* --- Logo FiLabb -------------------------------------------- */
.logo {
  font-size: clamp(72px, 16vw, 120px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 8px;
  opacity: 0;
  animation: logoPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards;
}

@keyframes logoPop {
  0%   { opacity: 0; transform: scale(0.6) translateY(20px); }
  100% { opacity: 1; transform: scale(1)   translateY(0);    }
}

.fi       { color: #34d3df; }
.lab-text { color: #c2a216; }

/* --- Slogan ------------------------------------------------ */
.slogan {
  font-size: clamp(14px, 4vw, 20px);
  color: var(--text-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 300;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}

.labo { color: #c2a216; font-weight: 500; }
.fis  { color: #34d3df; font-weight: 500; }

/* --- Animação genérica de entrada -------------------------- */
@keyframes fadeUp {
  0%   { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0);    }
}

/* --- Barra de progresso ------------------------------------ */
.loader-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
}

.bar-track {
  width: 240px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #34d3df, #c2a216);
  border-radius: 99px;
  transition: width 0.05s linear;
}

.loader-msg {
  font-size: 13px;
  color: var(--text-sub);
  letter-spacing: 1px;
  min-height: 20px;
}

/* --- Dots animados ---------------------------------------- */
.dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #34d3df;
  opacity: 0.4;
  animation: blink 1.2s ease infinite;
}

.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
  0%, 100% { opacity: 0.4; transform: scale(1);   }
  50%       { opacity: 1;   transform: scale(1.4); }
}

/* --- Chips dos módulos ------------------------------------- */
.modules-preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 440px;
  margin: 40px auto 0;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.7s forwards;
}

.mod-chip {
  padding: 6px 16px;
  border-radius: 99px;
  border: 1px solid rgba(52, 211, 223, 0.5);
  color: var(--text-sub);
  font-size: 11px;
  letter-spacing: 0.5px;
  transform: scale(0.9);
  opacity: 0.6;
  transition: all 0.4s ease;
  user-select: none;
}

.mod-chip.active {
  border-color: rgba(52, 211, 223, 0.7);
  color: rgba(52, 211, 223, 0.95);
  transform: scale(1);
  opacity: 1;
  background: rgba(52, 211, 223, 0.08);
}

/* Chips ímpares em dourado para variedade visual */
.mod-chip:nth-child(2n).active,
.mod-chip:nth-child(4n).active {
  border-color: rgba(194, 162, 22, 0.7);
  color: rgba(194, 162, 22, 0.95);
  background: rgba(194, 162, 22, 0.08);
}

.mod-chip:nth-child(2n),
.mod-chip:nth-child(4n) {
  border-color: rgba(194, 162, 22, 0.3);
}

/* --- Botão de entrada -------------------------------------- */
.enter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 40px auto 0;
  padding: 14px 52px;
  background: transparent;
  border: 1.5px solid rgba(52, 211, 223, 0.6);
  color: #34d3df;
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.btn-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(52, 211, 223, 0.4));
}

.enter-btn:hover {
  background: rgba(52, 211, 223, 0.12);
  border-color: #34d3df;
  transform: translateY(-2px);
}

.enter-btn:active {
  transform: translateY(0) scale(0.98);
}

.enter-btn.show {
  animation: fadeUp 0.6s ease forwards;
}

/* --- Info de licença --------------------------------------- */
.license-info {
  margin: 14px auto 0;
  font-size: 11px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  min-height: 16px;
}

.license-info.expira-breve {
  color: rgba(194, 162, 22, 0.75);
}

/* --- Transição de saída ------------------------------------ */
body.fade-out {
  transition: opacity 0.2s ease;
  opacity: 0;
}