/* 🌌 Estilo base */ 
html, body { 
    font-family: 'Inter', sans-serif; 
    /* background: linear-gradient(to bottom, #1e1e2f, #242437); */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #f0f0f0; 
    overflow-x: clip; /* en lugar de hidden */
    width: 100%; 
    max-width: 100vw; 
    position: relative; 
    margin: 0 auto;
  
  }
  
input,
textarea,
select {
  font-size: 16px;
}

/* HEADER */
header {
    background-color: #162a32f5;
    color: #ffffff;
    /* padding: 5px 0; */
    text-align: center;
    font-family: 'Segoe UI', sans-serif;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    max-width: 100%;
    z-index: 1000;
    margin: 0 auto;
}

#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
  }
  
  

  
.header-container {
    max-width: 1200px;
    width:100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #162a32f5; /*#1e1e2fc9 */
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.header-left {
    flex: 1;
    float: left;
    display: contents;
}

.site-logo {
    height: 58px;
    vertical-align: middle;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.top-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  margin-top:16px;
  font-family: 'Inter', sans-serif; /* O usa 'Poppins' si prefieres algo más redondeado */
}

.suggestions-box {
background: #121212;
    border-radius: 5px;
    border: 1px solid #444444;
    max-height: 200px;

    float: right;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
      display: none;
  position: absolute;
    z-index: 1000;
    width: 400px;
}

.suggestion-item {
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid #444444;
  white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.suggestion-item:hover {
  background-color: #393636;
}

.delete-history-btn {
  background-color: #cd1515;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  width: 100%;
  margin-top: 8px;
  transition: background-color 0.3s;
}

.delete-history-btn:hover {
  background-color: #e50914;
}

.history-deleted-msg {
  background-color: #203a43;
  color: #00ff99;
  padding: 8px;
  margin-top: 8px;
  border-radius: 5px;
  font-size: 14px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

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


.top-search-form input {
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #444;
  background-color: #1e1e2f;
  color: #fff;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.top-search-form input:focus {
  outline: none;
  border-color: #00ff99;
  box-shadow: 0 0 5px rgba(0, 255, 153, 0.5);
  font-size: 16px;
}

.top-search-form button {
  padding: 10px 16px;
  background: linear-gradient(135deg, #e50914, #b00610);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.top-search-form button:hover {
  background: linear-gradient(135deg, #ff1a2c, #c00a18);
  transform: scale(1.03);
}


/* Botón hamburguesa */
.hamburger {
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    color: #ccc;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width:35px;
  margin-right:20px;
}

/* MENÚ LATERAL */
.sidebar-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: #162a32f5;
    color: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.3);
    transition: right 0.3s ease;
    z-index: 1200;
    overflow-y: auto;
    overflow-x: clip;
}

.sidebar-menu.open {
    right: 0;
    padding:10px;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.close-btn {
    font-size: 28px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    left: 10px;
    color: #ccc;
}

.profile-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 10px;
    object-fit: cover;
    border: 2px solid #ccc;
}

.sidebar-header p {
    margin: 0;
    font-size: 1em;
    color: #ccc;
}

/* ENLACES DEL MENÚ */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    height:60%;
    overflow-y: auto;
    overflow-x: clip;
}

.sidebar-nav a {
    color: #ccc;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    padding: 10px;
}

.sidebar-nav a:hover {
    color: #fff;
    background: linear-gradient(to right, #242437, #817f7f5e);
}

/* BUSCADOR */

.searchbar-mobile {
  display: none;
}

.sidebar-search {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-search input {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #2a2a3d;
    color: #fff;
    font-size: 16px; 
}

.sidebar-search button {
    padding: 6px 12px;
    background-color: #e50914;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.sidebar-menu .top-search-form {
  flex-direction: column;
  align-items: stretch;
  padding: 10px;
}

.sidebar-menu .top-search-form input {
  width: 100%;
  font-size: 16px;
}

.sidebar-menu .top-search-form button {
  width: 100%;
  margin-top: 8px;
  font-size: 16px;
}

.sidebar-menu .suggestions-box {
  position: absolute;
  left: 0;
  width: 100%;
  max-width: none;
}

/* FOOTER */
footer {
    background-color: #162b33;
    color: #ccc;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    border-top: 1px solid #444;
    margin-top: 40px;
}

footer a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.social-links a {
    color: #ccc;
    margin: 0 10px;
    font-size: 1.2em;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #fff;
}

#btn-subir {
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 999;
  background-color: #333;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: none; /* Oculto por defecto */
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: background-color 0.3s;
}

#btn-subir:hover {
  background-color: #555;
}

.language-selector {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 10px 0;
  font-family: 'Inter', sans-serif;
}

.language-selector label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #fff;
  font-size: 14px;
}

.language-selector select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: #203a43;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.language-selector select:hover {
  border-color: #66afe9;
  background-color: #2c4e5a;
}

.language-selector select:focus {
  outline: none;
  border-color: #66afe9;
  box-shadow: 0 0 5px rgba(102, 175, 233, 0.6);
}

@media (max-width: 600px) {
  .searchbar-mobile {
    display: block;
    max-width: 100%;
    width: 100%;
  }

  .searchbar-pc {
    display: none;
  }

 

  .searchbar-mobile input {
    width: 100%;
    font-size: 16px;
  }

  .searchbar-mobile button {
    width: 100%;
    margin-top: 8px;
    font-size: 16px;
  }

  .searchbar-mobile .suggestions-box {
    max-height: 200px;
    position: absolute;
    position: fixed;
    margin-top: 2px;
    width: 100%;
    max-width: 280px;
    overflow-y: auto;
    background-color: #121212;
    border: 1px solid #444;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    }

  .suggestion-item {
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }

  .suggestion-item:hover {
    background-color: #393636;
  }
}

