/* Reset e configurações base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Orbitron", "Rajdhani", monospace;
  background: radial-gradient(ellipse at center, #0f0f23 0%, #000000 100%);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* Canvas layers */
#particleCanvas,
#textCanvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

#textCanvas {
  z-index: 3;
}

/* Efeitos de sobreposição */
.overlay-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Linhas de scan futuristas */
.scan-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(transparent 50%, rgba(0, 255, 136, 0.03) 50%);
  background-size: 100% 4px;
  animation: scanMove 2s linear infinite;
}

@keyframes scanMove {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(4px);
  }
}

/* Grid holográfico */
.holo-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(0, 255, 136, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridFloat 8s ease-in-out infinite;
  opacity: 0.3;
}

@keyframes gridFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-2px, -2px) scale(1.01);
  }
}

/* Tela de carregamento */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 1s ease-out;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-text {
  font-family: "Rajdhani", monospace;
  font-size: 1.2rem;
  color: #00ff88;
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
  text-shadow: 0 0 10px currentColor;
}

.loading-bar {
  width: 300px;
  height: 4px;
  background: rgba(0, 255, 136, 0.2);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.loading-progress {
  height: 100%;
  background: linear-gradient(90deg, #00ff88, #00ffef);
  border-radius: 2px;
  animation: loadProgress 3s ease-out forwards;
  box-shadow: 0 0 10px #00ff88;
}

@keyframes loadProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* Responsividade */
@media (max-width: 768px) {
  .holo-grid {
    background-size: 30px 30px;
  }

  .loading-text {
    font-size: 1rem;
  }

  .loading-bar {
    width: 250px;
  }

  /* Otimizações específicas para mobile */
  body {
    /* Previne zoom no mobile */
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
  }
}

@media (max-width: 480px) {
  .holo-grid {
    background-size: 20px 20px;
  }

  .loading-text {
    font-size: 0.9rem;
  }

  .loading-bar {
    width: 200px;
  }
}

/* Otimização para modo paisagem em dispositivos móveis */
@media (max-height: 500px) and (orientation: landscape) {
  .holo-grid {
    background-size: 25px 25px;
  }

  .loading-text {
    font-size: 0.8rem;
    margin-bottom: 1rem;
  }

  .loading-bar {
    width: 180px;
    height: 3px;
  }
}

/* Efeito de fade-in para elementos */
.fade-in {
  animation: fadeIn 2s ease-out;
}

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

/* Indicador de interação móvel */
.interaction-hint {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transition: opacity 0.5s ease-out;
  pointer-events: none;
}

.interaction-hint.hidden {
  opacity: 0;
  pointer-events: none;
}

.hint-text {
  font-family: "Rajdhani", sans-serif;
  font-size: 0.9rem;
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 1px;
}

.hint-pulse {
  width: 20px;
  height: 20px;
  border: 2px solid #00ff88;
  border-radius: 50%;
  animation: hintPulse 2s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

@keyframes hintPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 25px rgba(0, 255, 136, 0.6);
  }
}

/* Oculta hint em desktop */
@media (min-width: 769px) {
  .interaction-hint {
    display: none;
  }
}

/* Ajustes para tablets e telas pequenas */
@media (max-width: 768px) and (max-height: 600px) {
  .interaction-hint {
    bottom: 20px;
  }

  .hint-text {
    font-size: 0.8rem;
  }

  .hint-pulse {
    width: 16px;
    height: 16px;
  }
}
