* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #141414;
    color: #e0e0e0;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, rgba(0,0,0,0.9), transparent);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.navbar-brand h1 {
    font-size: 1.8rem;
    color: #e50914;
    font-weight: 800;
}

.tagline {
    font-size: 0.75rem;
    color: #999;
    margin-top: -0.25rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #e0e0e0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #e50914;
}

.nav-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-box {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    width: 200px;
    transition: all 0.3s ease;
}

.search-box:focus {
    outline: none;
    background: rgba(255,255,255,0.2);
    border-color: #e50914;
}

.dark-mode-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    height: 500px;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)), 
                url('https://via.placeholder.com/1920x500') center/cover;
    display: flex;
    align-items: flex-end;
    padding: 4rem;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(20,20,20,0.8));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
}

.hero-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #b3b3b3;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #e50914;
    color: white;
}

.btn-primary:hover {
    background: #b20710;
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(255,255,255,0.3);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.5);
}

/* Sections */
.section {
    padding: 2.5rem;
    margin: 0 auto;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.section.hidden {
    display: none;
}

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
}

.movie-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #2f2f2f;
    cursor: pointer;
    transition: all 0.3s ease;
    aspect-ratio: 2/3;
}

.movie-card:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 30px rgba(229,9,20,0.4);
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.movie-title {
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.movie-meta {
    font-size: 0.85rem;
    color: #b3b3b3;
    margin-bottom: 0.75rem;
}

.movie-actions {
    display: flex;
    gap: 0.5rem;
}

.movie-actions button {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    background: #e50914;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.movie-actions button:hover {
    background: #b20710;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #2f2f2f;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-inner {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-poster {
    width: 100%;
    border-radius: 8px;
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.modal-meta {
    color: #b3b3b3;
    margin-bottom: 1rem;
}

.modal-genres {
    color: #e50914;
    margin-bottom: 1rem;
    font-weight: 600;
}

.modal-info p {
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #e0e0e0;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Footer */
footer {
    background: #000;
    color: #666;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #333;
}

footer p {
    margin: 0.5rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-right {
        width: 100%;
        justify-content: space-between;
    }

    .search-box {
        width: 100%;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .modal-inner {
        grid-template-columns: 1fr;
    }
}
