:root {
  --fs-xl: clamp(1.5rem, 5vw, 3rem);
  --fs-700: 1.75rem;
  --fs-500: 1rem;
  --fs-400: 0.875rem;
  --fs-300: 0.75rem;
}


/* ====================
   Base / Reset
   ==================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
h1,
h2,
h3,
p {
  margin: 0;
}

body {
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Outfit', sans-serif;
  font-weight: 200;
  color: #404040;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}


/* ====================
   Typography
   ==================== */

.main-heading {
  font-size: var(--fs-xl);
  line-height: 1;
}

.navigation-tag {
  font-size: var(--fs-400);
  font-weight: 500;
}

.main-heading,
.navigation-tag {
  text-shadow: 0 2px 16px rgba(108, 105, 105, 0.74);
  letter-spacing: 0.03em;
}


/* ====================
   Layout
   ==================== */

.container {
  width: min(100% - 4rem, 800px);
  margin-inline: auto;
}

main {
  background-color: #151313;
  padding-bottom: 2em;
  flex: 1;
}


/* ====================
   Header / Navigation
   ==================== */

header {
  background:
    linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3)),
    url('./assets/banner.png');
  background-size: cover;
  background-position: center;
  height: clamp(140px, 30vh, 300px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.site-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 2.5em;
  padding: 2em 0;
}

.navigation-tag {
  position: relative;
  transition: color 0.2s ease;
}

.navigation-tag::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background-color: #fff;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.navigation-tag:hover::after {
  transform: scaleX(1);
}


/* ====================
   Search Bar
   ==================== */

.search-section {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: 3em;
}

.search-bar {
  background-color: #2E2E2F;
  position: absolute;
  top: -18px;
  width: 100%;
  display: flex;
  border: none;
  border-radius: 8px;
  backdrop-filter: blur(6px);
}

.search-icon {
  color: #fff;
  padding: 0.5em 1em;
}

.search-input {
  flex: 1;
  border: none;
  background-color: #2E2E2F;
  color: #fff;
}

#search-btn {
  cursor: pointer;
  border: none;
  background-color: #4B4B4B;
  border-radius: 0 7px 7px 0;
  width: 90px;
  color: #fff;
  transition:
    background-color 0.2s ease,
    transform 0.15s ease;
}

#search-btn:hover {
  background-color: #5c5c5c;
}

#search-btn:active {
  transform: scale(0.97);
}


/* ====================
   Empty / Status States
   ==================== */

.shows-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 55vh;
}

.no-data-message {
  align-self: center;
  color: #bdbdbd;
  text-align: center;
}

.movie-icon-div,
.watchlist-icon-div {
  opacity: 0.5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.film-icon {
  width: 50px;
}


/* ====================
   Show Cards
   ==================== */

.show-card {
  color: #fff;
  display: flex;
  gap: 1em;
  margin-top: 1em;
  padding-bottom: 1em;
  border-bottom: 1px solid #313131;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.show-card:hover {
  transform: translateY(-2px);
  border-color: #4a4a4a;
}

.show-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-size: var(--fs-300);
  gap: 0.5em;
  min-width: 0;
}

.show-card-img {
  width: 80px;
  height: 100%;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.show-card:hover .show-card-img {
  transform: scale(1.02);
  opacity: 0.95;
}

.title-div {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.5em;
}

.show-title {
  font-size: var(--fs-500);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rating-div {
  display: flex;
  flex-shrink: 0;
  gap: 5px;
  width: 30px;
}

.rating-icon {
  width: 10px;
}

.show-details {
  display: flex;
  gap: 1em;
}

.media-type-span::first-letter {
  text-transform: capitalize;
}

.genres-span,
.show-overview {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.genres-span {
  -webkit-line-clamp: 1;
}

.show-overview {
  -webkit-line-clamp: 4;
}


/* ====================
   Buttons / Interactive States
   ==================== */

.action-btn {
  cursor: pointer;
  border: solid 1px #313131;
  padding: 0.35em 0.75em;
  border-radius: 25px;
  background-color: #151313;
  color: #fff;
  margin-left: 0;
  margin-right: auto;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
}

.action-btn:hover {
  background-color: #262626;
}

.action-btn:active {
  transform: scale(0.96);
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.action-btn:disabled:hover {
  background-color: #151313;
  transform: none;
}

.saved {
  background-color: #1f5132;
  color: #d7ffe3;
}

.removed {
  background-color: #5a1f1f;
  color: #ffd6d6;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid #7aa2ff;
  outline-offset: 2px;
}


/* ====================
   Footer
   ==================== */

footer {
  background-color: #151313;
  color: #bdbdbd;
  border-top: 1px solid #313131;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  align-items: center;
  text-align: center;
  padding: 1.5em 0;
  font-size: var(--fs-300);
}

.footer-title {
  font-weight: 600;
  margin-bottom: 0.25em;
}

.footer-text {
  max-width: 45ch;
  line-height: 1.5;
}

.tmdb-logo {
  width: 55px;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.tmdb-logo:hover {
  opacity: 1;
}


/* ====================
   Media Queries
   ==================== */

@media (min-width: 600px) {
  .site-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    padding: 2em 0;
  }

  .footer-container {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}