/* === ALTADEFINIZIONE CLONE - CSS === */
/* Replica fedele del design system estratto dal sito originale */

/* --- Self-hosted Work Sans variable font (1 file = tutti i pesi 100..900) --- */
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/work-sans-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Work Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/work-sans-var-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Visually hidden (a11y/SEO: H1 nascosto visivamente ma leggibile da bot/screen reader) --- */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-body: #111111;
  --bg-header: linear-gradient(to bottom, #000 0%, #1c1c1c 100%);
  --bg-header-blur: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, rgba(28,28,28,0.65) 100%);
  --bg-card: #202020;
  --bg-dropdown: rgba(28,28,28,0.65);
  --primary: #0894D6;
  --primary-hover: #0aa8f0;
  --green: #198754;
  --text: #e9ecef;
  --text-muted: #999;
  --text-white: #fff;
  --border-color: rgba(255,255,255,0.2);
  --font: 'Work Sans', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --header-h: 72px;
  --container-max: 1320px;
  --radius: 6px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--text-white); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Audit fix 2026-04-10: tap target su link inline dentro pagine statiche
   (privacy/dmca) — i link in <p> erano ~16-20px alti, sotto la soglia 32px.
   Limitato a "long-form text" (paragrafi, h2, li) per non toccare gli inline
   link di card/swiper/header. */
.container > p > a,
.container > h2 > a,
.container > ul > li > a,
.container > ol > li > a {
  display: inline-block;
  padding: 0.4rem 0.15rem;
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  -webkit-tap-highlight-color: transparent;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-image: var(--bg-header);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  height: var(--header-h);
  display: flex;
  align-items: center;
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  gap: 0;
}

.header-logo .logo-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}
.header-logo .logo-icon {
  height: 36px;
  width: auto;
}
.logo-name { display: none; }
.header-logo .logo-sub {
  font-family: 'Work Sans', Arial, sans-serif;
  font-weight: 300;
  font-size: 12px;
  color: rgba(233, 236, 239, 0.5);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  flex-grow: 1;
  margin-left: 1rem;
  gap: 0;
}

.header-nav .nav-link {
  color: var(--text);
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color 0.2s;
  gap: 0.5rem;
}

.header-nav .nav-link:hover {
  color: var(--text-white);
}

.header-nav .nav-link.active {
  color: var(--primary);
}

.header-nav .nav-link svg {
  flex-shrink: 0;
}

/* Dropdown generi */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 460px;
  background-color: var(--bg-dropdown);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: var(--radius);
  padding: 1rem;
  z-index: 1001;
  border: 1px solid var(--border-color);
}

/* :hover solo su device con puntatore fine (mouse) — su touch iOS/Android
   il :hover diventa "sticky" al primo tap e conflige col toggle JS .open,
   risultato: il menu sembra non chiudersi/riaprirsi correttamente. */
@media (hover: hover) and (pointer: fine) {
  .dropdown:hover .dropdown-menu { display: block; }
}
.dropdown.open .dropdown-menu { display: block; }

.dropdown-menu .genre-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.dropdown-menu .genre-link {
  padding: 0.4rem 0.75rem;
  font-size: 0.85em;
  color: var(--text);
  border-radius: 4px;
  transition: background 0.2s;
}

.dropdown-menu .genre-link:hover {
  background-color: rgba(255,255,255,0.15);
  color: var(--text-white);
}

/* Spacer tra nav e search/random */
.nav-spacer { flex-grow: 1; }

/* Search */
.search-form {
  display: flex;
  align-items: center;
  position: relative;
  width: 240px;
  margin-left: 0.5rem;
}

.search-form .search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-form input {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.45rem 1rem 0.45rem 2.5rem;
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}

.search-form input::placeholder {
  color: var(--text-muted);
}

.search-form input:focus {
  border-color: var(--primary);
}

/* Mobile header */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 0.5rem;
}

/* Compact nav links on medium screens so they fit without hamburger */
@media (max-width: 1199px) and (min-width: 992px) {
  .header-nav .nav-link { padding: 0 0.4rem; font-size: 0.82rem; }
  .header-nav { margin-left: 0.5rem; }
  .search-form input { width: 140px; font-size: 0.82rem; }
}
@media (max-width: 991px) {
  .header-nav { display: none; }
  /* .search-form mobile rules removed: l'in-header form non si apre più,
     la lente apre l'overlay full-screen #msearch-overlay (vedi fine file) */
  .mobile-menu-btn { display: flex; }
  .mobile-search-btn { display: inline-flex; }
  .header .container { justify-content: space-between; flex-wrap: nowrap; position: relative; }
  .mobile-buttons { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }

  .header-nav.mobile-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - var(--header-h)) !important;
    height: calc(100dvh - var(--header-h)) !important;
    width: 100% !important;
    /* Audit fix 2026-04-10: era rgba(...,0.98) che lasciava trasparire la
       homepage (top10/genre chips) attraverso il menu — niente blur
       sufficiente su iOS Safari. Background completamente opaco. */
    background: #0b0b0b;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 1.5rem 1rem calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
    overflow-y: auto;
    z-index: 9999;
    gap: 0;
    align-items: stretch;
    margin: 0;
  }

  .header-nav.mobile-open .nav-link {
    height: auto;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .header-nav.mobile-open .nav-spacer { display: none; }

  .header-nav.mobile-open .dropdown-menu {
    position: static;
    width: 100%;
    box-shadow: none;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    margin-top: 0.5rem;
  }

  .header-nav.mobile-open .genre-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1600px) {
  .search-form { width: 280px; }
}

/* --- Sections --- */
.section {
  margin-bottom: 3rem;
  position: relative;
  z-index: 2;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  min-width: 0;
}

.section-title {
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0;
  /* Allow long titles to wrap or truncate cleanly on narrow viewports
     instead of pushing the showmore/arrow controls off the section. */
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.25;
}

.section-head .badge {
  background-color: var(--primary);
  color: #fff;
  padding: 0.2em 0.6em;
  border-radius: 4px;
  font-size: 0.75rem;
}

.showmore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-size: 0.85rem;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.55rem 0.5rem;
  margin-right: -0.5rem; /* visually re-align to the right edge while padding */
  min-height: 40px;
  -webkit-tap-highlight-color: transparent;
}

.showmore-btn:hover { color: var(--primary-hover); }

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-btn:hover { color: var(--text-white); }

/* --- Movie Cards / Poster Grid --- */
.poster-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1399px) { .poster-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 1199px) { .poster-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 991px) { .poster-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }
@media (max-width: 767px) { .poster-grid { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; } }
@media (max-width: 575px) { .poster-grid { grid-template-columns: repeat(2, 1fr); } }

.movie-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s;
}

.movie-card:hover {
  transform: scale(1.05);
  z-index: 5;
  box-shadow: 0 8px 25px rgba(0,0,0,0.5);
}

.movie-card .poster-wrap {
  position: relative;
  padding-top: 150%; /* Ratio 2:3 */
  background: #1a1a1a;
  overflow: hidden;
}

.movie-card .poster-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: filter 0.3s;
}

.movie-card:hover .poster-img {
  filter: brightness(0.6);
}

/* NEW badge */
.movie-card .new-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #e74c3c;
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  z-index: 3;
}

