/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', 'Arial', sans-serif;
}

body {
    background: linear-gradient(135deg, #0c0c1e, #1e1a3b);
    color: white;
    min-height: 100vh;
    line-height: 1.6;
}

/* Header Styles */
header {
    padding: 20px 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: rgba(12, 12, 30, 0.98);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.logo {
    font-size: 2.2rem;
    font-weight: 900;
    color: #FF0099;
    text-shadow: 0 0 15px rgba(255, 0, 153, 0.7);
    margin-right: 20px;
}

nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
    cursor: pointer;
    font-size: 1rem;
}

nav a:hover, nav a.active {
    color: #FF00AA;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #FF00AA;
    border-radius: 3px;
}

/* Dropdown menu for Join Channels */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: rgba(20, 20, 40, 0.95);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.3);
    z-index: 1;
    border-radius: 8px;
    padding: 10px;
    left: 50%;
    transform: translateX(-50%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-content a {
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background: rgba(255, 0, 170, 0.2);
    color: #FF00AA;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
}

.search-bar input {
    width: 100%;
    padding: 12px 100px 12px 15px;
    border-radius: 30px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}

.search-bar input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-bar input:focus {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px #FF00AA;
}

/* Search button styles */
.search-button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #FF00AA, #AA00FF);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.search-button:hover {
    background: linear-gradient(135deg, #FF0099, #9900FF);
    transform: translateY(-50%) scale(1.05);
}

/* Main Content Styles */
main {
    padding: 20px 5%;
}

section {
    margin: 40px 0;
    display: none;
}

section.active {
    display: block;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: white;
    border-left: 5px solid #FF00AA;
    padding-left: 15px;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
    color: #FF00AA;
}

/* Content Scroller for Home Page Sections */
.content-scroller {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 15px 5px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.content-scroller::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* REDESIGNED CONTENT CARDS */
.content-scroller .content-card {
    flex: 0 0 220px;
    scroll-snap-align: start;
    background: linear-gradient(135deg, rgba(30, 26, 59, 0.8), rgba(12, 12, 30, 0.9));
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    color: white;
    position: relative;
    height: 380px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 0, 170, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.content-scroller .content-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 35px rgba(255, 0, 170, 0.25);
    border-color: rgba(255, 0, 170, 0.3);
}

.content-scroller .card-poster {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: all 0.5s ease;
    flex-shrink: 0;
    position: relative;
}

.content-scroller .content-card:hover .card-poster {
    transform: scale(1.08);
}

.content-scroller .card-poster::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(12, 12, 30, 0.9) 0%, transparent 100%);
    pointer-events: none;
}

.content-scroller .card-info {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* Grid layouts for Movies and TV Shows pages */
.movies-grid, .tv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    padding: 15px 0;
}

/* REDESIGNED GRID CARDS */
.movies-grid .content-card,
.tv-grid .content-card {
    background: linear-gradient(135deg, rgba(30, 26, 59, 0.8), rgba(12, 12, 30, 0.9));
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    color: white;
    position: relative;
    height: 380px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 0, 170, 0.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.movies-grid .content-card:hover,
.tv-grid .content-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 15px 35px rgba(255, 0, 170, 0.25);
    border-color: rgba(255, 0, 170, 0.3);
}

.movies-grid .card-poster,
.tv-grid .card-poster {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: all 0.5s ease;
    flex-shrink: 0;
    position: relative;
}

.movies-grid .content-card:hover .card-poster,
.tv-grid .content-card:hover .card-poster {
    transform: scale(1.08);
}

.movies-grid .card-poster::after,
.tv-grid .card-poster::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(12, 12, 30, 0.9) 0%, transparent 100%);
    pointer-events: none;
}

.movies-grid .card-info,
.tv-grid .card-info {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.quality-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #AA00FF, #FF00AA);
    color: white;
    position: absolute;
    top: -13px;
    right: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

.content-title {
    font-size: 1.05rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.content-year {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.content-year::before {
    content: '🎬';
    margin-right: 6px;
    font-size: 0.8rem;
}

/* Add a subtle shine effect on hover */
.content-scroller .content-card::before,
.movies-grid .content-card::before,
.tv-grid .content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    transition: left 0.7s ease;
    z-index: 2;
    pointer-events: none;
}

.content-scroller .content-card:hover::before,
.movies-grid .content-card:hover::before,
.tv-grid .content-card:hover::before {
    left: 100%;
}

/* Rating badge style */
.rating-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(12, 12, 30, 0.85);
    color: #FFD700;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    z-index: 3;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.rating-badge::before {
    content: '★';
    margin-right: 4px;
    font-size: 0.7rem;
}

/* Genre Grid */
.genre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.genre-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.genre-card:hover {
    background: rgba(255, 0, 170, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.genre-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #FF00AA;
}

.genre-name {
    font-weight: bold;
    font-size: 1.1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 5%;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    background: rgba(12, 12, 30, 0.5);
}

/* Streaming Page Styles */
#streaming-page {
    display: none;
    min-height: 100vh;
}

.streaming-container {
    padding: 20px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    color: #FF00AA;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    font-size: 1rem;
}

.back-btn:hover {
    color: white;
}

.movie-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #FF00AA;
    text-shadow: 0 0 10px rgba(255, 0, 170, 0.5);
}

