/* ========== Base/Reset Styles ========== */
*,
*::after,
*::before {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
/* ========== CSS Variables ========== */
:root {
  --bg-light: #ffffff;
  --bg-dark: #121212;
  --border-clr: #d1d5db;
  --light-text: #dfdddd;
}

body {
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  max-width: 550px;
  margin: 0 auto;
  background: var(--bg-light);
}

/* typography */
h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 40px;
  letter-spacing: -0.045em;
}

header a, .linkadd {
  font-size: 0.875rem;
  line-height: 20px;
  text-align: right;
  text-decoration: none;
  color: inherit;
}
.movies i, .movies .cta{
  color: var(--light-text);
}
.movies i {
  font-size: 4.3rem;
}
.movies .cta {
  font-size: 1.125rem;
  margin-top: 9px;
}
header a, 
.movies .cta, 
.linkadd {
  font-weight: 700;
}
.linkadd {
text-align: center;
color: #363636;
}
.addcontainer {
  margin-top:15px;
}
/* ==========
    LAYOUT
   ========== */

/* flex center containers */
header, 
.searchbar,
.movies,
.movie-data, 
.movie-info .row {
  display:flex;
  align-items: center;
}

/* header */

header {
  position: relative;
  z-index: 1;
  background-color: var(--primary-black);
  background: url("./assets/header.jpg") no-repeat center center;
  background-size: cover;
  background-position: 30% 30%;
  height: 208px;
  color: white;
  justify-content: space-between;
  gap: 10px;
  padding: 45px;
}

header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.712);
  z-index: -1;
}

/* search bar */
.searchbar {
  border: 1px solid var(--border-clr);
  background-color: var(--bg-light);
  box-shadow: 0px 1px 2px 0px #0000000d;
  border-radius: 6px;
  width: 84%;
  height: 38px;
  padding: 10px 0px 10px 13px;
  margin: -20px auto 0px;
  gap: 8px;
  z-index: 999;
  position: relative;
}
.fa-magnifying-glass {
  color: #9CA3AF;
}
.searchbar input {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  border: none;
  outline: none;
  flex: 1;
  background-color: transparent;
}
.searchbtn {
  border: 1px solid var(--border-clr);
  background-color:#F9FAFB;
  color: #374151;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  border-right: none;
  width: 120px;
  height: 38px;
  padding: 10px 20px;
  border-radius: 0px 6px 6px 0px;
  cursor: pointer;
}

/* movies container */
.movies {
  justify-content: center;
  flex-direction: column;
  height: calc(100vh - 226px);
  width: 84%;
  margin: 0 auto;
}
.showresult {
  height: calc(100% - 226px);
}
/* dynamically inserted movie data */
.movie-data {
  width: 100%;
  min-height: 147.41px;
  gap: 21px;
  box-sizing: content-box;
  padding:21px 0px;
  border-bottom: 1px solid var(--border-clr);
}
.movie-data:last-child {
  border-bottom: none;
}
.movie-data img {
  width: 100px;
  height: 147.1px;
  border-radius: 2.33px;
  object-fit: contain;
}
.row1 {
  gap: 7px;
  margin-bottom:11px;
}
.row2 {
  gap: 16px;
  margin-bottom:8px;
}
/* icons */
i.fa-star {
  color: rgb(235, 206, 19);
  font-size: 0.937rem;
}
i.fa-circle-plus , i.fa-circle-minus{
  font-size: 1rem;
  margin: 0px 5px 0px 2px;
  color: #111827;
}
.btn {
  background: none;
  border: none;
}
.movie-info h2 {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 20px;
}
.movie-info span,
.row2 p {
  font-size: 0.75rem;
  line-height: 20px;
}
.movie-info > p {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 20px;
}

/* ==========
    MEDIA QUERIES
   ========== */
@media (min-width: 550px) {
  body {
    max-width: 100vw;
  }
  /* typography */
  h1 {
    font-size: 2.8rem;
  }
  /* layout */
  header {
    padding: 80px;
    background-position: 30% 22%;
  }
}
/* Color Schemes */
@media(prefers-color-scheme:dark){
  :root {
    --border-clr: #2C2C2C;
    --light-text: #2E2E2F;
  }
    body{
        background-color: var(--bg-dark);
        color:white;
    }
    .searchbtn {
      background-color:#4B4B4B;
    }
    .searchbar {
      background-color: var(--light-text);}
    
      .searchbar input, .movie-info>p
      {
        color:#A5A5A5;
    
      }
    .movie-data {
      border-bottom: 1.5px solid var(--border-clr);
    }
    .linkadd,
    .btn, 
    .searchbtn,
    i.fa-circle-plus, 
    i.fa-circle-minus{
      color:inherit;
    }
}