/* Freshness badges (NEW appena aggiunto / FRESH nuovo episodio / HOT) */
.movie-card .card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #fff;
  z-index: 4;
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
  text-transform: uppercase;
}
.movie-card .card-badge-new   { background: linear-gradient(135deg, #22c55e, #16a34a); }
.movie-card .card-badge-fresh { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.movie-card .card-badge-hot   { background: linear-gradient(135deg, #f97316, #dc2626); }
.movie-card .card-badge-soon  { background: linear-gradient(135deg, #a855f7, #6d28d9); font-size: 0.72rem; padding: 0.2rem 0.45rem; letter-spacing: 0.03em; }

/* === Lista A-Z (ultra minimal) === */
.laz {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  color: rgba(255,255,255,0.85);
}
.laz-head {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.laz-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}
.laz-sub {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
}
.laz-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 10;
  background: rgba(17,17,17,0.92);
  backdrop-filter: blur(8px);
  padding: 0.5rem 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.laz-nav-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.laz-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.laz-nav a:hover,
.laz-nav a.laz-active { color: #fff; background: rgba(255,255,255,0.12); }
.laz-sec {
  margin-bottom: 2rem;
  scroll-margin-top: calc(var(--header-h) + 56px);
}
.laz-letter {
  margin: 0 0 0.5rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 0.35rem;
}
.laz-list {
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: 3;
  column-gap: 1.5rem;
}
.laz-list li {
  break-inside: avoid;
  padding: 0.05rem 0;
  font-size: 0.85rem;
  line-height: 1.5;
}
.laz-list a {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  transition: color 0.1s;
  display: block;
  /* Audit fix 2026-04-10: tap target — were 19px tall inline links.
     12k titles × 16px padding adds page height but is necessary on touch.
     The content-visibility on .laz-sec means we don't pay layout cost
     for sections off-screen. */
  padding: 0.55rem 0;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.laz-list a:hover { color: #fff; }
.laz-y { color: rgba(255,255,255,0.45); font-size: 0.78rem; }
.laz-t {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 1px 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(6,182,212,0.95);
  background: rgba(6,182,212,0.14);
  border-radius: 3px;
  vertical-align: middle;
  line-height: 1.45;
}
@media (max-width: 900px) { .laz-list { column-count: 2; } }
@media (max-width: 575px) {
  .laz-list { column-count: 1; }
  .laz-title { font-size: 1.3rem; }
  .laz-letter { font-size: 1.15rem; }
  /* .laz-nav top è var(--header-h) — nessun override mobile necessario */
  .laz-nav-inner {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.1rem;
  }
  .laz-nav-inner::-webkit-scrollbar { display: none; }
  .laz-nav a { min-width: 32px; height: 32px; font-size: 0.78rem; padding: 0 0.3rem; }
}

/* === FAQ section (Domande Frequenti) === */
.faq-section { margin-top: 2.5rem; margin-bottom: 2rem; }
.faq-list {
  display: flex; flex-direction: column; gap: 0.6rem;
  max-width: 900px;
}
.faq-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
}
.faq-item[open] { background: rgba(255, 255, 255, 0.05); }
.faq-q {
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2.2rem;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  position: absolute; right: 1rem; top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem; font-weight: 400;
  color: rgba(255,255,255,0.55);
}
.faq-item[open] .faq-q::after { content: '\2212'; }
.faq-a {
  padding: 0 1rem 0.9rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.7);
}

/* Type badge (Film / Serie TV) */
.movie-card .type-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.72);
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1;
  z-index: 3;
  backdrop-filter: blur(4px);
}

/* Quality badge */
.movie-card .quality-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--green);
  color: #fff;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  z-index: 3;
}

/* Play button overlay */
.movie-card .play-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 50px; height: 50px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
  z-index: 4;
}

.movie-card:hover .play-overlay {
  transform: translate(-50%, -50%) scale(1);
}

.play-overlay svg {
  fill: #fff;
  width: 20px;
  height: 20px;
  margin-left: 3px;
}

/* Card info below poster */
.movie-card .card-info {
  padding: 0.5rem 0.25rem;
}

.movie-card .movie-title {
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
  /* Single line: no wrap, ellipsis. Tutte le card hanno la stessa altezza
     testo → niente disallineamento nel grid né sovrapposizione tra titoli. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  text-shadow: 0 1px 1px rgba(0,0,0,0.55);
}

.movie-card .movie-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  /* Single-line meta — wrap is OK on very narrow cards but never break a word */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Swiper Slider Sections --- */
.slider-section {
  position: relative;
}

.slider-section .swiper {
  overflow: hidden;
}
.slider-section {
  overflow: hidden;
}

.slider-section .swiper-slide {
  width: auto;
}

.slider-controls {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.slider-btn {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
/* Audit fix 2026-04-10: nascondi le frecce dei carousel sotto 768px.
   Sui touch device l'utente swipa nativamente, le frecce competono con
   "Mostra tutto" per lo spazio nel section-head e schiacciano il titolo.
   Sopra il breakpoint le frecce restano per chi usa mouse. */
@media (max-width: 767px) {
  .slider-controls { display: none; }
}

.slider-btn:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.slider-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.slider-btn svg {
  width: 14px;
  height: 14px;
}

/* --- Hero / Player Area --- */
.hero-player {
  position: relative;
  width: 100%;
  min-height: 480px;
  overflow: hidden;
  margin-bottom: 2rem;
}

@media (max-width: 991px) {
  .hero-player { min-height: 300px; }
}

@media (max-width: 575px) {
  .hero-player { min-height: 220px; }
}

.hero-player .backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.35);
}

.hero-player .hero-gradient {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 60%;
  background: linear-gradient(to top, var(--bg-body) 0%, transparent 100%);
  z-index: 2;
}

.hero-player .hero-content {
  position: absolute;
  bottom: 2rem;
  left: 0; right: 0;
  z-index: 3;
}

.hero-player .hero-title {
  font-size: 2rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-player .hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.hero-player .hero-plot {
  max-width: 600px;
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0.85;
  margin-bottom: 1rem;
  max-height: 68px;
  overflow: hidden;
}

.hero-controls {
  display: flex;
  gap: 0.75rem;
}

/* Player overlay gradient */
.player-overlay-gradient {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* Player clickable area */
.player[role="button"] {
  cursor: pointer;
}

.player[role="button"]:hover .play-btn-large {
  background: var(--primary);
  transform: translate(-50%, -60%) scale(1.15);
  box-shadow: 0 0 40px rgba(8,148,214,0.5);
}

.player[role="button"]:hover .play-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.player[role="button"]:hover .layer-image {
  filter: brightness(0.25);
}

.player .layer-image {
  transition: filter 0.4s;
}

/* Play button large */
.play-btn-large {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  width: 80px; height: 80px;
  background: rgba(8,148,214,0.85);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 30px rgba(8,148,214,0.3);
}

.play-btn-large svg {
  width: 32px;
  height: 32px;
  fill: #fff;
  margin-left: 4px;
}

/* Play label under button */
.play-label {
  position: absolute;
  top: calc(50% + 55px);
  left: 50%;
  transform: translate(-50%, 8px);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0;
  transition: all 0.35s;
  z-index: 5;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  pointer-events: none;
  white-space: nowrap;
}

/* --- Detail Page - Player --- */
.player {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  margin-bottom: 0;
}

@media (max-width: 991px) {
  .player { min-height: 280px; }
}

.player .layer-image {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.3);
}

.player .player-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}

/* Player bar */
.player-bar {
  position: relative;
  background: #050505;
  padding: 0.75rem 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.player-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.player-bar .control-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  padding: 0.4rem 0.5rem;
  transition: color 0.2s;
}

.player-bar .control-btn:hover {
  color: var(--text-white);
}

.player-bar .control-btn svg {
  width: 16px;
  height: 16px;
}

.player-bar .control-btn .badge {
  background: var(--primary);
  color: #fff;
  padding: 0.1em 0.45em;
  border-radius: 3px;
  font-size: 0.7rem;
  margin-left: 0.25rem;
}

/* --- CTA Buttons --- */
.cta-section {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 0;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  border: 2px solid;
}

.btn-cta-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-cta-primary:hover {
  background: var(--primary-hover);
}

.btn-cta-outline {
  background: transparent;
  border-color: var(--text-white);
  color: var(--text-white);
}

.btn-cta-outline:hover {
  background: rgba(255,255,255,0.1);
}

/* --- Detail Page --- */
.dp { padding-bottom: 0; }

/* TV Selector bar (Stagione: 1 2 3 / Episodio: 1 2 3) */
.dp-tv-selector {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0.35rem 0;
}
.dp-sel-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0;
}
.dp-sel-label {
  font-size: 0.78rem;
  color: #888;
  min-width: 68px;
  flex-shrink: 0;
  font-weight: 500;
}
.dp-sel-chips {
  display: flex;
  gap: 0.3rem;
  overflow-x: auto;
  scrollbar-width: none;
  flex-wrap: nowrap;
}
.dp-sel-chips::-webkit-scrollbar { display: none; }
.dp-sel-chip {
  min-width: 38px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.6rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #b5b5b5;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.dp-sel-chip:hover { background: rgba(255,255,255,0.1); color: #fff; }
.dp-sel-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* Short-height viewports: compress header + season/episode selector so the
   player box keeps enough vertical space for the info overlay.
   Targets laptop screens like 1098×618 @1.75 DPR (491px effective height). */
@media (max-height: 650px) and (min-width: 576px) {
  :root { --header-h: 56px; }
  .header-logo .logo-icon { height: 28px; }
  .header-logo .logo-sub { font-size: 0.5rem; }
  .dp-tv-selector { padding: 0.15rem 0; }
  .dp-sel-row { padding: 0; gap: 0.35rem; }
  .dp-sel-label { font-size: 0.72rem; min-width: 56px; }
  .dp-sel-chip {
    height: 28px;
    min-width: 32px;
    font-size: 0.75rem;
    padding: 0 0.45rem;
    border-radius: 5px;
  }
  .dp-sel-chips { gap: 0.2rem; }
  /* Compressed selector ~62px instead of ~94px */
  .dp-tv-selector + .dp-main .dp-player-box {
    height: calc(100vh - var(--header-h) - 62px - var(--dp-actions-h));
    height: calc(100dvh - var(--header-h) - 62px - var(--dp-actions-h));
  }
  /* Smaller actions row */
  :root { --dp-actions-h: 52px; }
  .dp-action { height: 38px; font-size: 0.82rem; padding: 0.5rem 1rem; }
  /* Compact info overlay: hide plot + crew, smaller title, so it doesn't
     fill the entire player box on short screens */
  .dp-plot { display: none; }
  .dp-crew { display: none; }
  .dp-title { font-size: 1.1rem; margin-bottom: 0.3rem; }
  .dp-badges { margin-bottom: 0.3rem; gap: 0.25rem; }
  .dp-genres { margin-bottom: 0.2rem; font-size: 0.75rem; }
  .dp-now-playing { font-size: 0.72rem; margin-top: 0.2rem; }
  .dp-box-info { padding: 1rem; }
}

/* Episodi non disponibili / pending — visibili ma non cliccabili.
   L'utente vede SEMPRE il numero corretto di episodi (mai più placeholder fantasma
   linkati a vixsrc 404). Pending = non ancora in DB ma TMDB lo conosce. */
.dp-sel-chip.dp-ep-unavailable,
.dp-sel-chip.dp-ep-pending {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  position: relative;
}
.dp-sel-chip.dp-ep-unavailable:hover,
.dp-sel-chip.dp-ep-pending:hover {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
}
.dp-sel-chip.dp-ep-pending::after {
  content: '·';
  position: absolute;
  top: -2px;
  right: 4px;
  font-size: 14px;
  color: var(--primary, #e50914);
}

/* Banner inline mostrato dal preflight ep-check quando vixsrc 404a un episodio.
   Sostituisce il vecchio comportamento "404 di vixsrc dentro al nostro iframe". */
.ep-unavailable-banner {
  background: #2a1010;
  border: 1px solid #5a1f1f;
  border-left: 4px solid #e50914;
  color: #fff;
  padding: 12px 40px 12px 16px;
  margin: 12px 0;
  border-radius: 6px;
  font-size: 14px;
  position: relative;
  line-height: 1.5;
}
.ep-unavailable-banner strong { color: #ffb4b4; }
.ep-banner-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.6);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.ep-banner-close:hover { color: #fff; }

/* === Chip-row scroller (overflow only) === */
/* Wrappa .dp-sel-chips per aggiungere frecce + gradient fade quando i chip
   superano la larghezza del viewport (es. Simpsons con 37 stagioni / 25 episodi).
   Le frecce e il fade compaiono SOLO se JS aggiunge .has-overflow al wrap. */
.dp-sel-chips-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.dp-sel-arrow { display: none; }

.dp-sel-chips-wrap.has-overflow::before,
.dp-sel-chips-wrap.has-overflow::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.2s;
}
.dp-sel-chips-wrap.has-overflow::before {
  left: 0;
  background: linear-gradient(to right, #111 0%, transparent 100%);
}
.dp-sel-chips-wrap.has-overflow::after {
  right: 0;
  background: linear-gradient(to left, #111 0%, transparent 100%);
}
.dp-sel-chips-wrap.has-overflow.at-start::before { opacity: 0; }
.dp-sel-chips-wrap.has-overflow.at-end::after   { opacity: 0; }

.dp-sel-chips-wrap.has-overflow .dp-sel-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(20,20,20,0.92);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s, background 0.15s;
}
.dp-sel-chips-wrap.has-overflow .dp-sel-arrow:hover {
  background: rgba(45,45,45,0.95);
}
.dp-sel-arrow-left  { left: -2px; }
.dp-sel-arrow-right { right: -2px; }
.dp-sel-chips-wrap.has-overflow.at-start .dp-sel-arrow-left  { opacity: 0; pointer-events: none; }
.dp-sel-chips-wrap.has-overflow.at-end   .dp-sel-arrow-right { opacity: 0; pointer-events: none; }

.dp-sel-chips-wrap.has-overflow .dp-sel-chips { cursor: grab; }
.dp-sel-chips-wrap.has-overflow .dp-sel-chips.is-dragging {
  cursor: grabbing;
  user-select: none;
  scroll-behavior: auto;
}

@media (max-width: 575px) {
  .dp-sel-chips-wrap.has-overflow .dp-sel-arrow { display: none; }
}


/* Main layout - fills viewport, no scroll needed for the hero */
.dp-main {
  padding-top: 0;
  padding-bottom: 0;
}

/* Player box fills the remaining viewport height after the header AND
   leaves room for the action buttons row (Trailer / Download) below.
   Uses 100dvh (dynamic viewport height) so on mobile the address bar
   collapse/expand doesn't make the box grow past the visible area.
   --dp-actions-h is the reserved height for the actions row. */
:root { --dp-actions-h: 64px; }
.dp-player-box {
  position: relative;
  width: 100%;
  /* Fallback for browsers without dvh */
  height: calc(100vh - var(--header-h, 72px) - var(--dp-actions-h));
  height: calc(100dvh - var(--header-h, 72px) - var(--dp-actions-h));
  min-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.06);
}
/* When TV selector is present, subtract its height too */
.dp-tv-selector + .dp-main .dp-player-box {
  height: calc(100vh - var(--header-h, 72px) - 94px - var(--dp-actions-h));
  height: calc(100dvh - var(--header-h, 72px) - 94px - var(--dp-actions-h));
}

/* === Action buttons row (Trailer + Verdetto + Commenti + Scarica) — sits BELOW the player box === */
.dp-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.6rem;
  height: var(--dp-actions-h);
  padding: 0.6rem 0;
  box-sizing: border-box;
}
/* The .dp-download wrapper carries data-tmdb/data-type for the JS check
   but must not break the flex layout — display:contents makes it transparent
   so its child anchor becomes a direct flex item of .dp-actions. When the
   JS clears the inline style="display:none" this rule kicks back in. */
.dp-actions .dp-download { display: contents; }
.dp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  height: 44px;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.dp-action:active { transform: scale(0.97); }
.dp-action svg { flex-shrink: 0; }
.dp-action-trailer {
  background: rgba(255,255,255,0.08);
  color: var(--text-white);
  border-color: rgba(255,255,255,0.15);
}
.dp-action-trailer:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
}
.dp-action-trailer svg { color: #ff0033; }
.dp-action-verdict,
.dp-action-comments {
  background: rgba(255,255,255,0.08);
  color: var(--text-white);
  border-color: rgba(255,255,255,0.15);
}
.dp-action-verdict:hover,
.dp-action-comments:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.25);
}
.dp-action-verdict svg { color: #a78bfa; }
.dp-action-comments svg { color: #cfcfcf; }
.dp-action-comments { position: relative; }
.dp-action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 0.4rem;
  margin-left: 0.2rem;
  background: #e50914;
  color: #fff;
  border-radius: 9px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.dp-action-download {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.dp-action-download:hover {
  background: #0aa3eb;
  border-color: #0aa3eb;
}
.dp-action-download.disabled { opacity: 0.4; pointer-events: none; }

/* Scroll offset for in-page jumps (Verdetto / Commenti) — evita che l'header sticky
   copra il titolo della section target dopo smooth scroll. */
.ai-editorial,
.comments {
  scroll-margin-top: calc(var(--header-h, 72px) + 12px);
}

@media (max-width: 575px) {
  /* Stack verticale icon+label su mobile per far stare 4 bottoni in 1 riga su 360-390px */
  :root { --dp-actions-h: 60px; }
  .dp-actions {
    gap: 0.3rem;
    padding: 0.4rem 0.25rem;
  }
  .dp-action {
    flex: 1;
    min-width: 0;
    max-width: none;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 0.2rem;
    height: 52px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }
  .dp-action span { line-height: 1; }
  .dp-action svg { width: 18px; height: 18px; }
  /* "Vale la pena?" (13 char) + "Commenti" con badge pallino sono i label più lunghi:
     scalo leggermente il testo su viewport stretti per evitare truncation. */
  .dp-action-verdict span { font-size: 0.64rem; letter-spacing: -0.01em; }
  /* Sul mobile il badge commenti diventa un pallino assoluto in alto-destra
     (pattern notifica app-store) per non spingere fuori il label. */
  .dp-action-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    min-width: 16px;
    height: 15px;
    padding: 0 0.3rem;
    font-size: 0.62rem;
    margin-left: 0;
  }
}
.dp-box-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Focus verso il tercio superiore dell'inquadratura: su viewport wide il box
     è più largo del 16:9 dell'immagine → cover crop verticale. Senza object-position
     custom, il 50%/50% default taglia simmetricamente alto/basso, rimuovendo i visi
     che nei backdrop TMDB stanno tipicamente nel tercio alto dell'immagine. */
  object-position: center 25%;
}
.dp-box-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 45%, rgba(0,0,0,0.2) 100%);
}
.dp-box-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

/* Play button */
.dp-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 40px rgba(8,148,214,0.4);
  -webkit-tap-highlight-color: transparent;
}
.dp-play svg { margin-left: 3px; }
.dp-play:hover { transform: scale(1.1); box-shadow: 0 0 50px rgba(8,148,214,0.6); }
.dp-play:active { transform: scale(0.95); }

/* Info overlay inside player box */
.dp-box-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 45%;
  max-width: 520px;
  padding: 1.5rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.dp-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.dp-badges {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.dp-badge {
  font-size: 0.82rem;
  color: #e0e0e0;
  background: rgba(255,255,255,0.12);
  padding: 0.22em 0.6em;
  border-radius: 3px;
  backdrop-filter: blur(4px);
  line-height: 1.4;
}
.dp-badge-imdb {
  background: #f5c518;
  color: #000;
  font-weight: 700;
}
.dp-genres {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}
.dp-genres a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  /* Audit fix 2026-04-10: tap target — these were 15px tall inline links.
     Padding 0.45rem makes the hit area ~36px without changing layout much. */
  display: inline-block;
  padding: 0.45rem 0.05rem;
  -webkit-tap-highlight-color: transparent;
}
.dp-genres a:hover { color: var(--primary); }
.dp-plot {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  margin-bottom: 0.4rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.dp-crew {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.55;
}
.dp-crew-label { color: rgba(255,255,255,0.35); margin-right: 0.2rem; }
.dp-crew a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  display: inline-block;
  padding: 0.5rem 0.05rem;
  -webkit-tap-highlight-color: transparent;
}
.dp-crew a:hover { color: var(--primary); }

/* Now playing label */
.dp-now-playing {
  font-size: 0.78rem;
  color: var(--primary);
  margin-top: 0.4rem;
  font-weight: 500;
}

/* Legacy .dp-download / .btn-download styles removed:
   the download button now lives inside .dp-actions below the player box
   (see .dp-action / .dp-action-download rules above). */

/* Related - intentionally below the fold (only seen if user scrolls down) */
.dp-related {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

/* Tablet */
@media (max-width: 991px) {
  .dp-main { padding-top: 0; }
  .dp-player-box { border-radius: 10px; }
  .dp-box-info { width: 55%; padding: 1rem; }
  .dp-title { font-size: 1.15rem; }
  .dp-plot { -webkit-line-clamp: 2; font-size: 0.82rem; line-height: 1.5; }
  .dp-box-overlay { background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 55%, rgba(0,0,0,0.15) 100%); }
}
/* Mobile */
@media (max-width: 575px) {
  .dp-player-box { border-radius: 8px; }
  /* Play button nel terzo alto del box — evita sovrapposizione con info panel */
  .dp-box-play { top: 30%; }
  /* Stronger backdrop overlay for legibility */
  .dp-box-overlay { background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 40%, rgba(0,0,0,0.4) 100%); }
  .dp-title { font-size: 1.1rem; margin-bottom: 0.35rem; line-height: 1.2; }
  .dp-badges { margin-bottom: 0.45rem; gap: 0.35rem; }
  .dp-badge { font-size: 0.82rem; padding: 0.22em 0.55em; }
  .dp-genres { font-size: 0.78rem; margin-bottom: 0.35rem; }
  /* Plot and crew visible on mobile */
  .dp-plot {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 0.4rem;
    color: rgba(255,255,255,0.88);
  }
  .dp-crew {
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255,255,255,0.7);
  }
  .dp-crew-label { color: rgba(255,255,255,0.4); }
  /* Override tap-target padding dei link: sulla base sono 0.5rem/0.45rem per
     l'audit accessibility (36px tap target). Su mobile l'info panel è compatto
     e quei padding enormi gonfiavano l'altezza facendo salire il contenuto
     fino a sovrapporsi col play button centrato. 0.15rem = touch-friendly
     (il link è comunque inline-block e il touch slop del browser compensa). */
  .dp-crew a { color: rgba(255,255,255,0.75); padding: 0.15rem 0.05rem; }
  .dp-genres a { padding: 0.15rem 0.05rem; }
  /* Info panel: full-width, altezza massima 55% del box così non raggiunge
     mai il play button (posizionato a top:30%). Gradient corto. */
  .dp-box-info {
    width: 100%;
    max-width: none;
    max-height: 55%;
    overflow: hidden;
    padding: 0.75rem 0.85rem 0.65rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 45%, rgba(0,0,0,0.25) 75%, rgba(0,0,0,0) 100%);
  }
  .dp-title { font-size: 1.05rem; margin-bottom: 0.25rem; }
  .dp-badges { margin-bottom: 0.3rem; }
  .dp-genres { margin-bottom: 0.2rem; }
  .dp-plot { margin-bottom: 0.2rem; -webkit-line-clamp: 2; font-size: 0.78rem; line-height: 1.4; }
  .dp-play { width: 56px; height: 56px; }
  .dp-now-playing { font-size: 0.75rem; margin-top: 0.2rem; }
  .dp-download { margin-top: 0.5rem; }
  .btn-download { padding: 0.45rem 1rem; font-size: 0.78rem; }
}

