body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
}

header {
    background-color: #1e1e1e;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

h1 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 2.5em;
}

.search-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

#searchInput {
    padding: 12px 15px;
    width: 400px;
    border-radius: 25px;
    border: 1px solid #333;
    background-color: #2a2a2a;
    color: #e0e0e0;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

#searchInput::placeholder {
    color: #bbb;
}

#searchInput:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
    outline: none;
}

#searchButton {
    padding: 12px 25px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#searchButton:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

main {
    padding: 30px;
    max-width: 1200px;
    margin: 20px auto;
}

h2 {
    color: #007bff;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-top: 40px;
    margin-bottom: 25px;
    font-size: 2em;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.movie-card {
    background-color: #1e1e1e;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.7);
}

.movie-card img {
    max-width: 100%;
    height: 270px; /* Adjusted height for better aspect ratio with 180px width */
    object-fit: cover;
    border-bottom: 1px solid #333;
}

.movie-card h3 {
    font-size: 1.1em;
    padding: 15px 10px;
    margin: 0;
    color: #e0e0e0;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

#videoPlayerSection {
    background-color: #1e1e1e;
    padding: 30px;
    margin-top: 50px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

#videoPlayer {
    width: 100%;
    background-color: black;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden; /* Ensures iframe corners are also rounded */
}

#videoPlayer iframe {
    border-radius: 5px;
}

#favoriteButton {
    padding: 12px 25px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

#favoriteButton:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

#seriesControls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 20px;
    justify-content: center;
}

#seriesControls label {
    font-size: 1.1em;
    color: #e0e0e0;
}

#seasonSelect, #episodeSelect {
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid #333;
    background-color: #2a2a2a;
    color: #e0e0e0;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

#seasonSelect:focus, #episodeSelect:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
    outline: none;
}

#favoritesSection {
    margin-top: 60px;
}

.search-type-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 1.1em;
}

.search-type-container input[type="radio"] {
    margin-right: 5px;
    accent-color: #007bff; /* Highlights the radio button */
    transform: scale(1.2); /* Slightly enlarges the radio button */
}

.search-type-container label {
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-type-container label:hover {
    color: #007bff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    #searchInput {
        width: 100%;
    }

    .search-container {
        flex-direction: column;
    }

    #searchButton {
        width: 100%;
    }

    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }

    .movie-card img {
        height: 180px;
    }

    .movie-card h3 {
        font-size: 0.9em;
    }

    #videoPlayerSection {
        padding: 20px;
    }

    #seriesControls {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    main {
        padding: 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    h2 {
        font-size: 1.5em;
        margin-top: 30px;
        margin-bottom: 15px;
    }

    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .movie-card img {
        height: 150px;
    }
}
