:root {
    --primary-color: #0dcaf0;
    --secondary-color: #0d6efd;
    --dark-bg: #0a0e27;
    --card-bg: #1a1f3a;
    --hover-bg: #252b4a;
    --text-primary: #ffffff;
    --text-secondary: #b0b8c8;
    --border-color: #0dcaf0;
    --border-color-dark: #272d50;;
    --box-shadow-color: rgba(13, 202, 240, 0.2);
    --box-shadow-live: rgb(240 13 13 / 36%);
    --bs-link-color: #0dcaf0;
    --bs-link-color-rgb: rgba(13, 202, 240, 1);
}

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

html {
    background: var(--dark-bg);
    overscroll-behavior: none;
}

body {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #0f1429 100%);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding-top: 70px;
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

[v-cloak] {
    display: none;
 }

.container-fluid{
    max-width: 1280px;
}




/* Toolbar */
.toolbar {
    /*
    background: linear-gradient(135deg, rgba(26, 31, 58, 0.95) 0%, rgba(15, 20, 41, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-color);
    */
    box-shadow: 0 4px 20px rgba(13, 202, 240, 0.2);
    /* nuovo stile traslucido*/
    position: fixed;
  top: 0;
  width: 100%;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* per Safari */
  background: rgba(20, 20, 30, 0.4);   /* colore semitrasparente */
  /*border-bottom: 2px solid var(--primary-color);*/
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
    
}

.toolbar .btn {
    color: var(--text-secondary);
    border: none;
    transition: all 0.3s ease;
    background: transparent;
    padding: 8px 12px;
    border-radius: 8px;
}

.toolbar .btn:hover, .toolbar .btn.active {
    color: var(--primary-color);
    background: var(--hover-bg);
    transform: translateY(-2px);
}

.logo-image{
    width: 100%;
    height: auto;
    object-fit: cover;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.current-time {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.scroll-container {
  display: flex;
  overflow-x: auto;
  overflow-y: auto;
  border: 3px solid #0dcaf0;
  border-radius: 1rem;
  max-width: 100%;
  background: #111;
  color: white;
  font-family: sans-serif;
  max-height: 80vh;
  /*
  height: 1260px;
  max-height: 1260px;
  */
  scroll-behavior: smooth;
}

.scroll-container::-webkit-scrollbar {
    height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.fixed-column {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #222;
  flex-shrink: 0;
  min-width: 5rem;
  border-right: 2px solid #333;
}

.scrollable-columns {
    display: flex;
    /*
    overflow-y: hidden;
    max-height: 1028px;
    */
}

.column {
  display: flex;
  flex-direction: column;
  min-width: 150px;
  border-right: 1px solid #333;
  max-width: 300px;
  overflow: hidden;
}

.cell {
    padding: 1rem;
    border-bottom: 1px solid #333;
    white-space: nowrap;
    min-height: 120px;
}

.cell-program{
    padding: 0.2rem 0.5rem;
    border-right: 1px solid #333;
    border-bottom: 1px solid #333;
    border-collapse: collapse;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}

.header {
    font-weight: bold;
    min-height: 60px!important; 
}

.epg-container {
  display: flex;
  max-width: 100%;
  border: 3px solid var(--border-color);
  border-radius: 1rem;
  background-color: var(--dark-bg);
  color: #fff;
  font-family: sans-serif;
  overflow: hidden;
  scroll-behavior: smooth;
}

.epg-container::-webkit-scrollbar {
    height: 8px;
}

.epg-container::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.epg-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* Colonna canali fissa */
.channels-column {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #111;
  border-right: 2px solid #222;
  flex-shrink: 0;
  width: 120px;
}

.channel-header {
  padding: 10px;
  font-weight: bold;
  /*background: #0a84ff;*/
  text-align: center;
}

.channel {
  padding: 10px;
  border-left: 1px solid #333;
  border-bottom: 1px solid #333;
  border-right: 1px solid #333;
  height: 120px;
  cursor: pointer;
}

/* Sezione scrollabile */
.epg-scroll {
  overflow-x: auto;
  overflow-y: auto;
  white-space: nowrap;
  flex: 1;
  scroll-behavior: smooth;
  height:100%;
    position: relative;
    z-index: 1;
}

.epg-scroll::-webkit-scrollbar {
    height: 8px;
}

.epg-scroll::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.epg-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.epg-current-time {
    position: absolute;
    top:0;
    height:100%;
    width: 3px;
    z-index: 10;
    background-color: #ff0000c2;
}

.epg-row {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #222;
}

.epg-header {
  background: #111111;
  font-weight: bold;
  text-align: left;
  padding-left: 1rem;
}

.time-slot {
  padding: 10px;
  border-right: 1px solid #333;
  flex-shrink: 0;
  width: 120px; /* 4px per minuto */
}

.program {
  text-align: left;
  padding: 5px;
  height: 120px; /* stessa altezza di .channel */
  background: #1a1a1a;
  border-right: 1px solid #333;
  border-bottom: 1px solid #333;
  border-collapse: collapse;
  margin-top: -1px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
}

/* Channel Cards */
.channel-scroll {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 20px 0;
    scroll-behavior: smooth;
}

.channel-scroll::-webkit-scrollbar {
    height: 8px;
}

.channel-scroll::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.channel-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}



/* EPG MOBILE */
/* Contenitore scrollabile orizzontalmente */
.horizontal-scroll {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding: 1rem 0.5rem;
  gap: 1rem;
}
/* Scrollbar sottile e discreta */
.horizontal-scroll::-webkit-scrollbar {
  height: 6px;
}
.horizontal-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.horizontal-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 191, 255, 0.4);
  border-radius: 3px;
}

/* Singola colonna canale */
.epg-column {
  flex: 0 0 auto;
  width: 300px;
  scroll-snap-align: start;
  background: rgba(10, 20, 40, 0.92);
  border: 1px solid #00bfff;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  backdrop-filter: blur(6px);
  position: relative;
  box-shadow: 0 0 12px rgba(0, 191, 255, 0.15);
}

/* Sezione logo e nome canale (sticky) */
.epg-channel {
  position: sticky;
  top: 0;
  background: rgba(5, 10, 25, 0.95);
  border-bottom: 1px solid rgba(0, 191, 255, 0.4);
  text-align: center;
  padding: 0.7rem 0.3rem;
  z-index: 10;
  backdrop-filter: blur(8px);
}

/* Logo canale */
.logo-image {
  width: 120px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Nome canale */
.logo-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #00bfff;
  margin-top: 0.3rem;
}

/* Lista programmi */
.epg-program-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.epg-program-list .list-group-item{
    background-color: inherit!important;
    border-bottom: solid 1px var(--card-bg);
}
/* Card programma */
.epg-program {
  position: relative;
  background: rgba(15, 25, 45, 0.7);
  border: 1px solid var(--border-color-dark);
  border-radius: 1rem;
  margin: 0.5rem;
  padding: 0.7rem;
  cursor: pointer;
  transition: background 0.25s ease;
}

.epg-program.active{
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 20px var(--box-shadow-live);
}

.epg-program:hover {
  background: var(--hover-bg);
}



/* Orari */
.epg-program .program-time {
  font-size: 1rem;
  font-weight: bold;
  color: #b0dfff;
  margin-bottom: 0.4rem;
  text-align: center;
}


.epg-program .program-image{
    width: auto;
    height: 100px;
    max-width: 100%;
    overflow: hidden;
}

/* Immagine programma */
.epg-program .program-image img {
  width: auto;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

/* Titolo e categoria */
.epg-program .program-title {
  color: #00bfff;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 0.4rem;
  text-align: center;
  line-height: 1.3;
}

.epg-program .program-genre {
  font-size: 0.8rem;
  /*color: #8fb6ff;*/
  text-align: center;
  margin-top: 0.2rem;
}

.epg-program.mobile .badge-live {
    right: auto;
    left: 0.7rem;
    top: 0.7rem;
}

/* Responsive ottimizzato */
@media (max-width: 768px) {

 .container-fluid{
    max-width: 95vw;
 }
  .horizontal-scroll {
    gap: 0.6rem;
    padding: 0.5rem;
  }

  .epg-column {
    width: 85%;
    min-width: 270px;
  }

  .logo-image {
    width: 100px;
  }

  .program-title {
    font-size: 0.9rem;
  }
}
/* EPG MOBILE FINE */

.channel-card {
    min-width: 140px;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.channel-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(13, 202, 240, 0.1), transparent);
    transition: left 0.5s ease;
}

.channel-card:hover::before {
    left: 100%;
}

.channel-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(13, 202, 240, 0.3);
}

