/* ============================================================
   PORNO CALDO — v1
   Layout de dos columnas (rail lateral fijo + contenido).
   Paleta "caldo": carbón casi negro con acentos de brasa. Cada
   categoría, tag y ficha recibe uno de los 8 tonos, todos dentro de
   la misma gama cálida para que el sitio se lea como una sola pieza.
   Tema oscuro por defecto (html.dark) y tema claro (html.light).
   ============================================================ */

:root, html.dark {
  --bg: #140b09;
  --bg-2: #1a0e0b00;
  --rail: #1c100d;
  --surface: #23140f;
  --surface-2: #301b14;
  --surface-3: #3e251a;
  --border: rgba(255,196,150,.10);
  --border-2: rgba(255,196,150,.18);
  --text: #fff6f0;
  --text-2: #dcbdac;
  --text-3: #a98878;
  --shadow: 0 14px 34px rgba(0,0,0,.55);
  --shadow-sm: 0 6px 16px rgba(0,0,0,.38);
  --hero-1: rgba(255,60,32,.34);
  --hero-2: rgba(255,138,0,.28);
  --hero-3: rgba(255,196,60,.18);
}
html.light {
  --bg: #fdf6f2;
  --rail: #ffffff;
  --surface: #ffffff;
  --surface-2: #fbeee7;
  --surface-3: #f5e0d5;
  --border: rgba(80,30,15,.12);
  --border-2: rgba(80,30,15,.20);
  --text: #2a1109;
  --text-2: #6b4033;
  --text-3: #966a5a;
  --shadow: 0 14px 34px rgba(80,30,15,.14);
  --shadow-sm: 0 6px 16px rgba(80,30,15,.09);
  --hero-1: rgba(255,60,32,.22);
  --hero-2: rgba(255,138,0,.18);
  --hero-3: rgba(255,196,60,.14);
}

/* Paleta de acentos (pg_color() reparte 1..8): la gama de la brasa,
   del rojo vivo al ámbar pasando por el fucsia caliente. */
:root {
  --c1: #ff3c20;  --c2: #ff7a18;  --c3: #ffb020;  --c4: #ff2d6f;
  --c5: #e11d48;  --c6: #f97316;  --c7: #ff5a3c;  --c8: #d946a6;
  --accent: var(--c1);
  --accent-2: var(--c2);
  --ok: #22c55e;
  --radius: 14px;
}
.c1 { --tone: var(--c1); } .c2 { --tone: var(--c2); } .c3 { --tone: var(--c3); } .c4 { --tone: var(--c4); }
.c5 { --tone: var(--c5); } .c6 { --tone: var(--c6); } .c7 { --tone: var(--c7); } .c8 { --tone: var(--c8); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Roboto, system-ui, -apple-system, Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; }
h1, h2, h3 { line-height: 1.25; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 9px 16px; border-radius: 0 0 10px 0; z-index: 400; }
.skip-link:focus { left: 0; }

/* ============================================================
   Estructura: rail lateral + columna de contenido
   ============================================================ */
.shell { display: flex; min-height: 100vh; }

.rail {
  width: 250px; flex: none; background: var(--rail); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  scrollbar-width: thin;
}
.rail::-webkit-scrollbar { width: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; }

.rail-head { padding: 18px 18px 14px; }
.logo { display: inline-flex; align-items: baseline; gap: 1px; font-weight: 900; font-size: 20px; letter-spacing: -.6px; }
.logo .w1 { color: var(--text); }
.logo .w2 { background: linear-gradient(96deg, var(--c1), var(--c5) 55%, var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c1); margin-left: 3px; align-self: center; }
.rail-tag { display: block; margin-top: 4px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }

.rail-nav { padding: 4px 10px 10px; display: grid; gap: 2px; }
.rail-nav .nav-h { padding: 16px 10px 6px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); font-weight: 800; }
.rail-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 13.5px; }
.rail-nav a svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.rail-nav a:hover { background: var(--surface-2); color: var(--text); }
.rail-nav a.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.rail-nav a .n { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--text-3); }
.rail-nav a .dot { width: 8px; height: 8px; border-radius: 3px; background: var(--tone, var(--c1)); flex: none; }
.rail-nav a.link-all { color: var(--accent); font-weight: 800; }