.video-player {
    width: 100%;
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.video-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.download-options {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.download-btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    transition: all 0.3s;
    text-align: center;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.quality-480p {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
}

.quality-720p {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.quality-1080p {
    background: linear-gradient(135deg, #2196F3, #1565C0);
}

.quality-4k {
    background: linear-gradient(135deg, #9C27B0, #673AB7);
}

.movie-details {
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.movie-description {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1rem;
}

.detail-row {
    display: flex;
    margin-bottom: 10px;
}

.detail-label {
    width: 120px;
    color: #FF00AA;
    font-weight: bold;
    font-size: 0.95rem;
}

.detail-value {
    flex: 1;
    font-size: 0.95rem;
}

/* Search results styling */
.search-results {
    margin-top: 20px;
    display: none;
}

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

.no-results {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

/* Genre content section */
#genre-content {
    margin-top: 30px;
    display: none;
}

.genre-header {
    font-size: 1.5rem;
    margin: 20px 0 15px;
    color: #FF00AA;
    padding-bottom: 8px;
    border-bottom: 2px solid #FF00AA;
}

/* TV Show Detail Styles */
.tvshow-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.tvshow-poster {
    width: 100%;
    max-width: 300px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.tvshow-info {
    flex: 1;
}

.tvshow-title {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: #FF00AA;
}

.tvshow-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
}

.tvshow-description {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Season Navigation */
.season-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.season-btn {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.season-btn:hover, .season-btn.active {
    background: #FF00AA;
}

/* Episodes Grid */
.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.episode-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.episode-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 0, 170, 0.2);
}

.episode-thumbnail {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.episode-info {
    padding: 12px;
}

.episode-number {
    font-size: 0.8rem;
    color: #FF00AA;
    margin-bottom: 5px;
}

.episode-title {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 900px;
    background: #0c0c1e;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0,0,0,0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s;
}

.close-modal:hover {
    background: rgba(255, 0, 170, 0.5);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.modal-info {
    padding: 20px;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #FF00AA;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.modal-description {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* TV Show Detail Back Button */
.tvshow-back-btn {
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    color: #FF00AA;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    font-size: 1rem;
}

.tvshow-back-btn:hover {
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .logo {
        margin-bottom: 15px;
        font-size: 1.8rem;
    }
    
    nav {
        width: 100%;
        justify-content: space-between;
        margin-bottom: 15px;
    }
    
    .search-bar {
        margin-left: 0;
        max-width: 100%;
    }
    
    .search-button {
        position: relative;
        margin-top: 10px;
        width: 100%;
        right: 0;
        top: 0;
        transform: none;
        border-radius: 30px;
    }
    
    .search-bar input {
        padding: 12px 15px !important;
    }
    
    .content-scroller .content-card {
        flex: 0 0 180px;
        height: 320px;
    }
    
    .content-scroller .card-poster {
        height: 220px;
    }
    
    .movies-grid .content-card,
    .tv-grid .content-card {
        height: 320px;
    }
    
    .movies-grid .card-poster,
    .tv-grid .card-poster {
        height: 220px;
    }
    
    .genre-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .movies-grid, .tv-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    
    .movie-title {
        font-size: 1.8rem;
    }
    
    .download-options {
        flex-direction: column;
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
    }
    
    .detail-row {
        flex-direction: column;
        margin-bottom: 15px;
    }
    
    .detail-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .tvshow-header {
        flex-direction: column;
    }
    
    .tvshow-poster {
        max-width: 100%;
    }
}

/* Animation for card loading */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-scroller .content-card,
.movies-grid .content-card,
.tv-grid .content-card {
    animation: cardEntrance 0.6s ease-out;
    animation-fill-mode: both;
}

/* Stagger the animation for grid items */
.movies-grid .content-card:nth-child(2),
.tv-grid .content-card:nth-child(2) {
    animation-delay: 0.1s;
}

.movies-grid .content-card:nth-child(3),
.tv-grid .content-card:nth-child(3) {
    animation-delay: 0.2s;
}

.movies-grid .content-card:nth-child(4),
.tv-grid .content-card:nth-child(4) {
    animation-delay: 0.3s;
}