/* movie.css */

/* Ensure this imports the main styles */
@import url("style.css");

/* Override or add specific styles for the movie page */

/* General page adjustments */
.movie-details-page {
    padding-top: 40px;
    padding-bottom: 50px;
    background-color: var(--bg-color); /* Default background color */
    color: var(--text-color);
}

/* Container for the entire content area to control max width */
.movie-details-container {
    max-width: 1200px; /* Adjust as needed */
    margin: 0 auto; /* Center the content */
    padding: 20px;
    background-color: #1e293b; /* A slightly lighter background for content area */
    border-radius: var(--border-radius-lg);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

/* Styling for the movie title */
.movie-details-page h1 {
    font-family: var(--font-heading);
    font-size: 3em;
    font-weight: 700;
    color: var(--text-heading-color);
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* Restructure the grid to place video above details */
.movie-grid {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    gap: 30px;
}

/* Style the movie poster */
.movie-poster {
    max-width: 300px;
    margin: 0 auto; /* Center the poster */
}

.movie-poster img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 30px var(--shadow-color);
    transition: transform var(--transition-fast);
}

.movie-poster img:hover {
    transform: scale(1.05);
}

/* Style the video container */
.movie-video-container {
    max-width: 100%;
    aspect-ratio: 16 / 9;
    margin-bottom: 1rem;
    position: relative;
}

.movie-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Style for when video is not available */
.no-video-message {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ccc;
    font-size: 1.2em;
    text-align: center;
}

/* Style the movie information */
.movie-info {
    max-width: 800px;
    margin: 0 auto;
}

/* Style the movie description */
.movie-plot {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 1.1em;
    line-height: 1.7;
    text-align: justify;
    padding: 15px;
    border-radius: var(--border-radius-sm);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Style the details grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px 30px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(69, 162, 158, 0.2);
}

.detail-line {
    display: flex;
    align-items: start;
    color: var(--text-color);
    font-size: 1em;
}

.detail-line i {
    color: var(--primary-accent-color);
    margin-left: 12px;
    width: 25px;
    text-align: center;
    flex-shrink: 0;
    font-size: 1.2em;
    margin-top: 3px;
}

.detail-line strong {
    margin-left: 8px;
    color: var(--text-heading-color);
    flex-shrink: 0;
}

.detail-line span {
    word-break: break-word;
}

.detail-line span.na-value {
    color: #888;
    font-style: italic;
}

/* Movie details list */
.movie-details-list {
    padding: 20px;
    border-radius: var(--border-radius-md);
    background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent background */
}

.movie-details-list p {
    margin-bottom: 0.75em;
    color: var(--text-color);
    font-size: 1.1em;
}

.movie-details-list strong {
    font-weight: bold;
    color: var(--text-heading-color);
    margin-left: 0.5em;
}

/* Style the actions section */
.movie-actions {
    margin-top: 30px;
    text-align: center;
}

/* Style the action buttons (Watch Trailer, Add to list, etc.) */
/* Apply same base style to both classes */
/* Style the action buttons (Watch Trailer, Add to list, etc.) */
/* Apply same base style to both classes */
.add-to-list-button, .watch-trailer-button { /* <-- Added .watch-trailer-button here */
    padding: 12px 25px;
    background-color: var(--primary-accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.1em;
    font-weight: 700;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    /* Use flexbox for better alignment of icon, text, and loader */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.add-to-list-button:hover, .watch-trailer-button:hover { /* <-- Added .watch-trailer-button here */
    background-color: var(--secondary-accent-color);
    transform: translateY(-2px);
}

/* Style the icon inside the button */
.add-to-list-button i, .watch-trailer-button i { /* <-- Added .watch-trailer-button here */
    margin-left: 8px; /* Space between icon and text */
}

/* Style for the loader added in the previous HTML update */
.watch-trailer-button .loader { /* <-- Specific rule for loader inside the trailer button */
     margin-right: 10px; /* Space before the loader */
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .movie-grid {
        gap: 20px;
    }
    .movie-poster {
        max-width: 250px;
    }
    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .movie-details-page h1 {
        font-size: 2.5em;
    }
    .movie-plot {
        font-size: 1em;
    }
    .detail-line {
        font-size: 0.9em;
    }
}

@media (max-width: 576px) {
    .movie-details-page h1 {
        font-size: 2em;
    }
    .movie-plot {
        font-size: 0.9em;
    }
    .detail-line {
        font-size: 0.85em;
    }
}


#movie-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}
