html, body {
  background: url("/images/imagen_sitio/MisMierdas_bg.png") no-repeat center center fixed;
  background-size: cover;
  background-attachment: fixed;
  background-color: #000;
}

/* === Fondo tipo "terminal" para los artículos === */

.blah.w-100 {
  background: rgba(0, 0, 0, 0.7);            /* negro translúcido */
  backdrop-filter: blur(10px);               /* efecto vidrio borroso */
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1rem;                       /* esquinas redondeadas */
  border: 1px solid rgba(0, 255, 0, 0.3);    /* borde verde tenue */
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.2); /* brillo sutil */
  padding: 1.5rem;
  color: #00ff00;                            /* texto verde tipo terminal */
  transition: all 0.3s ease;
}

/* Hover para efecto de resalte */
.blah.w-100:hover {
  background: rgba(0, 0, 0, 0.85);
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
  transform: translateY(-2px);
}

/* Títulos */
.blah.w-100 h1,
.blah.w-100 h2,
.blah.w-100 h3 {
  color: #00ff00 !important;
  font-family: "Courier New", monospace;
  margin-top: 0;
}

/* Texto y enlaces */
.blah.w-100 p,
.blah.w-100 a {
  color: #00ff00 !important;
  font-family: "Courier New", monospace;
}

/* Botón "read more" */
.blah.w-100 a.ba {
  border: 1px solid rgba(0, 255, 0, 0.3);
  background: rgba(0, 0, 0, 0.6);
  color: #00ff00 !important;
}

.blah.w-100 a.ba:hover {
  background: rgba(0, 255, 0, 0.15);
  border-color: rgba(0, 255, 0, 0.6);
}


/* === Estilo terminal para las páginas de artículos individuales === */

/* Contenedor principal del artículo */
.nested-copy-line-height.lh-copy.serif.f4.nested-links.mid-gray.pr4-l.w-two-thirds-l {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: 1px solid rgba(0, 255, 0, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
  padding: 2rem;
  color: #00ff00 !important;
  font-family: "Courier New", monospace;
  transition: all 0.3s ease;
}

/* Título principal del artículo */
header h1,
header p,
header time,
header aside {
  color: #00ff00 !important;
  font-family: "Courier New", monospace;
}

/* Enlaces dentro del artículo */
.nested-copy-line-height.lh-copy.serif.f4.nested-links.mid-gray.pr4-l.w-two-thirds-l a {
  color: #00ff00 !important;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 255, 0, 0.3);
}

.nested-copy-line-height.lh-copy.serif.f4.nested-links.mid-gray.pr4-l.w-two-thirds-l a:hover {
  color: #00cc00 !important;
  border-bottom-color: rgba(0, 255, 0, 0.6);
}

/* Encabezados dentro del artículo */
.nested-copy-line-height.lh-copy.serif.f4.nested-links.mid-gray.pr4-l.w-two-thirds-l h1,
.nested-copy-line-height.lh-copy.serif.f4.nested-links.mid-gray.pr4-l.w-two-thirds-l h2,
.nested-copy-line-height.lh-copy.serif.f4.nested-links.mid-gray.pr4-l.w-two-thirds-l h3 {
  color: #00ff00 !important;
  font-family: "Courier New", monospace;
}

/* Listas y párrafos */
.nested-copy-line-h

/* === Estilo terminal para el header de los artículos === */

header {
  background: rgba(0, 0, 0, 0.8);           /* negro más oscuro */
  backdrop-filter: blur(12px);             /* efecto vidrio borroso */
  -webkit-backdrop-filter: blur(12px);     /* soporte Safari */
  border-radius: 1rem;
  border: 1px solid rgba(0, 255, 0, 0.4);  /* borde verde tenue */
  box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
  padding: 1.5rem 2rem;
  color: #00ff00 !important;
  font-family: "Courier New", monospace;
  margin-bottom: 2rem;
}

/* Títulos dentro del header */
header h1,
header p,
header time,
header aside {
  color: #00ff00 !important;
  font-family: "Courier New", monospace;
}

/* Opcional: enlaces en el header */
header a {
  color: #00ff00 !important;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 255, 0, 0.3);
}

header a:hover {
  color: #00cc00 !important;
  border-bottom-color: rgba(0, 255, 0, 0.6);
}


/* === Header ultra compacto para artículos individuales === */

article header {
  background: rgba(0, 0, 0, 0.85);         /* fondo negro translúcido */
  backdrop-filter: blur(10px);             /* efecto vidrio borroso */
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0.5rem;                   /* esquinas suaves */
  border: 1px solid rgba(0, 255, 0, 0.4); /* borde verde tenue */
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
  padding: 0.6rem 1rem;                    /* padding muy reducido */
  margin-bottom: 1rem;
  color: #00ff00 !important;
  font-family: "Courier New", monospace;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;                            /* espacio mínimo entre elementos */
  line-height: 1.1;                         /* más compacto verticalmente */
}

/* Títulos y metadatos */
article header h1 {
  color: #00ff00 !important;
  font-family: "Courier New", monospace;
  margin: 0;
  font-size: 1.2rem;                        /* tamaño ajustable */
  line-height: 1.1;
}

article header p,
article header time,
article header aside {
  color: #00ff00 !important;
  font-family: "Courier New", monospace;
  margin: 0;
  font-size: 0.85rem;                       /* más pequeño y compacto */
  line-height: 1.1;
}

/* Enlaces dentro del header */
article header a {
  color: #00ff00 !important;
  text-decoration: none;
  border-bottom: 1px dashed rgba(0, 255, 0, 0.3);
}

article header a:hover {
  color: #00cc00 !important;
  border-bottom-color: rgba(0, 255, 0, 0.6);
}


/* === Estilo terminal para paginación === */

.pagination {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

/* Enlaces de paginación (números y siguiente/anterior) */
.pagination a,
.pagination span {
  display: inline-block;
  margin: 0 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 0.5rem;
  font-family: "Courier New", monospace;
  text-decoration: none;
  transition: all 0.3s ease;
}

/* Números de página inactivos */
.pagination a {
  color: #00ff00;
  border: 1px solid rgba(0, 255, 0, 0.3);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.2);
}

/* Hover: más brillo y leve movimiento */
.pagination a:hover {
  color: #00ff00;
  border-color: rgba(0, 255, 0, 0.6);
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.8);
}

