/* =========================================================
   IHMTV — global styles (mobile-first, dark premium theme)
   ========================================================= */
:root{
  --bg:#0b0b0f;
  --bg-2:#14141b;
  --card:#1b1b24;
  --line:#26263200;
  --border:#2a2a36;
  --text:#f5f5f7;
  --muted:#9aa0aa;
  --brand:#e50914;
  --brand-dark:#b0060f;
  --success:#22c55e;
  --danger:#ef4444;
  --radius:14px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}

/* ---- Icons ---- */
.icon{width:22px;height:22px;display:inline-block;vertical-align:middle;flex:0 0 auto}
.btn .icon{width:18px;height:18px;vertical-align:-3px;margin-right:6px}
.mini-ico{width:15px;height:15px;display:inline-block;vertical-align:middle}
body{
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
}
a{color:inherit;text-decoration:none}
img{max-width:100%}

.container{max-width:480px;margin:0 auto;padding:0 20px}
.container-wide{max-width:1100px;margin:0 auto;padding:0 20px}

/* ---- Brand ---- */
.brand{font-weight:800;letter-spacing:.5px;color:var(--brand);font-size:26px}
.brand small{display:block;color:var(--muted);font-size:11px;font-weight:500;letter-spacing:2px}
.brand-has-logo{display:inline-flex;align-items:center;gap:10px;text-align:left}
.brand-has-logo .brand-text{display:flex;flex-direction:column;line-height:1.05}
.brand-logo{max-height:42px;width:auto;display:block;border-radius:6px}
.topbar .brand-logo{max-height:38px}
.topbar .brand-has-logo{font-size:22px}

/* Centre the brand block on the auth screens (logo sits with the title). */
.auth-head .brand{justify-content:center}
.auth-head .brand-has-logo{display:inline-flex}

/* ---- Auth screens ---- */
.auth-wrap{min-height:100vh;display:flex;flex-direction:column;justify-content:center;padding:40px 0}
.auth-head{text-align:center;margin-bottom:26px}
.auth-title{font-size:26px;font-weight:800;margin:14px 0 4px}
.auth-sub{color:var(--muted);font-size:14px;margin:0}

.form-group{margin-bottom:16px}
.form-label{display:block;font-size:13px;color:var(--muted);margin-bottom:7px;font-weight:600}
.form-control{
  width:100%;background:var(--bg-2);border:1px solid var(--border);
  color:var(--text);padding:14px 16px;border-radius:12px;font-size:15px;outline:none;
  transition:border-color .15s,box-shadow .15s;
}
.form-control::placeholder{color:#5b616b}
.form-control:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(229,9,20,.15)}

.input-icon{position:relative}
.input-icon .toggle{
  position:absolute;right:12px;top:50%;transform:translateY(-50%);
  color:var(--muted);cursor:pointer;background:none;border:none;padding:4px;
  display:inline-flex;align-items:center
}
.input-icon .toggle .eye-hide{display:none}
.input-icon .toggle.revealed .eye-show{display:none}
.input-icon .toggle.revealed .eye-hide{display:inline-flex}
.input-icon .toggle .mini-ico{width:20px;height:20px}

.btn{
  display:block;width:100%;text-align:center;cursor:pointer;border:none;
  padding:15px;border-radius:12px;font-size:16px;font-weight:700;transition:opacity .15s,background .15s
}
.btn:active{opacity:.85}
.btn-primary{background:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-dark)}
.btn-outline{background:transparent;color:var(--text);border:1px solid var(--border)}
.btn-outline:hover{border-color:var(--muted)}
.btn-ghost{background:transparent;color:var(--muted);font-weight:600}

.link-brand{color:var(--brand);font-weight:600}
.text-muted{color:var(--muted)}
.text-center{text-align:center}
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-2{margin-bottom:16px}
.small{font-size:13px}

.divider{display:flex;align-items:center;gap:14px;color:var(--muted);margin:20px 0;font-size:13px}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--border)}

.checkbox-row{display:flex;align-items:flex-start;gap:10px;font-size:13px;color:var(--muted)}
.checkbox-row input{margin-top:2px;accent-color:var(--brand);width:16px;height:16px}

