* {
  box-sizing: border-box;
}

.titolo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.titoli-text {
  flex: 1;
}

.titoli-text h3 {
  margin: 0;
}

/*Sfocatura*/
#logo {
  height: 50px;
  width: auto;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.3);
  filter: blur(15px);
  box-shadow: 3px 1px 5px 3px #000;
  background-image: linear-gradient(180deg, #ff9800 0%, #000);

}

.logo-animato {
  height: 60px;
  opacity: 0;
  transform: scale(0.5) rotate(-10deg);
  filter: blur(10px);
  animation: logoIn 1.2s ease-out forwards;

}

/*Sfocatura pixellata*/
/*#logo {
  height: 50px;
  width: auto;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.3);
  filter: blur(15px);
  box-shadow: 3px 1px 5px 3px #000;
  background-image: linear-gradient(180deg, #ff9800 0%, #000);
}

.logo-animato {
   -webkit-mask-image: radial-gradient(circle, black 50%, rgba(0,0,0,0) 50%);
  -webkit-mask-size: 4px 4px;
  
  animation: logoIn 2.5s ease-out forwards;
}

@keyframes logoIn {
  0% {
    opacity: 0;
    transform: scale(0.3) rotate(-15deg);
    filter: blur(15px);
    -webkit-mask-size: 20px 20px;
  }
  50% {
    opacity: 0.5;
    filter: blur(5px);
    -webkit-mask-size: 8px 8px;
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
    filter: blur(0);
    -webkit-mask-size: 1px 1px;
  }
}*/

/*Sfocatura Blockbuster da Cinema*/
/*#logo {
  height: 60px;
  width: auto;
  border-radius: 50%;
  opacity: 0;
  cursor: pointer;
  transition: filter 0.3s;
 box-shadow: 0 0 20px rgba(255, 152, 0, 0); 
}

.logo-animato {
  animation: cinemaIn 2.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cinemaIn {
  0% {
    opacity: 0;
    transform: scale(1.8) rotate(5deg);
    filter: blur(30px) brightness(300%) contrast(150%);
    -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 11%);
    -webkit-mask-size: 30px 30px;
  }
  40% {
    opacity: 0.7;
    filter: blur(10px) brightness(150%);
    -webkit-mask-size: 15px 15px;
    box-shadow: 0 0 40px #ff9800; 
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: blur(0) brightness(100%) contrast(100%);
    -webkit-mask-image: none;
    box-shadow: 3px 1px 5px 3px #000;
  }
}*/

/*Sfocatura Effetto Magnetico + Bagliore*/
/*#logo {
  height: 60px;
  width: auto;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  box-shadow: 0 0 0px #ff9800;
  background: linear-gradient(180deg, #ff9800 0%, #000);
}

.logo-animato {
  animation: magnetIn 2.2s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes magnetIn {
  0% {
    opacity: 0;
    transform: scale(2.5) translateZ(100px);
    filter: blur(20px) brightness(5) contrast(200%);
    clip-path: inset(0 100% 0 0); 
  }
  30% {
    opacity: 1;
    filter: blur(10px) brightness(2) contrast(150%);
    clip-path: inset(0 50% 0 0); 
  }
  60% {
    filter: blur(2px) brightness(1.5);
    box-shadow: 0 0 50px 20px #ff9800;
    clip-path: inset(0 0 0 0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateZ(0);
    filter: blur(0) brightness(1) contrast(100%);
    box-shadow: 3px 1px 10px #000;
    clip-path: inset(0 0 0 0);
  }
}*/

/*#logo {
  height: 50px;
  width: auto;
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(255, 152, 0, 0.2); 
  background-image: linear-gradient(180deg, #ff9800 0%, #000);
}

.logo-animato {
  animation: cinemaIn 3.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cinemaIn {
  0% {
    opacity: 0;
    transform: scale(1.5) translateZ(0); 
    filter: blur(25px) brightness(3) contrast(150%); 
    letter-spacing: 20px;
    clip-path: circle(0% at 50% 50%); 
  }
  40% {
    opacity: 0.6;
    filter: blur(10px) brightness(1.5) drop-shadow(0 0 15px #ff9800);
    clip-path: circle(30% at 50% 50%);
  }
  80% {
    opacity: 0.9;
    transform: scale(1.05);
    filter: blur(2px) brightness(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
    filter: blur(0) brightness(1);
    clip-path: circle(100% at 50% 50%);
  }
}*/

