body {
    margin: 0;
    padding: 0;
    background-color: #002147;
    background-image: linear-gradient(315deg, #002147 0%, #3b3c36 74%);

}

.carousel-container {
    position: relative;
    width: 98%;
    max-height: 650px;
    margin: 20px auto;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    aspect-ratio: 16/9; /* Maintain aspect ratio */
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
    width: 100%;
}

.carousel-item {
    min-width: 100%;
    position: relative;
    height: 100%;
}

.carousel-item img,
.carousel-item video,
.carousel-item .iframe-container {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* For images/videos */
}

/* Special styling for iframe container */
.iframe-container {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.carousel-item video {
    height: 100%;
    width: 100%;
}

.goTo {
    position: absolute;
    top: 80%;
    bottom: auto;
    left: 42%;
    right: 50%;
    width: 12%;
    outline: rgb(255, 255, 255) solid 1px;
    outline-offset: 3px;
    align-items: center;
    background: rgba(226, 62, 87, 1);
    color: black;
    text-decoration: none;
    padding: 15px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 650;
    z-index: 2;
    transition: background 0.6s;
}

.goTo:hover {
    background: rgb(211, 77, 97);
}

/* Rest of your existing CSS remains the same */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 15px;
}

.next {
    right: 15px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicators span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    display: none;
}

.carousel-indicators span.active {
    background: white;
}

/* Add these styles to your existing CSS */
.caption {
    position: absolute;
    width: 100%;
    border-top-right-radius: 15px;
    top: 500px;
    bottom: 0;
    left: 0;
    right: 0;
    color: rgb(255, 255, 255);
    padding: 15px;
    text-align: left;
    font-size: 1.2em;
    z-index: 2;
    text-shadow: rgb(0, 0, 0) 2px 0 10px;
}

.caption h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    text-shadow: rgb(0, 0, 0) 2px 0 10px;
}

.media-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.8em;
    margin-bottom: 10px;
}

.media-info span {
    display: inline-flex;
    align-items: center;
}

.details-btn {
    position: absolute;
    width: 500px;
    bottom: 20px;
    left: 20px;
    background: white; /* TMDB blue */
    color: black;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
    z-index: 3;
    transition: background 0.3s;
}

.details-btn:hover {
    background: #e23e57; /* Darker TMDB blue */
}

@media (max-width: 1250px) {
    .caption {
        top: 75%;
    }

    .details-btn {
        width: 40%;
    }
}

@media (max-width: 1024px) {
    .goTo {
        font-size: 15px;
        width: 20%;
    }

    .caption {
        top: 70%;
    }
}

@media (max-width: 900px) {

    .goTo {
        font-size: 12px;
        width: 20%;
    }

    .caption {
        top: 73%;
        font-size: 1em;
        padding: 10px;
    }
 
    .caption h3 {
        font-size: 1.1em;
    }
    
    .media-info {
        font-size: 0.8em;
        gap: 6px;
    }
    
    .details-btn {
        left: 10px;
        bottom: 10px;
        padding: 6px 12px;
        font-size: 0.8em;
    }
    
    .carousel-control {
        width: 30px;
        height: 30px;
        font-size: 1.2em;
    }
    
    .carousel-container {
        aspect-ratio: 4/3; /* More square aspect ratio for mobile */
    }
}

@media (max-width: 600px) {
  .goTo {
    width: 30%;
    left: 37%;
  }
  
  .caption {
    top: 68%;
  }
}

@media (max-width: 600px) {
    .caption {
        top: 55%;
    }

    .details-btn {
        font-size: 10px;
    }
}