/* Streamit-inspired Design CSS */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #0f0f0f;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Featured Movies Section */
.featured-section {
    margin-top: 20px;
    margin-bottom: 60px;
}

.featured-movies {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 40px;
}

.featured-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 320px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.featured-card:hover {
    transform: scale(1.02);
}

.featured-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.featured-content {
    width: 100%;
}

.featured-badge {
    background: #e50914;
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: inline-block;
}

.featured-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.featured-meta .year,
.featured-meta .duration {
    color: #b3b3b3;
    font-size: 14px;
}

.genre-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.genre-tag {
    background: rgba(255,255,255,0.1);
    color: #b3b3b3;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.featured-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-watch-now,
.btn-more-info {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-watch-now {
    background: #e50914;
    color: white;
}

.btn-watch-now:hover {
    background: #f40612;
    color: white;
}

.btn-more-info {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-more-info:hover {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* Movies Section */
.movies-section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
}

.view-options {
    display: flex;
    gap: 8px;
}

.btn-view {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #b3b3b3;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view.active,
.btn-view:hover {
    background: #e50914;
    border-color: #e50914;
    color: white;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.filter-tab {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #b3b3b3;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 14px;
}

.filter-tab.active,
.filter-tab:hover {
    background: #e50914;
    border-color: #e50914;
    color: white;
}

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.movie-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.05);
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.movie-card:hover .poster-img {
    transform: scale(1.05);
}

.quality-badge,
.new-badge {
    position: absolute;
    top: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.quality-badge {
    right: 8px;
    background: #28a745;
    color: white;
}

.new-badge {
    left: 8px;
    background: #e50914;
    color: white;
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.overlay-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.btn-play,
.btn-watchlist {
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-play:hover {
    background: #e50914;
    color: white;
    transform: scale(1.1);
}

.btn-watchlist:hover {
    background: white;
    color: #e50914;
    transform: scale(1.1);
}

.movie-quick-info {
    color: white;
}

.movie-quick-info .movie-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}

.movie-quick-info .movie-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 11px;
    color: #b3b3b3;
    flex-wrap: wrap;
}

.movie-quick-info .rating {
    color: #ffc107;
}

.movie-description {
    font-size: 11px;
    color: #ccc;
    line-height: 1.3;
}

/* Load More Button */
.load-more-section {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    background: linear-gradient(45deg, #e50914, #f40612);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.4);
}

.btn-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured-movies {
        grid-template-columns: 1fr;
    }
    
    .featured-card {
        height: 250px;
    }
    
    .featured-overlay {
        padding: 20px;
    }
    
    .featured-title {
        font-size: 20px;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .filter-tabs {
        gap: 8px;
    }
    
    .filter-tab {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .featured-overlay {
        padding: 15px;
    }
    
    .featured-title {
        font-size: 18px;
    }
    
    .featured-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-watch-now,
    .btn-more-info {
        width: 100%;
        justify-content: center;
    }
}

/* Animation for smooth transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-card {
    animation: fadeInUp 0.5s ease-out;
}

/* Pagination Styles */
.pagination-section {
    margin-top: 50px;
    text-align: center;
}

.pagination-nav {
    margin-bottom: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: #b3b3b3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    border-color: rgba(255,255,255,0.3);
}

.page-item.active .page-link {
    background: #e50914;
    border-color: #e50914;
    color: white;
}

.page-item.disabled .page-link {
    background: transparent;
    border: none;
    color: #666;
    cursor: not-allowed;
}

.page-item.disabled .page-link:hover {
    background: transparent;
    color: #666;
}

.pagination-info {
    color: #b3b3b3;
    font-size: 14px;
    margin-top: 15px;
}

/* Responsive Pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 4px;
        flex-wrap: wrap;
    }
    
    .page-link {
        min-width: 35px;
        height: 35px;
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .pagination-info {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .page-link {
        min-width: 30px;
        height: 30px;
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Scrollbar Styling */
.filter-tabs::-webkit-scrollbar {
    height: 4px;
}

.filter-tabs::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.filter-tabs::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 2px;
}

.filter-tabs::-webkit-scrollbar-thumb:hover {
    background: #f40612;
}