:root {
  --top-navigation-height: 4rem;
  --bottom-nav-height: 60px;
  --z-index-bottom-nav: 1000;
  --z-index-sidebar: 2000;
  --z-index-main-header: 700;
  --max-width: 1440px;
  --azul-oscuro-1: #020824;
  --azul-oscuro-2: #0b1230;
  --dorado: #d4af37;
  --dorado-suave: #f3d38c;
  --blanco: #ffffff;
  --gris-claro: #b0b3c0;
  --fontsis: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

body {
  font-family: var(--fontsis);
  background: radial-gradient(circle at top, var(--azul-oscuro-2) 0%, var(--azul-oscuro-1) 55%, #000010 100%);
  color: var(--blanco);
  min-height: 100vh;
  padding-bottom: var(--bottom-nav-height); /* Space for mobile bottom nav */
}

a {
  text-decoration: none;
  color: inherit;
}

/* ================================
   HEADER
   ================================ */

.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.main-header {
  position: sticky;
  top: 0;
  z-index: var(--z-index-main-header);
  backdrop-filter: blur(12px);
  background: linear-gradient(to bottom, rgba(2, 8, 36, 0.95), rgba(2, 8, 36, 0.8));
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.logo {
  border-radius: 2px;
  flex-shrink: 0;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* Desktop Navigation */


.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
  text-decoration: none;
}

.desktop-nav a {
  color: var(--dorado);
  transition: color 0.2s ease;
  white-space: nowrap;
  
}

.desktop-nav a:hover {
  color: var(--dorado-suave);
}

.desktop-nav a:visited{
  color: var(--gris-claro);
}

/* Desktop Auth Buttons */
.desktop-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.desktop-auth a{
  color: var(--gris-claro);
  transition: color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.desktop-auth a:visited{
 color: var(--gris-claro);
}


/* ================================
   NUEVO MENU
   ================================ */
#Menu-Desktop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem;
  color: var(--gris-claro);
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

/* Overlay oscuro con fade */
.overlaydesk {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.20s ease;
}

/*Invoca el evento de accion*/
.overlaydesk.activo {
  opacity: 1;
  pointer-events: auto;
}


/* Overlay oscuro con fade */
.overlaydeskb {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.20s ease;
}

/*Invoca el evento de accion*/
.overlaydeskb.activo {
  opacity: 1;
  pointer-events: auto;
}


/* Menú dropdown */
.menu-dropdown {
  position: absolute;
  top: 100%; /* justo debajo del botón */
  right: 0;
  background: var(--azul-oscuro-1);
  width: 200px;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  margin-right: 25px;
  border: 1px solid var(--dorado);


  /* oculto por defecto */
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 1.3s ease, opacity 0.8s ease;
  z-index: 1001;
  text-decoration: none;
}

.menu-dropdown button {
  background: none;
  color: white;
  border: none;
  padding: 20px;
  margin-left: 10px;
  text-align: left;
  cursor: pointer;
}

.menu-dropdown a {
  background: none;
  color: white;
  border: none;
  padding: 20px;
  margin-left: 10px;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.menu-dropdown span {
  margin-left: 10px;
}

.menu-dropdown button:hover {
  background: rgba(255,255,255,0.2);
}

.menu-dropdown a:hover {
  background: rgba(255,255,255,0.2);
}

/* Estado activo: efecto dropdown */
.menu-dropdown.activo {
  max-height: 500px; /* suficiente para mostrar todos los botones */
  opacity: 1;
}





/* ================================
   HASTA AQUI LLEGANUEVO MENU
   ================================ */

.btn-login {
  color: var(--dorado);
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--dorado);
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.btn-login:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--dorado-suave);
}

.btn-register {
  background: linear-gradient(135deg, var(--dorado), var(--dorado-suave));
  color: var(--azul-oscuro-1);
  padding: 0.5rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-register:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.btn-profile {
  color: var(--dorado);
  background: rgba(212, 175, 55, 0.1);
  padding: 0.5rem 1.4rem;
  border-radius: 6px;
  border: 2px solid var(--dorado);
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-profile:hover {
  background: var(--dorado);
  color: var(--azul-oscuro-1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Mobile Auth Buttons */
.mobile-auth {
  display: none;
  gap: 0.5rem;
}

.btn-login-mobile,
.btn-register-mobile {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-login-mobile {
  color: var(--blanco);
  background: var(--azul-oscuro-2);
  border: 1px solid var(--dorado);
}

.btn-register-mobile {
  background: linear-gradient(135deg, var(--dorado), var(--dorado-suave));
  color: var(--azul-oscuro-1);
}

/* Dropdown */
.dropdown {
  position: relative;
  z-index: 1;
}

/*
.dropdown-content {
  width: 500px;
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 9999;
  min-width: 200px;
  background-color: var(--azul-oscuro-2);
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.3);
  padding: 0.5rem;
  border-radius: 8px;
  margin-top: 0.5rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
}
  */


.dropdown-content {
  width: 300px;
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 9999;
  min-width: 200px;
  background-color: var(--azul-oscuro-2);
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.3);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 0.5rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.dropdown a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  transition: background 0.3s ease;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown a:hover {
  background: rgba(212, 175, 55, 0.1);
}

.dropa {
  border-color: var(--dorado);
  color: var(--dorado);
  font-size: 0.85rem;
}







/* ================================
   MOBILE BOTTOM NAVIGATION
   ================================ */

.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: linear-gradient(to top, rgba(2, 8, 36, 0.98), rgba(2, 8, 36, 0.95));
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(212, 175, 55, 0.25);
  z-index: var(--z-index-bottom-nav);
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  padding: 0.5rem 0;
}

.mobile-bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem;
  color: var(--gris-claro);
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
}

.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item:focus {
  color: var(--dorado-suave);
  transform: translateY(-2px);
}

.mobile-bottom-nav .nav-item svg {
  width: 24px;
  height: 24px;
}

.mobile-bottom-nav .nav-item span {
  font-size: 0.7rem;
  font-weight: 500;
}

/* ================================
   MOBILE SIDEBAR
   ================================ */

.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: var(--z-index-sidebar);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 85%;
  max-width: 320px;
  background: var(--azul-oscuro-1);
  padding: 1.5rem;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.5);
}

.mobile-sidebar-overlay.active .mobile-sidebar {
  transform: translateX(0);
}

/* Sidebar Logo */
.sidebar-logo {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.sidebar-logo img {
  height: 36px;
  width: auto;
}

/* Sidebar Close Button */
.sidebar-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--gris-claro);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s ease;
}

.sidebar-close:hover {
  color: var(--dorado);
}

/* Sidebar Auth Buttons */
.sidebar-auth {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.sidebar-btn {
  display: block;
  text-align: center;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.sidebar-btn-join {
  background: linear-gradient(135deg, var(--dorado), var(--dorado-suave));
  color: var(--azul-oscuro-1);
}

.sidebar-btn-join:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.sidebar-btn-login {
  background: var(--azul-oscuro-2);
  color: var(--blanco);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.sidebar-btn-login:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--dorado);
}

.sidebar-btn-profile {
  background: var(--dorado);
  color: var(--azul-oscuro-1);
}

.sidebar-btn-logout {
  background: #dc2626;
  color: var(--blanco);
}

/* Sidebar Navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.sidebar-link {
  display: block;
  padding: 0.875rem 1rem;
  color: var(--gris-claro);
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.sidebar-link:hover {
  background: rgba(212, 175, 55, 0.1);
  color: var(--dorado-suave);
  padding-left: 1.25rem;
}

/* Sidebar Section */
.sidebar-section {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: rgba(212, 175, 55, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.sidebar-section h3 {
  color: var(--dorado);
  font-size: 1rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.sidebar-link-cta {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: var(--dorado);
  color: var(--azul-oscuro-1);
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
}

.sidebar-link-cta:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.sidebar-text-small {
  font-size: 0.8rem;
  color: var(--gris-claro);
  margin: 0;
}

/* Sidebar Footer */
.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.sidebar-disclaimer {
  font-size: 0.85rem;
  color: var(--dorado);
  margin-bottom: 1rem;
  font-weight: 600;
  text-align: center;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.sidebar-links a {
  font-size: 0.8rem;
  color: var(--gris-claro);
  transition: color 0.2s ease;
}

.sidebar-links a:hover {
  color: var(--dorado-suave);
}

.sidebar-copyright {
  font-size: 0.75rem;
  color: rgba(176, 179, 192, 0.6);
  text-align: center;
  margin: 0;
}

/* ================================
   RESPONSIVE
   ================================ */

/* Desktop (769px+) */
@media (min-width: 769px) {
  body {
    padding-bottom: 0;
  }

  .desktop-nav {
    display: flex;
  }

  .desktop-auth {
    display: flex;
  }

  .mobile-auth {
    display: none !important;
  }

  .mobile-bottom-nav {
    display: none !important;
  }

  .mobile-sidebar-overlay {
    display: none !important;
  }

  .logo img {
    height: 50px;
  }
}

/* Tablet and Mobile (≤768px) */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .desktop-auth {
    display: none;
  }

  .mobile-auth {
    display: flex;
  }

  .mobile-bottom-nav {
    display: grid;
  }

  .header-inner {
    padding: 0.75rem 0;
  }

  .logo img {
    height: 36px;
  }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
  .mobile-auth {
    gap: 0.375rem;
  }

  .btn-login-mobile,
  .btn-register-mobile {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
  }

  .mobile-bottom-nav .nav-item span {
    font-size: 0.65rem;
  }

  .mobile-sidebar {
    width: 90%;
  }

  .logo img {
    height: 32px;
  }
}