/* Very tight phones (< 380px or short height): clamp plot to 2 lines */
@media (max-width: 380px), (max-height: 700px) and (max-width: 575px) {
  .dp-plot { -webkit-line-clamp: 2; }
}
.dp-related-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.7rem;
  color: rgba(255,255,255,0.9);
}
.dp-related-row {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* Allow last card not to be cut off mid-scroll */
  scroll-snap-type: x proximity;
  scroll-padding-left: 0;
  padding-bottom: 0.5rem;
}
.dp-related-row::-webkit-scrollbar { display: none; }
.dp-related-card {
  flex-shrink: 0;
  width: 110px;
  scroll-snap-align: start;
}
.dp-related-card img {
  width: 110px;
  height: 165px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

/* Desktop */
@media (min-width: 768px) {
  .dp-hero { max-height: 60vh; }
  .dp-title { font-size: 2.2rem; }
  .dp-play { width: 70px; height: 70px; }
  .dp-play svg { width: 36px; height: 36px; }
  .dp-info { padding: 1rem 2rem; max-width: 800px; }
  .dp-plot { -webkit-line-clamp: 5; }
  .dp-seasons { padding: 0 2rem; max-width: 800px; }
  .dp-related { padding: 1rem 2rem; }
  .dp-related-card { width: 110px; }
  .dp-related-card img { width: 110px; height: 165px; }
}
@media (min-width: 1200px) {
  .dp-hero-content { padding: 2rem 3rem; }
  .dp-info { padding: 1rem 3rem; }
  .dp-seasons { padding: 0 3rem; }
  .dp-related { padding: 1rem 3rem; }
}

/* Breadcrumb / Speedbar */
.speedbar {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speedbar a {
  color: var(--text-muted);
  display: inline-block;
  padding: 0.45rem 0.15rem;
  -webkit-tap-highlight-color: transparent;
}
.speedbar a:hover { color: var(--primary); }

/* Movie entry */
.movie-entry {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

/* movie-entry mobile handled in unified mobile block below */

.movie-entry-poster {
  width: 200px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
}

.movie-entry-poster img {
  width: 100%;
  height: auto;
}

.movie-entry-body {
  flex: 1;
  min-width: 0;
}

.movie-entry-title-img {
  max-height: 60px;
  margin-bottom: 1rem;
}

.movie-entry h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

/* Meta info labels */
.meta-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.label {
  display: inline-flex;
  align-items: center;
  padding: 0.15em 0.6em;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
}

.label.imdb {
  background: #f5c518;
  color: #000;
}

.label.quality {
  background: var(--primary);
  color: #fff;
}

.meta-list {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  opacity: 0.75;
  font-size: 0.85rem;
}

.meta-list span + span::before {
  content: '';
}

/* Plot */
.movie-entry-plot {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.more-link {
  color: var(--primary);
  cursor: pointer;
  font-size: 0.85rem;
}

/* Details rows */
.movie-entry-details {
  margin-bottom: 1.25rem;
}

.detail-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}

.detail-row .detail-label {
  color: var(--text-muted);
  min-width: 70px;
  flex-shrink: 0;
}

.detail-row .detail-value {
  flex: 1;
}

.detail-row .detail-value a {
  color: var(--text);
}

.detail-row .detail-value a:hover {
  color: var(--primary);
}

/* Rating stars */
.movie-entry-rating {
  margin-top: 1rem;
}

.rating-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.star-rating {
  display: inline-flex;
  gap: 2px;
  cursor: pointer;
}

.star-rating .star {
  font-size: 1.25rem;
  color: #444;
  transition: color 0.15s;
}

.star-rating .star.filled {
  color: #f5c518;
}

.star-rating .star:hover,
.star-rating .star:hover ~ .star {
  color: #f5c518;
}

.vote-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* --- Sidebar - Related --- */
.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.related-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: opacity 0.2s;
}

.related-item:hover { opacity: 0.8; }

.related-item .related-poster {
  width: 60px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #1a1a1a;
}

.related-item .related-poster img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.related-item .related-info {
  flex: 1;
  min-width: 0;
}

.related-item .related-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-item .related-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --- Comments --- */
.comments-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
}

.comments-section h5 {
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.comment-form textarea {
  grid-column: 1 / -1;
}

.comment-form input,
.comment-form textarea {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  resize: none;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--primary);
}

.comment-form .btn-submit {
  grid-column: 2;
  justify-self: end;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.comment-form .btn-submit:hover {
  background: var(--primary-hover);
}

/* --- Filters Bar --- */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-dropdown {
  position: relative;
}

.filter-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: rgba(255,255,255,0.15);
}

.filter-btn svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

.filter-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  max-height: 300px;
  overflow-y: auto;
  background: #1a1a1a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 0.5rem;
  z-index: 100;
}

.filter-dropdown.open .filter-panel {
  display: block;
}

.filter-option {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  text-align: left;
  border-radius: 4px;
  cursor: pointer;
}

.filter-option:hover {
  background: rgba(255,255,255,0.1);
}

.filter-option.active {
  color: var(--primary);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.88rem;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.page-btn:hover {
  background: rgba(255,255,255,0.15);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* --- Archive Table --- */
.archive-table {
  width: 100%;
}

.archive-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
  cursor: pointer;
}

.archive-row:hover {
  background: rgba(255,255,255,0.03);
}

.archive-row .archive-num {
  width: 30px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.archive-row .archive-thumb {
  width: 45px;
  height: 60px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  background: #1a1a1a;
}

.archive-row .archive-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.archive-row .archive-title {
  flex: 1;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-row .archive-year {
  color: var(--text-muted);
  font-size: 0.8rem;
  width: 50px;
  text-align: center;
}

.archive-row .archive-genre {
  color: var(--text-muted);
  font-size: 0.75rem;
  width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.archive-row .archive-rating {
  width: 40px;
}

.archive-row .archive-rating .label {
  width: 100%;
  justify-content: center;
}

@media (max-width: 767px) {
  .archive-row .archive-genre { display: none; }
  .archive-row .archive-year { width: 40px; }
}

/* Alpha filter */
.alpha-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.alpha-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

.alpha-btn:hover, .alpha-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* --- Season/Episode Selector --- */
.season-selector {
  margin: 1.5rem 0;
}

.season-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.season-tab {
  padding: 0.4rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  color: var(--text);
  font-size: 0.8rem;
  transition: all 0.2s;
}

.season-tab.active, .season-tab:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.episode-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
}

.episode-btn {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  text-align: left;
  transition: all 0.2s;
}

.episode-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.episode-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* --- Footer --- */
.footer {
  position: relative;
  padding: 3rem 0 2rem;
  text-align: center;
  margin-top: 3rem;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(17,17,17,0.95) 100%);
  z-index: 0;
}

.footer > * { position: relative; z-index: 1; }

.footer-logo {
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 30px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-nav a {
  color: var(--text);
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-nav a:hover { color: var(--primary); }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
.footer-copy a {
  display: inline-block;
  padding: 0.45rem 0;
  -webkit-tap-highlight-color: transparent;
  min-height: 32px;
  line-height: 1.5;
}

.gotop {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  background: var(--primary);
  border: none;
  border-radius: 4px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.gotop.visible {
  opacity: 1;
  visibility: visible;
}

.gotop svg {
  width: 14px;
  height: 18px;
}

/* --- Page title header --- */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.page-header .subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- Hero Swiper (homepage) --- */
.hero-swiper {
  position: relative;
  margin-bottom: 2rem;
}

.hero-swiper .swiper-slide {
  position: relative;
  height: 480px;
  overflow: hidden;
}

@media (max-width: 991px) {
  .hero-swiper .swiper-slide { height: 350px; }
}

@media (max-width: 575px) {
  .hero-swiper .swiper-slide { height: 260px; }
}

.hero-swiper .slide-backdrop {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 20%;
  filter: brightness(0.4);
}

.hero-swiper .slide-gradient {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 70%;
  background: linear-gradient(to top, var(--bg-body) 0%, transparent 100%);
  z-index: 2;
}

.hero-swiper .slide-content {
  position: absolute;
  bottom: 3rem;
  left: 0; right: 0;
  z-index: 3;
  padding: 0 2rem;
}

.hero-swiper .slide-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

@media (max-width: 575px) {
  .hero-swiper .slide-title { font-size: 1.25rem; }
}

.hero-swiper .slide-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.hero-swiper .slide-plot {
  max-width: 550px;
  font-size: 0.85rem;
  opacity: 0.85;
  max-height: 68px;
  overflow: hidden;
  margin-bottom: 1rem;
}

@media (max-width: 767px) {
  .hero-swiper .slide-plot { display: none; }
}

.hero-swiper .slide-controls {
  display: flex;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--text-white);
  color: var(--text-white);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
}

/* Swiper pagination — bigger tap target (default Swiper bullet is 8x8 = unusable on touch).
   We render a 10px visible bullet centered inside a 32x32 transparent hit area. */
.hero-swiper .swiper-pagination {
  padding: 4px 0;
  /* Posizionata subito sotto il gradient, sopra il contenuto sottostante.
     bottom: 10px la inchioda nella parte bassa della slide. */
  bottom: 10px !important;
  z-index: 5;
}
.hero-swiper .swiper-pagination-bullet {
  width: 32px;
  height: 32px;
  background: transparent;
  opacity: 1;
  position: relative;
  margin: 0 2px !important;
  -webkit-tap-highlight-color: transparent;
}
.hero-swiper .swiper-pagination-bullet::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background 0.2s, transform 0.2s;
}
.hero-swiper .swiper-pagination-bullet-active::before {
  background: var(--primary);
  transform: translate(-50%, -50%) scale(1.15);
}
/* Mobile: pallini più piccoli, meno hit-area, così non accavallano il testo slide.
   Il slide-content mobile sta a bottom:3rem (~48px) e i dots a bottom:10px = spazio libero. */
@media (max-width: 575px) {
  .hero-swiper .swiper-pagination { bottom: 4px !important; padding: 2px 0; }
  .hero-swiper .swiper-pagination-bullet { width: 22px; height: 22px; margin: 0 1px !important; }
  .hero-swiper .swiper-pagination-bullet::before { width: 7px; height: 7px; }
}

/* Hero navigation arrows */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.45);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s, background .2s;
}
.hero-swiper:hover .hero-nav { opacity: 1; }
.hero-nav:hover { background: var(--primary); }
.hero-nav-prev { left: 1rem; }
.hero-nav-next { right: 1rem; }
@media (max-width: 575px) {
  .hero-nav { width: 44px; height: 44px; }
  .hero-nav-prev { left: .5rem; }
  .hero-nav-next { right: .5rem; }
}

/* --- Telegram Banner --- */
.telegram-banner {
  text-align: center;
  padding: 2rem;
  margin-bottom: 3rem;
}

.telegram-banner img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
}

.telegram-banner p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Lazy load fade-in */
.lazy-img {
  opacity: 0;
  transition: opacity 0.4s;
}

.lazy-img.loaded {
  opacity: 1;
}

/* --- Light Off Mode --- */
body.light-off .player-embed {
  z-index: 10000;
  position: relative;
}

body.light-off::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(5,5,5,0.95);
  z-index: 9999;
  pointer-events: none;
}

body.light-off .player,
body.light-off .player-bar {
  position: relative;
  z-index: 10001;
}

body.light-off .header {
  z-index: 1;
}

/* --- Catalog Counter --- */
.catalog-counter {
  background: linear-gradient(180deg, rgba(17,17,17,0) 0%, var(--bg-body) 100%);
  margin-top: -3rem;
  position: relative;
  z-index: 2;
  padding: 2rem 0 1rem;
}
.counter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: nowrap;
}
.counter-item {
  text-align: center;
}
.counter-item strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.counter-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.counter-divider {
  width: 1px;
  height: 2.5rem;
  background: rgba(255,255,255,0.1);
}
/* Mobile ≤575: i 4 item devono riempire tutta la larghezza (no spazio vuoto
   ai lati). space-evenly distribuisce uniformemente; font scalati per stare
   in ~360px senza andare a capo. */
@media (max-width: 575px) {
  .catalog-counter { padding: 1.25rem 0 0.75rem; margin-top: -1.5rem; }
  .counter-row { gap: 0; justify-content: space-evenly; }
  .counter-item strong { font-size: 0.95rem; }
  .counter-item span { font-size: 0.65rem; letter-spacing: 0.02em; white-space: nowrap; }
  .counter-divider { height: 1.5rem; }
}
@media (max-width: 360px) {
  .counter-item strong { font-size: 0.85rem; }
  .counter-item span { font-size: 0.6rem; }
}

/* --- Genre Chips --- */
.genre-chips {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 0 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.genre-chips::-webkit-scrollbar { display: none; }
.genre-chip {
  flex-shrink: 0;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.3;
}
.genre-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(8,148,214,0.1);
}

/* --- Hero Genre Chips Small --- */
.slide-genres {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}
.genre-chip-sm {
  padding: 0.18rem 0.65rem;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.4;
}
.slide-langs {
  display: flex;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.lang-tag {
  padding: 0.18rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 3px;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.4px;
  font-weight: 500;
  line-height: 1.35;
}
.lang-tag.sub {
  border-color: rgba(255,193,7,0.4);
  color: rgba(255,193,7,0.8);
}
@media (max-width: 600px) {
  .slide-langs { display: none; }
}
.slide-meta-top {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}
.slide-meta-top .type-label {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
}
.slide-meta-top .label.drop-season,
.slide-meta-top .label.drop-episode {
  background: linear-gradient(90deg, #22c55e, #16a34a);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(34,197,94,0.35);
  animation: drop-pulse 2.4s ease-in-out infinite;
}
.slide-meta-top .label.drop-episode {
  background: linear-gradient(90deg, #f59e0b, #d97706);
  box-shadow: 0 2px 8px rgba(245,158,11,0.35);
}
@keyframes drop-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
/* Mobile: 4 label in riga spaccano allineamento. Forza il drop badge su riga
   propria sotto meta-top, centrato, leggermente piu' compatto. */
@media (max-width: 767px) {
  .slide-meta-top { flex-wrap: wrap; }
  .slide-meta-top .label.drop-season,
  .slide-meta-top .label.drop-episode {
    flex-basis: 100%;
    order: 10;
    text-align: center;
    font-size: 0.7rem;
    padding: 0.28rem 0.6rem;
    margin-top: 0.15rem;
  }
}

/* Hero plot fix — max 2 righe con ellipsis pulito */
.slide-plot {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767px) {
  .slide-plot { display: none; }
  .slide-genres { display: none; }
  .slide-title { font-size: 1.4rem !important; }
  /* catalog-counter: regole definitive in @media ≤575px sopra */
}

/* --- Footer Espanso --- */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 2rem 0;
}
.footer-col {}
.footer-heading {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.footer-nav-col a {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s;
  /* Audit fix 2026-04-10: tap target ≥ 36px tall (was a 20px-tall inline link) */
  padding: 0.5rem 0;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.footer-nav-col a:hover { color: var(--primary); }

@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
}
@media (max-width: 575px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* --- Page Intro Text --- */
.page-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

/* --- Quick Filters (chip bar) --- */
.quick-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
}
.qf-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  min-height: 36px;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.3;
}
.qf-chip:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.15);
}
.qf-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.qf-sep {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.1);
  margin: 0 0.25rem;
}
@media (max-width: 767px) {
  .quick-filters { gap: 0.45rem; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 0.5rem; }
  .quick-filters::-webkit-scrollbar { display: none; }
  .qf-chip { font-size: 0.78rem; padding: 0.5rem 0.85rem; min-height: 36px; }
}

/* --- Person Page --- */
.person-header {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
}
.person-photo {
  flex-shrink: 0;
}
.person-photo img {
  border-radius: var(--radius);
  width: 200px;
  height: auto;
  object-fit: cover;
}
.person-info {
  flex: 1;
}
.person-info h1 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}
.person-info .meta-info {
  margin-bottom: 1rem;
}
@media (max-width: 575px) {
  .person-header { flex-direction: column; gap: 1rem; }
  .person-photo img { width: 150px; }
}

/* --- Player CLS Fix --- */
.player {
  aspect-ratio: 16 / 9;
}

/* --- Dropdown Mobile Fix --- */
@media (max-width: 1199px) {
  .dropdown-menu {
    width: min(460px, calc(100vw - 2rem)) !important;
  }
}

