:root {
    --bg-color: #000000;
    --surface-color: #121212;
    --accent-color: #e50914;
    /* Netflix Red style */
    --accent-glow: rgba(229, 9, 20, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glass Header */
.glass-header {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.glass-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-color);
}

/* Search Box */
.search-box {
    position: relative;
    width: 40%;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-box input {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 12px 15px 12px 45px;
    border-radius: 50px;
    width: 100%;
    transition: all 0.3s ease;
    outline: none;
}

.search-box input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Buttons */
.btn-primary {
    background-color: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary:hover {
    background-color: #ff0f1e;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 80px 0 40px;
    text-align: center;
}

.hero h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero h2 span {
    color: var(--accent-color);
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--accent-color);
    color: white;
}

.filter-btn.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 15px var(--accent-glow);
    border-color: var(--accent-color);
}

.section-title {
    margin-bottom: 25px;
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

.section-title h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 0 40px;
}

/* Movie Card */
.movie-card {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    height: 160px;
    /* Mobil uchun optimal balandlik */
}

.movie-card:hover {
    transform: scale(1.02);
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #1a1a1a;
}

.movie-info {
    padding: 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.movie-title {
    font-weight: 500;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.55rem;
    color: var(--text-secondary);
}

.movie-code {
    background: var(--accent-color);
    color: white;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: bold;
}

/* Skeleton Loaders */
.skeleton-card {
    height: 380px;
    background: linear-gradient(90deg, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--card-radius);
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Footer */
/* Numbered Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-item {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.page-item:hover {
    border-color: var(--accent-color);
}

.page-item.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.page-dots {
    color: var(--text-secondary);
}

/* Global Loader */
.global-loader {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--surface-color);
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

footer {
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.modal-content {
    background-color: var(--surface-color);
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.player-container {
    width: 100%;
    background: #000;
    aspect-ratio: 16/9;
}

#mainPlayer {
    width: 100%;
    height: 100%;
}

.video-details {
    padding: 20px;
}

#videoTitle {
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: var(--accent-color);
}

.movie-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 15px 0;
}

/* Parts Grid */
.parts-list {
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
}

.parts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.part-btn {
    background: #2a2a2a;
    border: 1px solid #333;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.part-btn:hover {
    background: #3a3a3a;
}

.part-btn.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.modal-footer {
    margin-top: 30px;
    text-align: center;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        padding-top: 50px;
    }

    #videoTitle {
        font-size: 1.2rem;
    }

    .glass-header .container {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 10px 15px;
    }

    .logo {
        font-size: 1.3rem;
        margin-bottom: 5px;
    }

    .search-box {
        width: 100%;
        min-width: unset;
    }

    .search-box input {
        padding: 10px 15px 10px 40px;
        font-size: 0.9rem;
    }

    .hero {
        padding: 40px 15px 20px;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .filters-bar {
        gap: 8px;
        margin-bottom: 25px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}