/* General Body Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #0d0d0d;
    color: #fff;
    margin: 0;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* Header Styles */
.main-header {
    background-color: #1a1a1a;
    color: #ffd700;
    padding: 1rem 0;
    border-bottom: 2px solid #ffd700;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.site-logo {
    margin: 0;
    font-family: 'Creepster', cursive;
    font-size: 2.5rem;
    line-height: 1;
}

.site-logo a {
    color: #ffd700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-logo a:hover {
    color: #fff;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: #ffd700;
}

.main-nav ul li a.active {
    color: #ffd700;
}

/* Hero Section */
.hero-section {
    position: relative;
    /* Removed the hero-bg.jpg reference here as it was causing a 404 */
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)); /* Keep the gradient overlay */
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
    margin-bottom: 40px;
}

.hero-content-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h2 {
    font-family: 'Metal Mania', cursive;
    font-size: 3.5rem;
    color: #ffd700;
    margin-bottom: 20px;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.7);
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background-color: #ffd700;
    color: #0d0d0d;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
    background-color: #fff;
    color: #0d0d0d;
}

/* Main Content Area */
.main-content {
    flex-grow: 1; /* Allows main content to take up available space */
    padding: 40px 0;
}

.section-title {
    font-family: 'Metal Mania', cursive;
    font-size: 2.8rem;
    color: #ffd700;
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

/* Movie Grid Styles (Tailwind CSS will handle much of this, but here for context/overrides) */
#latest-movie-grid,
#movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

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

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

.movie-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.movie-card img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Ensures images cover the area without distortion */
    aspect-ratio: 2/3; /* Common movie poster aspect ratio */
}

.movie-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.movie-info h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    margin: 10px 0;
    color: #fff;
}

.movie-info p {
    font-size: 0.9rem;
    color: #bbb;
    margin-bottom: 10px;
}

.movie-card .release-date {
    font-size: 0.85rem;
    color: #ffd700;
    margin-top: auto; /* Pushes the date to the bottom */
}


/* Movie Detail Page Styles */
.movie-detail-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}

.movie-detail-header {
    text-align: center;
    margin-bottom: 30px;
}

.movie-detail-header h1 {
    font-family: 'Metal Mania', cursive;
    font-size: 3.5rem;
    color: #ffd700;
    margin-bottom: 15px;
}

.movie-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: flex-start;
    max-width: 900px; /* Constrain width for detail content */
    width: 100%;
}

.movie-detail-poster img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
}

.movie-detail-info h2 {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 15px;
}

.movie-detail-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.movie-detail-info .release-date,
.movie-detail-info .rating {
    font-size: 1rem;
    color: #ffd700;
    font-weight: bold;
    margin-bottom: 10px;
}

.movie-detail-info .genres span {
    display: inline-block;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* Movie Detail back button */
.back-button {
    display: inline-block;
    background-color: #ffd700;
    color: #0d0d0d;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1rem;
    margin-top: 30px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.back-button:hover {
    background-color: #fff;
    color: #0d0d0d;
}

/* Search and Filter Section */
.search-filter-container {
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-group label {
    font-size: 1.1rem;
    color: #ffd700;
    min-width: 80px; /* Adjust as needed */
}

.search-input-group input[type="text"] {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #0d0d0d;
    color: #fff;
    font-size: 1rem;
}

.search-input-group input[type="text"]:focus {
    outline: none;
    border-color: #ffd700;
}

.search-input-group button {
    background-color: #ffd700;
    color: #0d0d0d;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.search-input-group button:hover {
    background-color: #fff;
}

.genre-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.genre-filters button {
    background-color: #333;
    color: #fff;
    padding: 8px 15px;
    border: 1px solid #555;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    font-size: 0.9rem;
}

.genre-filters button.active,
.genre-filters button:hover {
    background-color: #ffd700;
    color: #0d0d0d;
    border-color: #ffd700;
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.pagination button {
    background-color: #1a1a1a;
    color: #ffd700;
    padding: 10px 15px;
    border: 1px solid #ffd700;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination button:disabled {
    background-color: #333;
    color: #777;
    border-color: #555;
    cursor: not-allowed;
}

.pagination button:not(:disabled):hover {
    background-color: #ffd700;
    color: #0d0d0d;
}


/* Footer Styles */
.main-footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    border-top: 2px solid #ffd700;
    margin-top: auto; /* Pushes the footer to the bottom */
}

.footer-links {
    margin-top: 10px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ffd700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header .container {
        flex-direction: column;
        text-align: center;
    }

    .site-logo {
        margin-bottom: 15px;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .main-nav ul li {
        margin: 10px 0;
    }

    .hero-section h2 {
        font-size: 2.5rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .movie-detail-grid {
        grid-template-columns: 1fr;
    }

    .search-filter-container {
        padding: 15px;
    }
}