/* Página actual */
.pagination span.b {
  color: #000;
  background: #00ff00;
  border: 1px solid #00ff00;
  box-shadow: 0 0 15px rgba(0, 255, 0, 0.6);
  font-weight: bold;
}

/* Enlaces "Siguiente" y "Anterior" */
.pagination a.ml3,
.pagination a.mr3 {
  font-size: 0.9rem;
  padding: 0.3rem 0.8rem;
}


/* Botones Compartir */
.share-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.share-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--color-text, #333);
  transition: fill 0.2s, transform 0.2s;
}

.share-icon:hover svg {
  fill: #1da1f2; /* color azul tipo Twitter */
  transform: scale(1.15);
}


/* =====================================
   Cabecera fija y dinámica
   ===================================== */

/* Header fijo */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  transition: all 0.3s ease;
  overflow: visible; /* antes estaba hidden */
  display: flex;
  flex-direction: column;
  justify-content: center; /* centra verticalmente el contenido */
}

/* Contenido interno del header */
.shrink-header {
  transition: padding 0.3s ease, font-size 0.3s ease;
  padding: 0.5rem 1rem; /* ajusta según altura */
}

/* Altura inicial del header: 15% de la pantalla */
.fixed-header.initial {
  height: 12vh;
}

/* Estado shrink: cuando haces scroll, altura 10% */
.fixed-header.shrink {
  height: 8vh;
}

/* Padding y fuentes iniciales */
.shrink-header h1 {
  font-size: 2rem;
  margin: 0;
}

.shrink-header h2 {
  font-size: 1rem;
  /*margin-top: 0.2rem;*/
  margin: 0;
}

