/* Navigation */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
  background-color: transparent;
}

nav.scrolled {
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(1, 128, 235, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  font-family: 'Press Start 2P', monospace;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  z-index: 1002;
}

.logo-icon {
  width: 48px;
  height: 48px;
  position: relative;
}

.logo-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0180eb, #0160c0);
  border-radius: 8px;
  transform: rotate(45deg);
}

.logo-text-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  transform: rotate(-45deg);
}

.logo-text .blue {
  color: #0180eb;
}

.nav-menu {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 17px;
  position: relative;
  padding-bottom: 4px;
}

/* Línea animada desde el centro */
.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #0180eb;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-menu a:hover {
  color: #0180eb;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 10px;
  z-index: 1002;
  line-height: 1;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    height: 70px;
  }

  .logo {
    font-size: 16px;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
  }

  .logo-text-icon {
    font-size: 20px;
  }

  /* IMPORTANTE: Ocultar el menú por defecto en móvil */
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    /* ESTO ES LO IMPORTANTE: display: none por defecto */
    display: none;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }

  .nav-menu a {
    font-size: 16px;
    padding: 10px;
    display: block;
    text-align: center;
  }

  /* Solo mostrar cuando tenga la clase active */
  .nav-menu.active {
    display: flex !important;
  }

  /* Mostrar el botón toggle en móvil */
  .menu-toggle {
    display: flex;
  }
}

/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
  .logo-text {
    display: none;
  }
  
  .nav-container {
    padding: 0 15px;
  }
}