/* PORNFLIX — player. Nero, un solo rosso, comandi bianchi. */
@font-face { font-family: "PF Display"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("fonts/display.woff2") format("woff2"); }
@font-face { font-family: "PF Text"; font-style: normal; font-display: swap; font-weight: 400 700; src: url("fonts/text.woff2") format("woff2"); }

:root {
  --red: #e50914;
  --red-hi: #ff1f2b;
  --white: #fff;
  --muted: rgba(255, 255, 255, .72);
  --panel: rgba(18, 18, 18, .96);
  --f-display: "PF Display", "Bahnschrift", "Arial Narrow", sans-serif;
  --f-ui: "PF Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #000; color: var(--white); }
body { font-family: var(--f-ui); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.brand {
  font-family: var(--f-display); font-weight: 900; font-size: 30px; line-height: 1; letter-spacing: .015em;
  color: var(--red); text-decoration: none; white-space: nowrap;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: 4px; background: var(--white); color: #000; font-weight: 700; font-size: 15px; text-decoration: none;
}
.btn:hover { background: rgba(255, 255, 255, .82); }
.btn.ghost { background: rgba(109, 109, 110, .45); color: var(--white); }
.btn.ghost:hover { background: rgba(109, 109, 110, .65); }
.btn.red { background: var(--red); color: var(--white); }
.btn.red:hover { background: var(--red-hi); }
.btn.big { width: 100%; min-height: 50px; font-size: 16px; }

/* ---------- Pagine semplici (home, video non trovato) ---------- */
body.page { display: grid; grid-template-rows: 1fr auto; place-items: center; min-height: 100%; padding: 24px 16px 8px; }
.note { max-width: 440px; text-align: center; display: grid; justify-items: center; gap: 14px; }
.note h1 { margin: 10px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.note p { margin: 0; color: var(--muted); }
.notebtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.notebtns:empty { display: none; }
.brand.big { font-size: clamp(56px, 16vw, 104px); }
.foot { padding: 22px 16px max(8px, env(safe-area-inset-bottom)); text-align: center; font-size: 13px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--white); text-decoration: underline; }
/* Pagina privacy */
.note.legal { max-width: 640px; text-align: left; justify-items: start; gap: 10px; padding-bottom: 40px; }
.legal h1 { margin: 14px 0 6px; }
.legal h2 { margin: 14px 0 0; font-size: 17px; font-weight: 700; }
.legal p { color: rgba(255, 255, 255, .8); }
.legal a { color: var(--white); }
.home { max-width: 440px; }
.pluscard {
  width: 100%; margin-top: 12px; padding: 28px 26px 20px; border-radius: 10px; display: grid; justify-items: center; gap: 14px;
  background: radial-gradient(520px 200px at 50% -30%, rgba(229, 9, 20, .26), transparent 70%), #141414;
}

/* ---------- Player ---------- */
body.watch { overflow: hidden; }
.player {
  position: fixed; inset: 0; overflow: hidden; background: #000;
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.backdrop {
  position: absolute; inset: -60px; background: #000 center / cover no-repeat;
  filter: blur(48px) brightness(.34) saturate(1.15); transform: scale(1.08);
  opacity: 0; transition: opacity .5s ease;
}
.player.bars .backdrop { opacity: 1; }
video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: transparent;
}
.tapzone { position: absolute; inset: 0; }
.player:not(.ui).playing { cursor: none; }

/* Barra in alto */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; gap: 18px;
  padding: max(16px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) 46px max(22px, env(safe-area-inset-left));
  background: linear-gradient(rgba(0, 0, 0, .78), rgba(0, 0, 0, 0));
  transition: opacity .25s ease;
}
.ttl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ttl h1 { margin: 0; font-size: 16px; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai { flex: none; font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid rgba(255, 255, 255, .35); border-radius: 3px; padding: 1px 6px; }
.topactions { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; }
.cta, .plusbtn {
  flex: none; padding: 8px 14px; border-radius: 4px; background: var(--white); color: #000;
  font-weight: 700; font-size: 14px; line-height: 1.45; text-decoration: none; white-space: nowrap;
}
.cta:hover { background: rgba(255, 255, 255, .82); }
.plusbtn { background: var(--red); color: var(--white); }
.plusbtn:hover { background: var(--red-hi); }
/* con Plus attivo, il bottone del Discord passa in secondo piano */
.plusbtn ~ .cta { background: rgba(109, 109, 110, .45); color: var(--white); }
.plusbtn ~ .cta:hover { background: rgba(109, 109, 110, .65); }
/* Link premium: il marchio diventa "PORNFLIX Plus" */
.plusbrand { display: inline-flex; align-items: baseline; gap: 7px; }
.plusbrand .plusword { font-size: 1em; }

/* Comandi in basso */
.controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 60px max(22px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .82));
  transition: opacity .25s ease;
}
.player:not(.ui) .topbar, .player:not(.ui) .controls { opacity: 0; pointer-events: none; }

