/* Viaplay Style Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #E50914;
    --dark-bg: #111111;
    --darker-bg: #000000;
    --card-bg: #1a1a1a;
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --text-light-gray: #8c8c8c;
    --hover-color: #333333;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-white);
    line-height: 1.4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    background-color: var(--dark-bg);
    padding: 60px 0 40px;
    min-height: 400px;
}

.hero-content {
    padding: 40px 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 300;
    margin-bottom: 20px;
    color: var(--text-white);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    line-height: 1.6;
}

.btn-hero {
    background-color: var(--primary-red);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-hero:hover {
    background-color: #b20710;
}

/* Hero Posters */
.hero-posters {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.poster-item {
    flex: 0 0 auto;
}

.poster-image {
    width: 160px;
    height: 240px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.poster-image:hover {
    transform: scale(1.05);
}

/* Hero Dots */
.hero-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--text-white);
}

/* Filter Section */
.filter-section {
    background-color: var(--dark-bg);
    padding: 30px 0;
    border-bottom: 1px solid #333;
}

.section-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 15px;
    color: var(--text-white);
}

.filter-select {
    background-color: var(--card-bg);
    color: var(--text-white);
    border: 1px solid #333;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-red);
}

.view-options {
    display: flex;
    gap: 10px;
}

.btn-view {
    background-color: transparent;
    color: var(--text-gray);
    border: 1px solid #333;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view.active,
.btn-view:hover {
    background-color: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* Category Tabs */
.category-tabs {
    background-color: var(--dark-bg);
    padding: 20px 0;
    border-bottom: 1px solid #333;
}

.tabs-wrapper {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs-wrapper::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    background-color: var(--card-bg);
    color: var(--text-gray);
    border: none;
    padding: 12px 20px;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    border-right: 1px solid #333;
}

.tab-btn:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.tab-btn:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border-right: none;
}

.tab-btn.active,
.tab-btn:hover {
    background-color: var(--primary-red);
    color: white;
}

/* Movies Grid */
.movies-grid-section {
    padding: 40px 0 60px;
    background-color: var(--dark-bg);
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.movie-item {
    position: relative;
    transition: transform 0.3s ease;
}

.movie-item:hover {
    transform: scale(1.05);
    z-index: 2;
}

.movie-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    overflow: hidden;
    border-radius: 8px;
    background-color: var(--card-bg);
}

.poster-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Quality and New Badges */
.quality-badge,
.new-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: var(--primary-red);
    color: white;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 1;
}

.new-badge {
    top: 8px;
    left: 8px;
    right: auto;
    background-color: #00ff00;
    color: black;
}

/* Movie Overlay */
.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    border-radius: 8px;
}

.movie-item:hover .movie-overlay {
    opacity: 1;
}

.movie-info {
    width: 100%;
}

.movie-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-red);
    line-height: 1.3;
}

.movie-title a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

.movie-title a:hover {
    color: #b20710;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.year,
.rating {
    font-size: 12px;
    color: var(--text-gray);
}

.btn-play {
    background-color: var(--primary-red);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    font-size: 12px;
}

.btn-play:hover {
    background-color: #b20710;
    color: white;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    padding: 20px 0;
}

.btn-load-more {
    background-color: transparent;
    color: var(--text-white);
    border: 2px solid #333;
    padding: 12px 30px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }
    
    .poster-image {
        width: 130px;
        height: 195px;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0 30px;
    }
    
    .hero-title {
        font-size: 2rem;
        text-align: center;
    }
    
    .hero-posters {
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .movie-title {
        font-size: 12px;
    }
    
    .tabs-wrapper {
        justify-content: flex-start;
    }
    
    .tab-btn {
        padding: 10px 15px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .hero-posters {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .poster-image {
        width: 110px;
        height: 165px;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    
    .movie-title {
        font-size: 11px;
    }
    
    .filter-section .row {
        flex-direction: column;
        gap: 15px;
    }
    
    .view-options {
        justify-content: center;
    }
}

/* Additional Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.movie-item {
    animation: fadeInUp 0.6s ease forwards;
}

.movie-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.movie-item:nth-child(even) {
    animation-delay: 0.2s;
}

/* Loading States */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-red);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}