.channel-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 5px;
}


.channel-name {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Grid Canali */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 0.5rem 1rem;
    overflow: hidden;
    /*max-height: 75vh;*/
    scroll-behavior: smooth;
}

.channels-grid::-webkit-scrollbar {
    height: 8px;
}

.channels-grid::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.channels-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.channel-grid-item {
    aspect-ratio: 1;
    background: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /*width: 95%;
    overflow-x: hidden;*/
}

.channel-grid-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(13, 202, 240, 0.3);
}

.modal.show{
    display: block!important;
}


/* Modals */
.modal-content {
    top: 5rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--dark-bg) 100%);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    box-shadow: 0 -10px 40px rgba(13, 202, 240, 0.3);
    max-height: 80vh;
    max-width: 90vw;
    margin: auto;
}

.modal-header {
    border-bottom: 2px solid var(--primary-color);
}

.modal-footer {
    border-top: 2px solid var(--primary-color);
}

[v-cloak]{
    display: none;
}

.modal-body{
    max-height: 70vh;
    overflow-y: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.modal-body::-webkit-scrollbar {
    height: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 80vh;
    max-width: 1024px;
    margin: auto;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--dark-bg) 100%);
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    border: 2px solid var(--primary-color);
    border-bottom: none;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    z-index: 1050;
    overflow-y: auto;
    box-shadow: 0 -10px 40px rgba(13, 202, 240, 0.3);
}