.seek { position: relative; height: 26px; cursor: pointer; touch-action: none; }
.rail { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: rgba(255, 255, 255, .24); overflow: hidden; transition: height .12s, margin-top .12s; }
.seek:hover .rail, .player.scrub .rail, .seek:focus-visible .rail { height: 6px; margin-top: -3px; }
.buffered, .played { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
.buffered { background: rgba(255, 255, 255, .38); }
.played { background: var(--red); }
.knob {
  position: absolute; top: 50%; left: 0; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%;
  background: var(--red); transform: scale(0); transition: transform .12s;
}
.seek:hover .knob, .player.scrub .knob, .seek:focus-visible .knob { transform: scale(1); }
.seek:focus-visible { outline: none; }
.preview {
  position: absolute; bottom: 30px; left: 0; display: none; flex-direction: column; align-items: center; gap: 6px;
  transform: translateX(-50%); pointer-events: none;
}
.player.peek .preview { display: flex; }
.thumb { display: none; border: 2px solid var(--white); border-radius: 4px; background: #111 no-repeat; box-shadow: 0 6px 18px rgba(0, 0, 0, .6); }
.preview.has-thumb .thumb { display: block; }
.preview span { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); }

.row { display: flex; align-items: center; gap: 4px; height: 50px; }
.row button, .row .dl { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--white); transition: transform .12s, background-color .12s; }
.row button:hover, .row .dl:hover { transform: scale(1.1); }
.row button svg, .row .dl svg { width: 27px; height: 27px; }
.row button.txt { width: auto; min-width: 44px; padding: 0 10px; border-radius: 4px; font-weight: 700; font-size: 14px; }
.row button.txt:hover { transform: none; background: rgba(255, 255, 255, .12); }
.grow { flex: 1; }
.vol { display: flex; align-items: center; }
.vol input { width: 0; opacity: 0; transition: width .2s, opacity .2s; }
.vol:hover input, .vol:focus-within input { width: 92px; opacity: 1; }
.time { margin-left: 10px; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.time .sep { margin: 0 5px; color: var(--muted); }
#tdur { color: var(--muted); }

input[type=range] { -webkit-appearance: none; appearance: none; height: 26px; background: transparent; cursor: pointer; margin: 0 6px 0 2px; }
input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--white) var(--fill, 100%), rgba(255, 255, 255, .3) var(--fill, 100%)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border-radius: 50%; background: var(--white); border: 0; }
input[type=range]::-moz-range-track { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); }
input[type=range]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--white); }
input[type=range]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--white); border: 0; }

/* Icone che cambiano con lo stato */
.ic-pause, .ic-replay, .ic-mute, .ic-fsx { display: none; }
.player.playing .ic-play { display: none; }
.player.playing .ic-pause { display: block; }
.player.ended .ic-play { display: none; }
.player.ended .bigplay .ic-replay { display: block; }
.player.ended #btnPlay .ic-play { display: block; }
.player.muted .ic-vol { display: none; }
.player.muted .ic-mute { display: block; }
.player.fs .ic-fs { display: none; }
.player.fs .ic-fsx { display: block; }

/* Impostazioni: ingranaggio con il menu di qualità e velocità */
.menuwrap { position: relative; }
.row button.gear { position: relative; }
.row button.gear svg { transition: transform .25s ease; }
.row button.gear[aria-expanded=true] svg { transform: rotate(45deg); }
.qbadge {
  position: absolute; top: 6px; right: 1px; padding: 0 3px; border-radius: 2px; background: var(--red); color: var(--white);
  font-size: 9px; font-weight: 800; line-height: 13px; letter-spacing: .02em; pointer-events: none;
}
.menu {
  position: absolute; right: 0; bottom: 52px; min-width: 150px; padding: 6px; border-radius: 6px;
  background: var(--panel); box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}
