/*
Theme Name: Tesoflix MovieBox
Theme URI: https://example.com/
Author: ChatGPT
Description: Mobile-first MovieBox-style theme designed to work with the Tesoflix Core plugin (movies/series/episodes + tfx_player).
Version: 1.0.9
Text Domain: tesoflix-moviebox
*/

:root{
  --bg:#0b0f19;
  --panel: rgba(255,255,255,.06);
  --panel2: rgba(255,255,255,.10);
  --text:#e9efff;
  --muted: rgba(167,178,214,.92);
  --line: rgba(255,255,255,.10);
  --shadow: 0 12px 40px rgba(0,0,0,.45);
  --r:22px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background: radial-gradient(1200px 900px at 20% -10%, rgba(255,0,0,.12), transparent 60%),
              radial-gradient(1000px 800px at 80% 0%, rgba(255,208,0,.10), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  -webkit-font-smoothing: antialiased;
}
a{color:inherit;text-decoration:none}
a:hover{opacity:.95}
img{max-width:100%;height:auto;display:block}

.tfx-wrap{min-height:100vh; padding-bottom:84px;} /* room for bottom nav */

/* Top bar */
.tfx-topbar{
  position: sticky; top:0; z-index: 999;
  background: rgba(10,14,25,.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.tfx-topbar__inner{
  max-width: 1180px; margin:0 auto; padding: 12px 14px;
  display:flex; align-items:center; gap:12px; justify-content:space-between;
}
.tfx-brand{display:flex; align-items:center; gap:10px; font-weight:950; letter-spacing:.2px}
.tfx-brand__dot{width:10px;height:10px;border-radius:999px;background:#e40000; box-shadow: 0 0 0 4px rgba(228,0,0,.16)}

.tfx-search{
  flex:1; max-width: 560px;
  display:flex; align-items:center; gap:10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 10px 12px;
}
.tfx-search input{
  width:100%; border:0; outline:0; background: transparent;
  color: var(--text); font-weight:800;
}
.tfx-search input::placeholder{color: rgba(167,178,214,.8); font-weight:700}

.tfx-actions{display:flex; gap:10px; align-items:center;}

/* Buttons (align to plugin modal buttons) */
.tfx-btn, .tfx-btn:visited{
  display:inline-flex; align-items:center; justify-content:center;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #fff; font-weight: 900;
}
.tfx-btn:hover{background: rgba(255,255,255,.10)}
.tfx-btn--primary{
  border-color: rgba(255,0,0,.55);
  background: rgba(228,0,0,.16);
}
.tfx-btn--primary:hover{background: rgba(228,0,0,.22)}

/* Sections */
.tfx-container{max-width:1180px;margin:0 auto;padding: 14px;}
.tfx-hero{
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
  overflow:hidden;
}
.tfx-hero__inner{padding: 18px; display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap}
.tfx-hero h1{margin:0; font-size: 26px; font-weight: 950;}
.tfx-hero p{margin:6px 0 0; color: var(--muted); font-weight: 800; line-height: 1.5; max-width: 62ch;}

.tfx-section{margin-top: 16px;}
.tfx-section__head{display:flex; align-items:end; justify-content:space-between; gap:10px; margin: 10px 0;}
.tfx-section__title{margin:0;font-size:18px;font-weight:950;}
.tfx-section__sub{margin:0;color:var(--muted);font-weight:800;font-size:13px}

/* Grid cards */
.tfx-grid{display:grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr));}
@media (min-width: 680px){ .tfx-grid{grid-template-columns: repeat(4, minmax(0, 1fr));} }
@media (min-width: 1040px){ .tfx-grid{grid-template-columns: repeat(6, minmax(0, 1fr));} }

.tfx-card{
  border-radius: 6px;
  background: transparent;
  border: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.tfx-card__poster{
  aspect-ratio: 2/3;
  background: rgba(255,255,255,.04);
  position: relative;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
}
.tfx-card__poster img{width:100%;height:100%;object-fit:cover;display:block}
.tfx-card__footer{
  background: rgba(0,0,0,.55);
  padding: 7px 8px;
  border-radius: 0 0 6px 6px;
}
.tfx-card__title{
  display:block;
  margin:0;
  font-weight:700;
  font-size:13px;
  line-height:1.25;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tfx-card__badge{
  position:absolute; left:8px; top:8px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.16);
}


/* Player page */
.tfx-playerwrap{
  border-radius: 22px;
  overflow:hidden;
  background:#000;
  border: 1px solid rgba(255,255,255,.12);
}
.tfx-playerwrap video{width:100%;height:auto;display:block; background:#000}

.tfx-panel{
  margin-top: 12px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  padding: 14px;
}
.tfx-kv{display:flex; gap:12px; align-items:flex-start}
.tfx-kv__poster{width: 96px; flex: 0 0 96px; border-radius: 18px; overflow:hidden; border:1px solid rgba(255,255,255,.10)}
.tfx-kv__poster img{width:100%;height:100%;object-fit:cover; aspect-ratio:2/3}
.tfx-kv__main{flex:1}
.tfx-kv__title{margin:0; font-size: 18px; font-weight: 950;}
.tfx-kv__desc{margin:8px 0 0; color: var(--muted); font-weight: 800; line-height:1.55}
.tfx-kv__actions{margin-top:12px; display:flex; gap:10px; flex-wrap:wrap}

/* Episode list */
.tfx-episodes{display:grid; gap:10px;}
.tfx-episode{
  display:flex; gap:12px; align-items:center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}
.tfx-episode__n{font-weight:950; opacity:.95}
.tfx-episode__t{font-weight:950}
.tfx-episode__m{color:var(--muted);font-weight:800;font-size:12px;margin-top:4px}

/* Bottom nav (mobile app feel) */
.tfx-bottomnav{
  position: fixed; left:0; right:0; bottom:0; z-index: 999;
  background: rgba(10,14,25,.75);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.tfx-bottomnav__inner{
  max-width: 900px; margin: 0 auto;
  display:flex; gap: 6px; padding: 10px 10px;
}
.tfx-bottomnav a{
  flex:1; text-align:center;
  padding: 10px 8px;
  border-radius: 18px;
  border: 1px solid transparent;
  color: rgba(220,230,255,.92);
  font-weight: 900;
  background: transparent;
}
.tfx-bottomnav a.is-active{
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
}

/* WP core */
.wp-block{max-width:100%}


body:not(.logged-in) .tfx-open-pricing{display:none!important;}
.tfx-card__footer{
  padding: 8px 8px 10px;
  background: rgba(0,0,0,.18);
}



/* Auth pages */
.tfx-page.tfx-auth{padding:24px 12px;}
.tfx-auth-card{
  max-width:420px;
  margin:0 auto;
  background:rgba(10,12,16,.75);
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  padding:18px;
  backdrop-filter: blur(12px);
}
.tfx-auth-title{margin:0 0 12px;font-size:22px;font-weight:900;}
.tfx-form label{display:block;margin:10px 0;}
.tfx-form label span{display:block;font-size:13px;opacity:.75;margin-bottom:6px;}
.tfx-form input[type="text"],
.tfx-form input[type="email"],
.tfx-form input[type="password"],
.tfx-form input[type="search"]{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.35);
  color:#fff;
  outline:none;
}
.tfx-form-row{display:flex;align-items:center;gap:10px;margin:12px 0;}
.tfx-btn--block{width:100%;}
.tfx-auth-links{display:flex;justify-content:space-between;gap:12px;margin-top:12px;font-size:13px;opacity:.85;}
.tfx-auth-links a{white-space:nowrap;}
.tfx-auth-note{margin:14px 0 0;opacity:.6;font-size:12px;}
.tfx-alert{padding:10px 12px;border-radius:12px;margin:10px 0;font-size:13px;}
.tfx-alert--error{background:rgba(255,0,0,.15);border:1px solid rgba(255,0,0,.25);}
.tfx-alert--ok{background:rgba(0,200,120,.12);border:1px solid rgba(0,200,120,.22);}


/* WooCommerce (ensure checkout/order-pay renders correctly on dark theme) */
.woocommerce, .woocommerce-page{color: var(--text);}
.woocommerce a{color: var(--text);}
.woocommerce form .form-row label{color: var(--muted); font-weight:800;}
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="password"],
.woocommerce input[type="tel"],
.woocommerce input[type="number"],
.woocommerce textarea,
.woocommerce select{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.35);
  color:#fff;
  outline:none;
}
.woocommerce .woocommerce-error,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-message{
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  color: var(--text);
  border-radius: 14px;
}
.woocommerce #payment, .woocommerce-checkout #payment{
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
}
.woocommerce table.shop_table{
  background: rgba(255,255,255,.03);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  overflow:hidden;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td{border-color: rgba(255,255,255,.10);}
.woocommerce button.button, .woocommerce a.button, .woocommerce input.button{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 900;
}
.woocommerce button.button:hover, .woocommerce a.button:hover, .woocommerce input.button:hover{
  background: rgba(255,255,255,.12);
}


/* === Player polish (MovieBox-like) === */
.tfx-playerwrap{
  border-radius: 6px !important;
  overflow: hidden;
  background: #000;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}
.tfx-playerwrap iframe,
.tfx-playerwrap video,
.tfx-playerwrap .wp-video,
.tfx-playerwrap .mejs-container{
  border-radius: 0 !important;
  overflow: hidden;
}

/* Make title/action panel compact under player */
.tfx-kv{
  gap: 14px;
}
.tfx-kv__poster{
  width: 92px;
  flex: 0 0 92px;
}
.tfx-kv__poster img{
  border-radius: 6px !important;
}
.tfx-kv__title{
  font-size: 20px;
  line-height: 1.2;
  margin: 0;
}
.tfx-kv__actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}
.tfx-kv__actions .tfx-btn{
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
}

/* Sticky mini-player on scroll (mobile/tablet) */
.tfx-playerwrap.is-sticky{
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(var(--tfx-topbar-h, 64px) + 10px);
  z-index: 9999;
  border-radius: 8px !important;
}
.tfx-playerwrap.is-sticky .tfx-sticky-label{
  display:none;
}
.tfx-playerwrap.is-sticky iframe,
.tfx-playerwrap.is-sticky video{
  height: 190px !important;
}
@media (min-width: 992px){
  .tfx-playerwrap.is-sticky{
    left: auto;
    right: 20px;
    width: 420px;
  }
}

/* Spacer to avoid jump when sticky */
.tfx-player-spacer{
  height: 0px;
}


/* ---- Player paywall / membership notice: mobile-app sized typography ---- */
.tfx-playerwrap .tfx-lock,
.tfx-playerwrap .tfx-locked,
.tfx-playerwrap .tfx-paywall,
.tfx-playerwrap [class*="lock"],
.tfx-playerwrap [class*="paywall"],
.tfx-playerwrap [class*="access"],
.tfx-container [class*="Access Locked"],
.tfx-container .tfx-access,
.tfx-container .tfx-access-card,
.tfx-container .tfx-lock-card{
  font-size: 14px;
  line-height: 1.35;
}

.tfx-playerwrap .tfx-lock h1,
.tfx-playerwrap .tfx-lock h2,
.tfx-playerwrap .tfx-lock h3,
.tfx-playerwrap .tfx-locked h1,
.tfx-playerwrap .tfx-locked h2,
.tfx-playerwrap .tfx-locked h3,
.tfx-playerwrap .tfx-paywall h1,
.tfx-playerwrap .tfx-paywall h2,
.tfx-playerwrap .tfx-paywall h3{
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 10px;
}

.tfx-playerwrap .tfx-lock p,
.tfx-playerwrap .tfx-locked p,
.tfx-playerwrap .tfx-paywall p{
  margin: 0 0 10px;
  font-size: 14px;
}

/* reduce buttons inside lock notice */
.tfx-playerwrap .tfx-lock .button,
.tfx-playerwrap .tfx-locked .button,
.tfx-playerwrap .tfx-paywall .button,
.tfx-playerwrap .tfx-lock a.button,
.tfx-playerwrap .tfx-locked a.button,
.tfx-playerwrap .tfx-paywall a.button{
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
}

/* sticky mini-player: keep sharp rectangle */
.tfx-playerwrap{
  border-radius: 8px !important;
  overflow: hidden;
}
.tfx-playerwrap iframe,
.tfx-playerwrap video{
  border-radius: 8px !important;
}
.tfx-playerwrap.is-sticky{
  border-radius: 8px !important;
}
/* Tighten front page spacing below header */
.tfx-frontpage {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.tfx-frontpage>.tfx-section--first {
    padding-top: 8px !important;
    margin-top: 0 !important;
}

.tfx-frontpage>.tfx-section--first .tfx-section__head {
    margin-top: 0 !important;
}

/* If container adds spacing through first-child rules */
.tfx-frontpage>.tfx-section--first .tfx-section__title {
    margin-top: 0 !important;
}

.tfx-frontpage>.tfx-section--first .tfx-section__sub {
    margin-top: 4px;
}

/* In case the general section class has large top spacing */
.tfx-section {
    margin-top: 0;
}

.tfx-section+.tfx-section {
    margin-top: 24px;
}
/* Remove extra bottom space on homepage */
.tfx-frontpage,
.tfx-container {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove bottom gap under the last homepage section */
.tfx-frontpage>.tfx-section:last-child,
.tfx-container>.tfx-section:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove bottom gap under the last grid */
.tfx-frontpage>.tfx-section:last-child .tfx-grid,
.tfx-container>.tfx-section:last-child .tfx-grid {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Tighten page content above bottom nav */
body.home .site-main,
body.home main,
body.home .content-area,
body.home .site-content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Make bottom nav sit tighter */
.tfx-bottomnav {
    margin-top: 0px !important;
}
body.home .tfx-section:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}








.tfx-article{
  max-width: 860px;
  margin: 24px auto 40px;
  padding: 0 16px;
}

.tfx-article__header{
  margin-bottom: 18px;
}

.tfx-article__title{
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  color: #fff;
  font-weight: 900;
}

.tfx-article__meta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: rgba(167,178,214,.92);
  font-size: 14px;
  font-weight: 700;
}

.tfx-article__thumb{
  margin: 20px 0 24px;
  border-radius: 18px;
  overflow: hidden;
}

.tfx-article__thumb img{
  width: 100%;
  height: auto;
  display: block;
}

.tfx-article__content{
  color: #eaf0ff;
  line-height: 1.8;
  font-size: 16px;
}

.tfx-article__content p{
  margin: 0 0 16px;
}

.tfx-article__content h2,
.tfx-article__content h3,
.tfx-article__content h4{
  color: #fff;
  margin: 28px 0 12px;
}

.tfx-article__content a{
  color: #ff365c;
}

.tfx-article__content img{
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}