/* Thiraimax — modern dark episode page (inc-tx8.php, single-tx8.php). 1 Nov 2026.
   Restyles the old page's own blocks (tx-*, tx3-*, tx5-*, tx6-*); colours from the --tx2-* tokens (body.tx-dark). */

body.tx8-page .tx8 { max-width: 1040px; margin: 0 auto; padding: 24px 20px 64px; box-sizing: border-box; }
body.tx8-page .tx8 *, body.tx8-page .tx8 *::before, body.tx8-page .tx8 *::after { box-sizing: border-box; }

/* --- Schedule banner: in the column, not full-bleed --- */
body.tx8-page .thiraimax-single > .tx6-banner { width: 100%; left: 0; transform: none; margin: 0 0 20px; }

/* --- Player (poster link to tdn24) --- */
body.tx8-page .tx8-player {
  display: block; position: relative; max-width: none; margin: 0 0 24px; aspect-ratio: 16 / 9;
  border-radius: 18px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px var(--tx2-line), 0 24px 60px rgba(0,0,0,.45);
}
body.tx8-page .tx8-player img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,.7,.2,1), filter .3s; }
body.tx8-page .tx8-player:hover img { transform: scale(1.03); filter: brightness(.88); }
body.tx8-page .tx8-player:focus-visible { outline: 3px solid var(--tx2-accent); outline-offset: 3px; }
body.tx8-page .tx8-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 28%, rgba(0,0,0,0) 55%, rgba(0,0,0,.78) 100%); pointer-events: none; }
body.tx8-page .tx-hd-badge, body.tx8-page .tx-ep-badge {
  top: 16px; z-index: 2; background: rgba(11,11,16,.72); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.18); color: #fff; font-size: 12px; font-weight: 800; padding: 6px 11px; border-radius: 8px;
}
body.tx8-page .tx-play-btn {
  z-index: 2; width: 84px; height: 84px; background: rgba(255,255,255,.95); border: 0; color: #0b0b10;
  box-shadow: 0 12px 34px rgba(0,0,0,.45); backdrop-filter: none;
}
body.tx8-page .tx-play-btn svg { width: 34px; height: 34px; margin-left: 4px; }
body.tx8-page .tx8-player:hover .tx-play-btn { transform: scale(1.08); background: #fff; }
body.tx8-page .tx8-watch-label {
  position: absolute; left: 20px; bottom: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  color: #fff; font-size: 16px; font-weight: 800; text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
body.tx8-page .tx8-watch-label svg { width: 16px; height: 16px; }

/* --- Title block --- */
body.tx8-page .tx-hero {
  position: static; left: auto; width: auto; max-width: none; transform: none;
  background: none; border: 0; border-radius: 0; padding: 0; margin: 0 0 22px;
}
body.tx8-page .tx-eyebrow { background: rgba(230,57,80,.15); color: #ff6b7f; border: 1px solid rgba(230,57,80,.4); font-size: 11px; letter-spacing: .1em; padding: 6px 12px; }
body.tx8-page .tx-hero-title { color: var(--tx2-text); font-size: clamp(28px, 4vw, 42px); letter-spacing: -.02em; margin: 14px 0 6px; }
body.tx8-page .tx-hero-sub { color: var(--tx2-text); opacity: .9; font-size: clamp(18px, 2.4vw, 22px); margin: 0 0 14px; }
body.tx8-page .tx-accent { color: #ff6b7f; }
body.tx8-page .tx-lede, body.tx8-page .tx-episode-blurb { color: var(--tx2-muted); font-size: 15px; }
body.tx8-page .tx-episode-blurb strong, body.tx8-page .tx-lede strong { color: var(--tx2-text); }
body.tx8-page .tx-episode-blurb { margin-bottom: 18px; }

body.tx8-page .tx-factbar {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
  background: none; border: 0; border-radius: 0; overflow: visible;
}
body.tx8-page .tx-fact {
  text-align: left; padding: 14px 16px; border: 1px solid var(--tx2-line); border-radius: 14px; background: var(--tx2-surface);
}
body.tx8-page .tx-fact-label { margin-top: 0; color: var(--tx2-muted); font-size: 11px; letter-spacing: .1em; }
body.tx8-page .tx-fact-value { color: var(--tx2-text); font-size: 15px; margin-top: 4px; }
body.tx8-page .tx-fact-value a { color: var(--tx2-text) !important; }
body.tx8-page .tx-fact-value a:hover { color: #ff6b7f !important; }

/* --- Next episode button (inc-tx3.php) --- */
body.tx8-page .tx3-next-wrap { max-width: none; margin: 0 0 18px; }
body.tx8-page .tx3-next { background: linear-gradient(135deg, #d92e46, #e8452f); border-radius: 16px; box-shadow: 0 12px 30px rgba(230,57,80,.28); }
body.tx8-page .tx3-next.is-latest { background: var(--tx2-surface); color: var(--tx2-text) !important; border: 1px solid var(--tx2-line); box-shadow: none; }
body.tx8-page .tx3-next.is-latest .tx3-next-icon { background: rgba(52,199,123,.15); color: #3ccf86; }
body.tx8-page .tx3-next.is-latest .tx3-next-title { color: var(--tx2-muted); }

/* --- WhatsApp + report (inc-tx5.php) --- */
body.tx8-page .tx5-tools { max-width: none; margin: 0 0 12px; }
body.tx8-page .tx5-wa.is-follow { background: transparent; color: #3ccf86 !important; border-color: rgba(60,207,134,.6); }
body.tx8-page .tx5-report { max-width: none; margin: 0 0 26px; }
body.tx8-page .tx5-report-open { background: transparent; color: var(--tx2-muted); border-color: var(--tx2-line); }
body.tx8-page .tx5-report-open:hover { color: var(--tx2-text); border-color: var(--tx2-muted); }
body.tx8-page .tx5-report-panel { background: var(--tx2-surface); border-color: var(--tx2-line); }
body.tx8-page .tx5-report-q { color: var(--tx2-text); }
body.tx8-page .tx5-reason { background: var(--tx2-surface-2); color: var(--tx2-text); border-color: var(--tx2-line); }
body.tx8-page .tx5-report-done { background: rgba(52,199,123,.14); color: #3ccf86; }

/* --- All episodes list (inc-tx3.php) --- */
body.tx8-page .tx3-eplist { max-width: none; margin: 0 0 28px; background: var(--tx2-surface); border: 1px solid var(--tx2-line); border-radius: 18px; }
body.tx8-page .tx3-eplist-head { border-bottom-color: var(--tx2-line); padding: 18px 20px 14px; }
body.tx8-page .tx3-eplist-head h3 { color: var(--tx2-text); }
body.tx8-page .tx3-eplist-head span { color: var(--tx2-muted); }
body.tx8-page .tx3-eplist-items { max-height: 520px; padding: 8px; }
body.tx8-page .tx3-ep { color: var(--tx2-text) !important; transition: background .15s; }
body.tx8-page .tx3-ep:hover { background: var(--tx2-surface-2); }
body.tx8-page .tx3-ep.is-current { background: var(--tx2-surface-2); box-shadow: inset 3px 0 0 var(--tx2-accent); }
body.tx8-page .tx3-ep-num, body.tx8-page .tx3-ep-date, body.tx8-page .tx3-ep-state { color: var(--tx2-muted); }
body.tx8-page .tx3-ep.is-current .tx3-ep-num, body.tx8-page .tx3-ep.is-current .tx3-ep-state { color: #ff6b7f; }
body.tx8-page .tx3-ep.is-seen .tx3-ep-state { color: #3ccf86; }
body.tx8-page .tx3-ep-thumb { background: var(--tx2-surface-2); }

/* --- Previous / All / Next --- */
body.tx8-page .tx-continue { background: var(--tx2-surface); border: 1px solid var(--tx2-line); border-radius: 18px; }
body.tx8-page .tx-continue::before { background: linear-gradient(90deg, #e63950, #ff6b3d); }
body.tx8-page .tx-continue-pill { background: rgba(230,57,80,.15); color: #ff6b7f; border: 1px solid rgba(230,57,80,.4); }
body.tx8-page .tx-continue-series { color: var(--tx2-text); }
body.tx8-page .tx-nav-side { background: var(--tx2-surface-2); border-color: var(--tx2-line); color: var(--tx2-text); transition: border-color .15s, background .15s; }
body.tx8-page .tx-nav-side:hover { box-shadow: none; border-color: rgba(230,57,80,.55); }
body.tx8-page .tx-nav-label { color: #ff6b7f; }
body.tx8-page .tx-nav-date { color: var(--tx2-muted); }
body.tx8-page .tx-nav-all { background: linear-gradient(135deg, #d92e46, #e8452f); }

/* --- SEO text, details, about, chips --- */
body.tx8-page .tx-seo-para { color: var(--tx2-muted); font-size: 14px; }
body.tx8-page .tx-seo-para strong { color: var(--tx2-text); }
body.tx8-page .tx-panel { background: var(--tx2-surface); border: 1px solid var(--tx2-line); }
body.tx8-page .tx-panel h3 { color: var(--tx2-text); font-size: 19px; }
body.tx8-page .tx-panel p, body.tx8-page .tx-dl span:last-child { color: var(--tx2-muted); }
body.tx8-page .tx-dl strong { color: var(--tx2-text); }
body.tx8-page .tx-colon { color: var(--tx2-muted); }
body.tx8-page .tx-chip { background: transparent; border: 1px solid var(--tx2-line); color: var(--tx2-muted); }
body.tx8-page a.tx-chip { color: #ff6b7f; border-color: rgba(230,57,80,.45); }
body.tx8-page a.tx-chip:hover { background: var(--tx2-accent); color: #fff; border-color: var(--tx2-accent); }

/* --- Keep watching --- */
body.tx8-page .tx-keep-head { color: var(--tx2-text); font-size: 20px; letter-spacing: -.01em; }
body.tx8-page .thiraimax-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
body.tx8-page .thiraimax-card { background: transparent; box-shadow: none; color: var(--tx2-text); border-radius: 0; overflow: visible; }
body.tx8-page .thiraimax-card:hover { transform: none; box-shadow: none; }
body.tx8-page .thiraimax-card-thumb { border-radius: 14px; background: var(--tx2-surface-2); box-shadow: 0 0 0 1px var(--tx2-line); }
body.tx8-page .thiraimax-card-thumb img { transition: transform .45s cubic-bezier(.2,.7,.2,1); }
body.tx8-page .thiraimax-card:hover .thiraimax-card-thumb img { transform: scale(1.05); }
body.tx8-page .thiraimax-card-title { padding: 10px 2px 0; font-size: 14px; font-weight: 700; }
body.tx8-page .thiraimax-badge { background: rgba(11,11,16,.72); backdrop-filter: blur(6px); border-radius: 7px; right: auto; left: 10px; top: auto; bottom: 10px; }

/* --- Light mode (visitors who chose it on the home page) --- */
html.tx-light body.tx8-page .tx-accent, html.tx-light body.tx8-page .tx-nav-label,
html.tx-light body.tx8-page .tx3-ep.is-current .tx3-ep-num, html.tx-light body.tx8-page .tx3-ep.is-current .tx3-ep-state,
html.tx-light body.tx8-page a.tx-chip, html.tx-light body.tx8-page .tx-eyebrow, html.tx-light body.tx8-page .tx-continue-pill { color: #c42840; }
html.tx-light body.tx8-page .tx3-ep.is-seen .tx3-ep-state { color: #137a46; }

/* --- Preview badge (only while previewing) --- */
.tx8-flag {
  position: fixed; left: 16px; bottom: 16px; z-index: 9999; display: flex; align-items: center; gap: 10px;
  background: #f2b544; color: #1a1306; font: 800 13px/1 "Manrope", system-ui, sans-serif;
  padding: 10px 12px 10px 14px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.35);
}
.tx8-flag a { color: #1a1306 !important; text-decoration: underline !important; font-weight: 700; }

/* --- Phone --- */
@media (max-width: 640px) {
  body.tx8-page .tx8 { padding: 0 0 48px; }
  body.tx8-page .tx8 > *:not(.tx8-player) { margin-left: 16px; margin-right: 16px; }
  body.tx8-page .thiraimax-single > .tx6-banner { width: auto; margin-top: 12px; }
  body.tx8-page .tx8-player { border-radius: 0; box-shadow: none; margin-bottom: 18px; }
  body.tx8-page .tx-play-btn { width: 64px; height: 64px; }
  body.tx8-page .tx-play-btn svg { width: 26px; height: 26px; }
  body.tx8-page .tx8-watch-label { left: 14px; bottom: 12px; font-size: 14px; }
  body.tx8-page .tx-factbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.tx8-page .tx-fact { border-bottom: 1px solid var(--tx2-line); }
  body.tx8-page .tx3-eplist-items { max-height: none; }
  body.tx8-page .thiraimax-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0; }
  body.tx8-page .thiraimax-card-title { font-size: 13px; }
}
