/* Global Styles and Reset */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #141414; /* Dark background */
    color: #fff; /* Light text */
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Header and Navigation */
header {
    background-color: #000;
    padding: 10px 0;
    border-bottom: 3px solid #e50914; /* Netflix red accent */
}

/* Add this to your styles.css */
header h1 img {
    height: 60px; /* Adjust this height as needed */
    vertical-align: middle;
}

header h1 {
    color: #e50914;
    margin: 0;
    display: inline-block;
    font-size: 2em;
}

nav {
    float: right;
    margin-top: 10px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline;
    margin-left: 20px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #e50914;
}

/* Hero/Featured Section */
.hero {
    background: url('poster/hero/Everything-Everywhere-All-At-Once.jpg') no-repeat center center/cover; /* Replace with your image */
    background-color: #333; /* Fallback color */
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

/* Dark overlay for better text readability */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); 
}

.hero-content {
    z-index: 1; /* Bring content to front */
}

.hero h2 {
    font-size: 3em;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 2px 2px 4px #000;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #e50914;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #ff3847;
}

/* Movie Collection and Grid */
#movies h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #e50914;
}

.filter-bar {
    text-align: center;
    margin-bottom: 30px;
}

#movie-search, #genre-filter {
    padding: 10px;
    margin: 5px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

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

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

.movie-card img {
    width: 100%;
    height: auto;
    display: block;
    min-height: 350px;
    object-fit: cover; /* Ensures image covers area without distorting */
}

.movie-card h3 {
    font-size: 1.2em;
    margin: 10px 0 5px;
    color: #e50914;
}

.movie-card p.genre, .movie-card p.rating {
    margin: 5px 0 10px;
    font-size: 0.9em;
}

.movie-card.hidden {
    display: none;
}

/* Add this rule to your styles.css */
.movie-link {
    text-decoration: none; /* Removes the underline */
    color: inherit; /* Keeps text color the same as the parent */
}

/* Ensure the whole link block is visible */
.movie-link {
    display: block; 
}

/* details-styles.css */

/* Custom styles for the details page layout */
.movie-details-container {
    padding-top: 40px;
}

.movie-header {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    align-items: flex-start; /* Align items to the top */
}

.poster-area {
    flex-shrink: 0; /* Prevents poster from shrinking */
    width: 300px;
}

.details-poster {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.info-area {
    flex-grow: 1;
}

.info-area h2 {
    font-size: 3em;
    color: #e50914;
    margin-top: 0;
}

.metadata {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.metadata span {
    margin-right: 15px;
    padding: 3px 8px;
    border-radius: 4px;
    background-color: #333;
}

.genre-tag {
    background-color: #e50914;
    color: #fff;
    font-weight: bold;
}

.tagline {
    font-style: italic;
    color: #ccc;
    font-size: 1.2em;
    margin-bottom: 30px;
    border-left: 3px solid #e50914;
    padding-left: 10px;
}

/* Buttons */
.watch-btn {
    padding: 15px 30px;
    font-size: 1.2em;
    margin-right: 15px;
}

.trailer-btn {
    background-color: #555;
}

.trailer-btn:hover {
    background-color: #777;
}

/* Cast List */
.cast-list {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #444;
}

.cast-list ul {
    list-style: none;
    padding: 0;
}

.cast-list li {
    margin-bottom: 5px;
}

.cast-list a {
    color: #aaa;
    text-decoration: none;
}

.cast-list a:hover {
    color: #e50914;
    text-decoration: underline;
}

/* Synopsis Section */
.synopsis-section {
    margin-bottom: 50px;
}

/* Reviews */
.review-section h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
}

.review-card {
    background-color: #222;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 5px solid #e50914;
}

.review-card h4 {
    color: #fff;
    margin-top: 0;
}

/* Styling the Video Player Section */
.video-player-container {
    margin-bottom: 30px;
    background-color: #000;
    border-radius: 10px;
    overflow: hidden; /* Ensures video corners are rounded */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
}

.movie-video-player {
    width: 100%;
    /* 16:9 aspect ratio (56.25% height is 9/16) */
    /* This ensures the player maintains the correct shape */
    aspect-ratio: 16 / 9; 
    display: block;
}

/* Hide the poster image area when the video player is present 
   (We will move the player to the top of the page for this structure) */
.poster-area {
    display: none; /* Hide the static poster image since we have the player */
} 

/* Adjust layout if the player is now at the top */
.movie-header {
    /* Since the poster is gone, let's make the info-area fill the width */
    flex-direction: row; 
    gap: 0;
    margin-bottom: 20px;
}

/* Media Query for smaller screens (mobile view) */
@media (max-width: 800px) {
    .movie-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .poster-area {
        width: 70%;
        max-width: 300px;
    }

    .info-area h2 {
        font-size: 2em;
    }

    .metadata {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .metadata span {
        margin: 5px;
    }

    .watch-btn, .trailer-btn {
        display: block;
        width: 80%;
        margin: 10px auto;
    }
}


/* Footer */
footer {
    background-color: #000;
    color: #aaa;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

footer a {
    color: #e50914;
    text-decoration: none;
}