.bottom-sheet.show {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 50px;
    height: 5px;
    background: var(--text-secondary);
    border-radius: 10px;
    margin: 15px auto;
}



/* Program Cards */
.program-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.program-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(13, 202, 240, 0.2);
}
.program-card .badge-live{
    position: relative;
    right: auto;
    left: 0;
    width: 3rem;
    margin-right: 1rem;
    top: 0;
}

.program-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.program-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.program-title a{
    text-decoration: none;
    color: inherit;
}

.program-title a:hover{
    text-decoration: underline;
}

.program-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.program-genre {
    display: inline-block;
    background: var(--primary-color);
    color: var(--dark-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    margin-right: 10px;
}

.progress-bar {
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress{
    height: 10px;
}

/* Evening Programs Scroll */
.evening-programs {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
    scroll-behavior: smooth;
}

.evening-program-card {
    min-width: 250px;
    background: var(--hover-bg);
    border-radius: 15px;
    padding: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.evening-program-card:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Play Button */
.play-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(13, 202, 240, 0.4);
}

.play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(13, 202, 240, 0.6);
}

.play-btn i {
    font-size: 1.5rem;
}

/* Video Player */
#videoPlayer {
    width: 100%;
    border-radius: 10px;
    background: #000;
}

.form-control, .form-select {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 12px 20px;
}
.form-control:focus, .form-select:focus{
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(13, 202, 240, 0.3);
}

.form-group{
    margin-bottom: 1rem;
}

button.btn-default{

}

/* Search */
.search-input {
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 12px 20px;
}

.search-input:focus {
    background: var(--card-bg);
    color: var(--text-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(13, 202, 240, 0.3);
}

.search-results-list{
    overflow: auto;
    max-height: 60vh;
    border: solid 2px #0dcaf0;
    border-radius: 10px;
    padding: 1rem;
    scroll-behavior: smooth;
}

.search-results-list::-webkit-scrollbar {
    height: 8px;
}

.search-results-list::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.search-result {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    justify-content: start;
    /* gap: 10px; */
    vertical-align: top;
    overflow: hidden;
}

.search-result:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.search-result-image{
    width: 50px; height: 50px; object-fit: contain; margin-right: 15px; background: rgba(255,255,255,0.05); border-radius: 8px; padding: 5px;
}

/* Loading */
.spinner-border {
    color: var(--primary-color);
}

/* Section */
.section {
    margin-top: 2rem;
    animation: fadeIn 0.5s ease;
}

/*
.section.active {
    display: block;
}
*/

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Favorites */
.favorite-btn {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.favorite-btn:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    transform: scale(1.1);
}

.favorite-btn.active {
    background: var(--primary-color);
    color: var(--dark-bg);
}

.favorite-btn.active i::before {
    content: "\f586"; /* bi-star-fill */
}


.box-shadow{
    box-shadow: 0 10px 30px var(--box-shadow-color);
}

.box-shadow-live{
    box-shadow: 0 10px 30px var(--box-shadow-live);
}

.text-shadow{
    text-shadow: 0 10px 30px var(--box-shadow-color);
}


.not-scheduled {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
}


.movies-grid{
    overflow-x: hidden;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    scroll-behavior: smooth;
}

.movies-grid::-webkit-scrollbar {
    height: 8px;
}

.movies-grid::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.movies-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.movie-card {
    margin: 1rem;
    padding: 1rem;
    border: solid 2px #0dcaf04d;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(13, 202, 240, 0.2);
    width: 45%;
}

@media (max-width: 768px){
    .movies-grid{
        margin: 1rem -0.5rem;
    }
  .movie-card  {
    margin: 1rem 0rem;
    width: 90%;
  }
}

.bottom-sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1040;
    display: none;
}

