/* ---
Global Styles
--- */
body {
    background-color: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    margin: 0;
    padding: 0;
}

.site-main {
    max-width: 1600px; /* Increased max-width for carousel layout */
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* ---
Carousel Section Styles
--- */
.movie-category-section {
    margin-bottom: 4rem;
    position: relative; /* Needed for positioning swiper buttons */
    padding: 0 40px; /* Add padding to not overlap with arrows */
}

.category-title {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1.5rem;
    border-left: 4px solid #1683C6;
    padding-left: 1rem;
}

/* ---
Movie Card Styles (Largely the same)
--- */
.movie-card {
    text-decoration: none;
    color: #fff;
    background-color: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards in a row are same height */
    width: 100%;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(22, 131, 198, 0.2);
}

.movie-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    background-color: #525252;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-fallback {
    padding: 1rem; text-align: center; font-weight: bold;
}

.movie-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.85); color: #fff; padding: 1rem;
    opacity: 0; transition: opacity 0.3s ease; overflow-y: auto;
}

.movie-card:hover .movie-overlay { opacity: 1; }
.movie-meta { margin: 0 0 0.75rem 0; }
.movie-meta strong, .movie-plot strong { margin-right: 0.5em; }
.movie-plot { font-size: 0.9rem; line-height: 1.5; margin: 0; }
.movie-title {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem;
    margin: 0;
    background-color: #1a1a1a;
    flex-grow: 1;
    text-align: center;
    color: #fff;
    min-height: 3.3em; /* Reserve space for ~2 lines of text */
    display: flex;
    align-items: center; /* Vertically center the text */
    justify-content: center; /* Horizontally center the text */
}

/* ---
Custom Scrollbar for Movie Overlay
--- */
.movie-overlay::-webkit-scrollbar {
    width: 8px;
}

.movie-overlay::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.movie-overlay::-webkit-scrollbar-thumb {
    background-color: #1683C6;
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0);
    background-clip: padding-box;
}

.movie-overlay::-webkit-scrollbar-thumb:hover {
    background-color: #525252;
}


.no-movies-found {
    color: #525252; padding: 2rem; font-size: 1.2rem;
}

/* ---
Swiper Carousel Styles
--- */
.swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: stretch; /* This stretches the .movie-card to fill the slide's height */
}

.swiper-button-next,
.swiper-button-prev {
    color: #1683C6 !important; /* Swiper uses !important, so we must too */
    background-color: rgba(26, 26, 26, 0.7);
    width: 44px !important;
    height: 44px !important;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: rgba(22, 131, 198, 0.5);
    color: #fff !important;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.2rem !important;
    font-weight: bold;
}

.swiper-button-prev { left: 0px !important; }
.swiper-button-next { right: 0px !important; }

.poster-fallback { color: #fff; }

/* ---
Responsive Adjustments
--- */
@media (max-width: 768px) {
    .movie-category-section {
        padding: 0; /* Remove padding on smaller screens */
    }
    .swiper-button-next, .swiper-button-prev {
        display: none !important; /* Hide arrows on touch devices */
    }
    #primary { padding: 0; }
}

