@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Londrina+Outline&family=Londrina+Solid:wght@100;300;400;900&display=swap');
/* ---------------------------------------------------------------------------
   Colour Palette — Blockbuster-inspired
   --------------------------------------------------------------------------- */

:root {
  /* Core brand */
  --blue-dark:        #0e1442;
  --blue-mid:    #1a2270;
  --blue-light:  #2b3591;

  /* Yellow */
  --yellow-warm: #ffbe00;

  /* Neutrals */
  --off-white:       #f2efef;

  /* Typography */
  --font-display: 'Londrina Outline', sans-serif;
  --font-body:    'Inter', serif;

  --text-xs:   0.85rem;
  --text-base: 1rem;
  --text-l: 1.5rem;
  --text-xl:   2rem;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-base:  1rem;
  --space-xl:  2rem;

  /* Misc */
  --radius-sm: 2px;
  --radius:    4px;
  --radius-lg: 8px;
}
 
/* ---------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------- */

#app {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: vw;
}
header {
    width: 80%;
    align-items: center;
    text-align: center;
    display: flex;
    flex-direction: column;
    margin: var(--space-xl);
}

#attribution {
  font-family: var(--font-body);
  font-size: small;
  width: 80%;
  max-height: 20px;
  text-transform: lowercase;
}

#attribution-logo {
  max-height: 10px;
}

.screen {
    width: 80%;
}

#site-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 48pt;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

h2 {
    font-family: 'Londrina Solid', sans-serif;
    text-transform: uppercase;
    font-size: var(--text-xl) !important;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
}

button {
    border: 1px solid black;
    background-color: black;
    color: white;
    border-radius: var(--radius);
    height: var(--text-xl);
    flex-grow: 1;
    text-transform: lowercase;
}

button:hover {
    cursor: pointer;
    background-color: white;
    color: black;
}

button:disabled {
  background-color: #999;
  border-color: #999;
  color: white;
  cursor: default;
}

button:disabled:hover {
  background-color: #999;
  color: white;
}


select, input {
    height: var(--text-xl);
    flex-grow: 2;
    cursor: pointer;
    box-sizing: border-box;
}

.control-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 0 var(--space-xs);
    width: 100%;
    line-height: 0;
}

.fork-btn {
    width: 100%;
}

/* ---------------------------------------------------------------------------
   Search result items
   --------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------------
   Search result items
   --------------------------------------------------------------------------- */

.result-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-base);
}

#results-list,
#drawer-selected-list,
#modal-similar-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
  margin: var(--space-xl) 0;
}

.result-left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-xs);
  flex-shrink: 0;
  width: 92px;
}

.result-poster {
  width: 92px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}

.result-poster--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: #999;
  background: #f2f2f2;
}

.result-right {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
}

.result-title {
  font-family: 'Londrina Solid', sans-serif;
  text-transform: uppercase;
  font-size: var(--text-l);
  font-weight: 400;
  margin: 0;
}

.result-year {
  font-size: var(--text-xs);
  color: #666;
  margin: 0;
}

.overview {
  margin: 0;
  font-size: var(--text-xs);
}

.btn-overview-toggle {
  background: none;
  border: none;
  border-bottom: 1px solid black;
  color: black;
  font-size: var(--text-xs);
  padding: 0;
  height: auto;
  width: auto;
  flex-grow: 0;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0;
  align-self: flex-start;
}

.btn-overview-toggle:hover {
  background: none;
  color: #999;
}

#discovery-nav{
    width: 60%;
}

button.nav-active {
  background-color: white;
  color: black;
}

/* ---------------------------------------------------------------------------
   Swipe Filters
   --------------------------------------------------------------------------- */

#swipe-filters {
  background: black;
  color: white;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  width: 100%;
  box-sizing: border-box;
}

#swipe-filters h2 {
  color: white;
  margin-top: 0;
  margin-bottom: var(--space-base);
}

.filter-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-base);
  margin-bottom: var(--space-base);
}

.filter-label {
  width: 80px;
  flex-shrink: 0;
  padding-top: 2px;
}

#swipe-filter-type {
  display: flex;
  flex-direction: row;
  gap: var(--space-base);
}

#swipe-filter-type label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
}

#swipe-filter-genres {
  flex: 1;
}

#genre-checkboxes {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
}

#genre-checkboxes label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
  white-space: nowrap;
}

#genre-limit-notice {
  color: #ffbe00;
  font-size: var(--text-xs);
  margin: 0 0 var(--space-xs) 0;
}

.filter-divider {
  border: none;
  border-top: 1px solid white;
  margin: var(--space-base) 0;
}

.filter-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.filter-shuffle {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
}

#btn-apply-filters {
  flex-grow: 0;
  border-radius: 999px;
  padding: 0 var(--space-xl);
  background: white;
  color: black;
  border-color: white;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.05em;
}