/*.logo-animato {
  height: 60px;
  filter: url(#fractal-dissolve) blur(10px); 
  opacity: 0;
  transform: scale(1.5);
  animation: ricomposizione 3s ease-out forwards;
}

@keyframes ricomposizione {
  0% {
    opacity: 0;
    
    filter: url(#fractal-dissolve) blur(15px) brightness(2);
    transform: scale(1.8) rotate(-5deg);
  }
  50% {
    opacity: 0.7;
    
    filter: url(#fractal-dissolve) blur(5px) brightness(1.2);
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    
    filter: url(none) blur(0) brightness(1);
    transform: scale(1) rotate(0);
  }
}*/

html,
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, sans-serif;
  background: #0e0e0e;
  color: #fff;
  overflow: hidden;
  /* Blocca lo scorrimento dell'intera pagina */
}

/* Per Chrome, Safari e Opera */
body::-webkit-scrollbar {
  display: none;
}

/* Per Firefox e IE/Edge */
body {
  scrollbar-width: none;
  /* Firefox */
  -ms-overflow-style: none;
  /* IE e Edge */
}

.app {
  display: flex;
  flex-direction: column;
}

body,
.app {
  height: 100vh;
  height: 100dvh;
  height: var(--app-height);
}

h3,
.btnNotifiche {
  margin-block-start: 1px;
  margin-block-end: 1px;
}

