/* Stile comune delle pagine pubbliche (Home, Carica playlist, Download, Collega la TV, VPN, Inviti, Trakt,
   Privacy, Termini, 404), sullo stile di apple.com. Le pagine di servizio (admin, rivenditori, elimina account,
   reimposta password, captcha) usano solo styles.css, con gli stessi colori e lo stesso marchio. Barra in alto e piè di pagina li scrive sito.js. */
:root {
  --sx-bg: #000;
  --sx-bg-2: #0b0a12;
  --sx-card: #15131f;
  --sx-card-2: #1c1a29;
  --sx-line: rgba(255, 255, 255, 0.1);
  --sx-text: #f5f5f7;
  --sx-muted: #a1a1b0;
  --sx-accent: #a259ff;
  --sx-accent-hover: #b175ff;
  --sx-grad: linear-gradient(90deg, #a259ff 0%, #e04fd2 55%, #ff7a59 100%);
  --sx-radius: 28px;
  --sx-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  /* Variabili di styles.css riportate ai nuovi colori, per le pagine che lo caricano ancora */
  --night: #000;
  --ink: #f5f5f7;
  --muted: #a1a1b0;
  --line: rgba(255, 255, 255, 0.12);
  --card: #15131f;
  --violet: #a259ff;
  --grad: linear-gradient(90deg, #a259ff 0%, #e04fd2 55%, #ff7a59 100%);
}
html { scroll-behavior: smooth; }
body.sx {
  margin: 0; min-height: 100vh;
  background: var(--sx-bg); background-image: none;
  color: var(--sx-text);
  font-family: var(--sx-font);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  line-height: 1.47;
}
body.sx a { color: var(--sx-accent); text-decoration: none; }
body.sx a:hover { text-decoration: underline; }
body.sx img { max-width: 100%; }

/* ---------- Barra in alto (sito.js) ---------- */
.sx-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--sx-line);
}
.sx-nav-in { max-width: 1024px; margin: 0 auto; height: 56px; padding: 0 22px; display: flex; align-items: center; gap: 26px; font-size: 12.5px; }
body.sx .sx-nav a { text-decoration: none; }
/* Marchio: icona dell'app (la stessa del televisore) e scritta STREAMX con la X nei colori del logo */
.sx-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--sx-text); text-decoration: none; }
body.sx a.sx-brand:hover { text-decoration: none; }
.sx-brand img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 4px 14px rgba(162, 89, 255, 0.35); }
.sx-brand span { font-size: 19px; font-weight: 800; font-style: italic; letter-spacing: 0.02em; line-height: 1; color: #fff; }
.sx-brand b { font-weight: 800; background: linear-gradient(90deg, #46e3f7 0%, #b47cff 50%, #f25cff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 2px; }
.sx-nav .sx-brand { margin-right: auto; }
body.sx .sx-nav a.sx-link { color: rgba(245, 245, 247, 0.8); transition: color .2s; white-space: nowrap; }
body.sx .sx-nav a.sx-link:hover, body.sx .sx-nav a.sx-link.on { color: #fff; }
body.sx .sx-nav a.sx-cta { background: var(--sx-text); color: #000; padding: 5px 12px; border-radius: 980px; font-weight: 500; white-space: nowrap; }
/* Pulsanti dell'account (sito.js): «Accedi» col bordo, «Registrati» pieno; con la sessione aperta solo «Il mio account» */
.sx-acts { display: inline-flex; align-items: center; gap: 8px; }
body.sx .sx-nav a.sx-cta { border: 1px solid var(--sx-text); font-weight: 600; transition: background .2s, border-color .2s, color .2s; }
body.sx .sx-nav a.sx-cta:hover { background: #fff; border-color: #fff; }
body.sx .sx-nav a.sx-cta.ghost { background: transparent; color: var(--sx-text); border-color: rgba(255, 255, 255, 0.45); }
body.sx .sx-nav a.sx-cta.ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; }
.sx-menu { display: none; background: none; border: 0; color: var(--sx-text); width: 36px; height: 36px; margin: 0; padding: 0; font-size: 20px; cursor: pointer; }
/* Le pagine con moduli colorano tutti i pulsanti: il menu resta una semplice icona */
body.sx .sx-nav button.sx-menu { background: none; border-radius: 8px; padding: 0; margin: 0; width: 36px; font-weight: 400; }
body.sx .sx-nav button.sx-menu:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- Piè di pagina (sito.js) ---------- */
.sx-foot { border-top: 1px solid var(--sx-line); padding: 30px 22px 50px; font-size: 12px; color: #86868b; background: var(--sx-bg); }
.sx-foot-in { max-width: 1024px; margin: 0 auto; }
.sx-foot p { margin: 0 0 14px; line-height: 1.5; }
.sx-foot nav { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
body.sx .sx-foot a { color: #86868b; }
body.sx .sx-foot a:hover { color: var(--sx-text); text-decoration: none; }
.sx-foot select { width: auto; margin-left: auto; padding: 6px 10px; font-size: 12px; border-radius: 8px; background: var(--sx-card); color: var(--sx-text); border: 1px solid var(--sx-line); }

/* ---------- Sezioni della Home ---------- */
.sx .section { padding: 110px 22px; text-align: center; }
.sx .wrap { max-width: 1024px; margin: 0 auto; }
.sx .eyebrow { font-size: 21px; font-weight: 600; color: var(--sx-muted); margin: 0 0 8px; }
.sx .headline { font-size: clamp(40px, 7vw, 80px); font-weight: 700; line-height: 1.05; letter-spacing: -0.035em; margin: 0; }
.sx .title { font-size: clamp(32px, 5vw, 56px); font-weight: 700; line-height: 1.07; letter-spacing: -0.03em; margin: 0; }
.sx .lead { font-size: clamp(19px, 2.2vw, 24px); color: var(--sx-muted); max-width: 680px; margin: 18px auto 0; line-height: 1.38; font-weight: 400; }
.sx .grad { background: var(--sx-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.sx .buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; align-items: center; }
body.sx a.pill { display: inline-flex; align-items: center; gap: 6px; padding: 12px 24px; border-radius: 980px; font-size: 17px; font-weight: 500; transition: transform .15s, background .2s; text-decoration: none; }
body.sx a.pill:hover { transform: scale(1.03); text-decoration: none; }
body.sx a.pill.primary { background: var(--sx-accent); color: #fff; }
body.sx a.pill.primary:hover { background: var(--sx-accent-hover); }
body.sx a.pill.outline { color: var(--sx-text); border: 1px solid rgba(255, 255, 255, 0.45); padding: 11px 23px; }
body.sx a.pill.outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
body.sx a.more { color: var(--sx-accent); font-size: 17px; }
body.sx a.more::after { content: " ›"; }

.sx .section.hero { padding-top: 90px; padding-bottom: 40px; background: radial-gradient(70% 55% at 50% 0%, rgba(162, 89, 255, 0.28), transparent 70%); }
.sx .stage { position: relative; max-width: 980px; margin: 70px auto 0; }
.sx .tv { border-radius: 18px; overflow: hidden; border: 10px solid #1a1a1f; box-shadow: 0 40px 120px rgba(162, 89, 255, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.06); }
.sx .tv img, .sx .phone img { display: block; width: 100%; height: auto; }
.sx .tv-foot { width: 32%; height: 10px; margin: 0 auto; background: linear-gradient(#26262c, #121216); border-radius: 0 0 10px 10px; }
.sx .phone { position: absolute; right: -2%; bottom: -8%; width: 22%; border-radius: 34px; overflow: hidden; border: 8px solid #1a1a1f; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08); }

.sx .bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; margin-top: 56px; text-align: left; }
.sx .tile { background: var(--sx-card); border-radius: var(--sx-radius); padding: 36px; overflow: hidden; position: relative; min-height: 300px; display: flex; flex-direction: column; }
.sx .tile h3 { font-size: 28px; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 10px; font-weight: 700; }
.sx .tile p { color: var(--sx-muted); font-size: 17px; margin: 0; }
.sx .tile .kicker { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.sx .span-4 { grid-column: span 4; }
.sx .span-3 { grid-column: span 3; }
.sx .span-2 { grid-column: span 2; }
.sx .tile.shot { padding-bottom: 0; }
.sx .tile.shot img { display: block; margin-top: 30px; border-radius: 14px 14px 0 0; border: 1px solid var(--sx-line); border-bottom: 0; }
.sx .tile.phone-shot { padding-bottom: 0; }
.sx .tile.phone-shot img { display: block; width: 70%; height: 330px; margin: 28px auto 0; object-fit: cover; object-position: top; border-radius: 22px 22px 0 0; border: 1px solid var(--sx-line); border-bottom: 0; }
.sx .big-num { font-size: 72px; font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin-top: auto; padding-top: 18px; }

.sx .band { background: var(--sx-bg-2); }
.sx .section.account-band { padding-top: 90px; padding-bottom: 90px; }
.sx .wide-shot { margin: 56px auto 0; max-width: 1100px; border-radius: 22px; overflow: hidden; border: 1px solid var(--sx-line); }
.sx .wide-shot img { display: block; width: 100%; height: auto; }

.sx .platforms { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-top: 50px; }
.sx .plat { background: var(--sx-card); border-radius: 20px; padding: 26px 10px 20px; font-size: 14px; color: var(--sx-muted); }
.sx .plat svg { width: 40px; height: 40px; margin: 0 auto 12px; display: block; color: var(--sx-text); }
.sx .plat b { display: block; color: var(--sx-text); font-size: 15px; font-weight: 600; }

/* Loghi degli store: si accendono quando c'è il link (store.js / data-store) */
.sx .stores { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
body.sx a.store { display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px; background: #000; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 12px; text-align: left; color: var(--sx-text); transition: border-color .2s, transform .15s; text-decoration: none; }
body.sx a.store:hover { border-color: #fff; transform: translateY(-2px); text-decoration: none; }
.sx .store svg { width: 26px; height: 26px; flex: none; }
.sx .store small { display: block; font-size: 10.5px; color: var(--sx-muted); line-height: 1.1; }
.sx .store span { display: block; font-size: 17px; font-weight: 600; line-height: 1.15; }
body.sx a.store.soon { opacity: 0.45; pointer-events: none; }
.sx .apk-line { font-size: 15px; color: var(--sx-muted); margin-top: 22px; }

.sx .premium { background: radial-gradient(60% 80% at 50% 100%, rgba(224, 79, 210, 0.22), transparent 70%), var(--sx-bg); }
.sx .checks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 50px; text-align: left; }
.sx .check { background: var(--sx-card); border-radius: 22px; padding: 28px; }
.sx .check b { display: block; font-size: 19px; margin-bottom: 6px; }
.sx .check span { color: var(--sx-muted); font-size: 16px; }

.sx .faq { max-width: 760px; margin: 50px auto 0; text-align: left; }
.sx .faq details { border-bottom: 1px solid var(--sx-line); padding: 22px 4px; }
.sx .faq summary { cursor: pointer; font-size: 19px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.sx .faq summary::-webkit-details-marker { display: none; }
.sx .faq summary::after { content: "+"; color: var(--sx-accent); font-size: 26px; font-weight: 300; line-height: 1; transition: transform .2s; }
.sx .faq details[open] summary::after { transform: rotate(45deg); }
.sx .faq p { color: var(--sx-muted); margin: 12px 0 0; font-size: 17px; }

/* Avvisi (esito-email.js sulla Home; .msg delle pagine con i moduli) */
.sx .msg { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 15px; display: none; text-align: left; }
.sx .msg.ok { display: block; background: rgba(40, 180, 90, 0.16); border: 1px solid rgba(40, 180, 90, 0.5); }
.sx .msg.err { display: block; background: rgba(255, 90, 110, 0.14); border: 1px solid rgba(255, 90, 110, 0.5); }
.sx .hero .in > .msg { margin: 0 auto 26px !important; max-width: 560px !important; }

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .sx .reveal { animation: sx-sale linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
    @keyframes sx-sale { from { opacity: 0; transform: translateY(40px) scale(.98); } to { opacity: 1; transform: none; } }
  }
}

/* ---------- Pagine «a scheda» (Collega la TV, Inviti, Trakt, Privacy, Termini, 404, Download) ---------- */
body.sx > main:not(.home):not(.section) { max-width: 620px; margin: 0 auto; padding: 64px 22px 80px; }
body.sx main > .logo { display: none; }
body.sx main > h1, body.sx main .card h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; margin: 0 0 12px; }
body.sx .logo + h1::before { display: none; }
body.sx > main:not(.home) p.lead { color: var(--sx-muted); font-size: 19px; line-height: 1.42; margin: 0 0 28px; }
body.sx .dl-head p.lead { margin: 16px auto 0; }
body.sx .card { background: var(--sx-card); border: 1px solid var(--sx-line); border-radius: 22px; padding: 26px; margin-bottom: 18px; box-shadow: none; backdrop-filter: none; }
body.sx label { color: var(--sx-muted); font-size: 13px; }
body.sx input, body.sx select { border-radius: 12px; border: 1px solid var(--sx-line); background: #0d0c14; color: var(--sx-text); font-size: 16px; padding: 12px 14px; }
body.sx input:focus, body.sx select:focus { outline: 2px solid var(--sx-accent); border-color: transparent; }
body.sx button { border-radius: 980px; background: var(--sx-accent); font-weight: 500; font-size: 16px; padding: 12px; }
body.sx button:not(:disabled):hover { background: var(--sx-accent-hover); filter: none; }
body.sx button.secondary { background: transparent; border: 1px solid var(--sx-line); color: var(--sx-text); }
body.sx button.secondary:not(:disabled):hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.35); }
body.sx button.social.google { background: #fff; color: #1f1f1f; }
body.sx button.social.apple { background: #000; color: #fff; border: 1px solid var(--sx-line); }
body.sx button.pw-toggle { background: transparent; border-radius: 8px; width: 38px; height: 38px; padding: 0; font-size: 1.15rem; }
body.sx button.pw-toggle:hover { background: rgba(255, 255, 255, 0.1); }
body.sx .tabs button { border-radius: 980px; }
body.sx .tabs button.active { background: #fff; color: #000; border-color: #fff; }
body.sx .msg { border-radius: 12px; }
body.sx small { color: var(--sx-muted); }
/* Pagine legali: testo lungo leggibile */
body.sx section[data-lang] h2 { font-size: 22px; letter-spacing: -0.02em; margin-top: 34px; }
body.sx section[data-lang] p, body.sx section[data-lang] li { color: #d2d2d7; line-height: 1.6; }

/* ---------- Download ---------- */
body.sx[data-page="download"] > main:not(.home):not(.section) { max-width: 1024px; }
body.sx[data-page="download"] .langbar { display: none; }
body.sx .dl-head { text-align: center; padding: 30px 0 46px; }
body.sx .dl-head h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; margin: 0; }
body.sx .dl-head .lead { max-width: 640px; margin: 16px auto 0; }
body.sx .dl-head .ver { margin-top: 10px; color: var(--sx-muted); font-size: 14px; }
body.sx .dl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }
body.sx .dl-grid .card { margin: 0; padding: 30px; }
body.sx .dl-grid .card:first-child { grid-row: span 3; }
body.sx .dl-grid h2 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 6px; }
body.sx .dl-grid .lead { font-size: 16px; }
body.sx .card .icon { float: right; width: 34px; height: 34px; color: var(--sx-text); margin-left: 12px; }
body.sx .card .icon svg { width: 34px; height: 34px; }
body.sx a.btn { border-radius: 980px; background: var(--sx-accent); color: #fff; font-weight: 500; text-decoration: none; }
body.sx a.btn:hover { background: var(--sx-accent-hover); text-decoration: none; }
body.sx a.btn.secondary { background: transparent; border: 1px solid var(--sx-line); color: var(--sx-text); }
body.sx a.btn.secondary:hover { background: rgba(255, 255, 255, 0.06); }
body.sx .big { background: #0d0c14; border-radius: 12px; }
body.sx .dl-safe { margin-top: 20px; }
.sx .note { margin-top: 26px; padding: 16px 18px; border-radius: 16px; background: rgba(162, 89, 255, 0.1); border: 1px solid rgba(162, 89, 255, 0.3); font-size: 15px; line-height: 1.5; color: #d2d2d7; }

/* ---------- Pagine con la vecchia testata HBO (.hx: Carica playlist, VPN) ---------- */
body.sx.hx .nav, body.sx.hx .foot { display: none; }
body.sx.hx .hero { min-height: 0; display: block; text-align: center; background: radial-gradient(70% 70% at 50% 0%, rgba(162, 89, 255, 0.28), transparent 70%), var(--sx-bg); }
body.sx.hx .hero::before { display: none; }
body.sx.hx .hero .in { max-width: 820px; margin: 0 auto; padding: 90px 22px 40px; }
body.sx.hx .kicker { background: none; padding: 0; color: var(--sx-muted); font-size: 21px; font-weight: 600; letter-spacing: 0; text-transform: none; margin-bottom: 8px; }
body.sx.hx .hero h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; }
body.sx.hx .hero p { color: var(--sx-muted); font-size: clamp(18px, 2vw, 22px); max-width: 680px; margin: 0 auto 26px; }
body.sx.hx .actions { justify-content: center; }
body.sx.hx .actions a { border-radius: 980px; font-weight: 500; }
body.sx.hx .actions .primary { background: var(--sx-accent); color: #fff; }
body.sx.hx .actions .ghost { background: transparent; color: var(--sx-accent); }
body.sx.hx .section { max-width: 1024px; padding-left: 22px; padding-right: 22px; text-align: left; }
body.sx.hx h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -0.025em; margin: 56px 0 18px; }
body.sx.hx main > h2:first-child { margin-top: 24px; }
body.sx.hx .step { aspect-ratio: auto; min-height: 170px; background: var(--sx-card); border: 0; border-radius: 22px; padding: 26px; }
body.sx.hx .step:hover { transform: none; }
body.sx.hx .step > b { background: var(--sx-grad); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 40px; }
body.sx.hx .card { background: var(--sx-card); border: 0; border-radius: 22px; padding: 28px; }
body.sx.hx .note { border-radius: 16px; }

@media (max-width: 860px) {
  .sx .section { padding: 80px 18px; }
  .sx .bento { grid-template-columns: 1fr; }
  .sx .span-4, .sx .span-3, .sx .span-2 { grid-column: auto; }
  .sx .tile { min-height: 0; padding: 28px; }
  .sx .platforms { grid-template-columns: repeat(3, 1fr); }
  .sx .checks { grid-template-columns: 1fr; }
  .sx .phone { width: 28%; right: 2%; bottom: -12%; border-width: 5px; border-radius: 22px; }
  .sx .tv { border-width: 6px; border-radius: 12px; }
  .sx-nav-in { gap: 14px; padding: 0 16px; }
  .sx-nav .sx-links { display: none; }
  .sx-menu { display: block; }
  .sx-nav.open .sx-links { display: flex; position: absolute; top: 56px; left: 0; right: 0; flex-direction: column; gap: 0; background: rgba(0, 0, 0, 0.94); border-bottom: 1px solid var(--sx-line); padding: 8px 22px 16px; }
  .sx-nav.open .sx-links a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--sx-line); }
  .sx-foot select { margin-left: 0; }
  body.sx .dl-grid { grid-template-columns: 1fr; }
  body.sx .dl-grid .card:first-child { grid-row: auto; }
}
@media (min-width: 861px) { .sx-links { display: flex; gap: 26px; } }
/* Telefoni stretti: del marchio resta l'icona, così «Accedi» e «Registrati» stanno sempre nella barra */
@media (max-width: 480px) { .sx-nav .sx-brand span { display: none; } .sx-nav-in { gap: 10px; } }