.menu.settings { min-width: 240px; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); overflow-y: auto; overscroll-behavior: contain; }
.menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: auto; min-height: 40px; padding: 9px 12px; border-radius: 4px;
  font-size: 14px; font-weight: 600; text-align: left; color: var(--muted);
}
.menu button:hover { transform: none; background: rgba(255, 255, 255, .1); color: var(--white); }
.menu button::before { content: ""; flex: none; width: 4px; height: 16px; border-radius: 2px; background: transparent; }
.menu button[aria-checked=true] { color: var(--white); }
.menu button[aria-checked=true]::before { background: var(--red); }
.menu button.sub, .menu button.back { color: var(--white); }
.menu button.sub::before, .menu button.back::before { display: none; }
.menu .lbl { white-space: nowrap; }
.menu .val { margin-left: auto; color: var(--muted); font-weight: 500; white-space: nowrap; }
.menu .chev { color: var(--muted); font-size: 18px; line-height: 1; margin-top: -2px; }
.menu button.back { gap: 8px; margin-bottom: 4px; border-radius: 4px 4px 0 0; box-shadow: 0 1px 0 rgba(255, 255, 255, .1); }
.menu small { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.menu button.locked { color: var(--white); }
.menu button.locked .lock { flex: none; width: 13px; height: 13px; margin-left: -4px; color: var(--muted); }
.menu button.locked small { color: var(--white); background: var(--red); border-radius: 3px; padding: 1px 6px; font-weight: 700; font-size: 11px; }

/* Grande tasto al centro */
.bigplay {
  position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; place-items: center;
  width: 78px; height: 78px; margin: -39px 0 0 -39px; border-radius: 50%;
  background: var(--red); color: var(--white); box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  transition: transform .15s ease, background-color .15s, opacity .2s;
}
.bigplay svg { width: 36px; height: 36px; }
.bigplay .ic-play { margin-left: 4px; }
.bigplay:hover { transform: scale(1.06); background: var(--red-hi); }
.player.playing .bigplay { opacity: 0; pointer-events: none; }
.player.loading .bigplay { opacity: 0; pointer-events: none; }

/* Caricamento */
.spinner {
  position: absolute; left: 50%; top: 50%; z-index: 2; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%; border: 4px solid rgba(255, 255, 255, .18); border-top-color: var(--white);
  opacity: 0; pointer-events: none; transition: opacity .2s; animation: spin .9s linear infinite;
}
.player.loading .spinner { opacity: 1; transition-delay: .25s; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Doppio tocco: avanti e indietro di 10 secondi */
.ripple {
  position: absolute; top: 0; bottom: 0; width: 40%; z-index: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; opacity: 0; pointer-events: none; transition: opacity .3s;
  font-weight: 700; font-size: 14px;
}
.ripple svg { width: 34px; height: 34px; }
.ripple.left { left: 0; background: radial-gradient(ellipse at 0% 50%, rgba(255, 255, 255, .16), transparent 70%); }
.ripple.right { right: 0; background: radial-gradient(ellipse at 100% 50%, rgba(255, 255, 255, .16), transparent 70%); }
.ripple.on { opacity: 1; transition: none; }

/* Avvisi */
.toast {
  position: absolute; left: 50%; bottom: 112px; z-index: 4; transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 6px;
  background: var(--panel); box-shadow: 0 10px 30px rgba(0, 0, 0, .55); white-space: nowrap; font-size: 14px;
}
.toast button { padding: 7px 12px; border-radius: 4px; background: var(--white); color: #000; font-weight: 700; font-size: 13.5px; }
.toast button.x { background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 4px 8px; }
.error {
  position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 16px;
  padding: 24px; text-align: center; background: rgba(0, 0, 0, .78);
}
.error p { margin: 0; max-width: 340px; color: var(--muted); font-size: 16px; }
.error button { padding: 10px 20px; border-radius: 4px; background: var(--white); color: #000; font-weight: 700; }

/* Avviso 18+ */
.gate {
  position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(900px 500px at 50% 0%, rgba(229, 9, 20, .16), transparent 70%), #000;
}
.gatebox { max-width: 440px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.gatebox .brand { font-size: 46px; }
.gatebox h2 { margin: 12px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.gatebox p { margin: 0; color: var(--muted); }
.gatebtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.gatelink { margin-top: 10px; color: var(--muted); font-size: 13px; text-decoration: none; }
.gatelink:hover { color: var(--white); text-decoration: underline; }

/* ---------- PORNFLIX Plus ---------- */
.pluslogo { display: flex; align-items: baseline; justify-content: center; gap: 9px; margin: 0; line-height: 1; }
.pluslogo .brand { font-size: 36px; }
.plusword { font-family: var(--f-display); font-weight: 600; font-size: 36px; letter-spacing: .01em; color: var(--white); }
.perks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 11px; text-align: left; }
.perks li { display: flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 600; }
.perks svg { flex: none; width: 20px; height: 20px; color: var(--red); }
.price { margin: 8px 0 2px; display: flex; align-items: baseline; justify-content: center; gap: 3px; }
.price .amt { font-family: var(--f-display); font-weight: 800; font-size: 46px; line-height: 1; color: var(--white); }
.price .per { color: var(--muted); font-size: 16px; font-weight: 600; }

/* Finestra con i vantaggi (dal bottone in alto o dal tasto per scaricare) */
.plus {
  position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 16px;
  background: rgba(0, 0, 0, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  user-select: text; -webkit-user-select: text;
}
.plusbox {
  position: relative; width: 100%; max-width: 400px; max-height: 100%; overflow: auto; overscroll-behavior: contain;
  display: grid; justify-items: center; gap: 14px; padding: 34px 26px 22px; border-radius: 10px; text-align: center;
  background: radial-gradient(520px 220px at 50% -30%, rgba(229, 9, 20, .3), transparent 70%), #141414;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .7);
}
.plusx {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%;
  font-size: 26px; line-height: 1; color: var(--muted);
}
.plusx:hover { color: var(--white); background: rgba(255, 255, 255, .08); }
.plusreason { margin: -2px 0 0; color: var(--white); font-weight: 600; }
.plusbox .btn.big { margin-top: 2px; }
.plusnote { margin: -4px 0 0; color: var(--muted); font-size: 13px; }

/* Scheda a fine video */
.endcard {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 18px;
  padding: 96px 24px 128px; text-align: center;
  background: radial-gradient(800px 420px at 50% 40%, rgba(229, 9, 20, .14), transparent 70%), rgba(0, 0, 0, .74);
}
.perks.inline { grid-template-columns: repeat(4, auto); justify-content: center; gap: 10px 26px; margin: 0; }
.perks.inline li { font-size: 15px; }
.endbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.player.endshow .bigplay { opacity: 0; pointer-events: none; }

/* ---------- Telefono ---------- */
@media (max-width: 640px) {
  /* in alto: marchio e bottoni sulla prima riga, titolo sotto */
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: 36px; }
  .ttl { order: 3; flex-basis: 100%; }
  .brand { font-size: 24px; }
  .ttl h1 { font-size: 14px; }
  .cta, .plusbtn { padding: 7px 11px; font-size: 13px; }
  .endcard { gap: 16px; padding: 110px 20px 120px; }
  .perks.inline { grid-template-columns: repeat(2, auto); gap: 9px 22px; }
  .controls { padding-top: 40px; }
  .row { gap: 0; height: 46px; }
  .row button, .row .dl { width: 40px; height: 40px; }
  .row button svg, .row .dl svg { width: 25px; height: 25px; }
  .row button.txt { min-width: 40px; padding: 0 7px; font-size: 13px; }
  .time { margin-left: 4px; font-size: 13px; }
  .bigplay { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
  .toast { bottom: 96px; }
}
@media (max-width: 480px) {
  /* sul telefono avanti e indietro si fanno con il doppio tocco ai lati: lascio spazio al resto */
  #btnBack, #btnFwd { display: none; }
  .perks.inline { grid-template-columns: auto; }
}
@media (max-width: 400px) {
  #btnPip { display: none; }
  .topbar, .controls { padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right)); }
  .row button, .row .dl { width: 38px; }
}
@media (max-width: 350px) {
  .cta { display: none; }
}
/* telefono in orizzontale: finestra di Plus più compatta */
@media (max-height: 500px) {
  .plusbox { gap: 10px; padding: 22px 22px 16px; max-width: 460px; }
  .pluslogo .brand, .plusword { font-size: 30px; }
  .plusbox .perks { grid-template-columns: 1fr 1fr; gap: 9px 20px; }
  .plusbox .perks li { font-size: 15px; }
  .price .amt { font-size: 36px; }
  .endcard { padding-top: 70px; padding-bottom: 96px; gap: 12px; }
}
@media (hover: none) {
  .vol input { display: none; }
  .knob { transform: scale(1); }
  .rail { height: 5px; margin-top: -2.5px; }
  .row button:hover, .row .dl:hover, .bigplay:hover { transform: none; }
  /* sul telefono, con i comandi visibili, il tasto al centro mette in pausa */
  .player.playing.ui .bigplay { opacity: 1; pointer-events: auto; background: rgba(0, 0, 0, .45); box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 1.6s !important; }
}

/* =====================================================================
   Sito con account: home a scorrimento, pagina del video, accesso, account, Plus
   Stesso linguaggio del player: nero, un solo rosso, bottoni bianchi o grigi.
   ===================================================================== */
body.site { height: auto; min-height: 100%; overflow-x: clip; } /* clip, non hidden: hidden fermerebbe il player "sticky" */
.site .gate { z-index: 60; }
.site #plus { position: fixed; z-index: 50; }

/* ---------- Intestazione ---------- */
.sitehead {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 30px; height: 64px;
  padding: 0 max(4vw, env(safe-area-inset-right)) 0 max(4vw, env(safe-area-inset-left));
  background: linear-gradient(rgba(0, 0, 0, .9), rgba(0, 0, 0, .55)); transition: background-color .2s ease;
}
.sitehead.scrolled { background: #000; box-shadow: 0 1px 0 rgba(255, 255, 255, .07); }
.sitehead .brand { font-size: 30px; }
.sitenav { display: flex; gap: 22px; }
.sitenav a { color: rgba(255, 255, 255, .7); text-decoration: none; font-size: 15px; font-weight: 600; }
.sitenav a:hover, .sitenav a[aria-current=page] { color: var(--white); }
.headright { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hbtn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 4px;
  background: var(--white); color: #000; font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.hbtn:hover { background: rgba(255, 255, 255, .82); }
.hbtn.ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34); }
.hbtn.ghost:hover { background: rgba(255, 255, 255, .08); }
.hbtn.red { background: var(--red); color: var(--white); }
.hbtn.red:hover { background: var(--red-hi); }
.hbtn svg { width: 19px; height: 19px; }
.pluschip {
  display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 3px; background: var(--red); color: var(--white);
  font-family: var(--f-display); font-weight: 800; font-size: 13px; letter-spacing: .04em;
}

/* ---------- Home ---------- */
.feed { max-width: 1800px; margin: 0 auto; padding: 6px max(4vw, env(safe-area-inset-right)) 30px max(4vw, env(safe-area-inset-left)); }
.feedintro {
  display: grid; justify-items: start; gap: 10px; margin: 16px 0 26px; padding: 30px 30px 28px; border-radius: 10px;
  background: radial-gradient(760px 300px at 0% 0%, rgba(229, 9, 20, .3), transparent 70%), #141414;
}
.feedintro h1 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(28px, 4.2vw, 46px); line-height: 1.04; }
.feedintro p { margin: 0; max-width: 56ch; color: var(--muted); font-size: 16px; }
.introbtns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.sechd { margin: 0; font-size: 20px; font-weight: 700; }
.feedhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 26px 0 16px; }
.tabs { display: flex; gap: 3px; padding: 3px; border-radius: 6px; background: #141414; }
.tabs a { padding: 6px 14px; border-radius: 4px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.tabs a:hover { color: var(--white); }
.tabs a[aria-selected=true] { background: var(--white); color: #000; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px 16px; }
.empty { margin: 0; padding: 50px 0; color: var(--muted); }
.loadmore { display: grid; place-items: center; padding: 34px 0 6px; }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .16); border-top-color: var(--white); animation: spin .9s linear infinite; }
.rowsec { margin: 20px 0 4px; }
.rowsec > .sechd { margin-bottom: 12px; }
.hrow {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 270px); gap: 14px; overflow-x: auto;
  padding-bottom: 8px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.hrow > .vcard { scroll-snap-align: start; }

/* ---------- Schede dei video ---------- */
.vcard { display: grid; align-content: start; gap: 10px; min-width: 0; color: var(--white); text-decoration: none; }
.vthumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #181818; }
.vthumb img, .pvv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vthumb .fg { transition: transform .3s ease; }
.vcard:hover .vthumb:not(.vert) .fg { transform: scale(1.035); }
.vthumb.vert .bg { filter: blur(16px) brightness(.45); transform: scale(1.25); }
.vthumb.vert .fg, .vthumb.vert .pvv { object-fit: contain; }
.pvv { opacity: 0; transition: opacity .3s ease; }
.vcard.pv .pvv { opacity: 1; }
.vdur {
  position: absolute; right: 6px; bottom: 7px; padding: 1px 6px; border-radius: 3px; background: rgba(0, 0, 0, .82);
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.vdur:empty { display: none; }
.vbadge {
  position: absolute; left: 6px; top: 6px; z-index: 1; display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px;
  border-radius: 3px; font-size: 12px; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
}
.vbadge.new { background: var(--white); color: #000; }
.vbadge.excl { background: var(--red); color: var(--white); box-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.vbadge svg { width: 12px; height: 12px; }
.vbadge .sub { font-weight: 600; letter-spacing: 0; }
.vprog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .28); }
.vprog i { display: block; width: 0; height: 100%; background: var(--red); }
.vtext { display: grid; gap: 3px; min-width: 0; }
.vtitle { font-weight: 600; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vmeta { color: rgba(255, 255, 255, .58); font-size: 13.5px; }
.vcard:focus-visible { outline: none; }
.vcard:focus-visible .vthumb { outline: 2px solid var(--white); outline-offset: 2px; }
.vcard.small { grid-template-columns: 168px minmax(0, 1fr); gap: 11px; }
.vcard.small .vthumb { border-radius: 5px; }
.vcard.small .vtitle { font-size: 14px; }
.vcard.small .vmeta { font-size: 12.5px; }
.vcard.small .vbadge { height: 19px; padding: 0 5px; font-size: 10.5px; }
.vcard.small .vbadge .sub { display: none; }
.hrow .vcard.small { grid-template-columns: 1fr; }

/* ---------- Pagina del video ---------- */
.watchwrap {
  display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 26vw, 410px); gap: 26px; max-width: 1800px; margin: 0 auto;
  padding: 18px max(4vw, env(safe-area-inset-right)) 0 max(4vw, env(safe-area-inset-left));
}
.wmain { min-width: 0; }
.player.embedded { position: relative; inset: auto; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 150px); border-radius: 8px; }
.player.embedded.fs { border-radius: 0; max-height: none; }
.player.embedded:not(.fs) .topbar { display: none; }
.player.embedded .controls { padding: 44px 12px 4px; }
.player.embedded .row { height: 46px; }
.player.embedded .toast { bottom: 80px; }
.vinfo { display: grid; gap: 8px; padding: 14px 2px 0; }
.vh1 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.3; }
.vinfo .vmeta { margin: 0; }
.plusword-s { color: var(--red); font-weight: 700; }
.vactions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.btn.small { min-height: 38px; padding: 8px 16px; font-size: 14px; }
.vquota { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.wside > .sechd { margin: 0 0 12px; font-size: 17px; }
.sidelist { display: grid; gap: 12px; }
.watchwrap > .rowsec.more { grid-column: 1 / -1; margin: 34px 0 0; }
.rowsec.more > .sechd { margin-bottom: 16px; }

/* Video bloccato: l'anteprima muta dietro, il riquadro davanti */
.player.embedded.locked { display: grid; align-items: center; overflow: visible; }
.player.locked .controls, .player.locked .bigplay, .player.locked .topbar, .player.locked .tapzone,
.player.locked .spinner, .player.locked .backdrop, .player.locked .ripple { display: none; }
.player.locked video { object-fit: cover; filter: brightness(.36) saturate(1.1); border-radius: inherit; }
.lock { position: relative; z-index: 6; display: grid; place-items: center; padding: 30px 22px; }
.lockbox { max-width: 480px; display: grid; justify-items: center; gap: 12px; text-align: center; }
.lockbox h2 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: clamp(23px, 3vw, 32px); line-height: 1.08; }
.lockbox p { margin: 0; color: rgba(255, 255, 255, .84); }
.lockbadge {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 3px;
  background: var(--red); font-weight: 800; font-size: 13px; letter-spacing: .03em;
}
.lockbadge svg { width: 13px; height: 13px; }
.lockbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 6px 0 0; }
.lockbtns.small .btn { min-height: 38px; padding: 8px 14px; font-size: 14px; }
.lockbox .locknote { margin-top: 4px; color: var(--muted); font-size: 13px; }

/* Video successivo, a fine video */
.upnext {
  position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 12px;
  padding: 16px; text-align: center; background: rgba(0, 0, 0, .8);
}
.unlabel { margin: 0; color: var(--muted); font-size: 15px; font-weight: 600; }
.unlabel b { color: var(--white); font-variant-numeric: tabular-nums; }
.uncard {
  position: relative; display: block; width: min(320px, 58vw); aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden;
  background: #181818; color: var(--white); text-decoration: none; box-shadow: 0 12px 34px rgba(0, 0, 0, .6);
}
.uncard img { display: block; width: 100%; height: 100%; object-fit: cover; }
.untitle {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 10px 8px; text-align: left; font-weight: 700; font-size: 14px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .86));
}
.untitle:empty { display: none; }
.unbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Momenti più visti: la curva sopra la barra */
.heat { position: absolute; left: 0; right: 0; bottom: 50%; width: 100%; height: 30px; margin-bottom: 1px; pointer-events: none; opacity: 0; transition: opacity .15s ease; }
.heat path { fill: rgba(255, 255, 255, .27); }
.seek:hover .heat, .player.scrub .heat, .player.peek .heat, .seek:focus-visible .heat { opacity: 1; }

