@font-face {
  font-family: "UI Sans";
  src: url("https://assets.ecomm.ui.com/static/fonts/ui-sans-v9-light.woff2")
    format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "UI Sans";
  src: url("https://assets.ecomm.ui.com/static/fonts/ui-sans-v9-regular.woff2")
    format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "UI Sans";
  src: url("https://assets.ecomm.ui.com/static/fonts/ui-sans-v9-medium.woff2")
    format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "UI Sans";
  src: url("https://assets.ecomm.ui.com/static/fonts/ui-sans-v9-bold.woff2")
    format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "UI Sans";
  src: url("https://assets.ecomm.ui.com/static/fonts/ui-sans-v9-black.woff2")
    format("woff2");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("https://assets.ecomm.ui.com/_next/static/media/InterVariable.0336a89f.woff2")
    format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-ui-sans: "UI Sans", Inter, Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --type-title-md: 30px;
  --type-body-lg: 15px;
  --type-label: 13px;
  --tracking-tight: -0.02em;
  --brand-accent: #167c68;
  --brand-accent-soft: #dcefe9;
  --brand-accent-deep: #0f5f52;
}

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

[hidden] {
  display: none !important;
}

html {
  height: 100%;
  overflow: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  background: #f5f6f7;
  color: #111827;
  font-family: var(--font-ui-sans);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
  font-feature-settings: "liga", "clig" off;
  font-variant-ligatures: no-common-ligatures;
  text-rendering: optimizeLegibility;
}

body::-webkit-scrollbar {
  width: 10px;
}

body::-webkit-scrollbar-track {
  background: transparent;
}

body::-webkit-scrollbar-thumb {
  background-color: #cfcfcf;
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

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

p,
h1,
h2 {
  margin: 0;
}

h1,
h2 {
  font-weight: 600;
  letter-spacing: var(--tracking-tight);
}

.app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f6f7;
}

.topnav {
  width: 100%;
  min-height: 60px;
  background-color: var(--brand-accent);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
}

.topnav-inner {
  max-width: 1440px;
  min-height: 60px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topnav-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  line-height: 1;
}

.topnav-logo-icon {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
}

.topnav-logo-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.topnav-logo-title {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: var(--tracking-tight);
}

.topnav-logo-signature {
  color: #d8eee8;
  font-size: 12px;
  line-height: 1.1;
  font-weight: 500;
}

.topnav-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.topnav-link {
  border: none;
  background: transparent;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
  cursor: pointer;
}

.topnav-link:hover,
.topnav-link-active {
  color: #ffffff;
}

.topnav-account {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  min-width: 0;
}

.topnav-user-email {
  max-width: 320px;
  color: #e5f3f1;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topnav-user-name {
  color: #ffffff;
  font-weight: 700;
}

.topnav-user-status {
  color: #d7ebe7;
}

.search-strip {
  width: 100%;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.search-strip-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 9px 24px;
}

.search-strip-outer {
  position: relative;
  width: 100%;
}

.search-strip-form {
  display: flex;
  align-items: center;
  width: 100%;
  height: 40px;
  padding: 0 8px 0 0;
  background-color: transparent;
  border: none;
}

.search-strip-icon {
  width: 36px;
  text-align: center;
  font-size: 16px;
  color: #9ca3af;
}

.search-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

.search-strip-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 16px;
  color: #8a8a8a;
  font-weight: 400;
  font-style: italic;
  background-color: transparent;
  font-family: var(--font-ui-sans);
}

.search-strip-input::placeholder {
  color: #b0b0b0;
  font-style: italic;
}

.search-clear-button {
  border: none;
  background: transparent;
  font-size: 18px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0 4px;
}

.search-clear-button:hover {
  color: #4b5563;
}

.search-dropdown {
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  overflow: hidden;
  background-color: #ffffff;
  border-top: 1px solid #e5e5e5;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  z-index: 999;
}

.search-dropdown-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  margin: 0;
  border: none;
  border-bottom: 1px solid #e5e5e5;
  background: #ffffff;
  cursor: pointer;
  font-family: var(--font-ui-sans);
}

.search-dropdown-item:last-child {
  border-bottom: none;
}

.search-dropdown-item:hover {
  background: #f5f5f5;
}

.search-dropdown-title {
  font-size: 18px;
  font-weight: 400;
  color: #0f172a;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-dropdown-name {
  font-weight: 700;
}

.search-dropdown-search {
  font-size: 18px;
  font-weight: 400;
  color: #111827;
}

.search-dropdown-search-q {
  color: #6b7280;
  font-style: italic;
}

.search-dropdown-in,
.search-dropdown-year {
  color: #64748b;
  font-weight: 400;
}

.page-shell {
  max-width: 1440px;
  margin: 24px auto 24px;
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1 0 auto;
}

.results-panel {
  min-width: 0;
}

.movie-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.movie-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.movie-poster-wrap {
  min-width: 0;
}

.movie-poster,
.poster-placeholder {
  width: 88px;
  height: 132px;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  background: #e5e7eb;
}

