/* ===================================
   LOGO DRAWING ANIMATION
   Efecto de dibujo progresivo estilo Goku
   =================================== */

.logo-animation-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  padding: 40px 20px;
  box-sizing: border-box;
}

.logo-animation-container.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#logo-animated {
  width: min(70vw, 400px);
  height: auto;
  max-width: 400px;
  max-height: min(60svh, 400px);
  filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.2));
  transition: width 0.3s ease;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}

#logo-animated svg {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
}

/* Estilos para los paths del SVG */
#logo-animated path {
  fill: transparent;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Grupo de rellenos (aparece después) */
#logo-animated #fills path {
  stroke: none;
  fill: #000000;
  opacity: 0;
  transition: opacity 0.6s ease;
}

#logo-animated #fills.show {
  opacity: 1;
}

#logo-animated #fills path {
  opacity: 1;
}

/* Loading message */
.loading-text {
  position: absolute;
  bottom: 100px;
  color: #000;
  font-family: var(--font-manga);
  font-size: 1.5rem;
  text-align: center;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Responsive - Modern Devices (2024-2025) */
/* Using mobile-first approach with modern viewport units */

/* Tablets and larger */
@media (min-width: 768px) {
  #logo-animated {
    width: min(60vw, 450px);
    max-height: min(65svh, 450px);
  }
}

@media (min-width: 1024px) {
  #logo-animated {
    width: min(50vw, 500px);
    max-height: min(70svh, 500px);
  }
  
  .logo-animation-container {
    padding: 40px 20px;
  }
}

/* Mobile devices - Universal fix */
@media (max-width: 767px) {
  .logo-animation-container {
    padding: 20px 15px;
  }
  
  #logo-animated {
    width: min(80vw, 380px);
    max-height: min(55svh, 380px);
  }
  
  .loading-text {
    font-size: 1rem;
    bottom: 60px;
  }
  
  #logo-animated path {
    stroke-width: 1.8;
  }
}

/* Small mobile devices */
@media (max-width: 430px) {
  #logo-animated {
    width: min(85vw, 320px);
    max-height: min(50svh, 320px);
  }
  
  .loading-text {
    font-size: 0.9rem;
    bottom: 50px;
  }
  
  #logo-animated path {
    stroke-width: 1.6;
  }
}

/* Very narrow screens (Foldables, small phones) */
@media (max-width: 360px) {
  .logo-animation-container {
    padding: 15px 10px;
  }
  
  #logo-animated {
    width: min(88vw, 270px);
    max-height: min(45svh, 270px);
  }
  
  .loading-text {
    font-size: 0.8rem;
    bottom: 40px;
  }
  
  #logo-animated path {
    stroke-width: 1.4;
  }
}

/* Extra narrow screens (Galaxy Z Fold 6 cover display) */
@media (max-width: 280px) {
  .logo-animation-container {
    padding: 10px 8px;
  }
  
  #logo-animated {
    width: min(92vw, 240px);
    max-height: min(40svh, 240px);
  }
  
  .loading-text {
    font-size: 0.7rem;
    bottom: 30px;
  }
  
  #logo-animated path {
    stroke-width: 1.2;
  }
}