/* ---- Flash messages ---- */
.flash{padding:12px 16px;border-radius:12px;margin-bottom:14px;font-size:14px;border:1px solid transparent}
.flash-success{background:rgba(34,197,94,.12);border-color:rgba(34,197,94,.4);color:#a7f3c0}
.flash-error{background:rgba(239,68,68,.12);border-color:rgba(239,68,68,.4);color:#fca5a5}

/* ---- Home placeholder / topbar / bottom nav ---- */
.topbar{display:flex;align-items:center;justify-content:space-between;padding:16px 0}
.hero{
  border-radius:var(--radius);overflow:hidden;position:relative;
  background:linear-gradient(180deg,rgba(0,0,0,.1),rgba(0,0,0,.85)),var(--card);
  padding:60px 22px 22px;min-height:220px;display:flex;flex-direction:column;justify-content:flex-end
}
.badge{display:inline-block;background:var(--brand);color:#fff;font-size:10px;font-weight:800;
  padding:4px 8px;border-radius:6px;letter-spacing:1px;text-transform:uppercase}

.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:20px}

.bottom-nav{
  position:fixed;left:0;right:0;bottom:0;background:rgba(11,11,15,.96);
  border-top:1px solid var(--border);display:flex;justify-content:space-around;
  padding:10px 0 14px;backdrop-filter:blur(8px)
}
.bottom-nav a{display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--muted);font-size:11px}
.bottom-nav a.active{color:var(--brand)}
.bottom-nav .ico{font-size:20px;line-height:1}

.page-pad{padding-bottom:90px}
.errors-box{max-width:480px;margin:80px auto;text-align:center;padding:0 20px}

/* ---- Floating WhatsApp button ---- */
.wa-fab{
  position:fixed;
  right:18px;
  bottom:calc(82px + env(safe-area-inset-bottom, 0px));
  z-index:70;
  width:56px;height:56px;border-radius:50%;
  background:#25D366;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 16px rgba(0,0,0,.35);
  transition:transform .15s, box-shadow .15s;
}
.wa-fab:hover{transform:scale(1.05);box-shadow:0 8px 20px rgba(0,0,0,.45)}
.wa-fab:active{transform:scale(.96)}
.wa-fab svg{width:32px;height:32px;display:block}
/* On screens without the bottom nav (auth), sit lower. */
body:not(:has(.bottom-nav)) .wa-fab{bottom:calc(20px + env(safe-area-inset-bottom, 0px))}

