/* -- GENERAL -- */

/* :root {
  color-scheme: light dark !important;
} */

* {margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poopins', 'Segoe UI', sans-serif;}

.oculto {display: none;}

@media only screen and (max-width: 576px) {
  body {
      max-width: 576px;
      max-height: 1080px;
  }
}

body {
  /* background: linear-gradient(220.55deg, #4B73FF 0%, #7CF7FF 100%); */
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

.container {
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* background-color: var(--brand-basic) !important; */
}

header {
  position: relative;
  padding: 0 2rem;
}

li {
  list-style: none;
}

a {
  text-decoration: none !important;
  font-size: 1rem;
}

a:hover {
  color: gainsboro;
}

h1 {
  text-align: center;
}


/* -- HEADER -- */

/* MENÚ NORMAL */
.navbar {
  max-width: 100%;
  width: 100%;
  height: 100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo {
  margin-top: 8px;
}

.navbar .logo a {
  font-size: 1.5rem;
  font-weight: bold;
}

.navbar .links {
  display: flex;
  gap: 2rem;
}

.logo img {
  width: 100px;
}

/* MENÚ RESPONSIVE */

.navbar .toggle_btn {
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
}

/* dropdown menu */
.dropdown_menu {
  display: none;
  position: absolute;
  right: 2rem;
  top: 60px;
  width: 300px;
  height: 0;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border-radius: 10px;
  overflow: hidden;
  transition: height .2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 999;
}

/* para comprobar menú */
.dropdown_menu.open {
  height: 240px;
  /* height: 175px; */
}
/* ------------------- */

.dropdown_menu li {
  padding: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 992px) {
  .navbar .links {
      display: none;
  }

  .navbar .toggle_btn {
      display: block;
  }

  .dropdown_menu {
      display: block;
  }
}

@media (max-width: 576px) {
  .dropdown_menu {
      left: 2rem;
      width: unset;
  }

  .titlePage {
      display: none;
  }
}

/* APP src/aparcamiento */
.container > .card {
  border-radius: 1rem;
}

.container > .btn-lg {
  width: 100%;
  margin-bottom: 10px;
}

#info {
  margin-top: 1rem;
}

.container > .toggle-theme {
  position: absolute;
  top: 15px;
  right: 15px;
}


/* -- WIKI -- */
:root {
    --bg-base: #22252a;
    --bg-sidebar: #1a1c20;
    --text-main: #e0e0e0;
    --text-muted: #95a5a6;
    --accent-blue: #4a90e2;
    --accent-pink: #ff3385;
    --hover-bg: #2d3238;
}

#app { 
    display: flex; 
    width: 100%; 
    height: calc(100vh - 100px); /* Descuenta el tamaño del header para encajar perfecto */
    background: var(--bg-base); 
    color: var(--text-main);
}

#sidebar { 
    width: 280px; 
    background: var(--bg-sidebar); 
    padding: 20px; 
    overflow-y: auto; 
    border-right: 1px solid #111; 
}

#sidebar h3 { 
    margin-top: 0; 
    color: var(--accent-blue);
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
}

/* BUSCADOR DE ARCHIVOS */
#search-input {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 20px;
    border: 1px solid #333;
    border-radius: 6px;
    background-color: var(--bg-base);
    color: white;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

#search-input::placeholder {
    color: #666;
}

#search-input:focus {
    outline: none;
    border: 1px solid var(--accent-pink); 
    box-shadow: 0 0 8px rgba(255, 51, 133, 0.3);
}

/* CARPETAS ORDENADAS */
#sidebar ul { 
    list-style: none; 
    padding-left: 15px; 
    margin: 0; 
}

#sidebar > ul { 
    padding-left: 0; 
}

.folder-header { 
    cursor: pointer; 
    padding: 8px; 
    font-weight: 600; 
    border-radius: 4px; 
    user-select: none; 
    transition: background 0.2s;
}

.folder-header:hover { 
    background: var(--hover-bg); 
    color: var(--accent-blue); 
}

/* Estilos de los archivos */
.file { 
    cursor: pointer; 
    padding: 8px; 
    border-radius: 4px; 
    color: var(--text-muted);
    font-size: 0.95em;
    transition: all 0.2s;
}

.file:hover { 
    background: var(--hover-bg); 
    color: #fff;
    border-left: 3px solid var(--accent-pink);
    padding-left: 5px;
}

/* CONTENIDO DE LA NOTA */
#content { 
    flex: 1; 
    padding: 40px; 
    overflow-y: auto; 
    background: var(--bg-base); 
}

#viewer { 
    max-width: 800px; 
    margin: auto; 
    line-height: 1.7; 
    font-size: 1.1em;
    color: var(--text-main);
}

#viewer h1, #viewer h2, #viewer h3 {
    color: #fff;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-top: 20px;
}

/* Estilo para los enlaces de Obsidian y normales */
.internal-link, #viewer a { 
    color: var(--accent-blue); 
    text-decoration: none !important; 
    font-weight: 600;
    cursor: pointer; 
    transition: color 0.2s;
}

.internal-link:hover, #viewer a:hover { 
    color: var(--accent-pink); 
    text-decoration: underline !important; 
}

/* Estilos para fragmentos de código */
#viewer pre {
    background-color: var(--bg-sidebar);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid #333;
    margin: 15px 0;
}

#viewer code {
    font-family: 'Courier New', Courier, monospace;
    background-color: var(--bg-sidebar);
    padding: 2px 4px;
    border-radius: 4px;
    color: var(--accent-pink);
}

/* --- ESTILOS PARA LAS TABLAS EN MARKDOWN --- */
#viewer table {
    width: 100%;
    border-collapse: collapse; /* Hace que los bordes se unan en una sola línea */
    margin: 20px 0;
    font-size: 0.95em;
}

#viewer th, #viewer td {
    border: 1px solid #333; /* El color de las líneas (igual que tu borde lateral) */
    padding: 12px 15px;
    text-align: left;
}

#viewer th {
    background-color: var(--bg-sidebar); /* Fondo de la cabecera un poco más oscuro */
    color: var(--accent-blue); /* Letra de la cabecera en tu azul brillante */
    font-weight: 600;
}

/* Efecto "cebra" (opcional): filas alternas ligeramente más claras para facilitar la lectura */
#viewer tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Efecto hover: se ilumina un poco la fila al pasar el ratón */
#viewer tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* --- ESTILOS PARA LAS LISTAS EN EL VISOR --- */
#viewer ul {
    list-style-type: disc; /* Vuelve a poner los puntos */
    padding-left: 25px;    /* Devuelve el margen izquierdo */
    margin: 15px 0;
}

#viewer ol {
    list-style-type: decimal; /* Para listas numeradas (1. 2. 3.) */
    padding-left: 25px;
    margin: 15px 0;
}

#viewer li {
    list-style: inherit; /* Sobrescribe tu 'list-style: none' global */
    margin-bottom: 8px;
}

/* Estilo para el título principal de la nota */
.note-title {
    color: var(--accent-pink) !important; /* Lo ponemos en rosa para que destaque */
    font-size: 2.5em;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-top: 0 !important;
    margin-bottom: 25px;
    text-transform: capitalize;
}