
#main-header {
  background-color: #181818; 
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: background-color 0.3s ease;
}

#main-header.scrolled {
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(10px);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  max-width: 1280px;
  margin: 0 auto;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
}

#logo {
  width: auto; 
  height: 35px;  
  transition: transform 0.3s ease;
  object-fit: contain; 
}

#logo:hover {
  transform: scale(1.05);
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 500px;
  min-width: 150px;
}

#search-form {
  display: flex;
  align-items: center;
}

#search-input {
  background-color: #23272f; 
  border: 1px solid #3a3a3a;
  color: #f6f6f6; 
  padding: 10px 42px 10px 16px;
  border-radius: 8px; 
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1); 
}

#search-input:focus {
  outline: none;
  border-color: #00bfa5;
  box-shadow: 0 0 0 2px rgba(0, 191, 165, 0.2);
}

#search-button {
  position: absolute;
  right: 0;
  background: none;
  border: none;
  color: #bdbdbd;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1); 
}

#search-button:hover {
  color: #00bfa5; 
}

.desktop-nav {
  display: flex;
}

.desktop-nav ul {
  display: flex;
  gap: 28px;
}

.desktop-nav a {
  position: relative;
  font-weight: 500;
  padding: 5px 0;
  
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #00bfa5; 
}

.desktop-nav a.active {
  color: #00bfa5; 
}

.desktop-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #00bfa5; 
}

.mobile-menu-icon {
  display: none;
  font-size: 24px;

  cursor: pointer;
  color: #f6f6f6; 
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1); 
}

.mobile-menu-icon:hover {
  color: #00bfa5; 
}

.mobile-nav {
  position: fixed;     
  top: 0;
  left: 0;
  height: 100vh;        
  width: 250px;         
  background: rgba(0, 0, 0, 0.95); 
  padding: 20px;
  box-sizing: border-box;
  z-index: 9999;       
  transform: translateX(-100%); 
  transition: transform 0.3s ease;
  overflow-y: auto;     
  
}



.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav ul > li > a {
  display: block;
  padding: 12px 20px;  
  color: white;
  text-decoration: none;
}

.mobile-nav a {
  display: block;
  padding: 10px 15px;
  border-radius: 8px; 
  transition: all 0.3s cubic-bezier(0.4,0,0.2,1); 
}

.mobile-nav a.active {
  background-color: rgba(0, 191, 165, 0.1);
  color: #00bfa5; 
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-list-mobile {
  display: none;
  padding-left: 40px;   
  margin-top: 8px;     
  flex-direction: column;

}

.dropdown-list-mobile.show {
  display: flex;
}

.dropdown-mobile > .dropdown-toggle {
  cursor: pointer;
  display: block;
  width: 100%;
  padding: 12px 0;
  color: #fff;
  background: none;
  border: none;
  text-align: left;
  padding-left: 20px;
}


.dropdown-list-mobile li a {
  padding: 8px 0;      
  color: white;
  text-decoration: none;
  font-size: 0.95em;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}


@media screen and (max-width: 992px) {
  .header-container {
    padding: 15px 30px; 
    height: 70px;
  }
  
  .auth-buttons {
    display: none;
  }
  
  .user-profile {
    display: none;
  }

  .desktop-nav {
    display: none;
  }
  
  .mobile-menu-icon {
    display: block;
    flex-shrink: 0; 
  }
  
  .search-container {
    flex: 1;
    min-width: 0; 
  }
  
  
  #search-input {
    padding: 8px 12px; 
    font-size: 14px; 
    height: 35px; 
  }
  
  #search-button {
    padding: 8px 12px; 
    height: 35px; 
  }
  
  .logo-container {
    flex-shrink: 0;
  }
  
  .logo-container img {
    max-height: 35px;
    max-width: 280px;
  }
}

@media screen and (max-width: 768px) {
  .header-container {
    padding: 0 12px;
    gap: 10px;
    height: 70px;
  }
  
  .search-container {
    min-width: 100px;
    margin: 0 10px;
  }
  
  .search-container {
    min-width: 100px;
    margin: 0 10px;
  }
  
  .search-container {
    margin: 0 12px;
  }
  
  #search-input {
    padding: 8px 12px;
    font-size: 14px;
    height: 32px;
  }
  
  #search-button {
    padding: 6px 10px;
    height: 32px;
  }
  
  .logo-container img {
    height: 30px;
    max-width: 300px;
  }
  
  .mobile-menu-icon {
    font-size: 20px; 
  }

  .auth-single-btn {
    padding: 6px 12px;
    font-size: 14px;
  }
}


@media screen and (max-width: 480px) {
  .search-container {
    flex: 1;
    min-width: 80px;
    margin: 0 6px;
  }
  
  .header-container {
    padding: 0 8px;
    gap: 8px;
    height: 70px;
  }

  #search-input {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  #logo {
    height: 26px;
    width: 35px;
  }

  .auth-single-btn {
    padding: 5px 10px;
    font-size: 13px;
    gap: 5px;
  }

  .auth-single-btn span {
    display: none; /* Ocultar texto "Login" en móviles muy pequeños */
  }

  .auth-single-btn i {
    margin-right: 0;
  }
}

