body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #1a1a1a;
    color: #f0f0f0;
}

header {
    background-color: #282828;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #444;
}

h1 {
    margin: 0;
    color: #e0e0e0;
}

.search-container {
    margin-top: 15px;
}

#searchInput {
    padding: 10px;
    width: 250px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #333;
    color: #f0f0f0;
}

#searchButton {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#searchButton:hover {
    background-color: #0056b3;
}

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

.movie-grid {
    margin-top: 20px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    justify-content: center;
}

.movie-card {
    background-color: #282828;
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

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

.movie-card h3 {
    font-size: 1.1em;
    margin: 10px;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Movie Details Section */
#movieDetails {
    background-color: #282828;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

#movieDetails button {
    padding: 10px 15px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
}

#movieDetails button:hover {
    background-color: #5a6268;
}

#detailTitle {
    color: #e0e0e0;
    margin-top: 0;
}

#detailPoster {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

#detailOverview, #detailReleaseDate {
    line-height: 1.6;
    color: #ccc;
    margin-bottom: 15px;
}

#videoPlayers {
    margin-top: 30px;
}

#videoPlayers h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
}

.player-container {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.player-container h4 {
    margin-top: 0;
    color: #007bff;
    margin-bottom: 10px;
}

#vidsrcPlayer, #embedsuPlayer {
    width: 100%;
    height: 450px; /* Adjust as needed */
    border: none;
    background-color: black; /* To make sure no white background shows before load */
    border-radius: 5px;
}

/* Utility class to hide elements */
.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    #searchInput {
        width: 180px;
    }
    #vidsrcPlayer, #embedsuPlayer {
        height: 300px;
    }
}
