/* For small screens (mobile devices) */
@media only screen and (max-width: 992px) {
  /* Add styles for small screens here */
  body {
    background-color: #0d1531;
    font-family: "Outfit", serif;
    color: whitesmoke;
    /* unscrollable */
    overflow-x: hidden;
    max-width: 100%;
  }

  header {
    padding: 10px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    z-index: 5;
  }

  .welcome-container {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000; /* Ensure it overlays everything */
    padding: 3rem;

    /* make it sticky */
    position: fixed;
  }
  .welcome-container button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #831818;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  .welcome-title {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: bolder;
  }

  .welcome-text {
    font-size: 1em;
    max-width: 600px;
  }
  .logo-title {
    font-family: "Oswald", serif;
    font-size: 24px;
    font-weight: bold;
    color: #800e0e;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(173, 23, 23, 0.1);
    text-align: center;
  }
  .image-container {
    display: none;
  }
  .image-info {
    display: none;
  }

  .movie-caraousel {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .movie-caraousel h2 {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 20px;
    margin-left: 18px;
  }

  .movie-caraousel-container {
    display: flex;
    width: 100vw;
    gap: 0.4rem;
    overflow: scroll;
  }

  .movie-caraousel-container-place {
    display: flex;
    width: 100vw;
    gap: 0.5rem;
    overflow: scroll;
  }

  .search-form {
    display: none;
  }

  .movie-card img {
    min-height: 200px;
    min-width: 150px;
    width: 150px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    /* unselectable */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }

  .movie-card {
    cursor: pointer;
    position: relative;
    overflow-y: clip;
    width: 150px;
  }

  .mobile-search-bar-container {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 5;
    overflow: clip;
    top: 2px;
    margin-bottom: 20px;
  }

  .mobile-search-bar {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 5;
    width: 75vw;
  }
  .mobile-search-bar form {
    width: 100%;
  }

  .mobile-search-bar input {
    padding: 10px;
    border-radius: 10px;
    border: none;
    margin-right: 10px;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    position: relative;
    background-color: rgba(255, 255, 255, 0.1);
    color: whitesmoke;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 5;
  }

  .search-bar form svg {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    color: whitesmoke;
    z-index: 5;
  }

  .movie-info {
    display: none;
    pointer-events: none;
  }

  .movie-info span {
    pointer-events: none;
  }

  .categories {
    display: none;
  }

  .warning-container {
    display: none;
  }

  .movie-card-rating {
    position: relative;
    z-index: 5;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    padding: 2px;
    width: 60px;
    top: -195px;
    right: -84px;
  }

  body {
    font-family: "Outfit", serif;
    /*unscrollable*/
    overflow-x: hidden;
    color: whitesmoke;
    margin-left: auto;
    margin-right: auto;
    /* center the container */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .menu-bar-mobile {
    display: flex;
    justify-content: space-between;
    position: fixed;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 70px;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: whitesmoke;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
  }
  .sidebar {
    display: none;
  }
  .watch-later-container {
    display: none;
  }
  .watch-list-placeholder {
    display: none;
  }
}

/* For large screens (desktops) */
@media only screen and (min-width: 993px) {
  .menu-bar-mobile {
    display: none;
  }
  .mobile-search-bar {
    display: none;
  }

  /* Add styles for large screens here */
  .movie-caraousel {
    flex-direction: row;
    flex-wrap: wrap;
  }
  body {
    background-color: #0a0a12;
    font-family: "Outfit", serif;
    /*unscrollable*/
    overflow-x: hidden;
  }

  .search-form svg {
    position: absolute;
    top: 32px;
    right: 110px;
    z-index: 5;
  }
  .sidebar {
    background-color: rgba(15, 15, 15, 0.1);
    color: whitesmoke;
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    height: 100vh;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    z-index: 30;
    text-align: left;
    display: flex;
    flex-direction: column;
  }

  .sidebar .btn-menu {
    color: white;
    border: none;
    border-radius: 5px;
    padding: 10px 20px;
    cursor: pointer;
    text-align: left;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
    display: grid;
    display: flex;
    gap: 1rem;
  }

  .sidebar .active {
    /* transition effect */
    background-color: #4e0d0d;
    transition: background-color 0.3s ease;
    color: whitesmoke;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 5px;
  }

  .content {
  }

  .sidebar .btn-menu:hover {
    background-color: #4e0d0d;
  }

  .sidebar details {
    background-color: rgba(15, 15, 15, 0.3);
    color: whitesmoke;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
    cursor: pointer;
  }

  .sidebar details[open] {
    background-color: rgba(255, 255, 255, 0.1);
    color: whitesmoke;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .sidebar details summary {
    font-weight: bold;
    list-style: none;
    outline: none;
  }

  .sidebar details summary::-webkit-details-marker {
    display: none;
  }

  .sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .search-form input[type="text"] {
    margin-left: 5rem !important;
    padding: 10px;
    border-radius: 10px;
    border: none;
    margin-right: 10px;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    position: relative;
    background-color: rgba(255, 255, 255, 0.1);
    color: whitesmoke;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 5;
  }

  .search-form input[type="text"]::placeholder {
    color: #a9a9ac; /* Placeholder text color */
  }

  .search-form button[type="submit"] {
    background-color: #5ca6d1; /* Button background color */
    color: whitesmoke; /* Button text color */
  }

  .search-form button[type="submit"]:hover {
    background-color: #4a90e2; /* Button hover color */
  }
  .container {
    margin-left: 14rem;
  }

  .nav-container {
    display: flex;
    justify-content: flex-end;
    margin-left: 5rem;
    margin-right: 5rem;
    margin-top: 2vh;
  }

  .image-container {
    margin-top: -8rem;
    min-width: 100vw;
    display: flex;
    justify-content: center;
    height: 80vh;
    object-fit: fill;
    /* make it behind the text */
    position: relative;
    overflow: hidden;
  }

  .image-container img {
    object-fit: cover;
    user-select: none;
  }

  .slides img {
    width: 100vw;
    height: 80vh;
    object-fit: cover;
    user-select: none;
    /* undraggable */
    -webkit-user-drag: none;
  }

  .slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
  }

  .slide {
    min-width: 100%;
    transition: opacity 0.5s ease-in-out;
  }

  .prev,
  .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10;
    height: 100%;
    width: 5rem;
    transition: all;
  }

  .prev {
    left: 0px;
  }

  .next {
    left: 84vw;
  }

  .image-info {
    /* padding: 10rem; */
    position: absolute;
    top: 140px;
    left: 370px;
    width: 30vw;
    height: 50vh;
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: white;
    /* background-color: rgba(0, 0, 0, 0.5); */
    text-align: center;
    align-content: center;
    flex-wrap: nowrap;
    flex-direction: column;
    z-index: 1;
    margin-left: 5rem;
    /* unselectable */
    user-select: none;
  }

  .image-info h1 {
    font-size: 3em;
    margin-left: 1em;
    margin-bottom: 0.4em;
    max-width: 40vw;
    /* clip text if too long */
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: -3px 9px 21px rgba(0, 0, 0, 0.86);
    cursor: pointer;
  }

  .image-info h1:hover {
    /* scale text on hover */
    transform: scale(1.1);
    transition: transform 0.5s;
  }

  .image-info p {
    text-align: left;
    font-size: 1em;
    margin-top: 1em;
    max-width: 30vw;
    height: 10vh;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    text-shadow: -3px 9px 21px rgba(0, 0, 0, 0.86);
  }

  .image-info div {
    margin-top: 0.2em;
  }

  .top-menu {
    display: inline-flex;
  }

  .top-menu a {
    color: rgb(255, 255, 255);
    text-decoration: none;
    padding: 10px;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
      "Lucida Sans", Arial, sans-serif;
    font-weight: bolder;
    width: 40%;
    font-size: larger;
    /* transition effect */
    transition: 0.5s;
  }

  /* top menu hover animation */
  .top-menu a:hover {
    color: rgba(255, 255, 255, 0.664);
    text-decoration: none;
    padding: 10px;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
      "Lucida Sans", Arial, sans-serif;
    font-weight: bolder;
    width: 40%;
    font-size: larger;
    border-radius: 10px;
    scale: 1.1;
  }

  .categories {
    display: inline-block;
    position: relative;
    align-content: center;
  }

  .categories ul {
    list-style: none;
    margin: 0;
    margin-top: 10px;
    padding: 0;
  }

  .categories li {
    position: relative;
    width: 100%;
  }

  .category-link {
    text-decoration: none;
    color: white;
  }

  .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1c2c54;
    padding: 20px;
    display: none;
    border-radius: 10px;
    text-align: left;
    width: 10rem;
    /* transition effect */
    transition: 0.5s;
  }

  .dropdown-menu li {
    margin-bottom: 10px;
  }

  .dropdown-menu a {
    text-decoration: none;
    color: white;
    font-weight: lighter;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
      "Lucida Sans", Arial, sans-serif;
    cursor: pointer;
    /* transition effect */
    transition: 0.5s;
  }

  .categories li:hover .dropdown-menu {
    display: block;
    /* transition effect */
    transition: 0.5s;
  }

  .header {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding: 10px;
    z-index: 10;
    position: relative;
  }

  .gradient-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 20vh;
    background: rgb(22, 22, 22);
    background: linear-gradient(
      180deg,
      rgba(3, 3, 3, 0.87) 10%,
      rgba(51, 49, 49, 0) 100%
    );
    z-index: -1;
  }

  .gradient-line-middle {
    position: absolute;
    width: 100vw;
    height: 20vh;
    background: linear-gradient(
      0deg,
      rgb(0, 0, 0) 25%,
      rgba(10, 10, 18, 0.53) 55%,
      rgba(10, 10, 18, 0.3393732492997199) 74%,
      rgba(10, 10, 18, 0) 100%
    );
    z-index: 2;
    /* move it up little bit */
    transform: translateX(0) translateY(-19vh);
  }

  .image-text-data {
    margin-right: 1rem;
  }

  .ml-2 {
    margin-left: 0.5rem;
  }

  .mt-2 {
    margin-top: 0.5rem;
  }

  .movie-caraousel {
    width: 78vw;
    margin-top: 5rem;
    text-align: left;
    margin-left: 5vw;
    z-index: 5;
  }

  .movie-caraousel h2 {
    font-size: larger;
    margin-top: 2vh;
    margin-bottom: 2vh;
  }

  .movie-card img {
    min-height: 270px;
    min-width: 180px;
    width: 180px;
    height: 270px;
    object-fit: cover;
    border-radius: 10px;
    /* transition effect */
    transition: 0.5s;
    /* undraggable */
    -webkit-user-drag: none;
    /* unclickable */
  }

  .gap {
    gap: 1rem;
  }

  .movie-card {
    cursor: pointer;
    position: relative;
    overflow-y: clip;
    width: 180px;
  }

  .movie-card:hover .movie-info {
    /*Create transition effect of text pop up from bottom */
    display: flex;
    pointer-events: none;
  }

  .movie-card .movie-info {
    animation: slideIn 0.4s ease-out forwards;
    /* Ensure the animation only runs once and stays in the final state */
    animation-fill-mode: forwards;
  }

  .movie-card-text {
    margin-right: 1rem;
    font-weight: bolder;
    z-index: 5;
  }

  .movie-card h3 {
    /* cut text if too long */
    max-width: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .movie-card h3:hover {
    /* animate text sliding, come back from right if no more text */
    animation: slideText 5s linear infinite;
  }

  /* animate text pop up */
  @keyframes slideText {
    0% {
      transform: translateX(0);
    }
    100% {
      transform: translateX(100%);
    }
  }

  @keyframes slideIn {
    0% {
      transform: translateY(100%);
    }
    100% {
      transform: translateY(0);
    }
  }

  .movie-caraousel-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
  }

  .movie-caraousel-container-place {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
  }

  .movie-caraousel-container div {
    /* hide horizontal scrollbar */
    scrollbar-width: none;
  }

  header {
    padding: 10px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    z-index: 5;
  }

  /* add modern looking scrollbar */
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  ::-webkit-scrollbar-track {
    border-radius: 16px;
    background: #f1f1f1;
  }

  ::-webkit-scrollbar-thumb {
    border-radius: 16px;
    background: #5ca6d1;
  }

  .logo-title {
    font-family: "Oswald", serif;
    font-size: 24px;
    font-weight: bold;
    color: #800e0e;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(173, 23, 23, 0.1);
  }
  .logo-container {
    margin-bottom: 60px;
  }
  .flex-col {
    flex-direction: column;
  }

  .movie-card-text {
    /* prevent text overflow */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
  }

  .movie-card-rating {
    /* make it at right*/
    position: absolute;
    right: 6px;
    z-index: 5;
    top: 10px;
    /* make it transparent */
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    padding: 2px;
    width: 60px;
  }
  .watch-later-container {
    /* make it at left*/
    position: absolute;
    left: 6px;
    z-index: 5;
    top: 10px;
    /* make it transparent */
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    padding: 2px;
    width: 40px;
    /* align content to center */
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .popup-container {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    color: whitesmoke;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 20px;
    border-radius: 10px;
    border-radius: 5px;
    z-index: 5;
    width: 15rem;
    height: 6rem;
  }
  .popup-container {
    animation: showPopup 0.5s ease-in-out;
  }
  @keyframes showPopup {
    0% {
      transform: translateY(100%);
    }
    100% {
      transform: translateY(0);
    }
  }

  .hidden {
    animation: hidePopup 0.5s ease-in-out;
  }
  @keyframes hidePopup {
    0% {
      transform: translateY(0);
    }
    100% {
      transform: translateY(100%);
    }
  }

  .popup-container button {
    position: absolute;
    top: 0;
    right: 7px;
    padding: 2px;
    color: whitesmoke;
    border: none;
    border-radius: 5px;
    width: 20px;
    height: 10px;
    scale: 1.5;
  }

  .popup-container p {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 20px;
    padding: 0;
    color: whitesmoke;
  }

  .detail-info span {
    font-weight: lighter;
    color: #f1f1f1;
  }

  .movie-info {
    position: absolute;
    top: 200px;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 10px;
    color: white;
    display: none;
    transform: translateY(100%);
    animation: slideIn 0.5s ease-in-out;
  }

  .gradient-movie {
    overflow: hidden;
    z-index: 1;
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgb(0, 0, 0);
    background: linear-gradient(
      0deg,
      rgba(0, 0, 0, 1) 43%,
      rgba(0, 0, 0, 0.6867121848739496) 73%,
      rgba(0, 0, 0, 0.3393732492997199) 89%,
      rgba(0, 0, 0, 0) 100%
    );
    pointer-events: none;
  }

  .welcome-container {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 1000; /* Ensure it overlays everything */
    padding: 3rem;

    /* make it sticky */
    position: fixed;
  }
  .welcome-container button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #831818;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  .welcome-title {
    font-size: 3em;
    margin-bottom: 20px;
    font-weight: bolder;
  }

  .welcome-text {
    font-size: 1em;
    max-width: 600px;
  }

  .image-logo-image {
    width: 300px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    /* unselectable */
    user-select: none;
    /*shadow effect */
    box-shadow: 0 0 10px rgba(173, 23, 23, 0.1);
  }

  .image-logo-image:hover {
    cursor: pointer;
    transform: scale(1.1);
    transition: transform 0.5s;
  }

  .featured-tagline {
    font-size: 1.5em;
    margin-bottom: 20px;
    font-style: italic;
  }

  .watch-history-placeholder,
  .watch-list-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 278px;
    background-color: rgba(255, 255, 255, 0.1);
    color: whitesmoke;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 20px;
    border-radius: 10px;
    width: 100%;
  }

  .hidden {
    display: none;
  }
}