/* ---- Static pages ---- */
.page-article{padding:6px 0 10px}
.page-title{font-size:26px;font-weight:800;margin:6px 0 14px}
.page-body{line-height:1.65;color:#d5d8dd;font-size:15px}
.contact-info .pay-row{border-bottom:1px solid var(--border)}
.contact-info .pay-row:last-child{border-bottom:none}

/* ---- Footer ---- */
.site-footer{margin-top:30px;padding:22px 0 10px;border-top:1px solid var(--border);text-align:center}
.footer-links{display:flex;justify-content:center;flex-wrap:wrap;gap:18px;margin-bottom:12px}
.footer-links a{color:var(--muted);font-size:13px;font-weight:600}
.footer-links a:hover{color:var(--text)}
.footer-copy{color:#4b5058;font-size:12px;margin:0;opacity:.85}
.footer-copy a{color:var(--brand);font-weight:600}

/* ---- Topbar / search ---- */
.topbar-actions{display:flex;align-items:center;gap:16px;font-size:18px}
.search-inline{margin:6px 0 16px}
.search-inline input{width:100%}
.back-btn{color:var(--muted);font-size:16px;font-weight:600}

/* ---- Hero ---- */
.hero{background-size:cover;background-position:center}
.hero-title{margin:12px 0 4px;font-size:30px;font-weight:800;text-shadow:0 2px 12px rgba(0,0,0,.6)}
.hero-meta{margin:0 0 12px}
.hero-actions{display:flex;gap:10px}
.hero-actions .btn{width:auto;flex:1}

/* ---- Movie rows / cards ---- */
.mrow{margin:22px 0}
.mrow-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.mrow-title{font-size:17px;font-weight:700;margin:0}
.mrow-viewall{font-size:13px;font-weight:600;color:var(--brand);white-space:nowrap}
.mrow-viewall:hover{opacity:.85}
.mrow-scroll{display:flex;gap:12px;overflow-x:auto;scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;padding-bottom:4px}
.mrow-scroll::-webkit-scrollbar{height:0}
.mcard{flex:0 0 120px;scroll-snap-align:start}
.mcard-img{position:relative;border-radius:10px;overflow:hidden;aspect-ratio:2/3;background:var(--card)}
.mcard-img img{width:100%;height:100%;object-fit:cover;display:block}
.mcard-badge{position:absolute;top:6px;left:6px;background:var(--brand);color:#fff;
  font-size:9px;font-weight:800;padding:3px 6px;border-radius:5px;letter-spacing:.5px}
.mcard-title{font-size:13px;margin-top:7px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mcard-rate{font-size:12px;color:#ffce46}

.grid-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:12px}
@media(max-width:360px){.grid-cards{grid-template-columns:repeat(2,1fr)}}

/* ---- Pagination ---- */
.pager{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:6px;margin:22px 0 6px}
.pager-btn,.pager-num{padding:8px 12px;border:1px solid var(--border);border-radius:8px;
  font-size:13px;font-weight:600;color:var(--text);background:var(--bg-2)}
.pager-btn:hover,.pager-num:hover{border-color:var(--muted)}
.pager-num.active{background:var(--brand);border-color:var(--brand);color:#fff}
.pager-btn.is-disabled{opacity:.4;cursor:not-allowed}

/* ---- Movie detail ---- */
.detail-top{padding:14px 0}
.detail-head{display:flex;gap:16px;align-items:flex-start}
.detail-poster{width:120px;border-radius:12px;flex:0 0 120px;aspect-ratio:2/3;object-fit:cover}
.detail-meta{flex:1}
.detail-title{font-size:24px;font-weight:800;margin:0 0 6px}
.detail-rate{color:#ffce46;font-weight:700;margin:6px 0 0}
.detail-synopsis{margin:16px 0;line-height:1.5;font-size:14px;color:#d5d8dd}

.paywall{display:grid;grid-template-columns:auto 1fr;gap:10px 14px;align-items:center;
  background:linear-gradient(135deg,rgba(229,9,20,.18),rgba(229,9,20,.05));
  border:1px solid rgba(229,9,20,.35);border-radius:var(--radius);padding:18px}
.paywall-crown{font-size:28px;grid-row:span 2}
.paywall-title{font-weight:800}
.paywall .btn{grid-column:1 / -1}

.detail-actions{display:flex;justify-content:space-around;margin:20px 0;
  border-top:1px solid var(--border);border-bottom:1px solid var(--border);padding:14px 0}
.daction{display:flex;flex-direction:column;align-items:center;gap:5px;color:var(--muted);
  font-size:12px;background:none;border:none;cursor:pointer}
.daction .ico{font-size:20px}
.daction .wl-have{display:none}
.daction[data-in="1"]{color:var(--brand)}
.daction[data-in="1"] .wl-add{display:none}
.daction[data-in="1"] .wl-have{display:inline-flex}

/* ---- Player ---- */
.player-body{background:#000}
.player-wrap{max-width:900px;margin:0 auto}
.player-topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;color:#fff}
.player-back{font-size:26px;color:#fff;line-height:1}
.player-name{font-weight:700}
.player-video{width:100%;max-height:70vh;background:#000;display:block;border-radius:12px}
.player-note{text-align:center;padding:14px 16px}
.player-wrap{margin-top:6px}

/* Watch page actions */
.watch-actions{display:flex;gap:12px;margin:16px 0 4px}
.watch-btn{flex:1;display:flex;align-items:center;justify-content:center;gap:8px}
.watch-btn .icon{width:20px;height:20px}
.watch-btn.is-disabled{opacity:.4;cursor:not-allowed}
.like-count{font-size:12px;color:var(--muted)}
#likeBtn .like-on{display:none}
#likeBtn[data-liked="1"]{color:var(--brand);border-color:var(--brand)}
#likeBtn[data-liked="1"] .like-off{display:none}
#likeBtn[data-liked="1"] .like-on{display:inline-flex}
.watch-synopsis{margin:10px 0 0;line-height:1.5}

/* ---- Subscribe / paywall ---- */
.paywall-hero{text-align:center;padding:18px 0 6px}
.paywall-crown-lg{color:#f0c14b}
.paywall-crown-lg .icon{width:46px;height:46px}
.paywall-crown .icon{width:30px;height:30px}
.paywall-crown{color:#f0c14b}
.benefit-list .check .icon{width:14px;height:14px}
.pay-method-head .icon{width:20px;height:20px;color:var(--brand)}
.success-check .icon{width:52px;height:52px}
.expired-icon .icon{width:40px;height:40px}
.paywall-h1{font-size:24px;font-weight:800;margin:8px 0 4px}
.benefit-list{list-style:none;padding:0;margin:16px 0}
.benefit-list li{display:flex;align-items:center;gap:10px;padding:8px 0;font-size:14px}
.benefit-list .check{display:inline-flex;align-items:center;justify-content:center;
  width:22px;height:22px;border-radius:50%;background:rgba(229,9,20,.15);color:var(--brand);
  font-size:13px;font-weight:800;flex:0 0 22px}

.plan-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:8px}
.plan-card{position:relative;display:block;background:var(--card);border:1.5px solid var(--border);
  border-radius:var(--radius);padding:16px;cursor:pointer;transition:border-color .15s,background .15s}
.plan-card.selected,.plan-card:has(input:checked){border-color:var(--brand);background:rgba(229,9,20,.06)}
.plan-card input{position:absolute;top:14px;right:14px;accent-color:var(--brand)}
.plan-name{font-weight:700;font-size:15px}
.plan-price{font-size:22px;font-weight:800;margin-top:6px}
.plan-price .cur{font-size:15px;vertical-align:top}
.plan-price .per{font-size:12px;color:var(--muted);font-weight:500}
.plan-duration{font-size:12px;margin-top:2px}
.plan-desc{font-size:12px;margin-top:6px}

/* ---- Pay page ---- */
.pay-row{display:flex;justify-content:space-between;align-items:center;padding:7px 0}
.section-h{font-size:16px;margin:22px 0 10px}
.pay-method{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);
  padding:16px;margin-bottom:14px}
.pay-method-head{display:flex;align-items:center;gap:10px;margin-bottom:6px}
.pay-method-head .ico{font-size:20px}
.bank-box{background:var(--bg-2);border:1px solid var(--border);border-radius:10px;padding:12px;margin-top:8px}
.pill{font-size:11px;font-weight:700;padding:3px 10px;border-radius:20px;text-transform:capitalize}
.pill-pending{background:rgba(240,180,41,.15);color:#f0b429}
.pill-paid{background:rgba(34,197,94,.15);color:#4ade80}
.pill-failed,.pill-declined{background:rgba(239,68,68,.15);color:#fca5a5}

/* ---- Success ---- */
.success-screen{text-align:center;padding:60px 10px}
.success-check{width:96px;height:96px;border-radius:50%;margin:0 auto;
  display:flex;align-items:center;justify-content:center;font-size:48px;color:#fff;
  background:var(--success);box-shadow:0 0 0 12px rgba(34,197,94,.15)}
.success-title{font-size:24px;font-weight:800;margin:22px 0 6px}
.success-sub{font-size:16px;margin:0 0 6px}

/* ---- Expired ---- */
.sub-card.sub-active{border-color:rgba(34,197,94,.4)}
.expired-screen{text-align:center;padding:34px 18px;border-radius:var(--radius);
  background:linear-gradient(180deg,rgba(239,68,68,.12),rgba(239,68,68,.02));
  border:1px solid rgba(239,68,68,.3)}
.expired-icon{width:74px;height:74px;border-radius:50%;margin:0 auto 6px;
  display:flex;align-items:center;justify-content:center;font-size:40px;font-weight:800;
  color:#fff;background:var(--danger)}
.expired-title{font-size:22px;font-weight:800;margin:8px 0 4px}