.rail-searches { padding: 2px 14px 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.rail-foot { margin-top: auto; padding: 14px 18px 22px; color: var(--text-3); font-size: 11.5px; }
.rail-foot a { color: var(--text-3); }
.rail-foot a:hover { color: var(--accent); }
.rail-foot .legal { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 8px; }

.content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1500px; margin: 0 auto; padding: 0 22px; }
main.wrap { padding-top: 20px; padding-bottom: 34px; flex: 1 1 auto; }

/* ---------------- Topbar ---------------- */
.topbar { position: sticky; top: 0; z-index: 120; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 12px; height: 64px; }
.burger { display: none; flex-direction: column; gap: 4px; padding: 10px 8px; flex: none; }
.burger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }
.topbar .logo-mobile { display: none; }

/* min-width:0 es imprescindible: sin él el input impone su ancho mínimo
   intrínseco y el topbar desborda la pantalla en móvil. */
.search { flex: 1 1 auto; min-width: 0; max-width: 640px; position: relative; }
.search-box { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 4px 4px 4px 16px; transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.search-box input { flex: 1; background: transparent; border: 0; color: var(--text); outline: none; min-width: 0; padding: 8px 0; }
.search-box input::placeholder { color: var(--text-3); }
.search-box button { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; }
.search-box button:hover { filter: brightness(1.1); }
.search-box button svg { width: 18px; height: 18px; }

.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); }
.icon-btn:hover { color: var(--text); border-color: var(--border-2); }
.icon-btn svg { width: 19px; height: 19px; }
.top-cta { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 12px; font-weight: 800; font-size: 13px; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c6)); }
.top-cta:hover { filter: brightness(1.08); }
html.dark .theme-toggle .ico-sun { display: none; }
html.light .theme-toggle .ico-moon { display: none; }

