/* Responsive Mobile Optimizations */
@media (max-width: 600px) {
    body {
        font-size: 15px;
        padding: 0;
    }
    .container {
        padding: 0 8px;
        max-width: 100%;
    }
    .site-header {
        height: 56px;
        padding: 0 8px;
    }
    .header-content {
        gap: 10px;
        padding: 0 8px;
    }
    .header-content .logo {
        font-size: 22px;
    }
    .details-poster img, .details-poster {
        max-width: 120px;
        height: auto;
    }
    h1, h2, h3 {
        font-size: 1.2em;
    }
    .details-meta, .details-genre {
        font-size: 0.95em;
    }
    .details-actions button {
        font-size: 0.95em;
        padding: 10px 14px;
    }
    .sidebar {
        width: 100vw;
        position: static;
        height: auto;
        border-right: none;
    }
    .sidebar-menu {
        padding: 10px 0;
    }
    .menu-item {
        padding: 10px 12px;
        font-size: 14px;
    }
}
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e50914;
    --secondary-color: #141414;
    --text-color: #ffffff;
    --text-secondary: #b3b3b3;
    --bg-dark: #000000;
    --bg-card: #1a1a1a;
    --hover-color: #ff0a16;
    --gradient-start: #e50914;
    --gradient-end: #ff6b00;
    --sidebar-width: 220px;
    --header-height: 70px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Site Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1001;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 30px;
    gap: 30px;
}

.header-content .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.header-content .logo:hover {
    transform: scale(1.05);
}

.header-content .logo i {
    font-size: 32px;
}

.header-search {
    position: relative;
    flex: 1;
    max-width: 600px;
}

.header-search input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 45px 12px 20px;
    border-radius: 25px;
    color: var(--text-color);
    width: 100%;
    transition: all 0.3s ease;
    font-size: 14px;
}

.header-search input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.header-search input::placeholder {
    color: var(--text-secondary);
}

.header-search i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
}

.header-content .mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background: var(--bg-dark);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(229, 9, 20, 0.5);
    border-radius: 3px;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(229, 9, 20, 0.5);
    border-radius: 3px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(229, 9, 20, 0.1);
    color: var(--text-color);
    border-left-color: var(--primary-color);
}

.menu-item.active {
    background: rgba(229, 9, 20, 0.15);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.menu-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    padding: 30px;
}

/* Top Bar */
.topbar {
    position: sticky;
    top: 0;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 500px;
}

.search-box input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 45px 12px 20px;
    border-radius: 25px;
    color: var(--text-color);
    width: 100%;
    transition: all 0.3s ease;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-box i {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 16px;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Content Sections */
.content-section {
    padding: 30px 0;
}

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

.section-header h2 {
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header h2 i {
    color: var(--primary-color);
}

.view-all {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all:hover {
    color: var(--primary-color);
}

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.movie-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(229, 9, 20, 0.3);
}

.movie-poster {
    position: relative;
    width: 100%;
    padding-top: 150%;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.movie-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.movie-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 1;
}

.movie-rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffd700;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 1;
}

.favorite-btn {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 2;
    transition: all 0.3s ease;
    opacity: 0;
}

.movie-card:hover .favorite-btn {
    opacity: 1;
}

.favorite-btn.active {
    opacity: 1;
    background: rgba(220, 20, 60, 0.9);
    color: #fff;
}

.favorite-btn:hover {
    transform: translateX(-50%) scale(1.1);
    background: rgba(220, 20, 60, 0.9);
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 48px;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.movie-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.play-button {
    width: 70px;
    height: 70px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
    transition: all 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
    background: var(--hover-color);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-section h4 {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .header-content .mobile-toggle {
        display: block;
    }

    .header-search {
        display: none;
    }

    .header-content {
        padding: 0 20px;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding: 20px 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .main-content {
        padding: 15px;
    }

    .header-content .logo {
        font-size: 24px;
    }

    .header-content .logo i {
        font-size: 28px;
    }
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    padding: 80px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.page-header p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

/* Filters Section */
.filters-section {
    background: var(--bg-dark);
    padding: 30px 0 80px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filters-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    margin-bottom: 40px;
}

.filter-group label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group select {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
    z-index: 10;
}

.filter-group select option {
    background: #1a1a1a;
    color: var(--text-color);
    padding: 10px;
}

.filter-group select option:hover {
    background: rgba(220, 20, 60, 0.2);
}

.filter-group select option:checked {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.3), rgba(220, 20, 60, 0.1));
    color: var(--primary-color);
    font-weight: 600;
}

.filter-group select:hover {
    border-color: var(--primary-color);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(229, 9, 20, 0.1);
}

.results-count {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(229, 9, 20, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

/* Pagination Styles */
#paginationContainer {
    margin: 40px 0 20px;
}

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

.page-btn {
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.page-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn:disabled:hover {
    transform: none;
}

.page-dots {
    color: var(--text-secondary);
    padding: 0 5px;
    user-select: none;
}

@media (max-width: 768px) {
    .pagination {
        gap: 5px;
    }
    
    .page-btn {
        min-width: 40px;
        height: 40px;
        padding: 0 10px;
        font-size: 13px;
    }
}

