@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap");
:root {
  --bg-color: #000;
  --text-color: #e0e0e0;
  --accent-color: #000;
  --border-color: #404040;
  --back--color: #0d0d0d;
  --text-color-secundary: #fff;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

body {
  font-family: "poppins";
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: all 0.3s;
}

/* Personalización de la barra de desplazamiento */
::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent; /* Fondo transparente para que no se vea sobre el contenido */
}

::-webkit-scrollbar-thumb {
  background: #2e2e2e; /* Un color visible pero sutil para la barra */
  border-radius: 4px;
  border: 2px solid var(--bg-color); /* Borde que coincide con el fondo para dar efecto de flotado */
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Aplicar a la barra lateral */
#sidebar {
  scrollbar-width: thin;
  scrollbar-color: var(--bg-color);
}

/* Barra superior */
#top-bar {
  font-size: 11px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #0d0d0d;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 20px;
  z-index: 1000;
  border-bottom: 2px solid var(--border-color);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  width: 2%;
}

.logo-container h1 {
  font-size: 18px;
  font-weight: 400;
}

#burger-menu {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  margin-right: 20px;
}

#dark-mode-toggle {
  background: none;
  border: none;
  color: var(--accent-color);
  font-size: 24px;
  cursor: pointer;
  margin-left: auto;
}

#dark-mode-toggle img {
  width: 25px;
  height: 25px;
  transition: 0.8s ease-in-out;
}

#dark-mode-toggle img:hover {
  border-radius: 50%;
  border: #404040 solid 5px;
  scale: 1;
}

/* Contenedor principal */
.main-container {
  display: flex;
  margin-top: 60px;
  min-height: calc(100vh - 120px);
}

/* Barra lateral */
#sidebar {
  width: 20%;
  position: fixed;
  height: 100vh;
  background-color: var(--back--color);

  overflow-y: auto;
  border-right: 2px solid var(--border-color);
  transition: transform 0.3s;
}

.nav-section {
  margin-bottom: 0px;
}

.nav-main {
  display: block;
  padding: 8px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 11px;
  border-left: 3px solid transparent;
  transition: all 0.3s;
}

.nav-main:hover {
  background: var(--border-color);
  color: var(--text-color);
}

.nav-main.active {
  background-color: var(--accent-color);
  color: #fff;
}

.nav-sub {
  display: block;
  padding: 12px 25px;
  color: var(--text-color);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.3s;
  font-size: 11px;
}

.nav-sub:hover {
  border-left-color: var(--text-color) !important;
  background-color: var(--back--color) !important;
}

.nav-sub.active {
  border-left: 3px solid var(--text-color) !important;

  font-weight: 500;
}

/* Contenido principal */
#content {
  margin-left: 300px;
  width: calc(100% - 100px);
  padding: 20px;
  position: relative;

  transition: margin 0.3s;
}

.update {
  font-size: 11px;
}

.page {
  display: none;
  min-height: calc(100vh - 180px);
  gap: 5px;
}

.page.active {
  display: grid;
  grid-template-columns: 2fr 1fr;
}

.main-content {
  padding-right: 30px;
}

.subsections-box {
  position: fixed;
  right: 20px; /* Añadido para dar espacio desde el borde */
  top: 80px; /* Posiciona debajo de la barra superior */
  max-height: calc(
    100vh - 160px
  ); /* Altura máxima = (pantalla - cabecera - pie - márgenes) */
  overflow-y: auto; /* Muestra la barra de scroll SÓLO si es necesario */
  padding-right: 15px; /* Espacio para que la barra de scroll no se pegue al texto */
}

.section-box {
  background-color: none;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.section-box h2 {
  font-size: 35px;
  color: var(--text-color-secundary);
}

/* Footer */
#footer {
  bottom: 0;
  width: 100%;
  height: 60px;
  background-color: var(--back--color);
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 2px solid var(--border-color);
  font-size: 12px;
  left: 0;
  transition: 0.4s ease-in-out;
  color: #f0f0f0;
}

#footer a {
  color: #f0f0f0;
  transition: 0.4s ease-in-out;
}

#footer a:hover {
  color: #ccc;
  text-decoration: none;
}

a {
  color: #f0f0f0;
  transition: 0.4s ease-in-out;
  text-decoration: none;
}

a:hover {
  color: #ccc;
  text-decoration: none;
}

/* Botones de navegación */
.nav-arrows {
  position: fixed;
  bottom: 80px;
  right: 10%;
  display: flex;
  gap: 15px;
}

.nav-arrow {
  background-color: none;
  color: var(--text-color);
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  font-size: 16px;
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 120px;
  justify-content: center;
}

.nav-arrow.hidden {
  display: none;
}

.barra {
  height: 1px;
  background-color: var(--text-color);
  border: none;
  margin: 30px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .logo {
    width: 10% !important;
  }

  .nav-arrows {
    display: block !important;
  }

  .nav-arrow {
    display: block !important;
  }

  #burger-menu {
    display: block;
  }

  .main-content {
    padding-right: 0px;
    text-align: center;
    padding: 10px;
  }

  #sidebar {
    transform: translateX(-100%);
    width: 280px;
    height: calc(100vh - 60px);
    top: 60px;
    z-index: 999;
  }

  #sidebar.active {
    transform: translateX(0);
  }

  #content {
    margin-left: 0;
    width: 100%;
    padding: 0px;
  }

  .page.active {
    display: block;
  }

  .subsections-box {
    display: none;
  }

  .nav-arrows {
    position: relative;
    bottom: 70px;
    align-items: center;
    justify-content: center;
    transform: translate(10%);
  }

  #footer {
    width: 100% !important;
  }
}

.r {
  color: var(--text-color-secundary);
  text-decoration: none;
}