.bottom-sheet-backdrop.show {
    display: block;
}

.cookie-banner{
    /*display: none;*/
    position: fixed;
    bottom: 5vh;
    width: 80vw;
    left: 10vw;
    height: auto;
    padding: 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(13, 202, 240, 0.2);
    z-index: 10000;
    background-color: #03050c;
    overflow: hidden;
}

/*
.cookie-banner.show{
    display: block;
}
*/

.btn-simple-ok{
    color: #fff;
    border: solid 2px #0dcaf0;
}
.btn-close{
    margin-left: 1rem!important;
}

input[type="checkbox"], .form-check, .form-check-label, .form-check-input {
    cursor: pointer!important;
}

.text-ellipsis{
    white-space: nowrap;
    text-wrap: ellipsis;
}

.badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    margin-right: 10px;
    display: inline-block;
}

/* Badge rosso lampeggiante */
.badge-live{
    position: absolute;
    right:1rem;
    top:1rem;
    padding: 0.5rem;
    background-color: #f00;
    border-radius: 50%;
    overflow: hidden;
    width: 2.5rem;
    z-index:10;
    text-align: center;
    animation: pulse 1.5s infinite ease-in-out;
}

/* Effetto lampeggio */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.05);
  }
}

.badge-tmdb-link{
    background-color: #198754;
    color: #fff;
    padding: 0.5rem 0.8rem;
    display: inline-block;
    border-radius: 0.5rem;
    text-decoration: none;
}

/* HOMEPAGE */
.home-screen {
    
}

.section-title {
    font-size: 1.3rem;
    margin: 20px 0 10px;
}

/* --- HERO --- */
.hero .greeting {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 20px;
}


/* --- FAVORITI --- */
/* --- FAVORITI --- */
.fav-list {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem;
    cursor: pointer;
    scroll-behavior: smooth;
    white-space: nowrap;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    margin-bottom: 2rem;
}

.fav-list::-webkit-scrollbar {
    height: 8px;
}

.fav-list::-webkit-scrollbar-track {
    background: var(--card-bg);
    border-radius: 10px;
}

.fav-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.fav-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(6px);
    border-radius: 1rem;
    border: 1px solid var(--border-color-dark);
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 140, 255, 0.3);
    flex-shrink: 0;
    scroll-snap-align: center;
    height: 10rem;
}

.fav-card.channel{
  flex: 0 0 40%;
  max-width: 200px;
  text-align: center;
}

.fav-card.program{
  flex: 0 0 80%;
  height: 20rem;
  max-width: 500px;
  margin: 0;
  padding: 0;
}



.fav-card-channel-logo{
position: absolute;
  top: 1rem;
  left: 1rem;
  width: auto;
  height: 5rem;
  overflow: hidden;
  background-color: #00000080;
  border: solid 1px #01b8ff;
  border-radius:1rem;
 overflow:hidden;
  z-index:10;
}

.fav-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fav-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
}

.fav-card:hover {
    transform: scale(1.05);
    transition: 0.25s ease;
    box-shadow: 0 0 22px rgba(0, 140, 255, 0.9);
}

.fav-card-program-overlay {
    position: absolute;
    width: 100%;
    height: auto;
    left: 0;
    bottom: 0;
    overflow: hidden;
    background-color: #000000a3;
    padding: 1rem 2rem;
    
}
.fav-card-program-overlay .program-title {
    white-space: normal;
    
}

@media (max-width: 600px){
  .fav-card.channel {
    flex: 0 0 45%;
    height: 10rem;
  }
    .fav-card-program-overlay{
        padding: 0.5rem 0.5rem;
        font-size: 1rem;
        line-height: 1;
    }
  
}
/* END FAVORITES */



/* --- TAG BUTTONS --- */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.tag {
    padding: 8px 18px;
    border-radius: 2rem;
    font-size: 1rem;
    border: 1px solid rgba(255, 0, 200, 0.5);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 0, 200, 0.4);
    transition: 0.2s;
}

.tag:hover {
    background: rgba(255, 0, 200, 0.25);
    box-shadow: 0 0 16px rgba(255, 0, 200, 0.7);
}




/* --- CAROUSEL (scoped per evitare conflitti con Bootstrap) --- */
/* WRAPPER */
.tv-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 2rem;
}

