/* Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap');

body {
    font-family: 'Quicksand', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
}

header {
    background-color: #fff; /* Light background color */
    color: #333; /* Dark text color */
    padding: 1rem 1.5rem; /* Adjusted padding */
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #ddd; /* Light border color */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Light shadow */
}

header .branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

header .branding img {
    height: 40px; /* Adjusted height for the logo */
    margin-bottom: 0.5rem;
}

header .branding span {
    font-size: 1.2rem; /* Adjusted font size */
    font-weight: 700;
    color: #333;
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
}

nav ul li {
    margin: 0.5rem; /* Reduced margin */
}

nav ul li a {
    color: #333; /* Dark text color */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ff6f61; /* Accent color */
}

#search {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd; /* Light border color */
    border-radius: 25px;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem; /* Adjusted font size */
    width: 100%; /* Full width for smaller screens */
    max-width: 250px; /* Maximum width */
    transition: box-shadow 0.3s;
}

#search:focus {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Main Content */
main {
    padding: 1.5rem; /* Adjusted padding */
}

#popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Responsive grid */
    gap: 1rem; /* Reduced gap */
}

.movie-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}   
.movie-card a {
    text-decoration: none;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.movie-card img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 2px solid #f4f4f9;
}

.movie-card h3 {
    margin: 0.5rem;
    font-size: 1rem; /* Adjusted font size */
    color: #333;
}

/* Details Page */
.details-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem; /* Reduced gap */
    padding: 1.5rem; /* Adjusted padding */
}

.poster {
    flex: 0 0 200px; /* Adjusted size */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.poster img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.info {
    flex: 1;
}

.info h1 {
    font-size: 1.8rem; /* Adjusted font size */
    margin: 0;
    color: #333;
}

.info p {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.trailer {
    flex: 0 0 100%;
    margin-top: 1rem;
}

.cast-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.cast-item {
    flex: 0 0 120px; /* Adjusted size */
    text-align: center;
}

.cast-item img {
    width: 80px; /* Adjusted size */
    height: 80px; /* Adjusted size */
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ddd;
}

.cast-item p {
    margin: 0.5rem 0;
}

h2 {
    margin-top: 1rem;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    #search {
        width: 100%;
    }

    #popular-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* Smaller columns for smaller screens */
    }

    .details-container {
        flex-direction: column;
        align-items: center;
    }

    .poster {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .info {
        text-align: center;
    }

    .cast-item {
        flex: 0 0 auto;
    }
}

@media (max-width: 480px) {
    header .branding span {
        font-size: 1rem; /* Smaller font size */
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .info h1 {
        font-size: 1.5rem; /* Smaller font size */
    }

    #search {
        font-size: 0.8rem; /* Smaller font size */
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: row;
        width: 100%;
        column-gap: 10px;
		margin-bottom: 10px;
    }
	#rbrand{
		display: none;
}

nav ul li a:hover,
nav ul li a.active {
    color: #ff6f61; /* Accent color */
	
	