h3 {
  background-image: linear-gradient(269deg, #ffdd00 0%, #ff6c00 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
}

.btnNotifiche {
  background-image: linear-gradient(180deg, #cd0000 0%, #000);
  margin-left: 10px;
}

.titolo {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: row;
}

.sticky {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #000;
  pointer-events: auto;
}

header {
  padding: 5px 5px;
  display: flex;
  background-image: linear-gradient(180deg, #ba4a00 -97.06%, #000 54.68%);
}

.city-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

select {
  width: clamp(220px, 70vw, 420px);
  font-weight: bold;
  cursor: pointer;
  color: #E0FFFF;
  border: 1px solid #333;
  padding: 5px;
  margin: 8px 8px 10px 5px;
  border-radius: 6px;
  box-shadow: 2px 2px 8px 0px grey;
  background-image: linear-gradient(180deg, #808080 0%, #000 100%);
}

button {
  font-weight: bold;
  cursor: pointer;
  color: #E0FFFF;
  border: 1px solid #333;
  padding: 5px;
  margin: 8px 8px 10px 5px;
  border-radius: 6px;
  box-shadow: 2px 2px 8px 0px grey;
  background-image: linear-gradient(180deg, #808080 0%, #000 100%);
}

button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  background: #2b2b2b;
  color: #777;
  filter: grayscale(0.6);
}

button:hover {
  color: aqua;
  font-weight: bold;
  transition: background 0.2s ease, color 0.2s ease;
  background-image: linear-gradient(180deg, #808080 0%, #000);
}

.nav-btn.active {
  font-weight: bold;
  border-color: aqua;
  color: #00FA9A;
  /*font-size: 15px;*/
  box-shadow: 2px 4px 8px 0px #948801fc;
  background-image: linear-gradient(180deg, #ff9800 0%, #000);

}

.nav-btn {
  transition: background 0.2s ease, color 0.2s ease;
}

.city-fav {
  cursor: pointer;
  font-size: 12px;
  margin-right: 5px;
}

.city-fav.active {
  color: #ff9800;
}

.city-fav.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.city-fav:hover {
  opacity: 0.35;
  transition: background 0.2s ease, color 0.2s ease;
}

.preferiti-toolbar,
.trailers-toolbar {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  padding: 8px;
  margin-bottom: 10px;
  z-index: 10;
}

.trailers-toolbar button {
  opacity: 0.5;
  transition: 0.3s;
}

.trailers-toolbar button.active-sub {
  opacity: 1;
  border-bottom: 2px solid #ff0000;
  font-weight: bold;
}

.preferito-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: aqua;
}

.badge-modified {
  background-image: linear-gradient(270deg, #ff0000 0%, #3f1414 100%);
  color: white;
  font-size: 10px;
  display: flex;
  padding: 2px 6px;
  border-radius: 40px;
  margin-left: 5px;
  margin-top: 5px;
  margin-bottom: 5px;
  justify-content: space-evenly;
}

.preferito-item.invalid-session {
  cursor: default;
  opacity: 0.7;
  border-left: 4px solid #ff3b30;
  border-bottom: 1px solid #ff3b30;
  box-shadow: 2px 2px 8px 0px #ff3b30;
  padding-left: 8px;
}

.count-item {
  top: -6px;
  right: -8px;
  background-image: linear-gradient(270deg, #2ee8c4 0%, #e47575 100%);
  color: #ec0b54;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 20px;
  display: none;
}

.count-item.visible {
  display: inline-block;
}

.count-item.pop {
  transform: scale(1.5);
  transition: transform 0.2s ease;
}

/*.preferito-item.upcoming {
  position: relative;
  border-left: 5px solid #00e676;
  border-bottom: 2px solid #00e676;
  box-shadow: 2px 2px 8px 0px #00e676;
}*/

.preferito-item.upcoming {
  position: relative;
  border: 1px solid #00e676;
  border-left: 5px solid #00e676;
  border-bottom: 2px solid #00e676;
  box-shadow: 2px 2px 8px 0px #00e676;
  transition: all 0.5s ease;
}

.preferito-item.upcoming.is-urgent {
  animation: badge-pulse 1s infinite alternate;
}

.preferito-item.preroll {
  border-left: 5px solid #ff9800;
  border-bottom: 2px solid #ff9800;
  box-shadow: 2px 2px 8px 0px #ff9800;
}

.preferito-item.live {
  animation: none; /* Fermiamo il pulse di upcoming */
  border: 1px solid #7c4dff; 
  border-left: 5px solid #7c4dff;
  box-shadow: 2px 2px 10px rgba(124, 77, 255, 0.4);
  background-color: rgba(124, 77, 255, 0.05); /* Un leggero riflesso viola */
}

.preferito-item.expired {
  cursor: unset;
  border-left: 5px solid #ec0b54;
  border-bottom: 2px solid #ec0b54;
  box-shadow: 2px 2px 8px 0px #ec0b54;
  opacity: 0.5;
}

.remove-single {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.remove-single:hover {
  opacity: 0.7;
  background: #dc2828;
}

.view-programmazione .summary,
.view-programmazione .filter-days-wrapper {
  opacity: 1;
  transform: translateY(0);
}

.view-preferiti .summary,
.view-preferiti .filter-days-wrapper {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
}

.view-trailers .summary,
.view-trailers .filter-days-wrapper {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-20px);
}

.filter-days-wrapper {
  overflow-x: auto;
  border-bottom: 1px solid #222;
  transition: opacity 0.02s ease;
  background-image: linear-gradient(180deg, #171717 0%, #000);
}

.filter-data-list {
  display: flex;
  list-style: none;
  padding: 8px;
  margin: 5px 5px 5px 5px;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
}

.filter-data-list::-webkit-scrollbar {
  display: none;
}

.filter-data-list__button {
  padding: 8px 12px;
  border: 1px solid #333;
  color: #fff;
  border-radius: 20px;
  background-image: linear-gradient(180deg, #7c580a 0%, #000);
}

.filter-data-list__button:hover {
  background: #000;
  color: aqua;
  border: 1px solid aqua;
}

.filter-data-list__button.active {
  border: 2px solid aqua;
  font-weight: bold;
  color: #00FA9A;
  box-shadow: 5px 0px 8px 0px #948801fc;
  background-image: linear-gradient(180deg, #ff9800 0%, #000);
}

.filter-data-list__button.disabled {
  pointer-events: none;
  color: #767676;
  -webkit-text-decoration-line: line-through;
  text-decoration-line: line-through;
}

.sessions__group-date {
  font-weight: bold;
  margin-bottom: 6px;
  color: aqua;
  border-top: 1px solid aqua;
}

.film {
  margin-bottom: 12px;
}

.sessions__list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sessions__list__item {
  padding: 5px 14px;
  cursor: pointer;
  border-radius: 20px;
  margin-right: 10px;
  margin-top: 10px;
  margin-bottom: 15px;
  border-bottom: 1px solid aqua;
  box-shadow: 2px 2px 8px 0px grey;
  background-image: linear-gradient(270deg, #333333 0%, #000);
}

/*.sessions__list__item:hover {
color: aqua;
opacity: 0.7;
}*/

.sessions__list__item.active {
  color: aqua;
  font-weight: bold;
  box-shadow: 8px 5px 8px 0px #00350e;
  border-bottom: 1px solid #00ff45;
  background-image: linear-gradient(270deg, #523a06 0%, #000)
}

.session-time__start {
  font-size: 16px;
  font-weight: bold;
}

.session-time__end {
  font-size: 12px;
  font-weight: bold;
  margin-left: 6px;
  color: #ec0b54
}

.preferito-item {
  pointer-events: none;
  position: relative;
}

.replacement {
  pointer-events: all;
  margin-top: 4px;
  color: #00b894;
}

.replacement-link {
  cursor: pointer;
  text-decoration: underline;
}

.replacement-link:hover {
  color: #00b894;
}

.replacement-disabled {
  pointer-events: none;
  opacity: 0.5;
  cursor: unset;
}

.replacement-disabled .replacement-link {
  text-decoration: none;
  color: inherit;
}

.icon-svg {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  /*
  transform: scaleX(-1); 
  transform-origin: center;
  */
}

/*.icon-live-ending,
.icon-preroll-ending {
  animation: pulse 1.5s infinite;
}*/

.icon-live-ending,
.icon-preroll-ending {
  animation: pulse-slow 2s ease-in-out infinite;
}


.icon-upcoming-ending {
  display: inline-block;
  /* Necessario per ruotare span */
  animation: ruota-e-pausa 2s linear infinite;
}



/* =====================
   SUMMARY
===================== */
.summary-remove {
  background: none;
  border: none;
  cursor: pointer;
}

.summary-remove:hover {
  opacity: 0.7;
  background-image: linear-gradient(180deg, #ff0000 0%, #100404);
}

.summary {
  padding: 8px 12px;
  border-top: 1px solid #222;
  background-image: linear-gradient(0deg, #171717 0%, #000);
}

.summary-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 20px;
  margin: 5px;
  box-shadow: 2px 4px 8px 0px #000;
  background-image: linear-gradient(90deg, #000 0%, #1d2224);
}

.summary-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary-status {
  font-size: 0.75rem;
}

/* STATI */
.summary-status.status-upcoming {
  color: #00e676;
}

.summary-status.status-live {
  color: #ff9800;
}

.summary-status.status-ended {
  color: #ec0b54;
}

.summary-label {
  color: #f2e260;
}

.summary,
.filter-days-wrapper {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.summary::-webkit-scrollbar {
  display: none;
}

/*.summary-item {
  padding: 10px 12px;
  border-right: 1px solid #333;
  min-width: 220px;
}

.summary-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.summary-index {
  font-weight: bold;
  opacity: .6;
}

.summary-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

.summary-badge.modified {
  background: #ffcc00;
  color: #000;
}

.summary-badge.cancelled {
  background: #d32f2f;
  color: #fff;
}

.fav-count {
  font-size: 14px;
  margin-left: 4px;
  opacity: .8;
}

.fav-count.visible {
  font-weight: bold;
}
*/

/* =====================
   SWIPE PRO LAYOUT
===================== */

.view-change {
  animation: tapFeedback 120ms ease;
}

.swipe-wrapper {
  flex-grow: 1;
  width: 100vw;
  height: 100vh;
  /* O l'altezza della tua area utile */
  overflow: hidden;
  position: relative;
}

.swipe-track {
  display: flex;
  width: 200vw;
  height: 100%;
  will-change: transform;
}

/*.content {
  display: flex;        
  flex-direction: column; 
  flex: 0 0 100vw;
  height: 100%;
  padding: 12px;
  touch-action: pan-y;
  background-image: linear-gradient(180deg, #171717 0%, #000);
}*/

.content {
  display: flex;
  flex-direction: column;
  flex: 0 0 100vw;
  width: 100vw;
  height: 100%;
  /* Altezza fissa del contenitore */
  padding: 12px;
  touch-action: pan-y;
  background: linear-gradient(180deg, #171717 0%, #000);
}

.view-change {
  animation: tapFeedback 120ms ease;
}

/* =====================
   MODALE GENERICO
===================== */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  padding: 20px;
  border-radius: 12px;
  max-width: 90%;
  text-align: center;
  color: #fff;
  background-image: linear-gradient(270deg, #272523 0%, #000);
}

.modal-buttons {
  display: flex;
  justify-content: space-around;
  margin-top: 16px;
}

.modal-buttons button {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #503512;
  color: #fff;
  cursor: pointer;
  min-width: 80px;
}

.modal-buttons button:hover {
  background: #ff9800;
  color: #000;
}

.modal.toast .modal-buttons {
  display: none;
}

.modal.toast .modal-content {
  text-align: center;
  font-size: 15px;
}

.modal-overlay {
  display: none; /* Nascosto di default */
  position: fixed; /* Rimane fisso anche se scrolli */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85); /* Sfondo scuro semitrasparente */
  z-index: 99999; /* Valore molto alto per stare sopra a tutto */
  backdrop-filter: blur(5px); /* Opzionale: sfoca il sito sotto */
}

.preferitiModal-content {
  position: relative;
  width: 90%;
  max-width: 100%;
  margin: 0px auto;
  background: #1e1e1e;
  padding: 0px;
  border-radius: 12px;
  max-height: 100%;
  overflow-y: auto;
  color: white;
}


#video {
  width: 100%;
  display: block;
  border-radius: 15px;
}

.videoModal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  cursor: not-allowed;
}

.videoModal-content figure {
  width: 100% !important;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  box-shadow: 0px 0px 100px 20px #260800;
  position: relative;
  border-radius: 15px;
}

.videoModal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  display: block;
  cursor: auto;
}

#closePlayer, #closeModal {
  position: absolute;
  top: 0px;
  right: 0.1px;
  padding: 0;
  margin: 0;
  z-index: 101;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  backdrop-filter: blur(4px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  background: radial-gradient(circle, #f70606, #0000004d);
}

#closePlayer:active, #closeModal:active {
  transform: scale(0.9);
  background: #555;
}

#closePlayer svg, #closeModal svg {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

/* Fix per Mobile: lo teniamo nell'angolo interno per sicurezza */
@media (max-width: 600px) {
  #closePlayer, #closeModal {
    top: 0px;
    right: 0.1px;
  }
}

.film-row {
  display: flex;
  align-items: center;
  width: 100%;
  justify-content: space-between;
}

/* IL TITOLO: Dimensione fissa e troncamento */
.film-info {
  display: flex;
  flex: 0 0 60%;
  /* Occupa esattamente il 60% della riga */
  align-items: flex-end;
  justify-content: space-between;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* Aggiunge i puntini (...) se lungo */
  font-weight: bold;
  margin-right: 15px;
  /* Il "Tab" di distacco */
  border-bottom: 1px solid aqua;
}

/* IL PLAYER: Rimane sempre visibile a destra */
.openPlayer {
  flex: 0 0 auto;
  padding: 10px 5px 5px 5px;
  border-radius: 25px;
  font-size: 0.85rem;
  white-space: nowrap;
  color: #2de73b;
  cursor: pointer;
  background-image: linear-gradient(90deg, #0000006e 0%, #111e23d1);
}

.openPlayer:hover {
  color: #11deb8;
}

/* OTTIMIZZAZIONE MOBILE STRETTO */
@media (max-width: 380px) {
  .film-info {
    flex: 0 0 55%;
    /* Riduce un po' il titolo su schermi minuscoli */
  }

  .openPlayer {
    font-size: 0.75rem;
    padding: 4px 8px;
  }
}

/* Il Titolo: questo è l'unico elemento che si accorcia con i puntini */
.film-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  /* Permette al titolo di rimpicciolirsi */
  font-size: 15px
}

/* La Durata: non si restringe mai e mantiene lo spazio */
.film-duration {
  white-space: nowrap;
  flex-shrink: 0;
  /* Impedisce alla durata di sparire */
  margin-left: 5px;
  font-size: 13px;
  color: crimson;
}

.trl-duration {
  white-space: nowrap;
  flex-shrink: 0;
  /* Impedisce alla durata di sparire */
  margin-left: 5px;
  color: aqua;
  font-weight: bold;
}

.progress-container {
  display: flex;
  width: 100%;
  height: 8px;
  background-color: #eee;
  position: relative;
  margin-top: 35px;
  border-radius: 3px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.segmento {
  height: 100%;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}

#seg-pub {
  border-radius: 3px 0 0 3px;
  /*background-image: linear-gradient(to right, #8d4406, #cc9a00, #8d4406);*/
  background-image: linear-gradient(0deg, #281301 5%, #cc9a00 100%);
}

#seg-f1 {
  /*background-image: linear-gradient(to right, #0056b3, #007bff, #0056b3);*/
  background-image: linear-gradient(0deg, #01162c 5%, #007bff 100%);
}

#seg-int {
  /*background-image: linear-gradient(to right, #495057, #6c757d, #495057);*/
  background-image: linear-gradient(0deg, #15171a 5%, #6c757d 100%);
}

#seg-f2 {
  border-radius: 0 3px 3px 0;
  border-right: none;
  /*background-image: linear-gradient(to right, #b33, #f44, #b33);*/
  background-image: linear-gradient(0deg, #270b03 5%, #f44 100%);
}

.cursore-live {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: aqua;
    z-index: 999;
    border-radius: 2px;
    background-image: linear-gradient(0deg, #000000 1%, aqua 30%);
    transition: left 0.5s linear;
}

.cursore-label {
  position: absolute;
  bottom: 18px;
  /* Posizione sopra la barra */
  left: 50%;
  transform: translateX(-50%);
  /*background-image: linear-gradient(180deg, #808080 0%, #000 100%);*/
  color: #ffffff !important;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
  display: block !important;
  /* Forza la visualizzazione */
  visibility: visible !important;
}

/* Colori dinamici per la label basati sulla classe del genitore */
.cursore-live.fase-pub .cursore-label {
  background-image: linear-gradient(0deg, #281301 5%, #cc9a00 100%);
}

.cursore-live.fase-f1 .cursore-label {
  background-image: linear-gradient(0deg, #01162c 5%, #007bff 100%);
}

.cursore-live.fase-int .cursore-label {
  background-image: linear-gradient(0deg, #15171a 5%, #6c757d 100%);
}

.cursore-live.fase-f2 .cursore-label {
  background-image: linear-gradient(0deg, #270b03 5%, #f44 100%);
}

/* Freccina */
.cursore-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: aqua;
}

#preferiti,
#trailers {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

#programmazione,
#preferitiList,
#trailersList {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 15px;
  max-height: 100%;
  touch-action: pan-y;
  padding-bottom: 40px;
}

#programmazione::-webkit-scrollbar,
#preferitiList::-webkit-scrollbar,
#trailersList::-webkit-scrollbar {
  width: 8px;

}

/*#programmazione::-webkit-scrollbar-track,
#preferitiList::-webkit-scrollbar-track,
#trailersList::-webkit-scrollbar-track {
  background: aqua;
 border-radius: 10px;
}*/

#programmazione,
#preferitiList,
#trailersList {
  scrollbar-width: thin;

  scrollbar-color: aqua #1e1e1e;
}

/*#programmazione::-webkit-scrollbar-thumb,
#preferitiList::-webkit-scrollbar-thumb,
#trailersList::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0);
  transition: background 0.3s;
}

#programmazione:hover::-webkit-scrollbar-thumb,
#preferitiList:hover::-webkit-scrollbar-thumb,
#trailersList:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
}

#programmazione::-webkit-scrollbar-thumb:hover,
#preferitiList::-webkit-scrollbar-thumb:hover,
#trailersList::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.6);
}*/

/*prova*/
/* 1. Sfondo della traccia (Track): deve essere scuro o trasparente */
#programmazione::-webkit-scrollbar-track,
#preferitiList::-webkit-scrollbar-track,
#trailersList::-webkit-scrollbar-track {
  background: #121212;
  border-radius: 10px;
}

/* 2. Levetta (Thumb): deve essere visibile per capire dove ci si trova */
#programmazione::-webkit-scrollbar-thumb,
#preferitiList::-webkit-scrollbar-thumb,
#trailersList::-webkit-scrollbar-thumb {
  /* Grigio medio di base così la vedi anche senza hover */
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  border: 2px solid #121212;
  /* Crea un piccolo stacco dai bordi della traccia */
  transition: background 0.3s;
}

/* 3. Effetto Hover: la levetta diventa più luminosa */
#programmazione:hover::-webkit-scrollbar-thumb,
#preferitiList:hover::-webkit-scrollbar-thumb,
#trailersList:hover::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.5);
}

/* 4. Quando l'utente trascina la barra direttamente */
#programmazione::-webkit-scrollbar-thumb:hover,
#preferitiList::-webkit-scrollbar-thumb:hover,
#trailersList::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.8);
}


.search-container {
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px 0;
  flex-shrink: 0;
  width: 100%;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

#mainSearch {
  flex-grow: 1;
  width: 100%;
  padding: 10px 35px 10px 12px;
  /* Spazio a destra per la X */
  border-radius: 8px;
  background: #1e1e1e;
  color: white;
  border: 1px solid #333;
  font-size: 16px;
  box-sizing: border-box;
}

#mainSearch:focus {
  outline: none;
  border-color: #ff0000;
  /* Un tocco di colore al focus */
}

/* Questo garantisce che se il placeholder cambia, la X segua la logica corretta */
#mainSearch:placeholder-shown+#clearMainSearch {
  display: none !important;
}

#mainSearch:not(:placeholder-shown)+#clearMainSearch {
  display: block;
}

#clearMainSearch {
  position: absolute;
  right: 5px;
  backdrop-filter: blur(5px);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0px 0px 10px 4px grey;

  /* Animazione esistente */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  transform: scale(0.8);
  /* Effetto "pop" all'apparizione */

  pointer-events: none;
  -webkit-tap-highlight-color: transparent;
  background: radial-gradient(circle, #f70606, #0000004d);
}

#clearMainSearch.visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  /* Torna a dimensione piena */
  pointer-events: auto;
}

/* Effetto al tocco */
#clearMainSearch:active {
  background: #555;
  transform: scale(0.9);
}

/* Assicura che l'SVG scali bene */
#clearMainSearch svg {
  width: 14px;
  height: 14px;
}

.location-badge {
  font-size: 10px;
  background: #ffaa00;
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: bold;
  text-transform: uppercase;
  vertical-align: middle;
}

.badge-trl-stato {
  font-size: 10px;
  border-radius: 4px;
  margin-left: 5px;
  text-transform: uppercase;
  font-weight: bold;
}

.badge-prog {
  background: #2ecc71;
  color: #000;
  padding: 2px 5px;
}

.badge-pross {
  background: #f1c40f;
  color: #000;
  padding: 2px 15px;
}


.header-info {
  display: flex;
  align-items: center;
}

/* Se vuoi che la toolbar dei trailer sia centrata e spaziosa */
#trailersTitle,
#mainTitle {
  color: #ffaa00;
  /* Un colore diverso per i trailer */
  font-size: 1.1rem;
  width: 100%;
}

/* Nasconde anche la barra dei giorni (filter-days-wrapper) nei trailer */
.view-trailers .filter-days-wrapper,
.view-trailers #programSummary {
  display: none;
}

.highlight {
  color: #ffaa00;
  /* Arancione per l'evidenziazione */
  text-decoration: underline;
  /* Opzionale, per dare più enfasi */
}

/* Colore per le lettere delle unità (es: g, h, m, s) */
.unit {
  color: #ffaa00;
  /* Arancione o il colore che preferisci */
  font-weight: bold;
  margin-left: 1px;
}

/* Stile per l'urgenza (meno di 5 minuti) */
/*.urgent {
  color: #ff4444 !important;
  font-weight: bold;
  animation: blink-urgent 1s steps(5, start) infinite;
}

@keyframes blink-urgent {
  to { visibility: hidden; }
}*/

/*.urgent {
  animation: pulse-slow 2s ease-in-out infinite;
}*/

/*.urgent {
  color: #ff5252;
  font-weight: bold;
  animation: glow-red 1.5s ease-in-out infinite;
}

@keyframes glow-red {
  0%, 100% { text-shadow: 0 0 0px rgba(255, 82, 82, 0); }
  50% { text-shadow: 0 0 8px rgba(255, 82, 82, 0.6); }
}*/

/*.urgent {
  color: #fff;
  text-shadow: 
    0 0 5px #fff, 
    0 0 10px #ff0055, 
    0 0 20px #ff0055;
  font-weight: bold;
  animation: neon-flicker 2s infinite alternate;
}

@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 0 0 5px #fff, 0 0 10px #ff0055, 0 0 20px #ff0055;
    opacity: 1;
  }
  20%, 24%, 55% {
    text-shadow: none;
    opacity: 0.7;
  }
}*/

.urgent {
  font-weight: bold;
  color: #fff;
  background: linear-gradient(120deg, #ff0000 30%, #ff6666 50%, #ff0000 70%);
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shine 2s linear infinite;
  display: inline-block;
}

@keyframes shine {
  to {
    background-position: -200% center;
  }
}

@keyframes pulse-slow {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes badge-pulse {
  0% {
    box-shadow: 2px 2px 8px 0px #025530;
    border-color: #00e676;
  }
  100% {
    box-shadow: 2px 2px 8px 0px #00e676;
    border-color: #025530;
  }
}

@keyframes ruota-e-pausa {
  0% {
    transform: rotate(0deg);
  }

  5% {
    transform: rotate(30deg);
  }

  10% {
    transform: rotate(60deg);
  }

  15% {
    transform: rotate(90deg);
  }

  20% {
    transform: rotate(120deg);
  }

  25% {
    transform: rotate(150deg);
  }

  30% {
    transform: rotate(180deg);
  }

  40% {
    transform: rotate(180deg);
  }

  50% {
    transform: rotate(180deg);
  }

  55% {
    transform: rotate(210deg);
  }

  60% {
    transform: rotate(240deg);
  }

  65% {
    transform: rotate(270deg);
  }

  70% {
    transform: rotate(310deg);
  }

  75% {
    transform: rotate(330deg);
  }

  80% {
    transform: rotate(360deg);
  }

  90% {
    transform: rotate(360deg);
  }

  100% {
    transform: rotate(360deg);
  }

}

@keyframes logoIn {
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
    filter: blur(0);

  }
}

@keyframes tapFeedback {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.985);
  }

  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}