/* FRECCE */
.tv-carousel-arrow {
    position: absolute;
    top: 50%;
    height:100%;
    width:5rem;
    transform: translateY(-50%);
    z-index: 20;
    font-size: 34px;
    background: rgba(0,0,0,0.4);
    border: none;
    color: white;
    padding: 10px;
    border-radius: 0;
    cursor: pointer;
    user-select: none;
}
.tv-carousel-arrow.left { left: 0px; }
.tv-carousel-arrow.right { right: 0px; }



/* CAROUSEL */
.tv-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    white-space: nowrap;
    padding: 1rem;
    scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.tv-carousel::-webkit-scrollbar {
  display:none;
}

/* ITEM */
.tv-carousel-item {
    background-color: #000;
    position: relative;
    min-width: 260px;
    height: 40vh;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 15px 20px 5px rgba(0, 200, 255, 0.5); /* glow basso */
    flex: 0 0 100%;
    flex-shrink: 0;
    scroll-snap-align: center;
    max-height: 400px;
}

@media (max-width: 600px){
    .tv-carousel-wrapper{
        margin: 0;
        padding: 0;
    }
    .tv-carousel-arrow{
        padding: 0;
        margin: 0;
        width: 3rem;
    }
    .tv-carousel-item .channel-logo{
        width: 5rem!important;
        max-height: 3rem!important;
    }
}
@media (min-width: 600px){
  .tv-carousel-item {
    flex: 0 0 80%;
    height: 60vh;
  }
}

@media (min-width: 1024px){
  .tv-carousel-item {
    flex: 0 0 60%;
    height: 60vh;
  }
}
/* Hover: zoom + glow più intenso + leggero lift */
.tv-carousel-item:hover {
    transform: scale(1.05);
    box-shadow: 0 0 18px 10px rgba(0, 255, 255, 0.55), 
                0 0 30px 10px rgba(0, 200, 255, 0.35);
    cursor: pointer;
}
@keyframes tvPulseGlow {
    0%   { box-shadow: 0 0 10px 5px rgba(0, 200, 255, 0.25); }
    50%  { box-shadow: 0 0 18px 5px rgba(0, 255, 255, 0.35); }
    100% { box-shadow: 0 0 10px 5px rgba(0, 200, 255, 0.25); }
}

.tv-carousel-item {
    animation: tvPulseGlow 3.5s ease-in-out infinite;
}

.tv-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tv-carousel-item .channel-logo {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 10rem;
    max-height: 10rem;
    background-color: #00000052;
    border: solid 2px #00caff;
    border-radius: 8px;
  overflow:hidden;
}

.tv-carousel-item-channel-logo img {
    
}

/* OVERLAY basso */
.tv-carousel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 7rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(to top, rgb(0 0 0 / 99%), #000000a1);
    color: white;
}

.tv-carousel-overlay h2 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.tv-carousel-overlay p {
    font-size: 1rem;
    opacity: 0.85;
    margin: 4px 0 0 0;
}
/* END CAROUSEL */



/* --- ANIMAZIONI --- */
@keyframes neon-pulse-blue {
    0%   { box-shadow: 0 0 10px rgba(0, 170, 255, 0.4); }
    50%  { box-shadow: 0 0 18px rgba(0, 170, 255, 0.7); }
    100% { box-shadow: 0 0 10px rgba(0, 170, 255, 0.4); }
}

@keyframes neon-pulse-pink {
    0%   { box-shadow: 0 0 10px rgba(255, 0, 200, 0.4); }
    50%  { box-shadow: 0 0 18px rgba(255, 0, 200, 0.7); }
    100% { box-shadow: 0 0 10px rgba(255, 0, 200, 0.4); }
}

@keyframes glow-hover {
    0%   { transform: scale(1); }
    100% { transform: scale(1.03); }
}

.fav-card {
    animation: neon-pulse-blue 3.5s infinite;
}
.tag {
    animation: neon-pulse-pink 4s infinite;
}

.fav-card:hover {
    transform: scale(1.05);
    transition: 0.25s ease;
    box-shadow: 0 0 22px rgba(0, 140, 255, 0.9);
}
.tag:hover {
    animation: glow-hover 0.25s forwards;
    box-shadow: 0 0 22px rgba(255, 0, 200, 1);
    background: rgba(255, 0, 200, 0.35);
}
/* --- ANIMAZIONI --- */


.footer{
    max-width: 640px;
    margin: auto;
    border: solid 2px var(--border-color);
    border-radius: 1rem;
    margin-bottom: -10px;
    position: relative;
    margin-top: 4rem;
    padding: 1rem;
    text-align: center;
}


@media (max-width: 640px){
    .footer{
        max-width: 90vw;
    }
}

