/* Fayren Task — faixa "AO VIVO" dos streamers (site). Par de site/lives.js.
 * Visual "Forja" do jogo: chumbo (ardósia) + latão/mostarda, títulos em Cinzel;
 * selo AO VIVO vermelho. Tudo escopado em .it-lives / .itl-* (não vaza pra landing).
 * PC: linha de cartões centralizada. Celular (360–412 px): faixa com rolagem
 * horizontal suave (scroll-snap), sangrando até a borda da tela. */

.it-lives {
  --itl-bg: #1c1c1f;
  --itl-panel: #222325;
  --itl-panel-2: #2a2b2d;
  --itl-steel: #565759;
  --itl-steel-hi: #77787a;
  --itl-line: #363739;
  --itl-text: #dcd6c8;
  --itl-muted: #a3a4a6;
  --itl-ink: #f1e1b6;
  --itl-gold: #f0c24b;
  --itl-gold-dim: #b98424;
  --itl-red: #e5322d;
  --itl-red-deep: #a81c17;
  --itl-title-font: "Cinzel", "Marcellus SC", Georgia, serif;
  --itl-cut: 9px;
  --itl-card-w: 272px;
  display: block;
  padding: 30px 0 10px;
  color: var(--itl-text);
}
.it-lives[hidden] { display: none !important; }
.it-lives *, .it-lives *::before, .it-lives *::after { box-sizing: border-box; }

.itl-inner { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---------- cabeçalho ---------- */
.itl-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center;
  gap: 2px 14px; margin: 0 0 14px; padding: 0 0 10px; text-align: center;
  background: linear-gradient(90deg, transparent, var(--itl-gold-dim) 30%, var(--itl-gold) 50%, var(--itl-gold-dim) 70%, transparent) bottom / 100% 1px no-repeat;
}
.itl-heading {
  margin: 0; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--itl-title-font); font-weight: 900; text-transform: uppercase;
  font-size: clamp(20px, 3vw, 27px); letter-spacing: .08em; line-height: 1.15;
  color: var(--itl-ink); text-shadow: 0 1px 0 #000, 0 0 10px rgba(243, 200, 110, .18);
}
.itl-hdot {
  flex: none; width: 10px; height: 10px; border-radius: 50%;
  background: var(--itl-red); box-shadow: 0 0 0 0 rgba(229, 50, 45, .6);
  animation: itl-ring 2s ease-out infinite;
}
.itl-count {
  font: 700 12px/1 system-ui, sans-serif; letter-spacing: .02em; text-shadow: none;
  color: var(--itl-gold); background: var(--itl-panel-2); border: 1px solid var(--itl-steel);
  padding: 4px 8px 3px; border-radius: 2px;
}
.itl-sub { margin: 0; color: var(--itl-muted); font-size: 14px; line-height: 1.4; }

