/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #0f0f0f;
    color: #fff;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Navigation */
.navbar {
    background: rgba(0, 0, 0, 0.9);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.logo span {
    color: #e50914;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #ccc;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a:hover {
    color: #fff;
}

.nav-links a.admin-btn {
    background: #e50914;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1536440136628-849c177e76a1?ixlib=rb-4.0.3&auto=format&fit=crop&w=1925&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    margin-top: 70px;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    color: #ccc;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background: #e50914;
    color: white;
    padding: 15px 40px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    transition: transform 0.3s, background 0.3s;
}

.cta-button:hover {
    background: #ff0a16;
    transform: translateY(-3px);
}

/* Sections */
.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: white;
}

/* Movie Cards */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.movie-card {
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.movie-poster {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.movie-card:hover .movie-poster img {
    transform: scale(1.1);
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(229, 9, 20, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.play-btn {
    font-size: 48px;
    color: white;
}

.movie-info {
    padding: 15px;
}

.movie-info h3, .movie-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    color: #888;
    font-size: 14px;
}

/* Categories Section */
.category-section {
    margin-bottom: 50px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.category-header h3 {
    font-size: 24px;
    color: white;
}

.movie-count {
    font-size: 14px;
    color: #888;
    margin-left: 10px;
}

.see-all {
    color: #e50914;
    font-weight: 500;
    transition: color 0.3s;
}

.see-all:hover {
    color: #ff0a16;
}

.movies-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

/* Movie Detail Page */
.movie-detail {
    padding: 100px 0 50px;
}

.detail-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.detail-poster img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.detail-info h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.release-year {
    color: #888;
    font-weight: normal;
}

.detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.category, .rating {
    padding: 5px 15px;
    background: #1a1a1a;
    border-radius: 20px;
    font-size: 14px;
}

.rating {
    background: #e50914;
    color: white;
}

.description {
    color: #ccc;
    margin-bottom: 30px;
    line-height: 1.8;
}

.action-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
}

.btn-watch, .btn-download {
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    border: none;
}

.btn-watch {
    background: #e50914;
    color: white;
}

.btn-watch:hover {
    background: #ff0a16;
}

.btn-download {
    background: #2ecc71;
    color: white;
    text-decoration: none;
}

.btn-download:hover {
    background: #27ae60;
}

.btn-download.disabled {
    background: #666;
    cursor: not-allowed;
}

.movie-specs {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
}

.movie-specs h3 {
    margin-bottom: 20px;
    color: white;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.spec-label {
    color: #888;
}

.spec-value {
    color: white;
    font-weight: 500;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.modal-content {
    position: relative;
    margin: 50px auto;
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 2001;
}

#trailerPlayer {
    width: 100%;
    height: 500px;
}

/* Related Movies */
.related-movies {
    padding: 50px 0;
}

/* Footer */
.footer {
    background: #1a1a1a;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: #888;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #888;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #e50914;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .detail-container {
        grid-template-columns: 1fr;
    }
    
    .detail-poster {
        max-width: 300px;
        margin: 0 auto;
    }
    
    .hero h1 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
    
    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }
    
    .movie-poster {
        height: 200px;
    }
    
    .hero {
        height: 60vh;
    }
}