/* --- Search results page --- */
.search-correction {
  padding: 0.5rem 0 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.search-correction strong { color: var(--primary); }
.search-correction a { color: var(--text-muted); text-decoration: underline; }
.search-persons { margin-bottom: 1.5rem; }
.search-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.search-persons-row { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; }
.search-person-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 0.6rem 1rem 0.6rem 0.6rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
  transition: background 0.15s;
}
.search-person-card:hover { background: rgba(255,255,255,0.08); }
.search-person-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.search-person-nophoto { background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.search-person-name { font-size: 0.88rem; font-weight: 500; }
.search-person-role { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.1rem; }
.search-empty { text-align: center; padding: 3rem 1rem 2rem; }
.search-empty-icon { color: var(--text-muted); margin-bottom: 1rem; }
.search-empty-title { font-size: 1.1rem; margin-bottom: 0.5rem; }
.search-empty-hint { font-size: 0.85rem; color: var(--text-muted); max-width: 400px; margin: 0 auto 1.25rem; line-height: 1.5; }
.search-trending { text-align: left; margin-top: 2rem; }

/* --- Partner redirect CTA (zero-result search) ---
   Soft-exit verso altaregistrazione.net: recupera utenti frustrati dalla search vuota. */
.search-partner-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto 2rem;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(135deg, rgba(8,148,214,0.12), rgba(8,148,214,0.04));
  border: 1px solid rgba(8,148,214,0.35);
  border-radius: 10px;
  color: var(--text-white, #fff);
  text-decoration: none;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.search-partner-cta:hover {
  background: linear-gradient(135deg, rgba(8,148,214,0.2), rgba(8,148,214,0.08));
  border-color: rgba(8,148,214,0.6);
}
.search-partner-cta:active { transform: scale(0.98); }
.search-partner-cta-icon {
  flex-shrink: 0;
  color: #0894D6;
  display: flex;
}
.search-partner-cta strong { display: block; font-size: 0.92rem; font-weight: 600; margin-bottom: 0.15rem; }
.search-partner-cta small { display: block; font-size: 0.78rem; color: var(--text-muted, #999); }

/* --- Watch History --- */
.history-section { margin-bottom: 2rem; }
.history-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.history-grid::-webkit-scrollbar { display: none; }
.history-item {
  flex-shrink: 0;
  text-decoration: none;
  width: 120px;
  text-align: center;
}
.history-item img {
  border-radius: var(--radius);
  width: 120px;
  height: 180px;
  object-fit: cover;
}
.history-title {
  color: var(--text);
  font-size: 0.75rem;
  margin-top: 0.4rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================================
   MOBILE RESPONSIVE SYSTEM — Unified rules
   ================================================================ */

/* Desktop: hide mobile-only elements */
@media (min-width: 1200px) {
  .mobile-buttons { display: none; }
}

/* === TABLET + MOBILE (< 1200px) === */
@media (max-width: 1199px) {
  /* Mobile: l'in-header form non si apre più — la lente apre l'overlay full-screen */
  .search-form { display: none !important; }

  /* Mobile buttons group */
  .mobile-search-btn {
    display: inline-flex;
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
  }
}

/* === MOBILE ONLY (< 768px) === */
@media (max-width: 767px) {
  /* Container padding */
  .container { padding: 0 0.75rem; }

  /* Hero */
  .hero-swiper { margin-bottom: 0; }
  .slide-title { font-size: 1.3rem !important; line-height: 1.2; }
  .slide-plot { display: none; }
  .slide-genres { display: none; }
  .slide-controls { gap: 0.5rem; }
  .slide-controls .btn-primary,
  .slide-controls .btn-outline { padding: 0.5rem 1rem; font-size: 0.8rem; }

  /* Counter: regole definitive in @media (max-width: 575px) sopra */

  /* Hide play overlay on mobile — use bottom sheet instead */
  .movie-card .play-overlay { display: none !important; }
  .movie-card:hover .poster-img { filter: none; }

  /* Genre chips */
  .genre-chips { padding: 0.75rem 0 0.25rem; gap: 0.4rem; }
  .genre-chip { padding: 0.55rem 0.9rem; font-size: 0.78rem; }

  /* Section spacing */
  .section { margin-bottom: 1.5rem; }
  .section-head { margin-bottom: 0.75rem; }
  .section-title { font-size: 1rem; }
  .showmore-btn { font-size: 0.75rem; }

  /* CTA buttons */
  .cta-section {
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
  }
  .btn-cta {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 1rem;
    font-size: 0.8rem;
  }

  /* Player bar */
  .player-bar .container { gap: 0.5rem; }
  .player-bar .control-btn { font-size: 0.75rem; padding: 0.4rem 0.6rem; gap: 0.3rem; }

  /* Movie detail */
  .movie-detail { padding: 1rem 0 2rem; }
  .movie-entry { gap: 1rem; }
  .movie-entry-poster { width: 140px; }
  .movie-entry h1 { font-size: 1.25rem; }
  .movie-entry-plot { font-size: 0.85rem; }
  .detail-row { font-size: 0.8rem; }
  .detail-label { min-width: 60px; }

  /* Season selector */
  .season-tabs { gap: 0.4rem; }
  .season-tab { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
  .episode-btn { padding: 0.5rem 0.75rem; font-size: 0.8rem; }

  /* Sidebar */
  .detail-sidebar { margin-top: 1rem; }
  .related-item { gap: 0.75rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .footer-copy { font-size: 0.75rem; }

  /* Page intro */
  .page-intro { font-size: 0.8rem; margin-bottom: 1rem; }
  .page-header h1 { font-size: 1.3rem; }

  /* Person page */
  .person-header { flex-direction: column; gap: 1rem; }
  .person-photo img { width: 140px; }
  .person-info h1 { font-size: 1.3rem; }
}

/* === PLAYER FULLSCREEN MODE (?play=1) === */
body.player-fullscreen {
  overflow: hidden !important;
}
body.player-fullscreen .header,
body.player-fullscreen .player-bar,
body.player-fullscreen .cta-section,
body.player-fullscreen .movie-detail,
body.player-fullscreen .footer,
body.player-fullscreen .gotop,
body.player-fullscreen .dp {
  display: none !important;
}
body.player-fullscreen .player {
  display: block !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: #000 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  aspect-ratio: unset !important;
}
body.player-fullscreen #player-embed {
  display: block !important;
  height: 100% !important;
}
body.player-fullscreen #player-embed > div {
  padding-top: 0 !important;
  height: 100% !important;
}
body.player-fullscreen #player-embed iframe {
  width: 100% !important;
  height: 100% !important;
}
/* Lock to landscape in fullscreen */
@media (orientation: portrait) {
  body.player-fullscreen .player {
    width: 100vh !important;
    height: 100vw !important;
    transform: rotate(90deg) !important;
    transform-origin: top left !important;
    top: 0 !important;
    left: 100vw !important;
  }
  body.player-fullscreen .player-exit-fs {
    transform: rotate(90deg);
    top: auto;
    bottom: 12px;
    right: auto;
    left: 12px;
  }
  body.player-fullscreen .player-splash {
    transform: rotate(90deg);
    width: 100vh;
    height: 100vw;
    transform-origin: top left;
    top: 0;
    left: 100vw;
  }
}

/* Player splash screen (inside #player-area) */
.player-splash {
  display: none;
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 10;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.player-splash.active {
  display: flex;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.player-splash.fading {
  opacity: 0;
  pointer-events: none;
}
.splash-logo-img {
  width: 64px;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(8,148,214,0.4));
  animation: splash-pulse 2s ease-in-out infinite;
}
@keyframes splash-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}
.splash-title {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  max-width: 280px;
  line-height: 1.3;
}
.splash-subtitle {
  color: #888;
  font-size: 0.8rem;
  font-weight: 400;
  text-align: center;
  letter-spacing: 0.04em;
  margin-top: -0.4rem;
}
.splash-text {
  color: #555;
  font-size: 0.75rem;
  text-align: center;
  letter-spacing: 0.03em;
}
.splash-loader {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(255,255,255,0.06);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: splash-spin 0.7s linear infinite;
}
@keyframes splash-spin {
  to { transform: rotate(360deg); }
}

/* Exit fullscreen button (inside #player-area) */
.player-exit-fs {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 11;
  background: rgba(0,0,0,0.6);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-tap-highlight-color: transparent;
}
body.player-fullscreen .player-exit-fs {
  display: flex;
  opacity: 1;
  transition: opacity 0.4s ease;
}
body.player-fullscreen .player-exit-fs.exit-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Fullscreen lost overlay (popup stole focus) */
body.player-fs-lost .player::after {
  content: 'Tocca per tornare a schermo intero';
  position: absolute;
  inset: 0;
  z-index: 12;
  background: rgba(0,0,0,0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
body.player-fs-lost .player-exit-fs {
  z-index: 13;
}

/* === SPORT LIVE PAGE (player iframe LUPO) === */

/* Hero bar */
.sport-hero-bar {
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0.6rem 0;
}
.sport-hero-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1280px;
}
.sport-hero-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.sport-hero-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.sport-live-dot {
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  flex-shrink: 0;
  animation: sport-pulse 2s ease-in-out infinite;
}
@keyframes sport-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
  50% { opacity: 0.7; box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}
.sport-hero-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ef4444;
}
.sport-hero-channel {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sport-viewer-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}
.sport-viewer-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
}
.sport-brand {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary);
  text-transform: uppercase;
}

/* Page */
.sport-page {
  padding: 0.5rem 0 2rem;
}
.sport-content {
  max-width: 1280px;
}

/* Event card */
.sport-event-card {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #111;
  border: 1px solid rgba(8,148,214,0.15);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
}
.sport-event-time {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.2rem;
}
.sport-event-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

/* Player branded wrapper — larghezza vincolata all'altezza viewport disponibile */
.sport-player-branded {
  width: min(100%, calc((100dvh - var(--header-h, 72px) - 50px) * 16 / 9));
  margin: 0 auto 0.75rem;
}
.sport-info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.06);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}
.sport-info-strip-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}
.sport-live-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  background: #ef4444;
  color: #fff;
  border-radius: 3px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  flex-shrink: 0;
}
.sport-info-channel {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sport-info-strip-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* Player */
.sport-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  border-left: 1px solid rgba(255,255,255,0.06);
  border-right: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  border-radius: 0 0 8px 8px;
}
.sport-player-wrap iframe,
.sport-player-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000;
}

/* Custom player controls (HLS.js mode) */
.sport-player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 5;
}
.sport-player-wrap:hover .sport-player-controls,
.sport-player-wrap:focus-within .sport-player-controls {
  opacity: 1;
}
/* Always show controls on touch devices */
@media (hover: none) {
  .sport-player-controls { opacity: 1; }
}
.sport-ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  opacity: 0.9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sport-ctrl-btn:hover { opacity: 1; }
.sport-ctrl-spacer { flex: 1; }
.sport-live-pill {
  background: #e53935;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.05em;
  cursor: pointer;
  user-select: none;
}
.sport-live-pill:hover { background: #f44336; }
.sport-vol-slider {
  width: 70px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.sport-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
}
.sport-vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

/* Fullscreen: controls on the branded wrapper, not just video */
.sport-player-branded:fullscreen {
  background: #000;
  display: flex;
  flex-direction: column;
}
.sport-player-branded:fullscreen .sport-info-strip,
.sport-player-branded:fullscreen .sport-status-strip { display: none; }
.sport-player-branded:fullscreen .sport-player-wrap {
  flex: 1;
  aspect-ratio: auto;
}
.sport-player-branded:-webkit-full-screen .sport-info-strip,
.sport-player-branded:-webkit-full-screen .sport-status-strip { display: none; }
.sport-player-branded:-webkit-full-screen .sport-player-wrap {
  flex: 1;
  aspect-ratio: auto;
}

/* Loading overlay (channel switch) */
.sport-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.sport-loading-overlay[hidden] { display: none; }
.sport-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.sport-loading-logo {
  width: 36px;
  height: 36px;
  opacity: 0.8;
}
.sport-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: sport-spin 0.8s linear infinite;
}
@keyframes sport-spin { to { transform: rotate(360deg); } }
.sport-loading-text {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
}

/* Status strip (below player) */
.sport-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.85rem;
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none;
  border-radius: 0 0 8px 8px;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.3);
}

/* Error */
.sport-error {
  margin: 2rem 0;
  padding: 1.25rem;
  background: #151515;
  border: 1px solid #2a1a1a;
  border-left: 3px solid #e74c3c;
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* Suggest / vote system */
.sport-suggest {
  margin-top: 1rem;
}
.sport-suggest-toggle {
  background: none;
  border: 1px solid #252525;
  border-radius: 6px;
  color: rgba(255,255,255,0.45);
  font-size: 0.78rem;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  width: 100%;
  text-align: center;
}
.sport-suggest-toggle:hover {
  color: rgba(255,255,255,0.7);
  border-color: #3a3a3a;
}
.sport-suggest-panel {
  margin-top: 0.75rem;
  padding: 1rem;
  background: #111;
  border: 1px solid #1e1e1e;
  border-radius: 8px;
}
.sport-suggest-panel[hidden] { display: none; }
.sport-suggest-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
.sport-suggest-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.sport-suggest-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0.4rem 0.85rem;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.sport-suggest-chip:hover:not(:disabled) {
  background: #1e1e1e;
  border-color: var(--primary);
  color: #fff;
}
.sport-suggest-chip:disabled {
  opacity: 0.4;
  cursor: default;
}
.sport-suggest-chip--voted {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  opacity: 1 !important;
}
.sport-suggest-feedback {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--primary);
}
.sport-suggest-feedback[hidden] { display: none; }
.sport-event-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.5rem;
}
.sport-event-line-time {
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}
.sport-event-line-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sport-source-badge {
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  line-height: 1;
}
.sport-source-community {
  background: #22c55e;
  color: #000;
}

/* Mobile sport — player full-bleed, vincolo altezza non necessario (16:9 sul mobile è sempre basso) */
@media (max-width: 767px) {
  .sport-page { padding: 0 0 1.5rem; }
  .sport-player-branded { width: calc(100% + 2rem); margin-left: -1rem; margin-right: -1rem; }
  .sport-info-strip { border-radius: 0; border-left: none; border-right: none; }
  .sport-player-wrap { border-left: none; border-right: none; border-radius: 0; }
  .sport-event-line { padding-left: 0; }
  .sport-suggest-options {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
}
@media (max-width: 359px) {
  .sport-viewer-count { display: none; }
}

/* === SMALL MOBILE (< 480px) === */
@media (max-width: 479px) {
  .movie-entry { flex-direction: column; align-items: center; text-align: center; }
  .movie-entry-poster { width: 160px; }
  .detail-row { flex-direction: column; gap: 0.15rem; }
  .detail-label { min-width: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 1rem; }
  /* Counter: regole definitive in @media (max-width: 575px) e (max-width: 360px) sopra */
}

/* ================================================================
   MOBILE SEARCH OVERLAY (full-screen)
   Solo mobile (< 1200px). Su desktop l'overlay non è mai mostrato:
   resta il dropdown inline dell'in-header form.
   ================================================================ */
.msearch-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10,10,10,0.98);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.msearch-overlay[hidden] { display: none !important; }
@media (max-width: 1199px) {
  .msearch-overlay.open {
    display: flex;
    opacity: 1;
  }
}
body.msearch-locked { overflow: hidden; touch-action: none; }
body.menu-locked { overflow: hidden; touch-action: none; }

.msearch-bar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: calc(env(safe-area-inset-top, 0px) + 0.75rem) 0.75rem 0.75rem;
  background: rgba(10,10,10,0.95);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 2;
}
.msearch-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s;
}
.msearch-close:active { background: rgba(255,255,255,0.1); }

.msearch-form {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  transition: border-color 0.15s, background 0.15s;
}
.msearch-form:focus-within {
  border-color: var(--primary);
  background: rgba(255,255,255,0.1);
}
.msearch-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}
.msearch-form input {
  flex: 1;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-white);
  font-family: var(--font);
  font-size: 18px;
  padding: 0 2.75rem 0 2.75rem;
}
.msearch-form input::placeholder { color: var(--text-muted); }
.msearch-form input::-webkit-search-cancel-button { display: none; }
.msearch-clear {
  position: absolute;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.msearch-body {
  flex: 1;
  padding: 0.5rem 0.75rem calc(env(safe-area-inset-bottom, 0px) + 1.5rem);
}
.msearch-section-title {
  padding: 1rem 0.75rem 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
}
/* === Live online counter (footer) === */
.online-now {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.65rem 0 0.5rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.18);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0.01em;
}
.online-now strong {
  color: #22c55e;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: onlinePulse 2s infinite;
}
@keyframes onlinePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ============================================================
   TOP 10 della Settimana — stile lupo.gratis
   Numeri piccoli, scuri, fusi con lo sfondo (stroke bianco subdolo).
   Card poster compatte. Il numero sporge solo di 6px a sinistra.
   ============================================================ */
