* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #1a1a1a;
    color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #e50914;
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    background-color: #444;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

.loader {
    display: none;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #e50914;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.movie-card {
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-5px);
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.movie-info {
    padding: 1rem;
}

.movie-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-cast {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-year {
    font-size: 0.9rem;
    color: #e50914;
}

.download-links {
    padding: 1rem;
    background-color: #444;
    border-top: 1px solid #555;
}

.download-link {
    display: block;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background-color: #e50914;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.download-link:hover {
    background-color: #ff0f1f;
}

.add-to-watchlist {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.add-to-watchlist:hover {
    background-color: #218838;
}

.no-results {
    display: none;
    text-align: center;
    font-size: 1.2rem;
    color: #aaa;
    padding: 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
}