/* ---------------- Sugerencias de búsqueda ---------------- */
.suggest-panel { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border-2); border-radius: 16px; z-index: 150; box-shadow: var(--shadow); max-height: 72vh; overflow-y: auto; padding: 6px; }
.suggest-panel.is-open { display: block; }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--text-2); }
.suggest-item:hover { background: var(--surface-2); color: var(--text); }
.suggest-item .th { flex: none; width: 62px; aspect-ratio: 16/9; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.suggest-item .th img { width: 100%; height: 100%; object-fit: cover; }
.suggest-item .tt { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 600; font-size: 13.5px; }
.suggest-item .sub { flex: none; color: var(--text-3); font-size: 11.5px; }
.suggest-all { display: block; margin-top: 4px; padding: 10px; text-align: center; font-weight: 800; color: #fff; border-radius: 10px; background: linear-gradient(135deg, var(--c1), var(--c2)); }

/* ---------------- Drawer (móvil) ---------------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(4,4,14,.62); z-index: 190; }
body.drawer-open { overflow: hidden; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 30px 30px 26px;
  background:
    radial-gradient(680px 320px at 8% 0%, var(--hero-1), transparent 62%),
    radial-gradient(560px 320px at 92% 10%, var(--hero-2), transparent 60%),
    radial-gradient(520px 300px at 55% 110%, var(--hero-3), transparent 60%),
    var(--surface);
  border: 1px solid var(--border);
}
.hero h1 { font-size: clamp(23px, 3.1vw, 36px); font-weight: 900; letter-spacing: -.7px; }
.hero h1 em { font-style: normal; background: linear-gradient(96deg, var(--c1), var(--c5)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-top: 8px; color: var(--text-2); max-width: 62ch; font-size: 15px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border-2); }
.hero-stats .st { display: flex; align-items: baseline; gap: 7px; }
.hero-stats .st b { font-size: 19px; font-weight: 900; }
.hero-stats .st span { color: var(--text-3); font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.hero-stats .st.live b { color: var(--ok); }

/* ============================================================
   Secciones
   ============================================================ */
.section { margin-top: 30px; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-head h2, .section-head h1 { font-size: 19px; font-weight: 850; letter-spacing: -.3px; display: flex; align-items: center; gap: 9px; }
.section-head h2::before, .section-head h1.with-bar::before { content: ""; width: 5px; height: 20px; border-radius: 4px; background: linear-gradient(180deg, var(--tone, var(--c1)), var(--c2)); }
.section-head .count { color: var(--text-3); font-size: 12.5px; font-weight: 700; background: var(--surface-2); padding: 3px 10px; border-radius: 999px; }
.section-head .more { margin-left: auto; color: var(--text-2); font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
.section-head .more:hover { color: var(--accent); }
.car-nav { margin-left: auto; display: flex; gap: 6px; }
.section-head .more ~ .car-nav { margin-left: 10px; }
.car-prev, .car-next { width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; font-weight: 800; }
.car-prev:hover, .car-next:hover { background: var(--surface-3); color: var(--text); }

.page-head { margin: 2px 0 18px; }
.page-head.tone { border-left: 5px solid var(--tone, var(--c1)); padding-left: 14px; }
.page-head h1 { font-size: clamp(21px, 2.6vw, 30px); font-weight: 900; letter-spacing: -.5px; }
.page-head .lead { color: var(--text-2); margin-top: 6px; max-width: 90ch; }
.page-head .kpis { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kpi { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.kpi b { color: var(--text); }

.row-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: none; }
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; flex: none; }

/* ============================================================
   Tarjetas de video
   ============================================================ */
.grid-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 20px 16px; }

/* La tarjeta envuelve al enlace para poder colgarle encima el botón de
   preferiti: un <button> dentro de un <a> no es HTML válido. */
.card { position: relative; display: block; }
.row-scroll > .card { flex: none; width: 258px; }

.thumb { display: block; position: relative; }
.img-holder {
  position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  background: #000; box-shadow: var(--shadow-sm);
}
.img-holder::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow .18s;
}
.thumb:hover .img-holder::after { box-shadow: inset 0 0 0 2px var(--tone, var(--c1)); }
.img-holder img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.thumb:hover .img-holder img { transform: scale(1.05); }
.img-holder video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.img-holder.is-previewing img { opacity: 0; }

.badge-cat {
  position: absolute; top: 8px; left: 8px; z-index: 2; max-width: 68%;
  background: var(--tone, var(--c1)); color: #fff; font-size: 10.5px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 7px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.item-bottom { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 6px; pointer-events: none; }
.item-bottom .quality { background: rgba(10,10,25,.72); color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 6px; backdrop-filter: blur(4px); }
.item-bottom .time { margin-left: auto; background: rgba(10,10,25,.72); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 6px; backdrop-filter: blur(4px); }
.play-hint { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .18s; }
.play-hint span { width: 52px; height: 52px; border-radius: 50%; background: rgba(12,12,28,.6); backdrop-filter: blur(6px); display: grid; place-items: center; border: 2px solid rgba(255,255,255,.5); }
.play-hint svg { width: 20px; height: 20px; color: #fff; margin-left: 2px; }
.thumb:hover .play-hint { opacity: 1; }

.thumb .title { margin-top: 9px; font-size: 13.5px; font-weight: 650; line-height: 1.38; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thumb:hover .title { color: var(--tone, var(--c1)); }
.thumb-bottom { display: flex; align-items: center; gap: 12px; margin-top: 5px; color: var(--text-3); font-size: 12px; }
.thumb-item { display: inline-flex; align-items: center; gap: 4px; }
.thumb-item svg { width: 13px; height: 13px; }
.thumb-item-date { margin-left: auto; }

/* ---------- Preferiti ----------
   El botón se apoya sobre la miniatura. En escritorio solo aparece al pasar
   por encima de la tarjeta; en táctil está siempre visible porque no hay
   hover que lo revele. Cuando está guardado se queda fijo. */
.fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10,10,25,.62); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.22);
  opacity: 0; transform: scale(.9); transition: opacity .16s, transform .16s, background .16s;
}
.fav-btn svg { width: 17px; height: 17px; fill: none; stroke: #fff; }
.card:hover .fav-btn, .fav-btn:focus-visible { opacity: 1; transform: scale(1); }
.fav-btn:hover { background: rgba(10,10,25,.85); }
.fav-btn.is-on { opacity: 1; transform: scale(1); background: var(--c1); border-color: transparent; }
.fav-btn.is-on svg { fill: #fff; stroke: #fff; }
.fav-btn.is-on:hover { background: var(--c5); }
@media (hover: none) {
  .fav-btn { opacity: 1; transform: scale(1); }
}
/* En el listado vertical la miniatura es pequeña y va a la izquierda */
.card-list .fav-btn { top: 6px; left: 116px; right: auto; width: 26px; height: 26px; }
.card-list .fav-btn svg { width: 14px; height: 14px; }

/* Variante ancha, en la ficha del vídeo junto a los votos */
.fav-btn-wide {
  position: static; width: auto; height: auto; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  opacity: 1; transform: none; background: var(--surface-2);
  border: 1px solid var(--border-2); color: var(--text-2);
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.fav-btn-wide svg { stroke: currentColor; }
.fav-btn-wide:hover { background: var(--surface-3); color: var(--text); }
.fav-btn-wide.is-on { background: var(--c1); border-color: transparent; color: #fff; }
.fav-btn-wide.is-on svg { fill: #fff; stroke: #fff; }

/* Contador en el menú lateral */
.rail-nav .nav-favs .n {
  margin-left: auto; background: var(--c1); color: #fff;
  font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px;
}

/* Botón de vaciar, en la cabecera de /preferiti/ */
.kpi-btn { cursor: pointer; border: 1px solid var(--border-2); }
.kpi-btn:hover { background: var(--surface-3); color: var(--text); }

/* Listado vertical (videos relacionados en la ficha) */
.list-videos { display: grid; gap: 12px; }
.list-item { display: flex; gap: 11px; }
.list-item .img-holder { width: 148px; flex: none; border-radius: 10px; }
.list-item .meta { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.list-item .title { margin: 0; font-size: 13px; -webkit-line-clamp: 3; }
.list-item .thumb-bottom { margin: 0; font-size: 11.5px; gap: 10px; }
.list-item .thumb-item-date { margin-left: 0; }

/* ============================================================
   Chips y tags
   ============================================================ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.is-oneline, .chips.is-collapsed { max-height: 38px; overflow: hidden; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); padding: 7px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 650;
}
.chip:hover { border-color: var(--tone, var(--c1)); color: var(--text); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tone, var(--c1)); }
.chip .n { color: var(--text-3); font-size: 11px; font-weight: 700; }
.chip.is-solid { background: linear-gradient(135deg, var(--c1), var(--c2)); border-color: transparent; color: #fff; }
.chip.is-tone { background: color-mix(in srgb, var(--tone, var(--c1)) 16%, transparent); border-color: color-mix(in srgb, var(--tone, var(--c1)) 40%, transparent); color: var(--text); }
.tags-toggle { margin-top: 8px; color: var(--accent); font-weight: 800; font-size: 12.5px; }
.taxo { margin-top: 18px; }
.taxo h2 { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 9px; }

/* ============================================================
   Categorías / protagonistas / canales
   ============================================================ */
.grid-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cat-card {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 16px; transition: transform .16s, border-color .16s;
}
.cat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--tone, var(--c1)); }
.cat-card::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--tone, var(--c1)); opacity: .10; }
.cat-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone, var(--c1)) 45%, transparent); }
.cat-card .name { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; font-size: 15px; position: relative; }
.cat-card .name .n { color: var(--text-2); font-size: 11.5px; font-weight: 800; background: var(--surface-2); padding: 2px 9px; border-radius: 999px; }
.cat-card .desc { margin-top: 7px; color: var(--text-3); font-size: 12.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; position: relative; }

.cat-tile {
  width: 190px; border-radius: var(--radius); padding: 16px 14px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--tone, var(--c1)), color-mix(in srgb, var(--tone, var(--c1)) 45%, var(--c2)));
  min-height: 92px; display: flex; flex-direction: column; justify-content: flex-end;
}
.cat-tile:hover { filter: brightness(1.07); }
.cat-tile .t { font-weight: 850; font-size: 15px; }
.cat-tile .n { font-size: 11.5px; opacity: .85; font-weight: 700; }
.cat-tile svg { position: absolute; right: -6px; top: -8px; width: 66px; height: 66px; opacity: .18; }