.top10-section {
  margin: 1.8rem 0 2rem;
  /* Audit fix 2026-04-10: clip horizontally at section level so the 10 slides
     of the swiper don't push docW beyond viewport on 1024–1920 viewports.
     The rank "1" can still bleed-left visually because we use padding (not
     a transform) on the swiper itself. */
  overflow-x: clip;
}
.top10-title {
  font-weight: 900 !important;
  letter-spacing: -0.01em;
}
.top10-subtitle {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 0.2rem;
  font-weight: 400;
}
.top10-section .swiper {
  /* Keep overflow:visible so the rank stroke can sport over neighbours, but
     the parent .top10-section now clips horizontally (see above). */
  overflow: visible;
  padding-left: 16px; /* lascia spazio al numero che sporge del #1 */
}
.top10-slide {
  width: auto !important;
  flex-shrink: 0;
}
.top10-rank-wrap {
  position: relative;
  width: clamp(110px, 13vw, 160px);
  cursor: pointer;
}
.top10-rank {
  position: absolute;
  bottom: -8px;
  left: -8px;
  font-family: 'Work Sans', -apple-system, sans-serif;
  font-size: clamp(68px, 10vw, 104px);
  font-weight: 900;
  line-height: 1;
  color: #0a0a0a;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.18);
  text-stroke: 2px rgba(255, 255, 255, 0.18);
  z-index: 2;
  pointer-events: none;
  user-select: none;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.top10-rank[data-rank="10"] {
  letter-spacing: -0.08em;
  left: -14px;
}
.top10-card {
  position: relative;
  z-index: 1;
  margin-left: 22px;
  transition: transform 0.2s ease;
}
.top10-card .movie-card {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.top10-rank-wrap:hover .top10-card {
  transform: scale(1.04);
}
/* TOP 10: solo poster, nessun testo sotto.
   Il titolo resta leggibile via tooltip del link e al click.
   Così TUTTI i poster hanno la stessa altezza → i numeri restano allineati. */
.top10-card .card-info { display: none !important; }
.top10-card .movie-card { display: block; }
.top10-card .poster-wrap {
  border-radius: 6px;
  overflow: hidden;
}
/* Badge mini per le top10 — niente mini "tipo Film/Serie TV" o "HD" qui:
   il rank-number e il poster comunicano già abbastanza, e i badge a 9px
   erano illeggibili (audit fix 2026-04-10). Solo i NEW/freshness restano
   visibili, in versione un filo più piccola del default. */
.top10-card .type-badge,
.top10-card .quality-badge { display: none !important; }
.top10-card .new-badge,
.top10-card .card-badge {
  font-size: 0.75rem;
  padding: 3px 7px;
}

/* ============================================================
   PROSSIMAMENTE — slider home (card con badge data)
   ============================================================ */
.upcoming-section .section-title {
  background: linear-gradient(90deg, #a855f7 0%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.upcoming-card {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: transform 0.2s ease;
}
.upcoming-card:hover { transform: scale(1.04); }
.upcoming-card .poster-wrap {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111;
}
.upcoming-card .poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.9);
}
.upcoming-card .card-info {
  padding: 0.4rem 0.25rem 0.2rem;
}
.upcoming-card .movie-title {
  font-size: 0.85rem;
  line-height: 1.2;
  font-weight: 600;
  color: #e8e8e8;
  margin: 0 0 0.15rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.upcoming-card .movie-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
}
.upcoming-date-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(236, 72, 153, 0.95);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.03em;
  backdrop-filter: blur(4px);
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.upcoming-card .card-badge-soon {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  top: auto;
  bottom: 8px;
  right: 8px;
  position: absolute;
  z-index: 3;
  letter-spacing: 0.03em;
  line-height: 1;
}

/* ============================================================
   ANTEPRIMA — pagina dettaglio titolo futuro (no player VixSrc)
   ============================================================ */
.anteprima-page {
  position: relative;
  min-height: 60vh;
}
.anteprima-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 520px;
  overflow: hidden;
  z-index: 0;
}
.anteprima-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.5) saturate(0.8);
}
.anteprima-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10,10,12,0.4) 0%,
    rgba(10,10,12,0.75) 60%,
    rgba(10,10,12,1) 100%);
}
.anteprima-content {
  position: relative;
  z-index: 1;
  padding-top: 80px;
  padding-bottom: 40px;
}
.anteprima-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: flex-start;
  margin-bottom: 2.5rem;
}
.anteprima-poster {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.08);
}
.anteprima-poster img {
  width: 100%;
  height: auto;
  display: block;
}
.anteprima-badge {
  display: inline-block;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: 4px;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}
.anteprima-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin: 0 0 0.5rem;
  color: #fff;
  letter-spacing: -0.02em;
}
.anteprima-original {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 1.2rem;
  font-style: italic;
}
.anteprima-meta {
  margin-bottom: 1.5rem;
  padding: 1rem 1.2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  max-width: 440px;
}
.anteprima-date-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.anteprima-date-label {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.anteprima-date-value {
  font-size: 1rem;
  color: #fff;
  font-weight: 700;
}
.anteprima-countdown {
  font-size: 0.9rem;
  color: #ec4899;
  font-weight: 500;
}
.anteprima-countdown strong { color: #fff; font-weight: 800; }
.anteprima-plot {
  font-size: 1rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  max-width: 720px;
  margin-bottom: 1.2rem;
}
.anteprima-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.anteprima-trailer {
  margin: 2.5rem 0;
}
.anteprima-section-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: #fff;
}
.anteprima-trailer-wrap {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 20px 50px rgba(0,0,0,0.7);
}
.anteprima-trailer-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.anteprima-disclaimer {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(168, 85, 247, 0.08);
  border-left: 3px solid #a855f7;
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.8);
  max-width: 720px;
}
.anteprima-disclaimer a {
  color: #ec4899;
  text-decoration: none;
  font-weight: 600;
}
.anteprima-disclaimer a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .anteprima-backdrop { height: 400px; }
  .anteprima-content { padding-top: 40px; }
  .anteprima-grid {
    grid-template-columns: 160px 1fr;
    gap: 1.2rem;
  }
  .anteprima-title { font-size: 1.4rem; }
  .anteprima-meta { max-width: none; }
  .anteprima-plot { font-size: 0.9rem; }
}
@media (max-width: 480px) {
  .anteprima-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .anteprima-poster { max-width: 180px; }
}

/* === Persons Grid (attori/registi browse) === */
.persons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.2rem;
  padding: 1rem 0;
}
.person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s;
}
.person-card:hover { transform: translateY(-4px); }
.person-photo {
  width: 130px;
  height: 195px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  background: rgba(255,255,255,0.08);
}
.person-photo-placeholder {
  width: 130px;
  height: 195px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.person-name {
  margin-top: 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}
.person-count {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
  margin-top: 0.15rem;
}
@media (max-width: 575px) {
  .persons-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.8rem; }
  .person-photo, .person-photo-placeholder { width: 100px; height: 150px; }
  .person-name { font-size: 0.82rem; }
}

/* === TRAILER MODAL ===
   Facade: iframe YT iniettata solo al primo click. Player 16:9 + action bar fissa sotto
   (Guarda ora / Scarica) — niente overlay post-ended, le CTA sono sempre visibili. */
.tm-modal[hidden] { display: none; }
.tm-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: tm-fade 0.18s ease-out;
}
@keyframes tm-fade { from { opacity: 0; } to { opacity: 1; } }
.tm-backdrop { position: absolute; inset: 0; cursor: pointer; }
.tm-box {
  position: relative;
  width: min(960px, 100%);
  max-height: calc(100vh - 4rem);
  background: #0d0d0d;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
}
.tm-close {
  position: absolute; top: 0.5rem; right: 0.5rem; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.tm-close:hover { background: rgba(229,9,20,0.9); }
.tm-player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.tm-player { position: absolute; inset: 0; width: 100%; height: 100%; }
.tm-player iframe, .tm-player > div { width: 100% !important; height: 100% !important; border: 0; }
.tm-actions {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #0d0d0d;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.tm-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0.45rem;
  border: none;
  cursor: pointer;
  color: #fff;
  transition: background 0.15s, transform 0.15s;
  letter-spacing: 0.01em;
}
.tm-btn[hidden] { display: none; }
.tm-btn svg { flex-shrink: 0; }
.tm-btn-watch { background: #e50914; }
.tm-btn-watch:hover { background: #f6121d; transform: translateY(-1px); }
.tm-btn-download { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); }
.tm-btn-download:hover { background: rgba(255,255,255,0.14); transform: translateY(-1px); }
body.tm-locked { overflow: hidden; }
/* Badge bandierina nel bottone Trailer (emoji già unicode, solo sizing) */
.dp-flag { font-size: 1em; margin-left: 0.15em; line-height: 1; display: inline-block; }

/* Mobile: modal fullscreen, action bar full-width in fondo */
@media (max-width: 640px) {
  .tm-modal { padding: 0; }
  .tm-box {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    justify-content: center;
  }
  .tm-close { top: 0.75rem; right: 0.75rem; width: 44px; height: 44px; }
  .tm-actions {
    padding: 0.7rem 0.8rem calc(0.7rem + env(safe-area-inset-bottom));
    gap: 0.6rem;
  }
  .tm-btn { padding: 0.9rem 0.75rem; font-size: 0.95rem; }
}

/* === DOWNLOAD EPISODE MODAL (serie TV) ===
   Popup mostrato al click "Scarica" su scheda serie TV. Lista stagioni in
   sezioni; ogni stagione e' una griglia di chip episodio cliccabili.
   Ep senza download non renderizzati (lista solo disponibili). */
.dlm-modal[hidden] { display: none; }
.dlm-modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: tm-fade 0.18s ease-out;
}
.dlm-backdrop { position: absolute; inset: 0; cursor: pointer; }
.dlm-box {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 4rem);
  background: #0d0d0d;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
}
.dlm-close {
  position: absolute; top: 0.5rem; right: 0.5rem; z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.dlm-close:hover { background: rgba(229,9,20,0.9); }
.dlm-head {
  padding: 1.25rem 3rem 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dlm-title { font-size: 1.1rem; font-weight: 700; color: #fff; margin: 0 0 0.2rem; }
.dlm-sub { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.dlm-body {
  padding: 0.85rem 1.25rem 1.25rem;
  overflow-y: auto;
}
.dlm-loading { color: rgba(255,255,255,0.5); text-align: center; padding: 2rem 0; }
.dlm-season {
  margin-top: 0.9rem;
}
.dlm-season:first-child { margin-top: 0; }
.dlm-season-label {
  font-size: 0.82rem; font-weight: 700; color: rgba(255,255,255,0.75);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}
.dlm-eps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 0.5rem;
}
.dlm-ep {
  display: flex; align-items: center; justify-content: center;
  padding: 0.7rem 0.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.4rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}
.dlm-ep:hover {
  background: rgba(229,9,20,0.22);
  border-color: rgba(229,9,20,0.55);
  transform: translateY(-1px);
}
body.dlm-locked { overflow: hidden; }
@media (max-width: 640px) {
  .dlm-modal { padding: 0; }
  .dlm-box {
    width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .dlm-close { top: 0.75rem; right: 0.75rem; width: 44px; height: 44px; }
  .dlm-head { padding-top: 1.5rem; }
}

/* ==========================================================================
   MOOD DISCOVERY PAGE (/mood/)
   Hero statico + griglia chip grandi + 8 rail Swiper (riusa .slider-section).
   Target: indecisi che cercano scorciatoia per intento invece che genere.
   ========================================================================== */

.mood-hero {
  background: linear-gradient(135deg, #0a1a28 0%, #111 65%);
  padding: clamp(2rem, 6vw, 3.5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  margin-bottom: 1.5rem;
}
.mood-hero .container { max-width: 1080px; }
.mood-hero-title {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.mood-hero-sub {
  font-size: clamp(0.95rem, 2.2vw, 1.1rem);
  color: var(--text-muted);
  margin: 0 auto 1.75rem;
  max-width: 560px;
  line-height: 1.4;
}
.mood-chips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  max-width: 960px;
  margin: 0 auto;
}
.mood-chip-big {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0.85rem 1rem;
  min-height: 72px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  text-align: left;
}
.mood-chip-big strong {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.15rem;
}
.mood-chip-big small {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.25;
}
.mood-chip-big:hover,
.mood-chip-big:focus-visible {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  outline: none;
}
.mood-chip-big:hover small,
.mood-chip-big:focus-visible small { color: rgba(255, 255, 255, 0.9); }

@media (min-width: 768px) {
  .mood-chips-grid { grid-template-columns: repeat(4, 1fr); gap: 0.85rem; }
  .mood-chip-big { min-height: 80px; padding: 1rem 1.1rem; }
  .mood-chip-big strong { font-size: 1.02rem; }
  .mood-chip-big small { font-size: 0.8rem; }
}

/* Rail mood: ereditano .section.slider-section dal sito.
   Qui solo il tagline sotto al titolo e lo scroll-target offset per le anchor. */
.mood-rail { scroll-margin-top: calc(var(--header-h) + 1rem); }
.mood-rail-heading {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}
.mood-section-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* CTA finale */
.mood-cta {
  text-align: center;
  padding: 2.5rem 1rem 3rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.mood-cta h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  margin: 0 0 0.4rem;
  font-weight: 600;
}
.mood-cta p {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
}
.mood-cta-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   MOOD PAGE v2 — hero-quiz, temi grid, badge NEW, quiz result card
   ========================================================================== */

.mood-hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Hero Quiz (3 step + submit) */
.mood-quiz {
  max-width: 760px;
  margin: 1.5rem auto 0.25rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: left;
}
.mood-quiz-step { margin-bottom: 0.9rem; }
.mood-quiz-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.mood-quiz-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.mood-quiz-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 0.55rem 0.9rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  min-height: 40px;
}
.mood-quiz-chip:hover { background: rgba(255, 255, 255, 0.11); }
.mood-quiz-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.mood-quiz-submit {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.mood-quiz-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.mood-quiz-submit:not(:disabled):hover { transform: translateY(-1px); }

@media (min-width: 768px) {
  .mood-quiz { padding: 1.5rem 1.75rem; }
  .mood-quiz-submit { width: auto; min-width: 220px; margin: 0.75rem auto 0; display: block; padding: 0.95rem 2rem; }
}

/* Quiz result card (rendered dopo submit) */
.mood-quiz-result {
  max-width: 760px;
  margin: 1.25rem auto 0.5rem;
}
.quiz-card {
  display: flex;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(8, 148, 214, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(8, 148, 214, 0.3);
  border-radius: 10px;
  padding: 1rem;
  text-align: left;
  animation: quizCardFadeIn 0.3s ease;
}
@keyframes quizCardFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.quiz-card-poster {
  flex: 0 0 110px;
  border-radius: 6px;
  overflow: hidden;
  align-self: flex-start;
}
.quiz-card-poster img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}
.quiz-card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.quiz-card-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  font-weight: 700;
}
.quiz-card-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}
.quiz-card-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.quiz-card-rating { color: #ffc145; font-weight: 600; }
.quiz-card-genres {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}
.quiz-card-plot {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 0.3rem 0 0.6rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.quiz-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}
.quiz-card-actions .btn-primary,
.quiz-card-actions .btn-outline,
.quiz-card-actions .btn-ghost {
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
  font-weight: 600;
  transition: opacity 0.15s ease;
}
.quiz-card-actions .btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--text);
}
.quiz-card-actions .btn-outline:hover { background: rgba(255, 255, 255, 0.08); }
.quiz-card-actions .btn-ghost {
  background: transparent;
  color: var(--primary);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}
.quiz-card-actions .btn-ghost:hover { opacity: 0.8; }

@media (max-width: 575px) {
  .quiz-card { flex-direction: row; padding: 0.85rem; gap: 0.75rem; }
  .quiz-card-poster { flex: 0 0 90px; }
  .quiz-card-plot { -webkit-line-clamp: 2; font-size: 0.82rem; }
}

/* Hero divider ("oppure scegli direttamente") */
.mood-hero-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 640px;
  margin: 1.75rem auto 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.mood-hero-divider::before,
.mood-hero-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* Grid temi — card con thumbnail backdrop + overlay testo */
.mood-temi-section { margin-top: 2.5rem; }
.mood-temi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
.mood-tema-card {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #1a1a1a;
  transition: transform 0.2s ease;
}
.mood-tema-card:hover { transform: translateY(-2px); }
.mood-tema-card:hover .mood-tema-thumb { transform: scale(1.05); }
.mood-tema-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.mood-tema-thumb-empty {
  background: linear-gradient(135deg, #222, #111);
}
.mood-tema-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.8rem 0.9rem;
  gap: 0.2rem;
}
.mood-tema-name {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
.mood-tema-blurb {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
@media (min-width: 576px) {
  .mood-temi-grid { grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
  .mood-tema-name { font-size: 1.05rem; }
}
@media (min-width: 900px) {
  .mood-temi-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1200px) {
  .mood-temi-grid { grid-template-columns: repeat(5, 1fr); }
}

/* Sub-pagina /mood/tema/:slug — breadcrumb + header minimale */
.mood-tema-breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 1rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.mood-tema-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.mood-tema-breadcrumb a:hover { color: var(--primary); }
.mood-tema-breadcrumb [aria-current="page"] { color: var(--text); font-weight: 500; }
.mood-tema-header {
  margin: 1rem 0 1.5rem;
  padding: 1.5rem 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mood-tema-h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 0.4rem;
  line-height: 1.1;
}
.mood-tema-h1-blurb {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
  max-width: 680px;
}
.mood-tema-count {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--primary);
  background: rgba(8, 148, 214, 0.12);
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  font-weight: 600;
}

/* Nav badge NEW (rosso, accanto al link "Che guardo?") */
.nav-badge-new {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 2px 6px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #fff;
  background: #e53935;
  border-radius: 3px;
  vertical-align: middle;
  animation: moodBadgePulse 2s ease-in-out infinite;
}
@keyframes moodBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.55); }
  50% { box-shadow: 0 0 0 4px rgba(229, 57, 53, 0); }
}
.nav-link-mood.active .nav-badge-new,
.nav-link-mood:hover .nav-badge-new { animation: none; }

/* ==========================================================================
   NAV DROPDOWN "Generi" — colonna singola, 12 generi ordinati per pageviews
   GA4 reali. Riusa il pattern .dropdown/.dropdown-menu senza mega-grid.
   ========================================================================== */

.nav-caret {
  display: inline-block;
  margin-left: 0.3rem;
  transition: transform 0.2s ease;
  vertical-align: middle;
  opacity: 0.7;
}
#genre-dropdown.open .nav-caret { transform: rotate(180deg); opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  #genre-dropdown:hover .nav-caret { transform: rotate(180deg); opacity: 1; }
}

.dropdown-menu-generi {
  min-width: 220px;
  padding: 0.5rem;
  background: #14181d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
.dropdown-menu-generi a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1.3;
}
.dropdown-menu-generi a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary);
}