/* ---------- faixa de cartões ---------- */
.itl-track {
  list-style: none; margin: 0 -16px; padding: 6px 16px 16px;
  display: flex; gap: 14px;
  overflow-x: auto; overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: 16px; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--itl-steel) transparent;
}
.itl-track::-webkit-scrollbar { height: 6px; }
.itl-track::-webkit-scrollbar-track { background: transparent; }
.itl-track::-webkit-scrollbar-thumb { background: var(--itl-steel); border-radius: 3px; }
.itl-item { flex: 0 0 auto; width: var(--itl-card-w); scroll-snap-align: start; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
/* centraliza quando cabe; quando transborda as margens auto zeram e a faixa rola do início */
.itl-item:first-child { margin-left: auto; }
.itl-item:last-child { margin-right: auto; }

/* ---------- cartão: moldura de aço chanfrada (latão no hover) ---------- */
.itl-card {
  display: block; height: 100%; padding: 2px;
  color: inherit; text-decoration: none;
  background: linear-gradient(180deg, var(--itl-steel-hi), var(--itl-steel) 40%, #3e3f41);
  clip-path: polygon(var(--itl-cut) 0, calc(100% - var(--itl-cut)) 0, 100% var(--itl-cut), 100% calc(100% - var(--itl-cut)), calc(100% - var(--itl-cut)) 100%, var(--itl-cut) 100%, 0 calc(100% - var(--itl-cut)), 0 var(--itl-cut));
  transition: transform .14s ease, background .14s ease;
  -webkit-tap-highlight-color: transparent;
}
a.itl-card:hover, a.itl-card:focus-visible {
  background: linear-gradient(180deg, #ffe08a, var(--itl-gold) 35%, var(--itl-gold-dim));
  transform: translateY(-2px);
  outline: none;
}
a.itl-card:active { transform: translateY(0); }
.itl-card.is-demo { cursor: default; }
.itl-frame {
  display: flex; flex-direction: column; height: 100%;
  background: linear-gradient(180deg, #2c2d2f 0, var(--itl-panel) 70px, var(--itl-bg) 100%);
  clip-path: polygon(calc(var(--itl-cut) - 1px) 0, calc(100% - var(--itl-cut) + 1px) 0, 100% calc(var(--itl-cut) - 1px), 100% calc(100% - var(--itl-cut) + 1px), calc(100% - var(--itl-cut) + 1px) 100%, calc(var(--itl-cut) - 1px) 100%, 0 calc(100% - var(--itl-cut) + 1px), 0 calc(var(--itl-cut) - 1px));
}

/* preview 16:9 */
.itl-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #121314; border-bottom: 1px solid #0b0b0c; }
.itl-shot { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
a.itl-card:hover .itl-shot { transform: scale(1.04); }
/* sem preview (ou demo): cena desenhada em CSS */
.itl-ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: rgba(241, 225, 182, .6);
  background:
    radial-gradient(circle at 74% 26%, hsl(var(--itl-h, 30) 75% 64% / .55) 0, transparent 30%),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(0, 0, 0, .12) 22px 44px) 0 64% / 100% 36% no-repeat,
    linear-gradient(180deg, hsl(var(--itl-h, 30) 30% 26%) 0, hsl(var(--itl-h, 30) 26% 14%) 64%, #2a3622 64%, #1a2314 100%);
}
.itl-ph svg { width: 44px; height: 44px; padding: 8px; border: 2px solid currentColor; border-radius: 50%; background: rgba(0, 0, 0, .28); }

/* selo AO VIVO (pulsa discretamente) */
.itl-badge {
  position: absolute; top: 8px; left: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 7px 3px 6px; border-radius: 2px;
  background: linear-gradient(180deg, #f0473f, var(--itl-red) 55%, var(--itl-red-deep));
  color: #fff; font: 800 11px/1 system-ui, sans-serif; letter-spacing: .1em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.itl-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: itl-blink 1.8s ease-in-out infinite; }

.itl-viewers {
  position: absolute; left: 8px; bottom: 8px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 7px; border-radius: 2px;
  background: rgba(12, 12, 14, .8); color: #efe7d6;
  font: 600 12px/1.2 system-ui, sans-serif;
}
.itl-vi { display: inline-flex; color: var(--itl-red); }

/* marca de EXEMPLO (só no ?lives=demo) */
.itl-sample {
  position: absolute; top: 8px; right: 8px;
  padding: 3px 7px; border-radius: 2px;
  background: var(--itl-gold); color: #2a1a06;
  font: 800 10.5px/1.1 system-ui, sans-serif; letter-spacing: .14em;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .5);
}

/* nome + título */
.itl-meta { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px 12px; }
.itl-ava {
  flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--itl-red); box-shadow: 0 0 0 2px var(--itl-bg);
  background: var(--itl-panel-2);
}
.itl-ava-fb {
  display: grid; place-items: center;
  background: linear-gradient(160deg, hsl(var(--itl-h, 30) 42% 46%), hsl(var(--itl-h, 30) 38% 24%));
  color: var(--itl-ink); font: 700 14px/1 var(--itl-title-font); letter-spacing: .02em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .6);
}
.itl-txt { display: block; min-width: 0; flex: 1; }
.itl-name {
  display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font-family: var(--itl-title-font); font-weight: 700; font-size: 14.5px; line-height: 1.3;
  color: var(--itl-ink); letter-spacing: .02em;
}
.itl-title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden; margin-top: 2px; min-height: calc(2 * 1.35em);
  font-size: 13px; line-height: 1.35; color: var(--itl-muted); overflow-wrap: anywhere;
}
a.itl-card:hover .itl-name, a.itl-card:focus-visible .itl-name { color: var(--itl-gold); }

/* ---------- celular ---------- */
@media (max-width: 720px) {
  .it-lives { --itl-card-w: min(78vw, 290px); padding-top: 24px; }
  .itl-head { justify-content: flex-start; text-align: left; background-size: 100% 1px; background-image: linear-gradient(90deg, var(--itl-gold), var(--itl-gold-dim) 40%, transparent); }
  .itl-sub { flex-basis: 100%; font-size: 13.5px; }
  .itl-track {
    gap: 12px;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 26px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 26px), transparent 100%);
  }
  .itl-track::-webkit-scrollbar { display: none; }
  .itl-track { scrollbar-width: none; }
}

@keyframes itl-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes itl-ring {
  0% { box-shadow: 0 0 0 0 rgba(229, 50, 45, .6); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(229, 50, 45, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .itl-hdot, .itl-dot { animation: none; }
  .itl-card, .itl-shot { transition: none; }
  a.itl-card:hover, a.itl-card:focus-visible { transform: none; }
  a.itl-card:hover .itl-shot { transform: none; }
  .itl-track { scroll-behavior: auto; }
}
