/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #141414;
    color: #fff;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 4%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 10%, transparent);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: #141414;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1920px;
    margin: 0 auto;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #e50914;
    cursor: pointer;
}

.search-input {
    padding: 10px 20px;
    width: 400px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #fff;
}

.user-icon {
    font-size: 28px;
    cursor: pointer;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    height: 70vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 4%;
    margin-bottom: 20px;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

.hero-title {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.45);
}

.hero-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 16px;
}

.hero-overview {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.45);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn-primary {
    padding: 12px 30px;
    background-color: #e50914;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #f40612;
}

/* Filters */
.filters {
    padding: 20px 4%;
    display: flex;
    gap: 15px;
    background: rgba(0, 0, 0, 0.5);
}

.filters select {
    padding: 10px 15px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Content Container */
.content-container {
    padding: 20px 4%;
}

/* Content Rows */
.content-row {
    margin-bottom: 40px;
}

.row-header {
    margin-bottom: 15px;
}

.row-title {
    font-size: 24px;
    font-weight: bold;
}

/* Movie Cards Container */
.movie-cards {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    scroll-behavior: smooth;
}

.movie-cards::-webkit-scrollbar {
    height: 8px;
}

.movie-cards::-webkit-scrollbar-track {
    background: #141414;
}

.movie-cards::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.movie-cards::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Movie Card */
.movie-card {
    position: relative;
    min-width: 200px;
    width: 200px;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.movie-card:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    z-index: 10;
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .movie-card-overlay {
    opacity: 1;
}

.movie-card-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1.2;
}

.movie-card-info {
    display: flex;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 10px;
}

.play-btn {
    padding: 8px 16px;
    background: #e50914;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.play-btn:hover {
    background: #f40612;
}

/* Skeleton Loading */
.skeleton-card {
    min-width: 200px;
    width: 200px;
    height: 300px;
    background: linear-gradient(90deg, #222 25%, #333 50%, #222 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    flex-shrink: 0;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Loading Placeholder */
.loading-placeholder {
    text-align: center;
    padding: 60px 20px;
}

.loading-placeholder h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #333;
    border-top-color: #e50914;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-content {
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    background-color: #181818;
    padding: 40px;
    border-radius: 8px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 10;
}

.close-modal:hover {
    color: #e50914;
}

.modal-details {
    display: flex;
    gap: 30px;
}

.modal-poster {
    flex-shrink: 0;
}

.modal-poster img {
    width: 300px;
    border-radius: 8px;
}

.modal-info {
    flex: 1;
}

.modal-info h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.modal-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 16px;
    color: #aaa;
}

.modal-genres {
    margin-bottom: 20px;
}

.genre-tag {
    display: inline-block;
    padding: 5px 12px;
    background: #333;
    border-radius: 4px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.modal-overview {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.play-modal-btn {
    padding: 12px 30px;
    background: #e50914;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.play-modal-btn:hover {
    background: #f40612;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .movie-card {
        min-width: 180px;
        width: 180px;
        height: 270px;
    }
    
    .skeleton-card {
        min-width: 180px;
        width: 180px;
        height: 270px;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        height: 50vh;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .search-input {
        width: 250px;
    }
    
    .movie-card {
        min-width: 150px;
        width: 150px;
        height: 225px;
    }
    
    .skeleton-card {
        min-width: 150px;
        width: 150px;
        height: 225px;
    }
    
    .modal-details {
        flex-direction: column;
    }
    
    .modal-poster img {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .navbar-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-input {
        width: 100%;
    }
    
    .hero-title {
        font-size: 24px;
    }
    
    .movie-card {
        min-width: 130px;
        width: 130px;
        height: 195px;
    }
    
    .skeleton-card {
        min-width: 130px;
        width: 130px;
        height: 195px;
    }
}

/* View All Button */
.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all-btn {
    padding: 8px 16px;
    background: transparent;
    color: #e50914;
    border: 1px solid #e50914;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.view-all-btn:hover {
    background: #e50914;
    color: #fff;
}

/* ========== NEW FIXES BELOW ========== */

/* Category Section */
.category-section {
    margin-bottom: 40px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-header h2 {
    font-size: 24px;
    font-weight: bold;
}

/* View More Button */
.view-more-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.view-more-btn:hover {
    background: rgba(229, 9, 20, 0.8);
    border-color: #e50914;
}

/* Movie Info on Cards */
.movie-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}

.movie-info h3 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.movie-info p {
    font-size: 12px;
    color: #ffd700;
}

/* Episode Selector Dropdowns */
.episode-selector select {
    padding: 12px 20px;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    min-width: 200px;
}

.episode-selector select:hover {
    background: #2a2a2a;
}

.episode-selector select:focus {
    outline: none;
    border-color: #e50914;
    background: #2a2a2a;
}

.episode-selector select option {
    background: #1a1a1a;
    color: #fff;
    padding: 10px;
}
