@font-face {
  font-family: 'OpenDyslexic';
  src: url('fonts/OpenDyslexicMono-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}
html {
  scroll-behavior: smooth;
}

body {
  font-family: sans-serif;
}

h1, h2, h3 {
  font-family: 'Lexend', sans-serif;
  font-weight: 600;
}

.markdown-body {
  box-sizing: border-box;
  min-width: 200px;
  max-width: 800px;
  margin: auto;
  padding: 2rem;
  background-color: #f4f3e7;
  border-radius: 25px;
  color: #20455e;
  font-family: 'OpenDyslexic', sans-serif;
  line-height: 1.6;
  font-size: 1rem;
}

pre {
  position: relative;
  overflow: auto;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #eee;
  border: none;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 3px;
  opacity: 0.6;
  transition: opacity 0.3s;
  z-index: 2;
}

.copy-btn:hover {
  opacity: 1;
}

.nav-bar {
  text-align: left;
  padding: 1rem 2rem 0;
  max-width: 100%;
  margin: auto;
}

.nav-bar a {
  text-decoration: none;
  color: #0366d6;
  font-size: 14px;
}

.nav-bar a:hover {
  text-decoration: underline;
}

/* tablas */ 

.markdown-body table {
  width: 100%;
  background-color: #f4f3e7; /* fondo oscuro, ajusta según tu tema */
  color: #20455e; /* texto claro */
  /* equinas redondeadas */
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 10px;
  overflow: hidden;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid #444;
  padding: 8px;
}

.markdown-body th {
  background-color: #A3D2FF; /* un poco más claro que el fondo general */
  font-weight: bold;
}

.markdown-body tr:nth-child(even) {
  background-color: #2a2a2a; /* rayado para mejor lectura */
}

/* Para pantallas pequeñas (como móviles) */
@media (max-width: 600px) {

  .markdown-body {
    background-color: #e6e6e9;
    width: 90%;
    font-size: 0.5rem; /* Aumenta el tamaño en móviles */
  }

  h1 {
    font-size: 1rem;
  }

  h2 {
    font-size: 0.75rem;
  }

  h3 {
    font-size: 0.5rem;
  }

  pre, code {
    font-size: 1.1rem;
    background-color: #f3f0ff;
  }

  button.copy-btn {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }
}