/* --- tv_app/static/style.css --- */
/* --- PART 1 START --- */

/* --- General Styles --- */

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #141414;
    color: #fff;
}

.container {
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 20px;
    padding-top: 80px; /* Account for fixed navbar */
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6, p, ul, ol, dl {
    margin-top: 0;
    margin-bottom: 10px;
}

h2 {
    text-align: left;
    margin-bottom: 20px;
    color: #fff;
    font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1.1em;
    display: flex;
    align-items: center;
}

/* --- Navbar --- */

.navbar {
    background-color: #141414;
    color: white;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

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

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    height: auto;
    margin-right: 10px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    align-items: center;
    margin-right: auto;
    margin-left: 20px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    margin: 0 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 1em;
    display: flex;
    align-items: center;
}

.nav-link i {
    margin-right: 5px;
}

.navbar a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.brand-text {
    font-weight: bold;
    font-size: 1em;
    font-family: 'Panton Rust', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin-left: auto;
    margin-right: 20px;
    white-space: nowrap;
}

.ruffg-text {
    color: #4A90E2; /* A nice blue from your logo */
}

.series-text {
    color: #D0021B; /* A vibrant red from your logo */
}

.search-icon-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: white;
    font-size: 1.2em;
}

.search-icon-button i {
    pointer-events: none;
}

.floating-search {
    position: absolute;
    top: 65px;
    right: 20px;
    background-color: #222;
    border: 1px solid #555;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    z-index: 1001;
    display: none;
}

.floating-search.active {
    display: block;
}

.floating-search form {
    display: flex;
    align-items: center;
    padding: 5px;
}

.floating-search .search-input {
    padding: 8px;
    border: 1px solid #555;
    background-color: #333;
    color: white;
    border-radius: 4px;
    margin-right: 5px;
    width: 150px;
    transition: width 0.3s ease;
}

.floating-search .search-input:focus {
    width: 200px;
    border-color: #007bff;
    background-color: #444;
}

.floating-search .search-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    padding: 8px;
}
.floating-search .search-button:hover{
     background-color: #0056b3;
}

@media (max-width: 768px) {
	.nav-link .link-text {
		display: none;
	}
}

.eye-icon::before {
    font-family: "Font Awesome 6 Free";
    content: "\f06e";
    margin-right: 8px;
    color: #D0021B;
    display: inline-block;
    font-weight: 900;
    font-size: 0.8em;
}

.new-icon::before {
    font-family: "Font Awesome 6 Free";
    content: "\f058";
    margin-right: 8px;
    color: #90ee90;
    display: inline-block;
    font-weight: 900;
    font-size: 0.8em;
}
 .show-label-icon::before {
    font-family: "Font Awesome 6 Free";
    content: "\f039";
    margin-right: 8px;
    display: inline-block;
    font-weight: 900;
    font-size: 0.8em;
}

.tv-shows {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4vw;
    padding: 4vw;
}

.show-card {
    border: 1px solid #333;
    padding: 4vw;
    box-sizing: border-box;
    background-color: #222;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 4vw;
}
.show-card:hover {
	transform: translateY(-7px);
}

.show-card a {
    text-decoration: none;
    color: inherit;
     display: block;
     flex-grow: 1;
     display: flex;
     flex-direction: column;
}

.show-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
     margin-bottom: 10px;
}

.show-card h3 {
    font-size: 1em;
    margin-bottom: 5px;
    color: #4A90E2;
    font-family: 'Netflix Sans', sans-serif;
    text-align: center;
    margin-top: auto;
}

.show-card p {
    font-size: 0.7em;
    color: #aaa;
    margin-bottom: 0;
     margin-top: auto;
}

.episode-title{
    text-align: center;
     margin-top: 5px;
    font-weight: bold;
}

.show-list{
     display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 15px;
    padding: 20px;
}
 .show-item {
     background-color: #222;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color: 0.3s ease;
    width: calc(20% - 12px);
    box-sizing: border-box;
    text-align: center;
}

@media (min-width: 769px) {
   .tv-shows{
     grid-template-columns: repeat(2, 1fr);
        padding: 15px;
        gap: 15px;
   }
    .show-card {
        width: auto;
        padding: 15px;
        margin-bottom: 20px;
    }
    .show-card h3{
        font-size: 1.2em;
    }
     .show-card p{
        font-size: 0.9em;
    }
}