#btn-apply-filters:hover {
  background: #ddd;
  color: black;
}

#drawer-selected {
    width: 80%;
}

#drawer-selected-list .result-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-base);
}

#drawer-selected-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-base);
  margin: var(--space-xl) 0;
}

.btn-remove {
  background-color: #c0392b;
  border-color: #c0392b;
}

.btn-remove:hover {
  background-color: white;
  color: #c0392b;
  border-color: #c0392b;
}

.btn-similar {
  background: white;
  color: black;
  border: 1px solid black;
  font-size: var(--text-xs);
}

.btn-similar:hover {
  background: black;
  color: white;
}

#swipe-filters-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
}

#swipe-filters-body {
  display: none;
  margin-top: var(--space-base);
}

#swipe-filters-body.open {
  display: block;
}


#swipe-card {
  display: flex;
  flex-direction: row;
  gap: var(--space-base);
  align-items: flex-start;
  margin-bottom: var(--space-xl);
}

.swipe-card-left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-xs);
  flex-shrink: 0;
  width: 120px;
}

.poster-slot {
  position: relative;
  width: 120px;
  aspect-ratio: 2 / 3;
}

.poster-slot img,
.poster-slot #card-no-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
}

#card-poster {
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid #ccc;
  display: block;
}

#card-no-poster {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: #999;
  background: #f2f2f2;
  border-radius: var(--radius-lg);
}

#swipe-controls {
  display: flex;
  flex-direction: row;
  gap: var(--space-xs);
}

#swipe-controls button {
  flex: 1;
}

.swipe-card-right {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex: 1;
}

.swipe-card-right h3 {
  margin: 0;
  font-family: 'Londrina Solid', sans-serif;
  font-size: var(--text-l);
  text-transform: uppercase;
}

#card-year {
  margin: 0;
  font-size: var(--text-xs);
  color: #666;
}

#card-genres {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

#card-genres span {
  background: #e0e0e0;
  color: #333;
  font-size: var(--text-xs);
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#card-no-poster[hidden] {
  display: none;
}

/* ---------------------------------------------------------------------------
   Results — card grid
   --------------------------------------------------------------------------- */

.result-service {
  margin-bottom: var(--space-xl);
}

.result-card-row {
  display: flex;
  flex-direction: row;
  gap: var(--space-base);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
}

.result-card-row .result-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
  width: 120px;
  gap: var(--space-xs);
}

.result-card-row .result-left {
  width: 120px;
}

.result-card-row .result-poster {
  width: 120px;
}

.result-card-poster--empty,
.result-poster--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: #999;
  background: #f2f2f2;
}

.result-card--unavailable .result-poster {
  opacity: 0.35;
}

.result-card--unavailable .result-title {
  color: #999;
}

.result-card-stars {
  display: flex;
  flex-direction: row;
  gap: 1px;
  line-height: 1;
}

.star {
  font-size: 1rem;
  color: #ccc;
}

.star.full {
  color: var(--yellow-warm);
}

.star.half {
  position: relative;
  display: inline-block;
  color: #ccc;
}

.star.half::before {
  content: '★';
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: var(--yellow-warm);
}

.result-card-meta {
  font-size: var(--text-xs);
  color: #666;
  margin: 0;
}

#results-sort {
  margin-bottom: var(--space-base);
  gap: var(--space-xs);
  align-items: center;
}

#results-sort label {
  flex-shrink: 0;
  flex-grow: 0;
}

#results-sort select {
  flex-grow: 0;
  min-width: 160px;
}

#screen-results:not([hidden]) {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#results-nav{
    width: 80%;
}

a {
    color: black;
}

footer {
    font-size: var(--text-xs);
    text-align: center;
    margin-top: var(--space-xl);
}

.nav-split {
  border: none;
  border-left: 1px solid black;
  align-self: stretch;
  margin: 0;
  width: 0;
}

/* ---------------------------------------------------------------------------
   Similar titles modal
   --------------------------------------------------------------------------- */

#modal-similar {
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
}

#modal-similar:not([hidden]) {
  display: flex;
}

#modal-similar-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

#modal-similar-content {
  position: relative;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-sizing: border-box;
}

#modal-similar-content .control-row {
  margin-bottom: var(--space-base);
}

#modal-similar-title {
  flex-grow: 1;
  margin: 0;
}

#modal-similar-close {
  flex-grow: 0;
  width: var(--text-xl);
}

@media (max-width: 768px) {
  .control-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-xs);
  }

  .nav-split {
    border: none;
    border-bottom: 1px dotted black;
    width: 100%;
    height: 0;
    margin: 0;
    align-self: auto;
  }

  #modal-similar-content {
    width: 92%;
  }
  
}