:root {
  --primary-color: #070412;
  --secondary-color: #414141;
  --secondary-color-light: #6b6b6b;
  --accent-color: #00cc66;
  --secondary-gradient: linear-gradient(90deg, #0066ff, #0099cc);
  --primary-gradient: linear-gradient(90deg, #1b111f, #003333);
  --primary-gradient-opacity: linear-gradient(90deg, #1b111f80, #00333380);
  --white: #ffffff; 
}
.dark-theme {
  --primary-color: #b8e6bb;
  --secondary-color: #c6c6c6;
  --secondary-color-light: #e3e3e3;
  --accent-color:  #008442;
  --secondary-gradient: linear-gradient(90deg, #0066ff, #0099cc);
  --primary-gradient: #ffffff;
  --primary-gradient-opacity: linear-gradient(90deg, #1b111f4a, #0033334d);
  --white: #070412;
}
* {
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body {
  background: var(--primary-gradient);
  align-items: center;
}


/* Styling the Welcome page */
.flex-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

#video-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--primary-gradient-opacity);
}

video {
  object-fit: cover;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}

.flex-item {
  display: flex;
  position: absolute;
  top: 50%; 
  left: 50%; 
  transform: translate(-50%, -50%); 
  z-index: 1; /* Bring it to the front */
  align-items: center;
  justify-content: space-around;
  background: var(--primary-gradient);
  width: 70vw;
  border-radius: 50px;
}

.flex-item img {
  width: 30vw;
  height: auto;
  padding: 38px 0;
  box-shadow: 20px -0px 20px rgba(0, 0, 0, 0.4);
}

.text-container {
  display: flex;
  flex-direction: column;
  width: 100%; 
  padding: 40px;
  color: var(--white);
  border-left: 3px solid var(--accent-color);
}

.text-container h1, .text-container p, .text-container button {
  margin-bottom: 20px;
}

.text-container button {
  font-size: 1rem;
  width: 100%; 
  padding: 10px;
  border:none;
  color: var(--white);
  border-radius: 10px;
  background-color: var(--secondary-color);
  transition: background-color 0.3s;
}

.text-container button:hover {
  background-color: var(--secondary-color-light); 
}

/* -------------------------------- */
/* Styling the Search page */

/* ---------- Header */

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
  background-color: var(--primary-color);
}

.header-logo {
  margin-left: 50px;
  width: 10vw;
}

.log-in-container {
  width: 400px;
  height: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-right: 50px;
}

.log-in-container img {
  width: 2.5vw;
}

.log-in-container button {
  font-weight: bold;
  border: var(--secondary-color-light);
  border-radius: 5px;
  padding: 10px 20px;
  color: var(--primary-color);
  background-color: var(--accent-color);
  transition: transform 0.2s;
}
.log-in-container button:hover {
  cursor: pointer;
  transform: scale(1.1); 
}


/* -------- Search filed tools */
.search-field{
  display: flex;
  margin: 15px auto; 
  justify-content: space-between;
  align-items: center;
  width: 50%;
}

.search-placeholder {
  display: flex;
  flex: 2;
  justify-content: space-between;
  background-color: var(--secondary-color-light);
  border-radius: 20px;
  padding: 10px 20px;
  margin-right: 10px;
}

.search-placeholder input {
  width: 90%;
  font-weight: bold;
  color: var(--white);
  border: none;
  background-color: transparent;
  outline: none;
}

.search-placeholder input::placeholder {
  color: var(--white);
}

.search-placeholder img {
  margin-left: 10px;
  width: 1.5vw;
  height: 1.5vw;
}

.search-field button,
.search-field select {
  flex: 1;
  font-weight: bold;
  border: 2px solid transparent;
  border-radius: 5px;
  padding: 10px 0;
  margin-left: 1vw;
  color: var(--white);
  background-color: var(--secondary-color);
  transition: background-color 0.3s;
}

.search-field button:hover {
  background-color: var(--secondary-color-light); 
  border: 2px solid var(--accent-color);
}

/* -------- Result(movie title search or browsing)  */
.result {
  display: flex;
  justify-content: center;
  background-color: #00333340;
  color: var(--white);
  margin: 30px auto;
  padding: 30px 100px;
}

.info {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30%;
  margin-right: 00px;
}

.rating {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.rating img {
  margin-right: 10px;
  max-width: 25px;
}

.info-1 p {
  margin-bottom: 10px; 
}

strong {
 color: var(--accent-color);
}

.poster {
  margin-left: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 30px;
}

.poster button {
  color: var(--primary-color);
  background-color: var(--accent-color);
  border: none;
  width: 50%;
  margin-top: 5px;
  border-radius: 5px;
  transition: transform 0.3s;
}
.poster button:hover {
  cursor: pointer;
  transform: scale(1.2); 
}
 
 /* --------- Styling the browse result */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
}

/* Style for each poster image */
.poster-container img {
  max-width: 100%; 
  height: auto;
  border-radius: 20px;
  transition: transform 0.3s, opacity 0.3s;
  cursor: pointer;
}
.poster-container img:hover {
  transform: scale(1.06); 
  opacity: 0.7; 
}


/* Style Favorite list */
.favorite {
  color: var(--white);
  display: flex;
  margin: 10px auto;
  padding: 20px 50px;
  width: 60%;
  max-height: 10vh;
}

.favorite h1 {
  margin: 30px auto;
  text-align: center;
}

.empty-folder {
  max-width: 150px;
  height: auto;
  display: block;
  margin: 80px auto;
}

.favorite-movie {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px auto;
  font-size: 1rem;
  padding: 10px 0;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--accent-color);
  max-height: 10vh;
}

.favorite-movie img {
  max-width: 60px;
  border-radius: 10px;
}

/* --------------------------------------- */
/* Media query for screens up to 780px */

/* ----Styling the Welcome page */
@media (max-width: 780px) {
  .flex-item {
    flex-direction: column;
    width: 400px;
    padding: 20px;
  }
  .flex-item img {
    max-width: 50vw;
    width: 300px;
    box-shadow: none;
  }
  .text-container button{
    margin: 0 auto;
    font-size: 1rem;
    width: 50%;
  }
  .text-container {
    text-align: center;
    border-left: none;
    width: 80%;
    padding: 15px;
    border-top: 3px solid var(--accent-color);
  }

  /* ----Styling the header */
  .header {
    flex-direction: column;
  }
  .header-logo {
    margin: 0;
    width: 20vw;
    height: auto;
  }
  .log-in-container {
    width: 60%;
    padding: 5px 10px;
    margin: 0;
    height: auto;
    border-bottom: 2px solid var(--accent-color);
  }
  .log-in-container button {
    border-radius: 10px;
    padding: 5px 10px;
  }

  /* -------- Search filed tools */
  .search-field {
    justify-content: space-between;
    width: 80%;
  }
  .search-placeholder img {
    width: 2.5vw;
    height: 2.5vw;
  }
  
  
  /* -------- Result(movie title search or browsing)  */
  .result {
    flex-direction: column;
    align-items: center;
    margin: 10px auto;
    padding: 30px 50px;
  }
  .info {
    width: 80%;
    margin-bottom: 20px;
   }
   .poster {
    margin: 0 auto;
    border-radius: 50px;
  }
  /* ----Styling the browsing movies grid */

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
}