/* Botones de autenticación */
.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  display: none !important;
}

.auth-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.login-btn {
  background-color: transparent;
  color: #f6f6f6;
  border: 1px solid #00bfa5;
}

.login-btn:hover {
  background-color: rgba(0, 191, 165, 0.1);
}

.register-btn {
  background-color: #00bfa5;
  color: white;
}

.register-btn:hover {
  background-color: #008f7a;
}

/* Perfil de usuario */
.user-profile {
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: #f6f6f6;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background-color 0.3s ease;
}

.user-menu-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.user-menu-btn i:first-child {
  font-size: 1.2rem;
  color: #00bfa5;
}

.user-dropdown-content {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #161718;
  border: 1px solid #333;
  border-radius: 8px;
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.user-dropdown:hover .user-dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-content a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #bdbdbd;
  text-decoration: none;
  border-bottom: 1px solid #333;
  transition: all 0.3s ease;
}

.user-dropdown-content a:last-child {
  border-bottom: none;
}

.user-dropdown-content a:hover {
  color: #00bfa5;
  background-color: rgba(0, 191, 165, 0.1);
}

/* Autenticación móvil */
.mobile-auth-section {
  border-top: 1px solid #333;
  margin-top: 10px;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-auth-section a {
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
}

.mobile-login-btn {
  color: #00bfa5;
  border: 1px solid #00bfa5;
}

.mobile-register-btn {
  background-color: #00bfa5;
  color: white;
}

.mobile-user-profile {
  border-top: 1px solid #333;
  margin-top: 10px;
  padding-top: 10px;
  display: none !important;
}

.mobile-user-name {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #00bfa5;
  text-decoration: none;
  font-weight: 500;
}

.mobile-user-menu {
  padding-left: 20px;
  margin-top: 8px;
}

.mobile-user-menu li {
  margin-bottom: 5px;
}

.mobile-user-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #bdbdbd;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.mobile-user-menu a:hover {
  color: #00bfa5;
  background-color: rgba(0, 191, 165, 0.1);
}

/* Estilos para modales */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal {
  background: #1a1a1a;
  border-radius: 12px;
  padding: 30px;
  width: 90%;
  max-width: 400px;
  border: 1px solid #333;
  position: relative;
}

.modal h2 {
  color: #f6f6f6;
  margin-bottom: 20px;
  text-align: center;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  color: #bdbdbd;
  font-size: 24px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  color: #f6f6f6;
}

.form-group label {
  display: block;
  color: #f6f6f6;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 6px;
  color: #f6f6f6;
  font-size: 14px;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #00bfa5;
}

.error-message {
  color: #ff4757;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.modal-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.secondary-btn {
  background: transparent;
  color: #bdbdbd;
  border: 1px solid #444;
}

.secondary-btn:hover {
  background: #2a2a2a;
}

.success-message {
  color: #00bfa5;
  font-size: 0.9rem;
  margin-top: 5px;
  display: none;
}

/* Responsive */

@media screen and (min-width: 993px) {
  .mobile-auth-section,
  .mobile-user-profile {
    display: none !important;
  }
}

/* Botón único de Login para todos los dispositivos */
.auth-single {
    position: relative;
}

.auth-single-btn {
    background: transparent;
    border: 1px solid #00bfa5;
    color: #00bfa5;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.auth-single-btn:hover {
    background: rgba(0, 191, 165, 0.1);
}

/* Menú desplegable de autenticación */
.auth-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px;
    min-width: 180px;
    z-index: 1000;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.auth-dropdown-content.show {
    display: block;
}

.auth-dropdown-option {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: #f6f6f6;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-dropdown-option:hover {
    background: rgba(255,255,255,0.1);
}

.auth-dropdown-option.login-option {
    color: #00bfa5;
    border-bottom: 1px solid #333;
}

.auth-dropdown-option.register-option {
    color: #8B5CF6;
}

/* Overlay para cerrar menú */
.auth-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: none;
}

.auth-dropdown-overlay.show {
    display: block;
}

/* Botón único de Login para todos los dispositivos */
.auth-single {
    position: relative;
}

.auth-single-btn {
    background: transparent;
    border: 1px solid #00bfa5;
    color: #00bfa5;
    padding: 5px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.auth-single-btn:hover {
    background: rgba(0, 191, 165, 0.1);
}

/* Menú desplegable de autenticación */
.auth-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 8px;
    min-width: 180px;
    z-index: 1000;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.auth-dropdown-content.show {
    display: block;
}

.auth-dropdown-option {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: #f6f6f6;
    padding: 12px 16px;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-dropdown-option:hover {
    background: rgba(255,255,255,0.1);
}

.auth-dropdown-option.login-option {
    color: #00bfa5;
    border-bottom: 1px solid #333;
}

.auth-dropdown-option.register-option {
    color: #8B5CF6;
}

/* Overlay para cerrar menú */
.auth-dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: none;
}

.auth-dropdown-overlay.show {
    display: block;
}