/* Mobile: il dropdown si flattenizza dentro il drawer */
@media (max-width: 991px) {
  .header-nav.mobile-open .dropdown-menu-generi {
    width: 100%;
    min-width: 0;
    padding: 0.25rem 0 0.5rem;
    box-shadow: none;
    background: transparent;
    border: none;
  }
  .header-nav.mobile-open .dropdown-menu-generi a {
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 0;
  }
  .header-nav.mobile-open .nav-caret { margin-left: auto; }
}

/* Random link speciale highlight su hover */
.nav-link-random svg { transition: transform 0.3s ease; }
.nav-link-random:hover svg { transform: rotate(45deg); }

/* Freshness signal "Aggiornato: X" nell'hero */
.mood-hero-fresh {
  display: inline-block;
  margin: 0.5rem auto 0;
  padding: 0.3rem 0.85rem;
  font-size: 0.78rem;
  color: #ffc145;
  background: rgba(255, 193, 69, 0.08);
  border: 1px solid rgba(255, 193, 69, 0.25);
  border-radius: 50px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Toggle Film / Serie TV: riga dedicata centrata, gerarchia primaria */
.mood-kind-toggle {
  display: flex;
  gap: 0.25rem;
  width: fit-content;
  margin: 1.75rem auto 0.25rem;
  padding: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.mood-kind-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 50px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}
.mood-kind-pill:hover { color: var(--text); }
.mood-kind-pill.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(8, 148, 214, 0.4);
}
@media (max-width: 480px) {
  .mood-kind-pill { padding: 0.5rem 1.1rem; font-size: 0.88rem; }
}

/* Rail "Oggi consigliamo" — stile leggermente evidenziato vs. mood */
.mood-rail-daily .section-title {
  color: var(--primary);
}
.mood-rail-daily .section-title::after {
  content: "OGGI";
  display: inline-block;
  margin-left: 0.55rem;
  padding: 2px 7px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  background: var(--primary);
  color: #fff;
  border-radius: 3px;
  vertical-align: middle;
}

/* Sezione temi v2: intro + categorie + count badge */
.mood-temi-intro {
  text-align: center;
  margin: 2.5rem auto 1.5rem;
  max-width: 640px;
}
.mood-temi-h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 600;
  margin: 0 0 0.4rem;
  line-height: 1.15;
}
.mood-temi-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}
.mood-temi-sub strong { color: var(--text); }

.mood-temi-category { margin-bottom: 2.25rem; }
.mood-temi-cat-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
}
.mood-temi-cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  line-height: 1;
}
.mood-temi-cat-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.55rem;
  border-radius: 50px;
}

/* Count badge sulla card tema (es. "47 film") */
.mood-tema-count-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #fff;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 50px;
  letter-spacing: 0.02em;
  z-index: 2;
  pointer-events: none;
}

@media (min-width: 768px) {
  .mood-temi-cat-title { font-size: 1.2rem; gap: 0.65rem; }
  .mood-temi-cat-icon { width: 32px; height: 32px; font-size: 1rem; }
}

/* =====================================================================
   STATS PAGE — /statistiche (Spotify Wrapped style)
   ===================================================================== */