.grid-actors { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 16px 12px; }
.actor-card { text-align: center; }
.actor-card .ph { width: 100%; max-width: 116px; aspect-ratio: 1/1; margin: 0 auto; border-radius: 22px; overflow: hidden; background: linear-gradient(135deg, var(--tone, var(--c1)), var(--c2)); display: grid; place-items: center; }
.actor-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.actor-card .ph .ini { font-size: 34px; font-weight: 900; color: #fff; }
.actor-card:hover .ph { filter: brightness(1.08); }
.actor-card .name { margin-top: 8px; font-weight: 700; font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.actor-card .n { color: var(--text-3); font-size: 11.5px; }

.popular-item { width: 112px; text-align: center; }
.popular-item .ph { width: 96px; height: 96px; margin: 0 auto; border-radius: 26px; overflow: hidden; background: linear-gradient(135deg, var(--tone, var(--c1)), var(--c2)); display: grid; place-items: center; }
.popular-item .ph img { width: 100%; height: 100%; object-fit: cover; }
.popular-item .ph .ini { font-size: 32px; font-weight: 900; color: #fff; }
.popular-item:hover .ph { filter: brightness(1.08); }
.popular-item__name { margin-top: 8px; font-size: 12.5px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.popular-item .n { font-size: 11px; color: var(--text-3); }

.grid-channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.channel-card { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; align-items: center; }
.channel-card:hover { border-color: var(--tone, var(--c1)); }
.channel-card .ph { flex: none; width: 58px; height: 58px; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, var(--tone, var(--c1)), var(--c2)); display: grid; place-items: center; color: #fff; font-weight: 900; font-size: 22px; }
.channel-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.channel-card .name { font-weight: 800; }
.channel-card .desc { color: var(--text-3); font-size: 12.5px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   Ricerche (búsquedas guardadas)
   ============================================================ */
.search-cloud { display: flex; flex-wrap: wrap; gap: 9px; }
.search-cloud .chip .n { background: var(--surface-2); border-radius: 999px; padding: 1px 7px; }
.searches-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.search-row {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--tone, var(--c1)); border-radius: 12px; padding: 11px 14px;
}
.search-row:hover { border-color: var(--border-2); border-left-color: var(--tone, var(--c1)); }
.search-row .q { font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.search-row .rank { color: var(--text-3); font-weight: 900; font-size: 12px; min-width: 22px; }
.search-row .hits { margin-left: auto; font-size: 11.5px; font-weight: 800; color: var(--text-3); background: var(--surface-2); padding: 3px 9px; border-radius: 999px; flex: none; }
.search-row .flag { flex: none; font-size: 10.5px; font-weight: 800; color: var(--ok); }

/* ============================================================
   Ficha de video
   ============================================================ */
.video-layout { display: grid; grid-template-columns: minmax(0, 1fr) 336px; gap: 24px; align-items: start; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--text-3); font-size: 12.5px; margin-bottom: 12px; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: .45; }
.crumbs .current { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 46ch; }

.title-holder h1 { font-size: clamp(18px, 2.1vw, 24px); font-weight: 850; margin-bottom: 12px; }
.player-wrap { background: #000; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.embed-wrap { position: relative; width: 100%; }
.embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed-block { position: absolute; inset: 0; }
.html5-player { width: 100%; display: block; max-height: 78vh; background: #000; }
.full-cta { margin-top: 14px; }

.video-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 14px; margin-top: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-2); font-size: 13px; }
.video-stats .stat { display: inline-flex; align-items: center; gap: 6px; }
.video-stats .stat svg { width: 16px; height: 16px; }
.video-stats .stat-views { color: var(--text); font-weight: 700; }
.vote-group { margin-left: auto; display: flex; gap: 8px; }
.vote-group form { display: inline; }
.like-btn, .dislike-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-weight: 700; }
.like-btn svg, .dislike-btn svg { width: 15px; height: 15px; }
.like-btn:hover { background: var(--ok); color: #fff; }
.dislike-btn:hover { background: var(--c1); color: #fff; }

.prose { margin-top: 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text-2); line-height: 1.65; font-size: 13.5px; }
.mobile-promo { display: none; margin-top: 14px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 15px; margin-bottom: 16px; }
.panel h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); margin-bottom: 11px; }
.panel--flat { padding: 0; overflow: hidden; }
.promo-box { display: block; border-radius: 10px; overflow: hidden; margin-bottom: 10px; }
.cta-channel { display: block; text-align: center; background: linear-gradient(135deg, var(--c4), var(--c8)); color: #fff; font-weight: 800; padding: 10px 12px; border-radius: 10px; }
.cta-channel:hover { filter: brightness(1.08); }

/* ============================================================
   Botones, paginación y avisos
   ============================================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--surface-2); color: var(--text); font-weight: 700; padding: 10px 16px; border-radius: 11px; font-size: 13px; border: 1px solid transparent; }
.btn:hover { background: var(--surface-3); }
.btn-primary { background: linear-gradient(135deg, var(--c1), var(--c6)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-green { background: linear-gradient(135deg, var(--c4), var(--c8)); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text-2); }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 26px 0 6px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: inline-grid; place-items: center; padding: 0 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); border-radius: 11px; font-weight: 700; font-size: 13.5px; }
.pager a:hover { border-color: var(--border-2); color: var(--text); }
.pager .is-current { background: linear-gradient(135deg, var(--c1), var(--c2)); border-color: transparent; color: #fff; }
.pager .is-disabled { opacity: .35; }
.pager .dots { background: transparent; border-color: transparent; }
.js-infinite-on .pager { display: none; }
.infinite-status { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); padding: 20px 0; }
.spinner { width: 20px; height: 20px; border: 3px solid var(--surface-3); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.alpha-filter { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 18px; }
.alpha-filter a { min-width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0 9px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; color: var(--text-2); font-weight: 700; font-size: 12.5px; }
.alpha-filter a:hover { border-color: var(--border-2); color: var(--text); }
.alpha-filter a.is-active { background: linear-gradient(135deg, var(--c1), var(--c2)); border-color: transparent; color: #fff; }

.empty-note { background: var(--surface); border: 1px dashed var(--border-2); color: var(--text-3); border-radius: var(--radius); padding: 26px; text-align: center; }
.seo-text { margin-top: 34px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; color: var(--text-2); font-size: 13.5px; line-height: 1.7; }
.seo-text h2 { font-size: 15px; color: var(--text); margin-bottom: 9px; }
.static-page { max-width: 880px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 26px; }
.static-page h1 { font-size: 24px; margin-bottom: 14px; }
.static-page h2 { font-size: 16px; margin: 20px 0 8px; }
.static-page p, .static-page li { color: var(--text-2); line-height: 1.7; margin-bottom: 8px; }
.static-page ul { padding-left: 20px; }
.static-page a { color: var(--accent); }

.notice-404 { text-align: center; padding: 48px 0 34px; }
.notice-404 .code { font-size: 86px; font-weight: 900; line-height: 1; background: linear-gradient(96deg, var(--c1), var(--c5), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notice-404 p { color: var(--text-2); margin: 12px 0 20px; }

/* Sitios recomendados */
.grid-aff { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.aff-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.aff-card .ph { position: relative; display: block; aspect-ratio: 16/9; overflow: hidden; background: #000; }
.aff-card .ph .bgblur { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.6); }
.aff-card .ph .fg { position: relative; width: 100%; height: 100%; object-fit: contain; }
.aff-card .body { padding: 11px 12px 13px; }
.aff-card .name { font-weight: 800; font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aff-card .actions { display: flex; gap: 8px; margin-top: 10px; }
.aff-card .actions .btn { padding: 7px 11px; font-size: 12px; }

/* Publicidad */
.ad-slot { margin: 14px 0; text-align: center; }
.ad-slot img { margin: 0 auto; }
.ad-desktop { display: block; }
.ad-mobile { display: none; }

/* El nativo de la rejilla ocupa una celda más, con la misma proporción que
   una tarjeta: así no descoloca la cuadrícula ni desplaza lo que hay debajo
   cuando el anuncio termina de cargar. */
.ad-slot--grid { margin: 0; display: flex; align-items: center; justify-content: center; }
.ad-slot--grid > div { width: 100%; }
.ad-slot--grid::before { content: ""; display: block; padding-top: 56.25%; float: left; }
.ad-slot--grid > div:first-child { min-height: 1px; }

/* Reserva de altura en los huecos de banner, para no empujar el contenido. */
.ad-slot--header .ad-desktop { min-height: 90px; }
.ad-slot--header .ad-mobile { min-height: 100px; }
.ad-slot--footer .ad-desktop { min-height: 90px; }
.ad-slot--footer .ad-mobile { min-height: 250px; }
.ad-slot--single_sidebar { min-height: 250px; }

/* ============================================================
   Footer
   ============================================================ */
.footer { border-top: 1px solid var(--border); background: var(--rail); margin-top: 44px; }
.footer-inner { padding: 30px 0 26px; display: grid; gap: 18px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 22px; }
.footer-cols h4 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.footer-cols a { display: block; color: var(--text-2); font-size: 13px; padding: 3px 0; }
.footer-cols a:hover { color: var(--accent); }
.footer-about { color: var(--text-3); font-size: 12.5px; line-height: 1.65; max-width: 42ch; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-3); font-size: 12px; }
.badge-18 { display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--c1), var(--c6)); color: #fff; font-weight: 900; font-size: 11px; border-radius: 7px; padding: 3px 7px; }
.rta { border: 1px solid var(--border-2); border-radius: 5px; padding: 1px 6px; font-size: 10px; letter-spacing: .1em; }
.footer-bottom .sp { margin-left: auto; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1240px) {
  .video-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1060px) {
  .rail {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 200; transform: translateX(-102%);
    transition: transform .22s ease; width: 282px; max-width: 86vw; box-shadow: var(--shadow);
  }
  .rail.is-open { transform: translateX(0); }
  .burger { display: flex; }
  .topbar .logo-mobile { display: inline-flex; }
  .video-layout { grid-template-columns: 1fr; }
  aside .panel--channel { display: none; }
  .mobile-promo { display: block; }
  .wrap { padding: 0 16px; }
}
@media (max-width: 820px) {
  .grid-videos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .hero { padding: 22px 18px 20px; border-radius: 18px; }
  .search { max-width: none; }
  .top-cta { display: none; }
  .ad-desktop { display: none; }
  .ad-mobile { display: block; }
  .list-item .img-holder { width: 128px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  /* El buscador baja a su propia fila: hamburguesa + logo + tema arriba,
     búsqueda a lo ancho debajo. Así nada empuja el ancho de la página. */
  .topbar-inner { flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 9px; row-gap: 8px; }
  .topbar .logo-mobile { font-size: 17px; }
  .topbar .logo-mobile .dot { width: 6px; height: 6px; }
  .burger { padding: 8px; }
  .icon-btn { width: 36px; height: 36px; }
  .search { order: 5; flex: 1 0 100%; max-width: none; }
  .search-box { padding: 3px 3px 3px 14px; }
  .search-box input { padding: 7px 0; }
  .search-box button { width: 34px; height: 34px; }
}
@media (max-width: 560px) {
  .topbar-inner { gap: 8px; }
  .thumb .title { font-size: 12.5px; }
  .grid-actors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-stats { gap: 8px 16px; }
  .thumb-item-date { display: none; }
  .footer-cols { grid-template-columns: 1fr; }
}
