* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e50914;
    --secondary-color: #141414;
    --text-color: #ffffff;
    --text-secondary: #b3b3b3;
    --hover-color: #f40612;
}

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

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    padding: 20px 0;
    z-index: 1000;
    transition: background 0.3s;
}

.navbar.scrolled {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.search-box {
    display: flex;
    gap: 10px;
    position: relative;
}

.search-box input {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: var(--text-color);
    font-size: 14px;
    width: 250px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-box button {
    padding: 8px 15px;
    background: var(--primary-color);
    border: none;
    border-radius: 4px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.search-box button:hover {
    background: var(--hover-color);
    transform: scale(1.05);
}

.search-box button:active {
    transform: scale(0.95);
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    margin-top: 70px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.4);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, #000000, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    padding: 0 40px;
}

.hero-text h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.hero-text p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-color);
}

.btn-primary:hover {
    background: var(--hover-color);
    transform: scale(1.05);
}

.btn-secondary {
    background: rgba(109, 109, 110, 0.7);
    color: var(--text-color);
}

.btn-secondary:hover {
    background: rgba(109, 109, 110, 0.9);
}

/* Content Views */
.content-view {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Movie Sections */
.movie-section {
    margin: 60px 0;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Search Results */
.search-results-section {
    background: rgba(229, 9, 20, 0.05);
    border: 1px solid rgba(229, 9, 20, 0.2);
    border-radius: 12px;
    padding: 30px;
    margin-top: 20px;
}

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

.search-header .section-title {
    margin-bottom: 0;
    color: var(--primary-color);
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.search-no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.search-no-results h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.search-no-results p {
    font-size: 16px;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.movie-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.movie-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.movie-card-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.3s;
}

.movie-card:hover .movie-card-info {
    transform: translateY(0);
}

.movie-card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.movie-card-meta {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
}

.modal-content {
    background-color: #181818;
    margin: 5% auto;
    padding: 0;
    width: 80%;
    max-width: 900px;
    border-radius: 12px;
    overflow: hidden;
}

.close {
    color: var(--text-color);
    float: right;
    font-size: 40px;
    font-weight: bold;
    padding: 10px 20px;
    cursor: pointer;
}

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

.modal-body {
    display: flex;
    gap: 30px;
    padding: 40px;
}

.modal-poster {
    flex-shrink: 0;
}

.modal-poster img {
    width: 300px;
    border-radius: 8px;
}

.modal-info {
    flex: 1;
}

.modal-info h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.modal-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

#modalOverview {
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.modal-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.genre-tag {
    padding: 6px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 14px;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    padding: 40px 0;
    text-align: center;
    margin-top: 80px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer p {
    color: var(--text-secondary);
    margin: 5px 0;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .hero-text h1 {
        font-size: 32px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .modal-body {
        flex-direction: column;
        padding: 20px;
    }
    
    .modal-poster img {
        width: 100%;
    }

    .banner-left,
    .banner-right {
        display: none;
    }

    .ad-placeholder {
        padding: 10px 20px;
        font-size: 14px;
    }

    .search-results-section {
        padding: 20px;
    }

    .search-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 12px;
    }

    .logo {
        font-size: 20px;
    }
}