.poster-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.movie-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.movie-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.movie-title {
  color: #111827;
  font-size: 22px;
  line-height: 22px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

.movie-date {
  color: rgba(0, 0, 0, 0.5);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
}

.movie-overview {
  color: rgba(0, 0, 0, 0.68);
  font-size: 14px;
  line-height: 1.6;
}

.movie-overview-meta {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.browse-page-hero {
  margin: 0 0 24px;
  padding: 28px 30px;
  border: 1px solid #e4e8ee;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 249, 252, 0.96) 100%);
}

.browse-page-kicker {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5);
}

.browse-page-title {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #111827;
}

.browse-page-copy {
  margin: 14px 0 0;
  max-width: 760px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(0, 0, 0, 0.72);
}

.browse-page-message {
  margin: 0 0 24px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid #e4e8ee;
  background: #ffffff;
  color: rgba(0, 0, 0, 0.72);
}

.browse-page-message-error {
  color: #8f1d2c;
  border-color: rgba(143, 29, 44, 0.16);
  background: rgba(255, 246, 247, 0.96);
}

.home-page {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.home-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-kicker {
  color: var(--brand-accent);
  font-size: 12px;
  line-height: 14px;
  font-weight: 500;
}

.home-title {
  font-size: var(--type-title-md);
  line-height: 32px;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.85);
}

.home-copy {
  max-width: 56rem;
  color: rgb(0 0 0 / 0.65);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

.home-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.home-shelf {
  padding: 22px 22px 20px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.home-shelf-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.home-shelf-heading-side {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.home-shelf-title {
  color: rgba(0, 0, 0, 0.85);
  font-size: 24px;
  line-height: 26px;
  font-weight: 700;
}

.home-shelf-copy {
  margin-top: 6px;
  color: rgb(0 0 0 / 0.65);
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

.home-shelf-count {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.home-shelf-grid-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 28px) / 3);
  overflow-x: auto;
  overflow-y: hidden;
  align-items: stretch;
  gap: 14px;
  padding-top: 2px;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.home-shelf-grid-scroll::-webkit-scrollbar {
  height: 10px;
}

.home-shelf-grid-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.home-shelf-grid-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.home-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
  transition:
    transform 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease;
}

.home-card:hover {
  transform: translateY(-1px);
  border-color: #d9e3ec;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.home-card-poster-wrap {
  min-width: 0;
}

.home-card-poster-placeholder {
  width: 88px;
  height: 132px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.home-card-poster-placeholder-forest {
  background: linear-gradient(180deg, #1c564b 0%, #113a33 100%);
}

.home-card-poster-placeholder-slate {
  background: linear-gradient(180deg, #384353 0%, #1c2430 100%);
}

.home-card-poster-placeholder-gold {
  background: linear-gradient(180deg, #b78b2f 0%, #6b4f16 100%);
}

.home-card-poster-placeholder-plum {
  background: linear-gradient(180deg, #6d3d68 0%, #341c3d 100%);
}

.home-card-poster-placeholder-crimson {
  background: linear-gradient(180deg, #9b2f42 0%, #541523 100%);
}

.home-card-poster-placeholder-ash {
  background: linear-gradient(180deg, #6f7178 0%, #393c44 100%);
}

.home-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-card-kicker {
  color: var(--brand-accent);
  font-size: 12px;
  font-weight: 500;
  line-height: 14px;
  margin-bottom: 1px;
}

.home-card-title-row {
  display: block;
  min-width: 0;
  transform: translateY(2px);
}

.home-card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  color: rgba(0, 0, 0, 0.85);
  font-size: 22px;
  line-height: 22px;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

.home-card-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-card-platform-pill {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
}

.home-card-platform-pill-console {
  background: var(--brand-accent);
  color: #ffffff;
}

.home-card-platform-pill-disc {
  background: #111827;
  color: #ffffff;
}

.home-card-platform-pill-handheld {
  background: #f3f4f6;
  color: #374151;
}

.home-card-platform-pill-list {
  background: #eef6f3;
  color: var(--brand-accent-deep);
}

.home-card-meta {
  color: rgb(128, 136, 147);
  font-size: 13px;
  line-height: 14px;
  font-weight: 400;
  transform: translateY(2px);
}

.home-card-copy {
  color: rgba(0, 0, 0, 0.65);
  font-size: 14px;
  line-height: 18px;
  font-weight: 400;
  transform: translateY(3px);
}

.home-card-copy-clamped {
  position: relative;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  max-height: 54px;
}

.home-card-copy-faded::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34%;
  height: 18px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #ffffff 78%);
  pointer-events: none;
}

.home-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

.home-card-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 600;
}

.home-card-status-watch {
  background: #eef8fc;
  color: var(--brand-accent);
}

.home-card-status-watched {
  background: #ecfdf5;
  color: #166534;
}

.home-card-date {
  color: rgba(0, 0, 0, 0.65);
  font-size: 13px;
  font-weight: 500;
  line-height: 14px;
}

@media (max-width: 900px) {
  .topnav-inner {
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .topnav-nav,
  .topnav-account {
    width: 100%;
    justify-content: center;
  }

  .home-shelf-grid-scroll {
    grid-auto-columns: minmax(280px, 84vw);
  }
}

@media (max-width: 560px) {
  .topnav-inner {
    padding: 10px 12px;
    gap: 8px 10px;
  }

  .topnav-logo-icon {
    width: 38px;
    height: 38px;
  }

  .topnav-logo-title {
    font-size: 18px;
  }

  .topnav-logo-signature {
    font-size: 10px;
  }

  .topnav-link {
    font-size: 13px;
  }

  .search-strip-inner {
    padding: 8px 12px;
  }

  .page-shell {
    padding: 0 12px 20px;
  }

  .home-shelf {
    padding-left: 14px;
    padding-right: 14px;
  }

  .home-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 11px;
  }

  .home-card-poster-placeholder {
    width: 72px;
    height: 108px;
  }

  .home-card-title {
    font-size: 19px;
    line-height: 22px;
    display: flex;
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .home-card-title-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .movie-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 11px;
  }

  .movie-poster,
  .poster-placeholder {
    width: 72px;
    height: 108px;
  }

  .movie-title {
    font-size: 19px;
    line-height: 22px;
  }

  .movie-header {
    flex-direction: column;
    gap: 4px;
  }

  .browse-page-hero {
    padding: 20px;
  }
}