.fixed-header > div {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Scroll: reducir padding y tamaño de fuente */
body.scrolled .shrink-header h1 {
  font-size: 1.5rem;
}

body.scrolled .shrink-header h2 {
  font-size: 0.8rem;
}

body.scrolled .shrink-header {
  padding: 0.3rem 1rem;
}

/* Padding superior del main para que no quede solapado */
@media screen and (max-width: 59.99em) { /* <960px */
  main {
    padding-top: 21vh; /* ajusta según header */
  }
}

@media screen and (min-width: 60em) { /* ≥960px */
  main {
    padding-top: 15vh;
  }
}

.neon-red {
  color: #c3f801; /* color base rojo */
  text-shadow:
     0 0 5px #ff1a1a,
     0 0 10px #ff1a1a,
     0 0 20px #ff4d4d,
     0 0 40px #ff4d4d,
     0 0 60px #ff6666,
     0 0 80px #ff6666;
  animation: flicker 1.5s infinite alternate;
}

/* Animación de parpadeo */
@keyframes flicker {
  0%   { text-shadow: 0 0 5px #ff1a1a, 0 0 10px #ff1a1a, 0 0 20px #ff4d4d; }
  50%  { text-shadow: 0 0 2px #ff1a1a, 0 0 5px #ff1a1a, 0 0 10px #ff4d4d; }
  100% { text-shadow: 0 0 5px #ff1a1a, 0 0 10px #ff1a1a, 0 0 20px #ff4d4d, 0 0 40px #ff4d4d; }
}


/* COLOR DE LOS TITULOS */
/* Títulos de posts individuales */
h1.athelas.f1 {
    color: #FFD700 !important; /* amarillo dorado */
}

/* Títulos de posts en la home */
.blah.w-100 h1.f3 > a {
    color: #FFD700 !important; /* amarillo dorado */
}


/* --- Controla el ancho del contenido dentro de los posts/artículos --- */
article,
article .blah,
article .nested-links,
article .nested-copy-line-height {
  overflow: hidden;
  max-width: 100%;
}

/* --- Asegura que cualquier elemento multimedia se escale correctamente --- */
article img,
article video,
article iframe {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem; /* opcional */
  margin: 0 auto; /* centra el contenido */
}

/* --- Evita que el contenido de texto o links largos rompan el layout --- */
article,
article .blah {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* --- Si quieres que el artículo tenga un borde o sombra contenedora --- */
article.mv4 {
  box-sizing: border-box;
  overflow: hidden;
}


/* ===== Estilos para páginas de términos (tags y categorías) ===== */
.term-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.term-item {
  display: inline-flex;
  align-items: center;
  background: #f9f9f9;
  border: 1px solid #ddd;
  color: #333;
  border-radius: 2rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.4;
  text-decoration: none;
  transition: all 0.2s ease;
}

.term-item:hover {
  background: #fff;
  color: #000;
  border-color: #aaa;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

.term-item span.count {
  font-size: 0.8rem;
  color: #777;
  margin-left: 0.4rem;
}


/*================ EFECTO MATRIX TITULO=========================== */
/* === MATRIX EFFECT: Lightweight Version === */

/* Contenedor general: actúa como fondo del header */
.matrix-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;

  /* Overly sutil */
  background: transparent;
  mix-blend-mode: screen;
  opacity: 0.8;
}

/* Las columnas del efecto */
.matrix-column {
  position: absolute;
  top: -100%;
  width: 16px;
  height: 200%;
  font-size: 12px;
  line-height: 14px;
  color: #00ff41;
  white-space: nowrap;
  writing-mode: vertical-rl;
  opacity: 0.7;
  animation: fall linear infinite;
}

/* Letras con degradado tipo "lluvia" */
.matrix-column::before {
  content: "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
  background: linear-gradient(
    to bottom,
    #ffffff 0%,
    #00ff41 10%,
    #00dd33 30%,
    #009911 50%,
    rgba(0, 255, 65, 0.5) 70%,
    transparent 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animación de caída */
@keyframes fall {
  0% {
    transform: translateY(-100%);
    opacity: 1;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Header content stays above */
header > *:not(.matrix-container) {
  position: relative;
  z-index: 1;
}

/* === Responsive tweaks === */
@media (max-width: 768px) {
  .matrix-column {
    width: 12px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .matrix-column {
    width: 10px;
    font-size: 9px;
  }
}

/*================ FIN EFECTO MATRIX TITULO=========================== */


/*================ CSS del FONDO DINAMICO =========================== */
/* Fondo negro base */
#dynamic-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  overflow: hidden;
  z-index: 0; /* se queda detrás del contenido */
  pointer-events: none;
}

/* Cada imagen que cae */
.falling-image {
  position: absolute;
  top: -10%;
  opacity: 0.9;
  animation-name: fall;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

/* Animación de caída con desvanecimiento */
@keyframes fall {
  0% {
    transform: translateY(0) rotate(var(--rot, 0deg));
    opacity: 0.9;
  }
  75% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(110vh) rotate(var(--rot2, 360deg));
    opacity: 0;
  }
}
/*================ fin CSS del FONDO DINAMICO =========================== */