/*  movie container
    contains:
    poster, title, data bar [keywords, year, runtime],
    description, review, watch on, and trailer
*/

#movie-list-wrapper {
    opacity: 0;
    transition: opacity 0.3s ease-in;
  }
  
  #movie-list-wrapper.visible {
    opacity: 1;
  }
  

/* entire movie container */
.movie-container {
    max-width: 1400px; 
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* movie list container */
/* background behind movie boxes */
#movie-list {
    margin-left: 10px;
    list-style-type: none; 
    padding: 0;
}

/* no results to movies */
#no-results-message {
    margin-bottom: 20%;
}
  
/* movie container boxes */
.movie-item {
    margin: 20px 0; 
    border: 1px solid #1a1a1a; 
    padding: 10px;
    border-radius: 5px; 
    background-color: #0e0e0e; 
}

/* sets container to horizontal, centers poster w/ content */
.movie-content {
    align-items: center;
    display: flex;
}

/* movie poster */
.movie-poster {
    display: block;
    max-width: 205px; 
    min-width: 205px; 
    height: 300px;
    margin-right: 130px; 
    background-color: #1b1b1b;
    border-radius: 2%;
    padding: 1px;  
    transition: opacity 0.3s, background-color 0.3s; 
}

/* movie poster link, adds image margin */
#movie-poster-a {
    position: relative; /* Necessary for positioning the buttons */
    display: inline-block;
    overflow: hidden; /* Ensures buttons stay within the image bounds */
    max-width: 210px; 
    min-width: 210px; 
    margin-right: 30px; 
}

/* movie poster hover effect */
.movie-poster:hover {
    background-color: #141414;
    opacity: 0.85;
}

/* Hover effect on the poster */
#movie-poster-a:hover .movie-poster {
    opacity: 0.85; /* Slight fading effect */
}

/* Hover buttons container */
.hover-buttons {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    opacity: 0; /* Hidden by default */
    pointer-events: none; /* Prevent interaction when hidden */
    transition: opacity 0.3s ease-in-out;
}

/* Show buttons when hovering over the poster */
#movie-poster-a:hover .hover-buttons {
    opacity: 1; /* Make buttons visible */
    pointer-events: auto;
}

/* Individual hover button styles */
.hover-button {
    background-color: rgba(0, 0, 0, 0.7);
    color: #f0f6fc;
    border: none;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
}

/* Hover effect for buttons */
.hover-button:hover {
    transform: scale(1.1); /* Slight zoom effect */
    background-color: rgba(0, 0, 0, 0.9);
}

.hover-button:active {
    transform: scale(1.15); /* Slight shrink the button for click feedback */
    background-color: transparent; 
}


/* movie info: title, rating, data, desc, review  */
.movie-info {
    align-self: flex-start; 
    flex-grow: 1; 
    max-width: 60%;
    margin-right: 1%;
    padding-right: 10%;
    flex-direction: column;
}

#main-movie-title {
    font-size: 20px;
    margin-right: 10px;
    text-decoration: none;
    color: #f0f6fc; 
}

.rating {
    position: relative;
    top: -1px;
    vertical-align: middle;
    background-color: #333; 
    color: #f0f6fc; 
    padding: 2px 5px; 
    border-radius: 3px; 
    font-weight: bold; 
    font-size: 0.6em;
    white-space: nowrap;
}
    

#data-bar {
    margin-top: -15px;
}

#data-text {
    font-weight: bold;
    font-size: 14px;
}

#runtime {
    white-space: nowrap;
}


#description {
    flex-grow: 1; 
    min-height: 140px;
    padding-bottom: 2%;
    font-size: 15px;
    margin-top: 15px;
}

#review-text a {
    color: inherit;         /* keeps the same text color as the rest */
    text-decoration: none;  /* removes underline */
    font: inherit;          /* keeps the same font style */
}

#review-bar {
    margin-top: 0px;
}

#review-title {
    color:#f0f6fc;
    font-size: 14px;
    font-weight: bold;
    font-style: italic;
}

#review-text {
    font-style: italic;
    color:#a7a7a7;
    font-size: 14px;
    margin-left: 6px;
}


/* side info */
.more-movie-info {
    margin-top: 25px;
    align-self: flex-start; /* starts at top*/
    max-width: 100px;
    min-width: 100px;
    margin-right: 5px;
    margin-left: 1%;
    white-space: nowrap; /* no word wrap */
}

.trailer-link {
    text-decoration: none; 
    color: #f0f6fc;       
    border-radius: 2%;  
    padding: 6px;      
    display: inline-flex;  
    align-items: center;  
    justify-content: center;
    transition: background-color 0.3s; 
    font-size: 25px;
    margin-left: -8px;
    }

.trailer-link:hover {
    background-color: #272727;
}

#trailer-text {
    color:#a7a7a7;
    font-size: 14px;
    margin-left: 5px;
}

#watchon-text {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 4px;
}

#theater-date-text {
    margin-top: 5px;
    display: block;
    color:#a7a7a7;
    font-size: 14px;
    text-decoration: none;
}

#platform-text {
    margin-top: 3px;
    display: block;
    color:#a7a7a7;
    font-size: 14px;
    text-decoration: none;
}

#theater-text {
    margin-top: 5px;
    display: block;
    color:#a7a7a7;
    font-size: 14px;
    text-decoration: none;
    position: relative;
    top: -15px;
}

/* sets order for mobile display correctly */
.platform {
    order: 1;
}

.trailer {
    order: 2;
}

  /* new stuff for trailer, edit later */
  .trailer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.trailer-modal iframe {
    width: 65%;
    height: 65%;
    max-width: 100%;
    max-height: 100%;
    border: none;
    object-fit: cover; 
}

/* Close button */
.close-btn {
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    position: absolute; /* Position relative to the modal */
    top: 13%; /* Moves the close button 50px down from the top of the modal */
    right: 18%; /* Keeps the button 20px from the right side of the modal */
    display: flex;
}

.close-btn:hover {
    color: #f0f6fc;
}
