/* ===== Live banner, community join box, series ===== */

/* Live / premiere bar (above the header) */
.live-bar { position: relative; z-index: 41; background: linear-gradient(90deg, #8f0b0b, #c4160f 50%, #8f0b0b); color: #fff; }
.live-bar[hidden] { display: none; }
.live-row { display: flex; align-items: center; gap: 12px; min-height: 46px; padding-block: 6px; }
.live-tag { flex: none; font-size: .72rem; font-weight: 800; letter-spacing: .08em; padding: 3px 9px; border-radius: 4px; background: #fff; color: #c4160f; animation: livePulse 1.6s ease-in-out infinite; }
.live-tag-soon { background: rgba(255,255,255,.18); color: #fff; animation: none; }
@keyframes livePulse { 50% { opacity: .55; } }
.live-title { flex: 1; min-width: 0; font: 600 .92rem/1.3 var(--f-te); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-count { flex: none; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9rem; padding: 3px 10px; border-radius: 6px; background: rgba(0,0,0,.25); }
.live-actions { display: flex; gap: 8px; flex: none; }
.live-bar .btn-yt { background: #fff; color: #c4160f; box-shadow: none; }
.live-bar .btn-yt:hover { background: #ffe9e7; color: #a30f09; }
.live-bar .btn-ghost { border-color: rgba(255,255,255,.4); background: transparent; color: #fff; }
.live-x { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(0,0,0,.2); color: #fff; cursor: pointer; }
.live-x .ico { width: 15px; height: 15px; }

/* WhatsApp / Telegram join box */
.community {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  margin-block: 48px; padding: 22px 26px; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, rgba(37,211,102,.14), rgba(42,163,222,.12)); border: 1px solid rgba(37,211,102,.35);
}
.community-copy strong { display: block; font: 700 1.2rem/1.35 var(--f-te); color: #fff; }
.community-copy p { margin-top: 4px; color: #cfd6e2; font-size: .95rem; }
.community-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-wa { background: #25d366; color: #06310f; }
.btn-wa:hover { background: #3be27a; color: #06310f; }
.btn-tg { background: #2aa3de; color: #fff; }
.btn-tg:hover { background: #45b4ea; color: #fff; }
.community-compact { margin-block: 18px 0; padding: 12px 16px; }
.community-compact .community-copy strong { font-size: 1rem; }
.community-compact .btn { padding: .55em .9em; font-size: .85rem; }

/* Series cards */
.s-card .s-thumb { position: relative; display: block; aspect-ratio: 16/9; margin-top: 8px; }
.s-card .s-thumb img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.s-card .s-stack, .s-card .s-thumb::before { content: ""; position: absolute; left: 6%; right: 6%; top: -6px; height: 20px; border-radius: var(--radius) var(--radius) 0 0; background: #1d3358; z-index: 1; }
.s-card .s-thumb::before { left: 12%; right: 12%; top: -11px; background: #152742; z-index: 0; }
.s-count { position: absolute; z-index: 3; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 4px; background: rgba(0,0,0,.8); color: #fff; }
.s-count .ico { width: 13px; height: 13px; }
.s-progress { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.25); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; }
.s-progress i { display: block; height: 100%; width: 0; background: var(--yt); }
.s-progress.big { position: static; display: block; height: 6px; border-radius: 999px; }
.s-title { margin-top: 12px; font: 700 1.05rem/1.4 var(--f-te); }
.s-title a:hover { color: var(--gold); }
.s-done { color: #7ee0a0; }

/* Series page hero */
.s-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.s-hero::before { content: ""; position: absolute; inset: -40px; background: var(--s-img) center / cover; filter: blur(40px) brightness(.35); transform: scale(1.1); }
.s-hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 36px; align-items: center; padding-block: 48px; }
.s-hero-cover img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius-lg); box-shadow: 0 24px 60px -20px #000; border: 1px solid var(--line); }
.s-hero-copy { display: grid; gap: 10px; align-content: start; }
.s-hero-title { font: 800 clamp(1.7rem, 1.2rem + 2vw, 2.6rem)/1.25 var(--f-te); color: #fff; }
.s-hero-en { color: var(--gold-soft); font-family: var(--f-en); }
.s-progress-wrap { display: grid; gap: 6px; max-width: 360px; }
.s-progress-wrap small { color: var(--muted); font-size: .82rem; }
.s-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.s-desc { color: #cfd6e2; font-size: .95rem; line-height: 1.75; max-width: 70ch; margin-top: 6px; }

/* Episode list */
.ep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ep a { display: grid; grid-template-columns: 36px 180px 1fr 44px; gap: 16px; align-items: center; padding: 10px 14px 10px 8px; border-radius: var(--radius); border: 1px solid transparent; }
.ep a:hover { background: var(--night-2); border-color: var(--line-soft); color: inherit; }
.ep-num { text-align: center; font-weight: 700; font-size: 1.05rem; color: var(--muted); }
.ep-thumb, .next-thumb { position: relative; }
.ep-thumb { aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--panel); }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-check { position: absolute; left: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; display: none; place-items: center; background: #22a35a; color: #fff; font-size: .75rem; font-weight: 800; z-index: 2; }
.is-watched .ep-check { display: grid; }
.is-watched .ep-thumb img, .is-watched .next-thumb img { opacity: .6; }
.ep-text { display: grid; gap: 4px; min-width: 0; }
.ep-text strong { font-weight: 600; line-height: 1.4; }
.ep-text small { color: var(--muted); font-size: .8rem; }
.ep-watched { display: none; color: #7ee0a0; }
.is-watched .ep-watched { display: inline; }
.ep-play { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(242,106,27,.15); color: var(--saffron-hi); }
.ep-play .ico { width: 16px; height: 16px; }
.ep a:hover .ep-play { background: var(--saffron); color: #fff; }

/* Watch page: series bar, prev/next, side list */
.ser-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 14px; border-radius: var(--radius); background: var(--night-2); border: 1px solid var(--line-soft); }
.ser-name { display: inline-flex; align-items: center; gap: 8px; font: 600 .95rem/1.3 var(--f-te); color: var(--gold); }
.ser-name .ico { width: 16px; height: 16px; }
.ser-pos { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.ser-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ser-btn { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--night-2); font-size: .9rem; line-height: 1.35; }
.ser-btn small { display: block; color: var(--muted); font-size: .76rem; margin-bottom: 2px; }
.ser-btn .ico { flex: none; color: var(--saffron-hi); }
.ser-btn:hover { border-color: var(--gold); color: inherit; }
.ser-next { justify-content: flex-end; text-align: right; }
.ser-done { background: rgba(80,190,120,.1); border-color: rgba(80,190,120,.4); }
.ser-side h2 small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.ser-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 70vh; overflow-y: auto; }
.ser-list .next-item { padding: 6px; border-radius: 8px; }
.ser-list li.is-now .next-item { background: rgba(242,106,27,.14); }
.ser-list li.is-now strong { color: var(--saffron-hi); }

@media (max-width: 860px) {
  .s-hero-inner { grid-template-columns: 1fr; padding-block: 28px; }
  .ep a { grid-template-columns: 28px 120px 1fr; gap: 10px; }
  .ep-play { display: none; }
  .ser-nav { grid-template-columns: 1fr; }
  .ser-next { justify-content: space-between; text-align: left; }
  .live-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .84rem; }
  .live-cal { display: none; }
}
@media (max-width: 600px) {
  .live-row { flex-wrap: wrap; gap: 6px 10px; }
  .live-title { flex-basis: calc(100% - 120px); }
  .live-actions { order: 5; flex-basis: 100%; }
  .live-x { position: absolute; right: 8px; top: 8px; }
  .community { padding: 18px; }
  .community-btns, .community-btns .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .live-tag { animation: none; } }