/* ---------- Accesso, registrazione, account ---------- */
.authwrap { display: grid; justify-items: center; align-content: start; padding: 40px 16px 30px; min-height: calc(100vh - 160px); }
.authbox { width: 100%; max-width: 440px; display: grid; gap: 14px; padding: 34px 32px 30px; border-radius: 10px; background: #141414; }
.authbox:has(.legal) { max-width: 720px; }
.authbox h1 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 30px; line-height: 1.1; }
.authsub { margin: -4px 0 0; color: var(--muted); }
.authform { display: grid; gap: 14px; margin: 4px 0 0; }
.authform.inline { gap: 10px; }
.fld { display: grid; gap: 6px; }
.fld span { font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .8); }
.fld input {
  width: 100%; height: 48px; padding: 0 14px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .22);
  background: #000; color: var(--white); font: inherit; font-size: 16px;
}
.fld input:focus { border-color: var(--white); outline: none; }
.chk { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, .86); cursor: pointer; }
.chk input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--red); }
.chk a, .authbox .legal a { color: var(--white); }
.formerr, .forminfo { margin: 0; padding: 10px 14px; border-radius: 4px; font-size: 14px; }
.formerr { background: rgba(229, 9, 20, .16); box-shadow: inset 3px 0 0 var(--red); }
.forminfo { background: rgba(255, 255, 255, .08); box-shadow: inset 3px 0 0 var(--white); }
.or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ""; height: 1px; background: rgba(255, 255, 255, .15); }
.oauthrow { display: grid; gap: 10px; width: 100%; }
.oauthrow:empty { display: none; }
.btn.oauth { width: 100%; }
.authalt { margin: 0; color: var(--muted); font-size: 14px; text-align: center; }
.authalt a { color: var(--white); font-weight: 600; }
.btn:disabled { opacity: .6; cursor: default; }
.acsec { display: grid; gap: 10px; padding: 18px 0 4px; border-top: 1px solid rgba(255, 255, 255, .1); }
.acsec h2 { margin: 0; font-size: 16px; font-weight: 700; }
.acsec p { margin: 0; color: rgba(255, 255, 255, .82); font-size: 14.5px; }
.acsec .acnote { color: var(--muted); font-size: 13px; }
.plusok { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.acbtns { display: flex; gap: 10px; }
.connrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: 40px; }
.connname { width: 74px; font-weight: 700; font-size: 14px; }
.conninfo { flex: 1; min-width: 0; color: rgba(255, 255, 255, .8); font-size: 14px; overflow-wrap: anywhere; }
.conninfo .ok { color: #46d369; font-weight: 600; }
.conninfo .warn { color: #f5c518; font-weight: 600; }
.connrow form, .acline form { margin: 0; }
.acline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.acsec.danger h2 { color: #ff7a7a; }
.authbox .legal { display: grid; gap: 8px; }
.authbox .legal h2 { margin: 12px 0 0; font-size: 17px; }
.authbox .legal p { margin: 0; color: rgba(255, 255, 255, .8); }

/* ---------- PORNFLIX Plus ---------- */
.pluspage { display: grid; justify-items: center; padding: 40px 16px 30px; }
.pluscard.big { max-width: 520px; margin: 0; padding: 42px 34px 32px; gap: 16px; }
.pluscard.big .pluslogo .brand, .pluscard.big .plusword { font-size: 46px; }
.plussub { margin: 0; color: var(--muted); font-size: 17px; text-align: center; }
.pluscard .oauthrow { margin-top: 4px; }

.sitefoot { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; padding: 50px 16px max(20px, env(safe-area-inset-bottom)); }

/* ---------- Schermi più piccoli ---------- */
@media (max-width: 1000px) {
  .watchwrap { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; }
  .wmain .player.embedded { border-radius: 0; max-height: none; }
  .vinfo { padding: 12px max(4vw, env(safe-area-inset-right)) 0 max(4vw, env(safe-area-inset-left)); }
  .wside { padding: 26px max(4vw, env(safe-area-inset-right)) 0 max(4vw, env(safe-area-inset-left)); }
  .vcard.small { grid-template-columns: minmax(140px, 42%) minmax(0, 1fr); }
  .watchpage .sitehead { position: relative; }
  .watchwrap > .rowsec.more { padding: 0 max(4vw, env(safe-area-inset-right)) 0 max(4vw, env(safe-area-inset-left)); }
}
/* telefono in verticale: il video resta in alto mentre scorri gli altri */
@media (max-width: 1000px) and (orientation: portrait) {
  .wmain { display: contents; } /* il player diventa figlio della pagina intera: resta in alto fino in fondo */
  .wmain .player.embedded:not(.locked):not(.vertical) { position: sticky; top: 0; z-index: 15; }
  .wmain .player.embedded.vertical { aspect-ratio: 4 / 5; max-height: 72vh; }
}
@media (max-width: 640px) {
  .sitehead { gap: 14px; height: 56px; }
  .sitehead .brand { font-size: 24px; }
  .sitenav { display: none; }
  .hbtn { height: 34px; padding: 0 11px; font-size: 13.5px; }
  .hbtn.acct span { display: none; }
  .hbtn.acct { padding: 0 8px; }
  .feedintro { padding: 22px 20px; margin-top: 10px; }
  .feedhead { margin-top: 20px; }
  .sechd { font-size: 18px; }
  .player.embedded .controls { padding: 34px 6px 2px; }
  .player.embedded .row { height: 42px; }
  .lock { padding: 24px 16px; }
  .lockbox { gap: 10px; }
  .lockbox p { font-size: 14.5px; }
  .uncard { width: 40vw; }
  .upnext { gap: 8px; padding: 10px; }
  .unbtns .btn { min-height: 36px; padding: 6px 14px; font-size: 14px; }
  .authwrap { padding: 20px 12px; }
  .authbox { padding: 26px 20px 24px; }
  .pluscard.big { padding: 34px 22px 26px; }
  .pluscard.big .pluslogo .brand, .pluscard.big .plusword { font-size: 36px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 380px) {
  .sitehead .headright .hbtn.ghost:not(.acct) { display: none; } /* "Log in" resta nella pagina; in alto basta "Sign up free" */
}