@media (min-width: 992px) {
    .show-card {
        width: auto;
    }
    .tv-shows {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .show-card{
        width: auto;
    }
    .tv-shows {
        grid-template-columns: repeat(4, 1fr);
    }
}

.show-item:hover {
    background-color: #333;
}

.telegram-loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    animation: rotate 1s linear infinite;
}

.telegram-loader::before,
.telegram-loader::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 5px solid #fff;
    animation: pulse 1.5s ease-out infinite;
}

.telegram-loader::after {
    border-color: #007bff;
    animation-delay: 1s;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

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

@keyframes pulse {

    0%,
    100% {
        transform: scale(0);
        opacity: 1;
    }

    50% {
        transform: scale(1);
        opacity: 0.5;
    }
}

.pagination {
    text-align: center;
    margin-top: 20px;
    clear: both;
}

.pagination a {
    padding: 5px 10px;
    text-decoration: none;
    color: #007bff;
    border: 1px solid #333;
    margin: 0 3px;
    border-radius: 5px;
}

.pagination a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.pagination .current-page {
    padding: 5px 10px;
    margin: 0 3px;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.download-button {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1.1em;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color: 0.3s ease;
    margin-top: 15px;
    margin-bottom: 15px;
    border: none;
}

.download-button:hover {
    background-color: #0056b3;
}

.slideshow-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    margin-bottom: 30px;
}

.mobile-slideshow {
    height: auto;
}

.mobile-slideshow .slideshow-inner {
    display: flex;
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    justify-content: center;
}

.mobile-slideshow .slideshow-inner::-webkit-scrollbar {
    display: none;
}

.mobile-slideshow .slideshow-inner {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.mobile-slideshow .mySlides {
    flex: 0 0 90vw;
    scroll-snap-align: center;
    margin: 0 5vw;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.mobile-slideshow .mySlides.active-slide {
	opacity: 1;
	transform: scale(1);
	z-index: 2;
     margin: 0;
}
.mobile-slideshow .mySlides:not(.active-slide){
        filter: brightness(0.5) blur(2px);
    transform: scale(0.8);
}

.mobile-slideshow .slideshow-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.mobile-slideshow .slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 0 0 8px 8px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    width: auto;
    white-space: nowrap;
    z-index: 3;
}

.mobile-slideshow .prev,
.mobile-slideshow .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    user-select: none;
    z-index: 3;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 5px;
}

.mobile-slideshow .next {
    right: 0;
    border-radius: 5px 0 0 5px;
}

.mobile-slideshow .prev {
    left: 0;
    border-radius: 0 5px 5px 0;
}

.mobile-slideshow .prev:hover,
.mobile-slideshow .next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.mobile-slideshow .slideshow-dots {
    text-align: center;
    margin-top: 10px;
}

.mobile-slideshow .dot {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color: 0.6s ease;
    cursor: pointer;
}

.mobile-slideshow .dot.active-dot {
    background-color: #D0021B;
}

.desktop-slideshow {
    display: none;
    height: 280px;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.desktop-slideshow .slideshow-inner {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
     transition: transform 0.5s ease;
}

.desktop-slideshow .mySlides {
    flex: 0 0 auto;
    width: calc((100% / 5) - 16px);
    margin: 0 8px;
    height: 90%;
    transition: transform 0.5s ease, opacity 0.5s ease, filter 0.5s ease;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: none;
}

.desktop-slideshow .mySlides.active-slide{
     opacity: 1;
    transform: scale(1.1);
    z-index: 2;
}
.desktop-slideshow .mySlides:not(.active-slide){
     filter: brightness(0.5) blur(1px);
    transform: scale(0.8);
}

.desktop-slideshow .slideshow-image{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
     border-radius: 8px;
}
.desktop-slideshow .slide-caption{
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    width: auto;
    white-space: nowrap;
     z-index: 3;
}

.desktop-slideshow .prev,
.desktop-slideshow .next{
     cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: background-color: 0.6s ease;
    user-select: none;
    z-index: 3;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    border-radius: 5px;
}

.desktop-slideshow .next{
     right: 0;
    border-radius: 5px 0 0 5px;
}

.desktop-slideshow .prev{
    left: 0;
    border-radius: 0 5px 5px 0;
}
.desktop-slideshow .prev:hover,
.desktop-slideshow .next:hover{
   background-color: rgba(0, 0, 0, 0.8);
}


@media (max-width: 768px) {
    .desktop-slideshow {
        display: none;
    }
    .mobile-slideshow {
        display: block;
    }

}

    @media (min-width: 992px) and (max-width: 1199px) {
        .desktop-slideshow .mySlides {
           width: calc((100% / 4) - 16px);
           margin: 0 8px;
        }
         .mobile-slideshow{
            display:none
         }
         .desktop-slideshow{
            display:block;
         }
    }

    @media (min-width: 1200px) {

          .desktop-slideshow .mySlides {
           width: calc((100% / 5) - 16px);
            margin: 0 8px;
        }
         .mobile-slideshow{
            display:none
         }
         .desktop-slideshow{
            display:block;
         }
    }

.show-details-container {
    padding: 20px;
}

.show-details-banner {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 20px 20px 10px 20px;
    text-align: center;
    margin-bottom: 5px;
}

.show-details-banner h1 {
    font-size: 2.5em;
    margin-top: 0;
    margin-bottom: 5px;
    color: #4A90E2;
    font-family: 'Netflix Sans', sans-serif;
}

.episode-title {
    font-size: 1.2em;
    color: #aaa;
    margin-top: 5px;
    margin-bottom: 10px;
}

.show-details-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.show-image-container {
    width: 100%;
    text-align: center;
}

.show-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    display: block;
    margin: 0 auto;
}

.show-info {
    width: 100%;
}

.show-info h2 {
    margin-top: 0;
    margin-bottom: 5px;
}

.overview,
.rating,
.genres,
.year {
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.4;
}

.text-center.my-4 {
    margin-top: 10px;
    margin-bottom: 10px;
}

@media (min-width: 769px) {
    .show-details-content {
        flex-direction: row;
    }

    .show-image-container {
        width: 300px;
        flex-shrink: 0;
    }

    .show-image {
        max-height: none;
        object-fit: initial;
    }

    .show-info {
        width: auto;
    }
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
    border: 1px solid #333;
    padding: 15px;
    border-radius: 5px;
    background-color: #222;
}

.filter-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
}

