/* CV Chat: la web publica del foro (src/foroWeb.js), con los colores y las letras del chat */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fuentes/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/fuentes/inter-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --fondo: #1a1a1e; --barra: #121214; --tarjeta: #222327; --hover: #2c2c30; --borde: #29292d;
  --texto: #efeff1; --texto-2: #b5bac1; --apagado: #81828a; --acento: #5865f2; --acento-2: #4752c4; --enlace: #00a8fc;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 400 15px/1.5 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif; }
a { color: var(--enlace); text-decoration: none; }
a:hover { text-decoration: underline; }

/* La barra de arriba */
.barra { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--barra); border-bottom: 1px solid var(--borde); }
.marca { display: inline-flex; align-items: center; gap: 10px; color: var(--texto); font-weight: 700; font-size: 17px; }
.marca:hover { text-decoration: none; }
.marca img { width: 32px; height: 32px; border-radius: 50%; }
.marca .sub { color: var(--apagado); font-weight: 500; font-size: 14px; }
.entrar { margin-left: auto; padding: 7px 14px; border-radius: 8px; background: var(--acento); color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; }
.entrar:hover { background: var(--acento-2); text-decoration: none; }

.pagina { max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; }
.migas { margin-bottom: 8px; color: var(--apagado); font-size: 14px; }
.migas a { color: var(--texto-2); }
.titulo { margin: 0 0 6px; font-size: 26px; line-height: 1.25; font-weight: 800; }
.bajada { margin: 0 0 20px; color: var(--texto-2); }
.seccion { margin: 28px 0 10px; color: var(--apagado); font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.vacio { color: var(--apagado); }

/* Las listas de foros y de temas */
.lista { display: flex; flex-direction: column; gap: 8px; }
.foro, .tema { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 8px; background: var(--tarjeta); color: var(--texto); }
.foro:hover, .tema:hover { background: var(--hover); text-decoration: none; }
.foro-icono { flex: 0 0 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--hover); color: var(--texto-2); }
.foro-texto, .tema-texto { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.foro-nombre { font-weight: 700; font-size: 16px; }
.foro-desc, .tema-resumen { color: var(--texto-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foro-ultimo, .tema-meta { color: var(--apagado); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foro-nums { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; color: var(--apagado); font-size: 13px; white-space: nowrap; }
.foro-nums b { color: var(--texto); font-weight: 600; }
.tema-titulo { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tema-foro { color: var(--texto-2); font-weight: 600; }
.miniatura { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 6px; object-fit: cover; background: var(--hover); }
.av { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--hover); }
.av-letra { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; background: var(--acento); }
.etiquetas { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 2px; }
.etiqueta { padding: 1px 8px; border-radius: 10px; background: var(--hover); color: var(--texto-2); font-size: 12px; }
.pagina > .etiquetas { margin-bottom: 8px; }

/* Un tema: los mensajes como en el chat */
.hilo { margin-top: 8px; }
.mensaje { display: flex; gap: 14px; padding: 10px 4px; }
.mensaje-cuerpo { flex: 1 1 0; min-width: 0; }
.mensaje-cab { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.autor { font-weight: 600; color: var(--texto); }
.cuando { color: var(--apagado); font-size: 12px; }
.editado { color: var(--apagado); font-size: 12px; }
.texto { color: #dbdee1; overflow-wrap: anywhere; }
.texto p { margin: 4px 0; }
.texto blockquote { margin: 6px 0; padding: 2px 0 2px 12px; border-left: 4px solid #4e5058; color: var(--texto-2); }
.texto pre { margin: 6px 0; padding: 10px; border-radius: 6px; background: #111214; overflow-x: auto; }
.texto code { font-family: Consolas, 'Courier New', monospace; font-size: 13px; }
.texto :not(pre) > code { padding: 1px 4px; border-radius: 4px; background: #111214; }
.texto ul, .texto ol { margin: 4px 0; padding-left: 24px; }
.texto hr { border: 0; border-top: 1px solid var(--borde); margin: 10px 0; }
.texto .foto { margin: 6px 0; }
.texto .foto img { display: block; max-width: min(100%, 520px); max-height: 420px; border-radius: 8px; }
.texto .video video { display: block; max-width: min(100%, 560px); border-radius: 8px; background: #000; }
.texto figure { margin: 6px 0; }
.texto figcaption, .texto .tam { color: var(--apagado); font-size: 12px; }
.texto .tabla { overflow-x: auto; margin: 6px 0; }
.texto table { border-collapse: collapse; font-size: 14px; }
.texto th, .texto td { padding: 4px 10px; border: 1px solid var(--borde); text-align: left; }
.spoiler { padding: 0 2px; border-radius: 4px; background: #111214; color: transparent; cursor: pointer; }
.spoiler:hover, .spoiler:focus { color: inherit; outline: none; }
.reacciones { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.reaccion { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 8px; background: var(--tarjeta); border: 1px solid var(--borde); font-size: 14px; }
.reaccion b { color: var(--texto-2); font-weight: 600; font-size: 13px; }
.separador { display: flex; align-items: center; gap: 10px; margin: 10px 0; color: var(--apagado); font-size: 12px; font-weight: 600; }
.separador::before, .separador::after { content: ''; flex: 1; border-top: 1px solid var(--borde); }

/* Una encuesta */
.encuesta { max-width: 420px; margin: 8px 0; padding: 12px; border-radius: 8px; background: var(--tarjeta); border: 1px solid var(--borde); }
.encuesta-pregunta { margin-bottom: 8px; font-weight: 700; }
.opcion { position: relative; display: flex; justify-content: space-between; gap: 10px; margin: 6px 0; padding: 7px 10px; border-radius: 6px; background: #1e1f22; overflow: hidden; }
.barra-opcion { position: absolute; inset: 0 auto 0 0; background: rgba(88, 101, 242, .28); }
.opcion-texto, .opcion-votos { position: relative; }
.opcion-votos { color: var(--texto-2); font-size: 13px; white-space: nowrap; }
.encuesta-total { margin-top: 6px; color: var(--apagado); font-size: 12px; }

/* Paginas y botones */
.paginas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 16px 0; }
.paginas a, .paginas span { padding: 4px 10px; border-radius: 6px; background: var(--tarjeta); color: var(--texto-2); font-size: 14px; }
.paginas .actual { background: var(--acento); color: #fff; }
.boton { display: inline-block; padding: 9px 16px; border-radius: 8px; background: var(--acento); color: #fff; font-weight: 600; }
.boton:hover { background: var(--acento-2); text-decoration: none; }
.responder { margin-top: 24px; }
.pie { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 24px 16px 32px; border-top: 1px solid var(--borde); color: var(--apagado); font-size: 13px; }
.pie a { color: var(--texto-2); }

@media (max-width: 640px) {
  body { font-size: 15px; }
  .pagina { padding: 16px 12px 40px; }
  .titulo { font-size: 22px; }
  .marca .sub { display: none; }
  .foro, .tema { padding: 12px; gap: 12px; }
  .foro { flex-wrap: wrap; }
  .foro-nums { order: 3; flex-direction: row; gap: 12px; width: 100%; padding-left: 52px; }
  .miniatura { flex-basis: 52px; width: 52px; height: 52px; }
  .mensaje { gap: 10px; }
  .av { flex-basis: 36px; width: 36px; height: 36px; }
}