.stats-hero {
  background: linear-gradient(180deg, #0b1826 0%, var(--bg-body, #111) 100%);
  padding: 72px 0 56px;
  text-align: center;
}
.stats-eyebrow {
  color: var(--primary, #0894D6);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 8px;
}
.stats-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 12px;
  line-height: 1.15;
}
.stats-subtitle {
  color: #aaa;
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}
.stats-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.stats-bignum {
  display: flex; flex-direction: column; gap: 6px; align-items: center;
  padding: 16px 8px;
}
.stats-bignum .n {
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: var(--primary, #0894D6);
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stats-bignum .n.pulse {
  animation: statsPulse 2s ease-in-out infinite;
}
.stats-bignum .l {
  color: #999;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
@keyframes statsPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* Capitoli */
.stats-chapter {
  padding: 72px 0;
  border-top: 1px solid #1a1a1a;
}
.stats-chapter-alt { background: #0a0a0a; }
.stats-chapter > .container > header {
  text-align: center;
  margin-bottom: 40px;
}
.stats-chapter .kicker {
  display: inline-block;
  color: var(--primary, #0894D6);
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}
.stats-chapter h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin: 0 0 12px;
  line-height: 1.2;
}
.stats-chapter .chapter-lede {
  color: #aaa;
  max-width: 560px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.stats-chapter .subhead {
  font-size: 1.3rem;
  margin: 48px 0 20px;
  color: #eee;
  text-align: center;
}

/* LIVE grid */
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}
.live-card {
  background: #161616;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.live-label {
  color: #888;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.live-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary, #0894D6);
  font-variant-numeric: tabular-nums;
}
.live-value-text {
  font-size: 1.1rem;
  color: #eee;
  font-weight: 700;
  line-height: 1.3;
}
.live-sub {
  color: #999;
  font-size: 0.85rem;
}

/* Bar lists (città, generi, decade, paesi, browser, etc) */
.stats-bar-list {
  list-style: none;
  padding: 0;
  max-width: 780px;
  margin: 0 auto;
}
.stats-bar-list li {
  display: grid;
  grid-template-columns: 28px minmax(120px, 1fr) 180px 70px;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #1b1b1b;
}
.stats-bar-list.compact li { padding: 8px 0; }
.stats-bar-list .pos {
  color: #666;
  font-weight: 700;
  font-size: 0.85rem;
}
.stats-bar-list .label {
  font-weight: 600;
  color: #e5e5e5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stats-bar-list .bar {
  background: #1a1a1a;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}
.stats-bar-list .bar .fill {
  background: linear-gradient(90deg, var(--primary, #0894D6), #2db6e8);
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s ease-out;
}
.stats-bar-list .val {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #bbb;
  font-weight: 600;
}

/* Macro-aree (Nord/Centro/Sud) */
.macro-split { max-width: 780px; margin: 0 auto; }
.macro-bar {
  display: flex;
  height: 44px;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #1a1a1a;
}
.macro-bar .seg {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.macro-bar .seg.nord   { background: #0894D6; }
.macro-bar .seg.centro { background: #28a0ab; }
.macro-bar .seg.sud    { background: #f5a524; }
.macro-legend {
  display: flex; justify-content: center; gap: 32px; flex-wrap: wrap;
  color: #ccc;
}
.macro-legend span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.macro-legend .sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.macro-legend .sw.nord   { background: #0894D6; }
.macro-legend .sw.centro { background: #28a0ab; }
.macro-legend .sw.sud    { background: #f5a524; }

/* Callout */
.callout {
  background: #141414;
  border: 1px solid #222;
  border-left: 4px solid var(--primary, #0894D6);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 32px auto;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.callout .callout-label {
  color: #888;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.callout strong { color: #eee; font-size: 1.3rem; }
.callout .callout-sub { color: #999; font-size: 0.9rem; }
.callout .quote { color: #ddd; font-style: italic; font-size: 1.05rem; line-height: 1.5; margin: 8px 0; }
.callout.big { text-align: center; padding: 40px 24px; border-left: none; border-top: 2px solid var(--primary, #0894D6); }
.callout.big strong.huge {
  display: block;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--primary, #0894D6);
  font-weight: 800;
  line-height: 1;
  margin: 12px 0;
}
.callout.brand-compare {
  text-align: center;
  border-left: none;
  border-top: 2px solid var(--primary, #0894D6);
  border-bottom: 2px solid var(--primary, #0894D6);
  padding: 32px 24px;
}
.callout.brand-compare .big-number strong {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--primary, #0894D6);
  font-weight: 800;
}
.callout.brand-compare p { margin: 8px 0; color: #ccc; }

/* Preferenze città (film vs serie) */
.region-fav-list { list-style: none; padding: 0; max-width: 780px; margin: 0 auto; }
.region-fav-list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #1b1b1b;
}
.region-fav-list .city-name { font-weight: 700; color: #eee; }
.region-fav-list .split-bar {
  display: flex;
  height: 26px;
  border-radius: 13px;
  overflow: hidden;
  background: #1a1a1a;
}
.region-fav-list .seg-film { background: #e74c3c; color: #fff; display: grid; place-items: center; font-size: 0.78rem; font-weight: 600; min-width: 44px; }
.region-fav-list .seg-serie { background: var(--primary, #0894D6); color: #fff; display: grid; place-items: center; font-size: 0.78rem; font-weight: 600; min-width: 44px; }
.region-fav-list .seg-film span, .region-fav-list .seg-serie span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }

/* Heatmap oraria */
.heat-wrap { max-width: 960px; margin: 0 auto; }
.heat-grid {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 4px;
}
.heat-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: rgba(8, 148, 214, var(--w, 0.08));
  transition: transform 0.2s;
  min-height: 30px;
}
.heat-cell:hover { transform: scale(1.15); }
.heat-labels {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  gap: 4px;
  color: #666;
  font-size: 0.7rem;
  text-align: center;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.temporal-extras { display: flex; justify-content: center; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.temporal-card { background: #141414; border: 1px solid #222; border-radius: 12px; padding: 24px 32px; text-align: center; min-width: 200px; }
.temporal-card .big-pct { display: block; font-size: 2.5rem; font-weight: 800; color: var(--primary, #0894D6); line-height: 1; }
.temporal-card .temporal-label { display: block; color: #888; font-size: 0.85rem; margin-top: 8px; }

/* Device / Donut */
.device-layout { display: flex; gap: 48px; justify-content: center; align-items: center; flex-wrap: wrap; margin-bottom: 40px; }
.stats-donut-wrap { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.stats-donut {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  position: relative;
  display: grid;
  place-items: center;
}
.stats-donut .hole {
  width: 130px; height: 130px;
  background: var(--bg-body, #111);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
}
.stats-donut .hole .pct { font-size: 1.8rem; font-weight: 800; color: var(--primary, #0894D6); }
.stats-donut .hole .pct-lbl { color: #999; font-size: 0.8rem; text-transform: uppercase; }
.stats-chapter-alt .stats-donut .hole { background: #0a0a0a; }

.stats-legend { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.stats-legend li { display: flex; align-items: center; gap: 10px; color: #ccc; font-size: 0.95rem; }
.stats-legend li strong { margin-left: auto; color: #eee; }
.stats-legend .sw { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

.os-split { max-width: 460px; }
.os-bar {
  display: flex;
  height: 48px;
  border-radius: 24px;
  overflow: hidden;
  background: #1a1a1a;
}
.os-bar .seg-ios { background: #fff; color: #111; display: grid; place-items: center; font-weight: 700; }
.os-bar .seg-android { background: #3ddc84; color: #111; display: grid; place-items: center; font-weight: 700; }
.os-note { text-align: center; color: #888; font-size: 0.85rem; margin-top: 8px; }

/* Rank grid (classifiche film) */
.stats-rank-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 40px;
}
.stats-rank-item { position: relative; }
.stats-rank-item a {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}
.stats-rank-item a:hover { transform: translateY(-4px); }
.stats-rank-item .rank {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  background: var(--primary, #0894D6);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.stats-rank-item img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}
.stats-rank-item .title {
  display: block;
  font-weight: 600;
  color: #eee;
  font-size: 0.9rem;
  margin-top: 8px;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.stats-rank-item .views {
  display: block;
  color: #888;
  font-size: 0.78rem;
  margin-top: 2px;
}

/* Word cloud */
.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  align-items: baseline;
  max-width: 960px;
  margin: 0 auto;
  padding: 32px;
  background: #0f0f0f;
  border-radius: 16px;
  border: 1px solid #1a1a1a;
}
.word-cloud span {
  color: #ccc;
  font-weight: 600;
  line-height: 1.1;
  transition: color 0.2s;
  cursor: default;
}
.word-cloud span:hover { color: var(--primary, #0894D6); }

/* Emoji ranking */
.emoji-list {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
}
.emoji-item {
  text-align: center;
  background: #141414;
  border-radius: 12px;
  padding: 16px 20px;
  min-width: 80px;
}
.emoji-item .e { font-size: 2.4rem; display: block; line-height: 1; }
.emoji-item .c { color: #bbb; font-size: 0.85rem; display: block; margin-top: 6px; font-weight: 700; }

/* Trivia grid */
.trivia-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
.trivia-card {
  background: #141414;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  transition: transform 0.2s, border-color 0.2s;
}
.trivia-card:hover {
  transform: translateY(-2px);
  border-color: #2a2a2a;
}
.trivia-card .icon { font-size: 2.2rem; line-height: 1; flex-shrink: 0; }
.trivia-card .body h3 {
  color: var(--primary, #0894D6);
  font-size: 0.72rem;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
}
.trivia-card .body p {
  margin: 0;
  font-size: 0.98rem;
  color: #ddd;
  line-height: 1.35;
}
.trivia-card .body strong { color: #fff; }

/* Details / accordion */
.stats-details {
  max-width: 780px;
  margin: 24px auto 0;
  background: #0f0f0f;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
}
.stats-details summary {
  padding: 14px 20px;
  color: var(--primary, #0894D6);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.stats-details summary::-webkit-details-marker { display: none; }
.stats-details summary::before { content: '▸ '; }
.stats-details[open] summary::before { content: '▾ '; }
.stats-details .stats-bar-list { padding: 0 20px 16px; }

/* Brand close + share */
.stats-brand-close { background: linear-gradient(180deg, #0a0a0a, #081826); }
.stats-share { display: flex; justify-content: center; gap: 16px; margin: 40px 0 16px; flex-wrap: wrap; }
.stats-share-btn {
  background: var(--primary, #0894D6);
  color: #fff;
  border: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s, filter 0.15s;
}
.stats-share-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.stats-share-btn.secondary { background: transparent; border: 2px solid var(--primary, #0894D6); color: var(--primary, #0894D6); }
.stats-updated {
  text-align: center;
  color: #666;
  font-size: 0.85rem;
  margin: 24px 0 0;
}

/* Responsive */
@media (max-width: 991px) {
  .stats-hero-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-rank-grid { grid-template-columns: repeat(3, 1fr); }
  .trivia-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-bar-list li { grid-template-columns: 24px minmax(100px, 1fr) 100px 60px; gap: 10px; }
  .heat-cell { min-height: 22px; }
  .heat-labels span { font-size: 0.55rem; }
}
@media (max-width: 575px) {
  .stats-chapter { padding: 48px 0; }
  .stats-chapter h2 { font-size: 1.6rem; }
  .stats-hero-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .stats-rank-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .trivia-grid { grid-template-columns: 1fr; }
  .stats-bar-list li { grid-template-columns: 20px 1fr 50px; gap: 8px; }
  .stats-bar-list .bar { grid-column: 1 / -1; grid-row: 2; height: 6px; margin-top: -6px; }
  .stats-bar-list .pos, .stats-bar-list .label, .stats-bar-list .val { font-size: 0.85rem; }
  .heat-grid { grid-template-columns: repeat(12, 1fr); }
  .heat-cell:nth-child(odd) { display: none; }
  .heat-labels { grid-template-columns: repeat(12, 1fr); }
  .heat-labels span:nth-child(even) { display: none; }
  .region-fav-list li { grid-template-columns: 80px 1fr; gap: 8px; }
  .region-fav-list .seg-film span, .region-fav-list .seg-serie span { display: none; }
  .device-layout { gap: 32px; }
  .macro-legend { gap: 16px; }
  .macro-bar .seg { font-size: 0.8rem; }
}

/* =====================================================================
   STATS v2 — Sarcastic blocks (Roast, VS, Lonely, Closing)
   ===================================================================== */

.stats-roast {
  padding: 56px 0 24px;
  background: var(--bg-body, #111);
}
.stats-roast .roast-kicker {
  text-align: center;
  color: var(--primary, #0894D6);
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 20px;
}
.stats-roast .roast-list {
  list-style: none;
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  font-size: 1.1rem;
}
.stats-roast .roast-list li {
  padding: 14px 4px;
  color: #ddd;
  border-bottom: 1px dashed #222;
  line-height: 1.5;
}
.stats-roast .roast-list li span {
  color: #666;
  font-style: italic;
  margin-right: 6px;
  font-weight: 600;
}
.stats-roast .roast-list li strong {
  color: var(--primary, #0894D6);
}

.stats-vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  max-width: 920px;
  margin: 32px auto;
  align-items: stretch;
}
.stats-vs .col {
  background: #141414;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stats-vs .col.us {
  border-color: var(--primary, #0894D6);
  box-shadow: 0 0 0 1px var(--primary, #0894D6) inset;
}
.stats-vs .col h3 {
  margin: 0 0 10px;
  color: #888;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
}
.stats-vs .col.us h3 { color: var(--primary, #0894D6); }
.stats-vs .col .line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #1a1a1a;
  font-size: 0.92rem;
  color: #ccc;
  gap: 12px;
}
.stats-vs .col .line span { color: #888; }
.stats-vs .col .line strong { color: #eee; text-align: right; }
.stats-vs .col.us .line strong { color: var(--primary, #0894D6); }
.stats-vs .divider {
  display: grid;
  place-items: center;
  color: #555;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 3px;
}

.stats-lonely {
  text-align: center;
  margin: 32px auto;
  max-width: 780px;
  padding: 28px 24px;
  background: #141414;
  border-left: 4px solid #f5a524;
  border-radius: 8px;
}
.stats-lonely p {
  margin: 0;
  font-size: 1.05rem;
  color: #ddd;
  line-height: 1.5;
}
.stats-lonely strong { color: #f5a524; font-size: 1.3rem; }
.stats-lonely em { color: #eee; font-style: italic; }
.stats-lonely .cta { margin-top: 20px; }
.stats-lonely .cta a {
  display: inline-block;
  padding: 12px 24px;
  background: #f5a524;
  color: #111;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.15s, filter 0.15s;
}
.stats-lonely .cta a:hover { filter: brightness(1.1); transform: translateY(-1px); }

.closing-line {
  text-align: center;
  max-width: 640px;
  margin: 40px auto 32px;
  color: #bbb;
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.6;
}
.closing-line::before, .closing-line::after {
  content: "—";
  color: #555;
  margin: 0 12px;
  font-style: normal;
}

@media (max-width: 767px) {
  .stats-vs {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .stats-vs .divider {
    transform: none;
    padding: 4px 0;
    font-size: 1.2rem;
  }
  .stats-roast .roast-list { font-size: 1rem; }
  .stats-roast .roast-list li { padding: 12px 4px; }
}

/* =====================================================================
   TEMI / ANNO / FILTRI — pagine "Altro"
   ===================================================================== */

.temi-hero {
  background: linear-gradient(180deg, #0b1826 0%, var(--bg-body, #111) 100%);
  padding: 64px 0 48px;
  text-align: center;
}
.temi-hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 12px; line-height: 1.15; }
.temi-subtitle { color: #aaa; max-width: 720px; margin: 0 auto 36px; font-size: 1.05rem; line-height: 1.5; }
.temi-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 720px; margin: 0 auto 24px; }

.temi-toggle {
  display: inline-flex;
  gap: 8px;
  background: #141414;
  padding: 6px;
  border-radius: 999px;
  margin-top: 24px;
}
.temi-toggle a {
  padding: 10px 22px;
  border-radius: 999px;
  color: #999;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}
.temi-toggle a.active { background: var(--primary, #0894D6); color: #fff; }
.temi-toggle a:hover:not(.active) { color: #eee; }

.temi-featured { padding: 40px 0 8px; }
.temi-featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1320px;
  margin: 0 auto;
}
.temi-feat-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  display: block;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s;
  background: #141414;
}
.temi-feat-card:hover { transform: translateY(-4px); }
.temi-feat-card img { width: 100%; height: 100%; object-fit: cover; }
.temi-feat-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  gap: 4px;
}
.temi-feat-overlay h3 { margin: 0; font-size: 1.1rem; line-height: 1.2; }
.temi-feat-overlay p { margin: 0; font-size: 0.82rem; color: #ccc; line-height: 1.35;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.temi-feat-count {
  align-self: flex-start;
  background: var(--primary, #0894D6);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.temi-cat-section { padding: 48px 0; }
.temi-cat-section:nth-of-type(even) { background: #0a0a0a; }
.temi-cat-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.temi-cat-icon {
  font-size: 1.6rem;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: #1a1a1a;
  border-radius: 12px;
  color: var(--primary, #0894D6);
}
.temi-cat-head h2 { margin: 0; font-size: 1.6rem; flex: 1; }
.temi-cat-count {
  color: #888;
  font-size: 0.85rem;
  background: #1a1a1a;
  padding: 4px 12px;
  border-radius: 999px;
}

.temi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.temi-card {
  background: #141414;
  border: 1px solid #1f1f1f;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}
.temi-card:hover { transform: translateY(-3px); border-color: var(--primary, #0894D6); }
.temi-thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: #1a1a1a;
  overflow: hidden;
}
.temi-thumb-wrap.temi-thumb-empty { display: grid; place-items: center; }
.temi-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.temi-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(8, 148, 214, 0.95);
  color: #fff;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.temi-card-body { padding: 14px 16px 18px; }
.temi-card-body h3 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.25; }
.temi-card-body p { margin: 0; color: #aaa; font-size: 0.85rem; line-height: 1.4;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Anno page */
.anno-recent-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}
.anno-recent-card {
  background: linear-gradient(135deg, #0b1826, #142233);
  border: 1px solid #223;
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.2s, border-color 0.2s;
}
.anno-recent-card:hover { transform: translateY(-4px); border-color: var(--primary, #0894D6); }
.anno-year-big { font-size: 2rem; font-weight: 800; color: var(--primary, #0894D6); font-variant-numeric: tabular-nums; }
.anno-year-count { font-size: 1rem; color: #eee; font-weight: 600; }
.anno-year-sub { font-size: 0.8rem; color: #888; }

.anno-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.anno-card {
  position: relative;
  background: #141414;
  border: 1px solid #1f1f1f;
  border-radius: 10px;
  padding: 14px 10px 10px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.2s;
}
.anno-card:hover { transform: translateY(-2px); border-color: var(--primary, #0894D6); }
.anno-year { font-size: 1.15rem; font-weight: 700; color: #eee; font-variant-numeric: tabular-nums; }
.anno-count { font-size: 0.85rem; color: #888; font-variant-numeric: tabular-nums; }
.anno-pct {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  width: var(--pct, 0%);
  background: linear-gradient(90deg, var(--primary, #0894D6), #2db6e8);
}

/* Filtri page */
.filtri-hero h1 { color: var(--primary, #0894D6); }

.filtri-presets-section { padding: 40px 0 16px; }
.filtri-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
}
.preset-pill {
  display: inline-block;
  padding: 10px 18px;
  background: #141414;
  border: 1px solid #232323;
  border-radius: 999px;
  color: #eee;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.18s;
}
.preset-pill:hover {
  border-color: var(--primary, #0894D6);
  color: var(--primary, #0894D6);
  transform: translateY(-1px);
}

.filtri-form-section { padding: 32px 0 48px; }
.filtri-form {
  max-width: 1100px;
  margin: 0 auto;
  background: #0f0f0f;
  border: 1px solid #1a1a1a;
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.filtri-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.filtri-field { border: none; padding: 0; margin: 0; }
.filtri-field legend {
  color: var(--primary, #0894D6);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin-bottom: 10px;
  padding: 0;
}
.filtri-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.filtri-pills-wrap { gap: 6px; }
.filtri-pills label { cursor: pointer; }
.filtri-pills input[type="radio"], .filtri-pills input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.filtri-pills label span {
  display: inline-block;
  padding: 8px 14px;
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #ccc;
  transition: all 0.15s;
}
.filtri-pills label:hover span { border-color: var(--primary, #0894D6); }
.filtri-pills input:checked + span {
  background: var(--primary, #0894D6);
  border-color: var(--primary, #0894D6);
  color: #fff;
  font-weight: 600;
}
.filtri-year-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filtri-year-quick label { cursor: pointer; }
.filtri-year-quick input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.filtri-year-quick label span {
  display: inline-block;
  padding: 6px 12px;
  background: #171717;
  border: 1px solid #222;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #bbb;
}
.filtri-year-quick input:checked + span { background: #f5a524; border-color: #f5a524; color: #111; font-weight: 700; }
.filtri-year-range { display: flex; gap: 16px; flex-wrap: wrap; }
.filtri-year-range label { color: #888; font-size: 0.85rem; display: inline-flex; align-items: center; gap: 8px; }
.filtri-year-range input {
  width: 100px;
  padding: 8px 10px;
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 6px;
  color: #eee;
  font-size: 0.9rem;
}
.filtri-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; padding-top: 8px; border-top: 1px solid #1a1a1a; }

.filtri-results-section { padding: 32px 0 56px; }
.filtri-results-head { text-align: center; margin-bottom: 24px; }
.filtri-results-head h2 { margin: 0 0 8px; }
.filtri-count { color: #aaa; font-size: 1rem; margin: 0; }
.filtri-count strong { color: var(--primary, #0894D6); font-size: 1.15rem; }
.filtri-empty { color: #f5a524; }
.filtri-empty a { color: var(--primary, #0894D6); margin-left: 6px; }

.temi-footer-cta { padding: 48px 0; text-align: center; background: #0a0a0a; }
.temi-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

@media (max-width: 991px) {
  .temi-featured-grid { grid-template-columns: repeat(2, 1fr); }
  .anno-recent-grid { grid-template-columns: repeat(3, 1fr); }
  .filtri-row { grid-template-columns: 1fr; }
}
@media (max-width: 575px) {
  .temi-hero { padding: 44px 0 36px; }
  .temi-hero-stats { grid-template-columns: 1fr; gap: 12px; }
  .temi-featured-grid { grid-template-columns: 1fr; }
  .temi-grid { grid-template-columns: 1fr; gap: 12px; }
  .anno-recent-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .anno-recent-card { padding: 18px 12px; }
  .anno-year-big { font-size: 1.6rem; }
  .anno-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .anno-card { padding: 10px 6px 8px; }
  .anno-year { font-size: 1rem; }
  .anno-count { font-size: 0.78rem; }
  .filtri-form { padding: 20px; }
  .filtri-pills label span { font-size: 0.8rem; padding: 7px 12px; }
  .filtri-presets { gap: 8px; }
  .preset-pill { padding: 8px 14px; font-size: 0.85rem; }
  .temi-cat-head { gap: 12px; }
  .temi-cat-icon { width: 40px; height: 40px; font-size: 1.3rem; }
  .temi-cat-head h2 { font-size: 1.3rem; }
}



/* ============================================================
   SEARCH v2 (2026-04-22) — correction banner, badges, filters,
   chip examples, theme cards, zero-result rescue, autocomplete v2
   ============================================================ */

/* Utility: sr-only (accessibility) */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* Correction banner v2 — prominente */
.search-correction-v2 {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 16px 0 20px; padding: 12px 14px;
  background: linear-gradient(90deg, rgba(255,193,7,0.15), rgba(255,193,7,0.05));
  border-left: 3px solid #ffc107;
  border-radius: 6px; color: #fff;
}
.search-correction-v2-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.search-correction-v2-sub { font-size: 0.92rem; opacity: 0.85; }
.search-correction-v2-sub a { color: #ffc107; text-decoration: underline; margin-left: 4px; }
.search-correction-v2-sub a:hover { color: #ffd54f; }
.search-correction-v2 svg { color: #ffc107; margin-top: 3px; }

/* Intent strip (theme/person/franchise info) */
.search-intent-strip {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 0 0 16px; padding: 10px 14px;
  background: rgba(99, 179, 237, 0.08);
  border: 1px solid rgba(99, 179, 237, 0.2);
  border-radius: 6px;
  font-size: 0.95rem; color: #cbd5e0;
}
.search-intent-badge {
  display: inline-block; padding: 3px 10px;
  background: rgba(99, 179, 237, 0.2);
  border-radius: 12px; font-size: 0.8rem; font-weight: 600; color: #63b3ed;
}
.search-intent-strip strong { color: #fff; }
.search-intent-strip a { color: #63b3ed; margin-left: auto; font-size: 0.9rem; }
.search-intent-strip a:hover { text-decoration: underline; }

/* Filters toolbar */
.search-filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
  margin: 0 0 20px; padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.search-filter { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.search-filter span { font-size: 0.75rem; color: #a0aec0; text-transform: uppercase; letter-spacing: 0.4px; }
.search-filter select {
  padding: 6px 10px; min-width: 130px;
  background: #1a1d24; border: 1px solid rgba(255,255,255,0.1);
  color: #fff; border-radius: 4px; font-size: 0.92rem;
}
.search-filter-apply {
  padding: 8px 18px; border: 0; border-radius: 4px;
  background: #3182ce; color: #fff; cursor: pointer; font-weight: 600;
  transition: background 0.15s;
}
.search-filter-apply:hover { background: #2c5282; }

/* Persons v2 — card piu grandi */
.search-persons-v2 { margin: 0 0 28px; }
.search-persons-v2 .search-persons-row {
  display: flex; gap: 12px; overflow-x: auto;
  padding-bottom: 8px; -webkit-overflow-scrolling: touch;
}
.search-person-card-v2 {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex: 0 0 120px;
  padding: 10px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  text-decoration: none; color: #fff;
  transition: background 0.15s, transform 0.15s;
}
.search-person-card-v2:hover { background: rgba(99,179,237,0.1); transform: translateY(-2px); }
.search-person-photo-v2 {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; background: #2d3748;
  display: flex; align-items: center; justify-content: center; color: #718096;
}
.search-person-name-v2 { font-size: 0.95rem; font-weight: 600; text-align: center; }
.search-person-role-v2 { font-size: 0.8rem; color: #a0aec0; }

/* Pagination */
.search-pagination {
  display: flex; gap: 16px; align-items: center; justify-content: center;
  margin: 32px 0 20px;
}
.search-pagination a {
  padding: 8px 16px; border-radius: 4px;
  background: rgba(255,255,255,0.05); color: #fff;
  text-decoration: none; font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.15s;
}
.search-pagination a:hover { background: rgba(99,179,237,0.2); border-color: #63b3ed; }
.search-pagination-current { color: #a0aec0; font-size: 0.9rem; }

/* Related themes section */
.search-related-themes { margin: 32px 0 20px; }
.search-theme-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.search-theme-chip {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 16px; max-width: 280px;
  background: rgba(147,112,219,0.1); border: 1px solid rgba(147,112,219,0.25);
  border-radius: 8px; color: #fff; text-decoration: none;
  transition: background 0.15s, transform 0.15s;
}
.search-theme-chip:hover { background: rgba(147,112,219,0.2); transform: translateY(-1px); }
.search-theme-chip strong { font-size: 0.95rem; color: #d6bcfa; }
.search-theme-chip-blurb { font-size: 0.82rem; color: #cbd5e0; }

/* Genre chips */
.search-genre-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.search-genre-chip {
  padding: 8px 14px;
  background: rgba(99,179,237,0.1); border: 1px solid rgba(99,179,237,0.25);
  border-radius: 16px; color: #90cdf4; text-decoration: none;
  font-weight: 500; font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}
.search-genre-chip:hover { background: rgba(99,179,237,0.25); color: #fff; }

/* Empty state v2 */
.search-empty-v2 {
  padding: 40px 20px; text-align: center;
  background: rgba(255,255,255,0.02); border-radius: 8px;
  margin: 20px 0;
}
.search-empty-icon-v2 { color: #63b3ed; opacity: 0.6; margin-bottom: 16px; }
.search-empty-title-v2 { font-size: 1.3rem; font-weight: 600; margin: 0 0 12px; color: #fff; }
.search-empty-hint-v2 { color: #a0aec0; margin: 0 0 20px; font-size: 1rem; }
.search-empty-suggest {
  margin: 20px 0;
  padding: 16px;
  background: rgba(255,193,7,0.08); border-radius: 6px;
}
.search-empty-suggest p { margin: 0 0 8px; color: #ffc107; font-size: 0.95rem; }
.search-empty-correction-link {
  display: inline-block; padding: 8px 18px;
  background: #ffc107; color: #1a1d24;
  font-weight: 600; border-radius: 4px; text-decoration: none;
}
.search-empty-correction-link:hover { background: #ffca28; }
.search-empty-rescue { margin: 24px 0; text-align: left; }
.search-empty-rescue-title {
  font-size: 0.95rem; font-weight: 600;
  color: #cbd5e0; margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.search-partner-cta-v2 {
  display: inline-flex; gap: 8px; align-items: center;
  margin: 20px 0 0;
  padding: 10px 16px;
  background: rgba(255,255,255,0.05); color: #cbd5e0;
  border: 1px solid rgba(255,255,255,0.1); border-radius: 6px;
  text-decoration: none; font-size: 0.9rem;
  transition: background 0.15s;
}
.search-partner-cta-v2:hover { background: rgba(255,255,255,0.1); color: #fff; }

.msearch-chip-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 6px 14px 14px;
}
.msearch-chip {
  display: inline-block;
  padding: 8px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  color: #cbd5e0; text-decoration: none;
  font-size: 0.88rem; font-weight: 500;
  transition: background 0.15s;
}
.msearch-chip:hover { background: rgba(99,179,237,0.2); color: #fff; }
.msearch-chip-recent { background: rgba(255,193,7,0.1); border-color: rgba(255,193,7,0.2); color: #ffc107; }
.msearch-chip-theme { background: rgba(147,112,219,0.1); border-color: rgba(147,112,219,0.2); color: #d6bcfa; }

/* ============================================================
   LIVE SEARCH OVERLAY (2026-04-22)
   Overlay AJAX attivato dal form desktop. Fixed sotto header, copre
   tutto il body con griglia di poster. Grazie a /api/search-live
   (render SSR + nginx cache 3min) l'UX e' istantanea.
   Mobile <1200px usa il gia' esistente .msearch-overlay fullscreen
   che a sua volta fetcha /api/search-live -> questo overlay non si
   apre mai su mobile (display: none).
   ============================================================ */
.live-search-overlay {
  position: fixed;
  top: var(--header-h, 72px);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 990; /* sotto mobile menu (9999), sopra body content */
  background: rgba(17,17,17,0.98);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.live-search-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
@media (max-width: 1199px) {
  /* Su mobile l'overlay fullscreen separato (.msearch-overlay) gestisce la UX */
  .live-search-overlay { display: none !important; }
}
body.live-search-locked { overflow: hidden; }

.live-search-topbar {
  flex-shrink: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(0,0,0,0.25);
}
.live-search-topbar-inner {
  max-width: var(--container-max, 1320px);
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 36px;
}
.live-search-topbar-label {
  font-size: 0.9rem;
  color: #cbd5e0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.live-search-topbar-label strong { color: #fff; font-weight: 600; }
.live-search-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary, #0894D6);
  animation: live-search-pulse 0.9s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes live-search-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50%      { opacity: 1; transform: scale(1.1); }
}
.live-search-close {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #cbd5e0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.live-search-close:hover { background: rgba(255,255,255,0.08); color: #fff; }

.live-search-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.live-search-content {
  max-width: var(--container-max, 1320px);
  margin: 0 auto;
  padding: 18px 1rem 40px;
  min-height: 120px;
}

/* Transition leggera su swap contenuto — evita flash bianco */
.live-search-overlay.is-loading .live-search-content {
  opacity: 0.5;
  transition: opacity 0.12s ease;
}
.live-search-overlay:not(.is-loading) .live-search-content {
  opacity: 1;
  transition: opacity 0.12s ease;
}

.live-search-section-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a0aec0;
  font-weight: 700;
  margin: 0 0 12px;
}
.live-search-section-title strong { color: #fff; letter-spacing: 0; text-transform: none; font-weight: 700; }

.live-search-correction {
  padding: 10px 14px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(255,193,7,0.12), rgba(255,193,7,0.03));
  border-left: 3px solid #ffc107;
  border-radius: 6px;
  color: #fff;
  font-size: 0.92rem;
}
.live-search-correction strong { color: #ffc107; }

/* Persons — riga scrollabile orizzontale, tipo cast card */
.live-search-persons { margin: 0 0 24px; }
.live-search-persons-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.live-search-person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 120px;
  padding: 10px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  transition: background 0.15s, transform 0.15s;
}
.live-search-person-card:hover { background: rgba(99,179,237,0.1); transform: translateY(-2px); }
.live-search-person-photo {
  width: 72px; height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: #2d3748;
}
.live-search-person-nophoto {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #718096;
}
.live-search-person-name {
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.live-search-person-role { font-size: 0.75rem; color: #a0aec0; }

/* Grid titoli — 6 colonne desktop come StreamingCommunity */
.live-search-grid {
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 1.1rem !important;
}
@media (max-width: 1399px) { .live-search-grid { grid-template-columns: repeat(5, 1fr) !important; } }
@media (max-width: 1199px) { .live-search-grid { grid-template-columns: repeat(4, 1fr) !important; } }
@media (max-width: 767px)  { .live-search-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 0.75rem !important; } }
@media (max-width: 575px)  { .live-search-grid { grid-template-columns: repeat(2, 1fr) !important; } }

/* Fade-in stagger sui primi 20 card (stesso effetto della search-page) */
@keyframes live-search-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.live-search-grid .movie-card {
  animation: live-search-card-in 280ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
.live-search-grid .movie-card:nth-child(1)  { animation-delay: 0ms; }
.live-search-grid .movie-card:nth-child(2)  { animation-delay: 18ms; }
.live-search-grid .movie-card:nth-child(3)  { animation-delay: 36ms; }
.live-search-grid .movie-card:nth-child(4)  { animation-delay: 54ms; }
.live-search-grid .movie-card:nth-child(5)  { animation-delay: 72ms; }
.live-search-grid .movie-card:nth-child(6)  { animation-delay: 90ms; }
.live-search-grid .movie-card:nth-child(7)  { animation-delay: 108ms; }
.live-search-grid .movie-card:nth-child(8)  { animation-delay: 126ms; }
.live-search-grid .movie-card:nth-child(9)  { animation-delay: 144ms; }
.live-search-grid .movie-card:nth-child(10) { animation-delay: 162ms; }
.live-search-grid .movie-card:nth-child(11) { animation-delay: 180ms; }
.live-search-grid .movie-card:nth-child(12) { animation-delay: 198ms; }
.live-search-grid .movie-card:nth-child(13) { animation-delay: 216ms; }
.live-search-grid .movie-card:nth-child(14) { animation-delay: 234ms; }
.live-search-grid .movie-card:nth-child(15) { animation-delay: 252ms; }
.live-search-grid .movie-card:nth-child(16) { animation-delay: 270ms; }
@media (prefers-reduced-motion: reduce) {
  .live-search-grid .movie-card { animation: none; }
}

.live-search-see-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 22px auto 0;
  padding: 10px 20px;
  background: rgba(8,148,214,0.1);
  border: 1px solid rgba(8,148,214,0.35);
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.live-search-see-all:hover { background: rgba(8,148,214,0.2); border-color: rgba(8,148,214,0.6); }
.live-search-grid + .live-search-see-all { display: flex; width: fit-content; margin-left: auto; margin-right: auto; }

.live-search-empty {
  text-align: center;
  padding: 60px 20px;
}
.live-search-empty-icon {
  color: #63b3ed;
  opacity: 0.45;
  margin-bottom: 16px;
}
.live-search-empty-title { font-size: 1.15rem; color: #fff; margin: 0 0 8px; }
.live-search-empty-hint { color: #a0aec0; margin: 0 0 20px; font-size: 0.95rem; }

/* ============================================================
   Search page polish (2026-04-22 refactor)
   Goal: emulate StreamingCommunity's full-body grid feel —
   big poster grid, minimal chrome, fade-in stagger. Scoped to
   .search-page so altri usi di .poster-grid restano immutati.
   ============================================================ */
.search-page .page-header {
  margin-top: 8px;
  margin-bottom: 18px;
}
.search-page .page-header h1 {
  font-size: 1.9rem;
  line-height: 1.15;
  margin: 0 0 4px;
  color: #fff;
}
.search-page .page-header h1::before {
  content: '';
}
.search-page .page-header .subtitle {
  color: #a0aec0;
  font-size: 0.92rem;
}

/* Collapsible filters — default chiuso su desktop per non coprire i risultati */
.search-filters-details {
  margin: 0 0 18px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}
.search-filters-details > summary {
  list-style: none;
  cursor: pointer;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: #cbd5e0;
  display: flex; align-items: center; gap: 8px;
  user-select: none;
}
.search-filters-details > summary::-webkit-details-marker { display: none; }
.search-filters-details > summary::after {
  content: '▾';
  margin-left: auto;
  color: #718096;
  transition: transform 0.15s;
}
.search-filters-details[open] > summary::after { transform: rotate(180deg); }
.search-filters-details > summary:hover { color: #fff; }
.search-filters-details .search-filters {
  margin: 0;
  border: none;
  background: transparent;
  border-top: 1px solid rgba(255,255,255,0.05);
  border-radius: 0 0 8px 8px;
}

/* Grid poster piu grande e piu ariosa nella pagina search (6 col default) */
.search-page .poster-grid {
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}
@media (max-width: 1399px) { .search-page .poster-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1199px) { .search-page .poster-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 767px)  { .search-page .poster-grid { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; } }
@media (max-width: 575px)  { .search-page .poster-grid { grid-template-columns: repeat(2, 1fr); } }

/* Fade-in stagger cards — nth-child delay sui primi 24, poi simultaneo. */
@keyframes search-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.search-page .poster-grid .movie-card {
  animation: search-card-in 320ms cubic-bezier(0.2, 0.8, 0.25, 1) both;
}
.search-page .poster-grid .movie-card:nth-child(1)  { animation-delay: 0ms; }
.search-page .poster-grid .movie-card:nth-child(2)  { animation-delay: 20ms; }
.search-page .poster-grid .movie-card:nth-child(3)  { animation-delay: 40ms; }
.search-page .poster-grid .movie-card:nth-child(4)  { animation-delay: 60ms; }
.search-page .poster-grid .movie-card:nth-child(5)  { animation-delay: 80ms; }
.search-page .poster-grid .movie-card:nth-child(6)  { animation-delay: 100ms; }
.search-page .poster-grid .movie-card:nth-child(7)  { animation-delay: 120ms; }
.search-page .poster-grid .movie-card:nth-child(8)  { animation-delay: 140ms; }
.search-page .poster-grid .movie-card:nth-child(9)  { animation-delay: 160ms; }
.search-page .poster-grid .movie-card:nth-child(10) { animation-delay: 180ms; }
.search-page .poster-grid .movie-card:nth-child(11) { animation-delay: 200ms; }
.search-page .poster-grid .movie-card:nth-child(12) { animation-delay: 220ms; }
.search-page .poster-grid .movie-card:nth-child(13) { animation-delay: 240ms; }
.search-page .poster-grid .movie-card:nth-child(14) { animation-delay: 260ms; }
.search-page .poster-grid .movie-card:nth-child(15) { animation-delay: 280ms; }
.search-page .poster-grid .movie-card:nth-child(16) { animation-delay: 300ms; }
.search-page .poster-grid .movie-card:nth-child(17) { animation-delay: 320ms; }
.search-page .poster-grid .movie-card:nth-child(18) { animation-delay: 340ms; }
.search-page .poster-grid .movie-card:nth-child(19) { animation-delay: 360ms; }
.search-page .poster-grid .movie-card:nth-child(20) { animation-delay: 380ms; }
@media (prefers-reduced-motion: reduce) {
  .search-page .poster-grid .movie-card {
    animation: none;
  }
}

/* Loading hint su form header/mobile-overlay quando navighiamo */
.search-form.is-loading {
  opacity: 0.85;
}
.search-form.is-loading .search-icon {
  animation: search-pulse 0.9s ease-in-out infinite;
}
.msearch-overlay.is-loading .msearch-form {
  opacity: 0.85;
}
.msearch-overlay.is-loading .msearch-icon {
  animation: search-pulse 0.9s ease-in-out infinite;
}
@keyframes search-pulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}

@media (max-width: 640px) {
  .search-filters { gap: 8px; padding: 10px; }
  .search-filter select { min-width: 110px; font-size: 0.85rem; }
  .search-person-card-v2 { flex: 0 0 100px; }
  .search-person-photo-v2 { width: 80px; height: 80px; } .search-theme-chip { max-width: 100%; }
  .search-page .page-header h1 { font-size: 1.45rem; }
}