.filter-group label {
    margin-right: 5px;
    font-weight: bold;
    color: #fff;
}

.filter-form select,
.filter-form input[type="number"] {
    padding: 8px;
    border: 1px solid #555;
    background-color: #333;
    color: white;
    border-radius: 4px;
    flex-grow: 1;
    min-width: 100px;
}
.filter-form select{
    height: 36px;
}

.filter-form button[type="submit"],
.filter-form .reset-button
 {
    padding: 8px 12px;
    background-color: #D0021B;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 1em;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.filter-form button[type="submit"]:hover,
.filter-form .reset-button:hover
 {
    background-color: #b20709;
}
.filter-form .reset-button{
    text-decoration: none;
    display: inline-block;
}

@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group{
      width: 100%;
    }
     .filter-form select,
    .filter-form input[type="number"] {
        width: 100%;
    }
}

/* --- Styles for Ad Tiles (Corrected with Unique Names) --- */
#custom-ad-container {
    position: relative;
    margin-top: 20px;
    padding-top: 30px; /* Space for the hide button */
}

#custom-ad-container .custom-ad-tile {
    background-color: #1a1a1a;
    padding: 12px;
    border-radius: 10px;
    color: #fff;
    font-family: 'Comic Neue', sans-serif;
    font-size: 14px;
    text-align: center;
    border: 1px solid #333;
    margin-top: 15px;
}

#custom-ad-container .custom-ad-disclaimer {
    font-size: 0.8em;
    color: #aaa;
    display: block;
    margin-bottom: 5px;
}

#custom-ad-container .custom-ad-link {
    color: #4da6ff;
    text-decoration: underline;
    font-weight: bold;
}

#custom-ad-container #hide-ads-btn {
    position: absolute;
    top: 0;
    right: 0;
    background: #333;
    color: #aaa;
    border: none;
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.3s;
}

#custom-ad-container #hide-ads-btn:hover {
    background: #555;
    color: #fff;
	    }
