:root {
  color-scheme: dark;
  --bg: #11100f;
  --surface: #191817;
  --surface-raised: #201f1d;
  --border: #302e2a;
  --text: #f4f0e9;
  --muted: #9c9890;
  --faint: #69665f;
  --accent: #e7a66e;
  --accent-strong: #f0b37b;
  --green: #a7ba9b;
  --font: "DM Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse at 87% 7%, rgba(107, 80, 52, .12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.topbar {
  height: 74px;
  padding: 0 max(6.7vw, calc((100vw - 1200px) / 2));
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; letter-spacing: -.5px; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent); color: #20160f; font-family: Georgia, serif; font-size: 21px; font-weight: bold; }
.topnav { display: flex; align-items: center; gap: 34px; height: 100%; }
.nav-link { color: var(--muted); font-size: 12px; transition: color .2s ease; }
.nav-link:hover, .nav-link.active { color: var(--text); }
.nav-count { margin-left: 5px; color: var(--accent); }
.account-actions { display: flex; align-items: center; gap: 16px; }
.account-link { max-width: 180px; overflow: hidden; color: var(--accent); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.account-link:hover, .logout-button:hover { color: var(--accent-strong); }
.logout-button { padding: 6px 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.logout-button:disabled { opacity: .6; cursor: wait; }

main { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.hero { position: relative; min-height: 316px; display: flex; align-items: center; overflow: hidden; }
.hero-copy { position: relative; z-index: 1; padding: 38px 0 43px; }
.eyebrow, .step-label { color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: 1.45px; }
.sparkle { margin-right: 7px; font-size: 13px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 18px 0 12px; font-size: clamp(42px, 5vw, 58px); font-weight: 500; line-height: 1.04; letter-spacing: -2.7px; }
h1 em, .results-heading h2 em { color: var(--accent); font-family: "Playfair Display", Georgia, serif; font-weight: 600; }
.hero-copy > p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.hero-art { position: absolute; right: 6%; top: 20px; width: 310px; height: 270px; }
.orbit { position: absolute; border: 1px solid rgba(231,166,110,.13); border-radius: 50%; transform: rotate(-24deg); }
.orbit-one { width: 300px; height: 150px; top: 56px; left: 3px; }
.orbit-two { width: 235px; height: 205px; top: 32px; left: 28px; transform: rotate(28deg); }
.film-ticket { position: absolute; width: 119px; height: 157px; left: 101px; top: 51px; background: linear-gradient(148deg, #d3935f, #a8623f); border-radius: 7px; transform: rotate(8deg); box-shadow: 0 20px 60px rgba(0,0,0,.4); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; color: #25170e; }
.ticket-icon { width: 43px; height: 43px; display: grid; place-items: center; padding-left: 3px; border: 1px solid rgba(37,23,14,.5); border-radius: 50%; font-size: 13px; }
.ticket-label { text-align: center; font-size: 9px; font-weight: 700; line-height: 1.6; letter-spacing: 1px; }
.ticket-star { position: absolute; right: 11px; top: 10px; font-size: 14px; }
.floating-note { position: absolute; color: #b7a795; font-family: "Playfair Display", Georgia, serif; font-size: 11px; line-height: 1.35; }
.note-top { right: 0; top: 46px; transform: rotate(7deg); }
.note-bottom { left: 18px; bottom: 36px; transform: rotate(-7deg); }

.discover-panel { border: 1px solid var(--border); border-radius: 12px; background: rgba(25,24,23,.85); padding: 27px 31px 25px; box-shadow: 0 15px 50px rgba(0,0,0,.12); }
.section-heading { display: flex; justify-content: space-between; align-items: center; }
.step-label { color: var(--faint); font-size: 8px; letter-spacing: 1.2px; }
.step-label span { color: var(--accent); margin: 0 3px; }
.section-heading h2, .results-heading h2 { margin: 7px 0 0; font-size: 19px; font-weight: 500; letter-spacing: -.35px; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.text-button span { margin-left: 5px; color: var(--accent); }
.text-button:hover { color: var(--text); }
.mood-list { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.mood-chip { padding: 9px 13px; border: 1px solid #393733; border-radius: 6px; background: #1d1c1a; color: #c5c0b7; cursor: pointer; font-size: 11px; transition: .2s ease; }
.mood-chip span { margin-right: 5px; color: #c6a989; }
.mood-chip:hover { border-color: #8d674a; color: var(--text); }
.mood-chip.selected { border-color: #a47450; background: rgba(231,166,110,.11); color: #f2c69f; }
.mood-chip.selected span { color: var(--accent); }
.genre-selector { margin-top: 15px; border-top: 1px solid #302e2a; }
.genre-selector summary { padding: 13px 0 2px; color: #c5c0b7; cursor: pointer; font-size: 10px; list-style: none; }
.genre-selector summary::-webkit-details-marker { display: none; }
.genre-selector summary span { float: right; color: var(--accent); transition: transform .2s ease; }
.genre-selector[open] summary span { transform: rotate(180deg); }
.genre-selector-content { padding-top: 12px; }
.genre-search-label { display: flex; flex-direction: column; gap: 6px; color: #ded9d1; font-size: 10px; }
.genre-search-label input { height: 36px; padding: 0 10px; border: 1px solid #3a3834; border-radius: 5px; outline: 0; background: #141312; color: var(--text); font-size: 10px; }
.genre-search-label input:focus { border-color: #aa7954; }
.genre-search-label input::placeholder { color: #77736d; opacity: 1; }
.genre-selection-hint { margin: 8px 0; color: #89847c; font-size: 9px; }
.genre-options { max-height: 180px; overflow-y: auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 2px 8px 0; }
.genre-option { padding: 6px 9px; border: 1px solid #393733; border-radius: 14px; background: #1d1c1a; color: #bdb7ad; cursor: pointer; font-size: 9px; }
.genre-option:hover, .genre-option.selected { border-color: #a47450; color: #f2c69f; }
.genre-option.selected { background: rgba(231,166,110,.11); }
.genre-no-results { margin: 5px 0; color: var(--muted); font-size: 9px; }
.genre-selector-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 5px; color: #89847c; font-size: 9px; }
.genre-selector-footer .find-button { min-height: 32px; padding: 0 11px; }
.genre-selector-footer .find-button:disabled { opacity: .5; cursor: not-allowed; }
.divider { height: 1px; position: relative; margin: 22px 0 18px; background: #302e2a; }
.divider span { position: absolute; top: -6px; left: 50%; padding: 0 11px; transform: translateX(-50%); background: var(--surface); color: #77736c; font-size: 8px; letter-spacing: 1px; }
.favorites-form label { display: flex; flex-direction: column; gap: 6px; cursor: text; }
.input-title { color: #ded9d1; font-size: 12px; }
.input-row { height: 44px; margin-top: 11px; display: flex; align-items: center; border: 1px solid #3a3834; border-radius: 6px; background: #141312; transition: border-color .2s; }
.input-row:focus-within { border-color: #aa7954; }
.search-icon { padding: 0 12px 0 14px; color: #8e8980; font-family: Georgia, serif; font-size: 25px; transform: rotate(-15deg); }
.input-row input { min-width: 0; flex: 1; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; }
.input-row input::placeholder { color: #77736d; opacity: 1; }
.find-button { align-self: stretch; margin: 4px; padding: 0 14px; border: 0; border-radius: 4px; background: var(--accent); color: #261a10; cursor: pointer; font-size: 10px; font-weight: 700; transition: background .2s; }
.find-button:hover { background: var(--accent-strong); }
.find-button span { margin-left: 8px; font-size: 14px; }
.input-hint { margin: 8px 0 0; color: #77736d; font-size: 9px; }

.recommendations { padding: 43px 0 52px; }
.results-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 19px; }
.results-heading h2 { margin-top: 7px; font-size: 22px; }
.results-heading h2 em { font-size: 24px; }
.results-heading p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.recommendation-status { max-width: 580px; color: #b7a795 !important; }
.recommendation-status:empty { display: none; }
.recommendation-status.error { color: #e2a095 !important; }
.recommendation-status.loading { color: var(--accent) !important; }
.result-meta { padding-bottom: 3px; color: #79756e; font-size: 8px; letter-spacing: .8px; white-space: nowrap; }
.live-dot { display: inline-block; width: 6px; height: 6px; margin: 0 7px 1px 0; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px rgba(167,186,155,.45); }
.meta-divider { padding: 0 5px; color: var(--accent); }
.movie-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.movie-card { min-width: 0; overflow: hidden; border: 1px solid #302e2a; border-radius: 8px; background: #191817; transition: transform .2s ease, border-color .2s ease; }
.movie-card:hover { transform: translateY(-3px); border-color: #62503e; }
.poster { position: relative; height: 150px; overflow: hidden; display: flex; align-items: flex-end; padding: 15px; }
.poster-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster.has-image::after { background: linear-gradient(transparent 25%, rgba(0,0,0,.78)); }
.poster::before, .poster::after { position: absolute; content: ""; pointer-events: none; }
.poster::before { width: 180px; height: 180px; right: -25px; top: -62px; border: 1px solid rgba(255,255,255,.19); border-radius: 50%; }
.poster::after { inset: 45% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.62)); }
.poster-art { position: absolute; inset: 0; overflow: hidden; opacity: .94; }
.poster-art::before, .poster-art::after { position: absolute; content: ""; }
.poster-art::before { width: 105px; height: 145px; right: 16%; bottom: -27px; border-radius: 52% 52% 12% 12%; background: rgba(16,17,19,.58); filter: blur(1px); }
.poster-art::after { width: 68px; height: 68px; top: 16px; right: 28px; border-radius: 50%; background: rgba(255,224,163,.45); filter: blur(1px); }
.poster.wordless .poster-art::before { width: 3px; height: 110px; right: 50%; bottom: 0; border-radius: 4px; background: rgba(238,206,161,.65); box-shadow: 14px 19px 0 -1px rgba(238,206,161,.5), -13px 28px 0 -1px rgba(238,206,161,.5); }
.poster.wordless .poster-art::after { width: 120px; height: 120px; top: auto; right: 15%; bottom: -72px; background: rgba(27,31,42,.8); }
.poster-title { position: relative; z-index: 1; max-width: 80%; color: rgba(255,255,255,.94); font-family: "Playfair Display", Georgia, serif; font-size: 23px; line-height: .96; letter-spacing: -.5px; text-shadow: 0 2px 9px rgba(0,0,0,.7); }
.poster-mark { position: absolute; z-index: 1; top: 11px; left: 12px; color: rgba(255,255,255,.8); font-size: 7px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.match-badge { position: absolute; z-index: 2; top: 10px; right: 10px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.18); border-radius: 4px; background: rgba(15,14,12,.55); color: #e7dfd2; font-size: 8px; backdrop-filter: blur(5px); }
.match-badge span { margin-right: 3px; color: var(--accent); }
.card-content { padding: 12px 13px 13px; }
.movie-title-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.movie-title { overflow: hidden; margin: 0; color: #eee9e1; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.movie-year { flex: 0 0 auto; color: #858078; font-size: 9px; }
.movie-details { margin-top: 5px; color: #89847c; font-size: 9px; }
.genre-list { margin-top: 7px; color: #bd9a79; font-size: 8px; }
.movie-reason { min-height: 27px; margin: 10px 0 11px; color: #b1aaa0; font-size: 9px; line-height: 1.55; }
.provider-summary { min-height: 31px; margin: 0 0 9px; color: #a7ba9b; font-size: 8px; line-height: 1.55; }
.provider-summary strong { display: block; margin-bottom: 3px; color: #ddd4c6; font-size: 8px; font-weight: 600; }
.provider-types { color: #aaa39a; }
.watch-link { display: inline-block; margin-bottom: 9px; color: var(--accent); font-size: 9px; }
.watch-link:hover { color: var(--accent-strong); text-decoration: underline; }
.feedback-actions { display: flex; gap: 7px; margin: 3px 0 10px; }
.feedback-actions button { min-width: 0; flex: 1; padding: 6px 4px; border: 1px solid #393733; border-radius: 4px; background: #201f1d; color: #bdb7ad; cursor: pointer; font-size: 8px; transition: .2s ease; }
.feedback-actions button:hover { border-color: #8d674a; color: var(--accent-strong); }
.card-footer { padding-top: 9px; border-top: 1px solid #302e2a; display: flex; justify-content: space-between; align-items: center; }
.tag { color: #c39c76; font-size: 8px; }
.save-button { padding: 3px 0 3px 8px; border: 0; background: transparent; color: #99938b; cursor: pointer; font-size: 9px; }
.save-button:hover, .save-button.saved { color: var(--accent); }
.empty-state { padding: 40px 10px 20px; text-align: center; }
.empty-state > span { color: var(--accent); font-size: 25px; }
.empty-state h3 { margin: 10px 0 6px; font-size: 15px; font-weight: 500; }
.empty-state p { color: var(--muted); font-size: 11px; }
.watchlist-section { padding: 0 0 48px; scroll-margin-top: 24px; }
.watchlist-section .results-heading { margin-bottom: 19px; }
.watchlist-empty { margin: 0; color: var(--muted); font-size: 11px; }
.footer { max-width: 1060px; margin: 0 auto; padding: 18px 24px 24px; border-top: 1px solid rgba(255,255,255,.07); display: flex; justify-content: space-between; color: #6e6a64; font-size: 8px; letter-spacing: .7px; }
.footer > span:last-child { letter-spacing: 0; font-size: 9px; }
.footer-star { margin-left: 4px; color: var(--accent); }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 5; padding: 12px 16px; border: 1px solid #554434; border-radius: 6px; background: #24211d; color: #e9d8c6; font-size: 11px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

.account-page { min-height: 100vh; display: flex; flex-direction: column; }
.account-page .topbar { width: 100%; }
.account-page > .topbar > .nav-link { color: var(--muted); }
.account-main { width: min(100% - 36px, 470px); margin: auto; padding: 52px 0; }
.account-card { padding: 31px; border: 1px solid var(--border); border-radius: 12px; background: rgba(25,24,23,.92); box-shadow: 0 15px 50px rgba(0,0,0,.18); }
.account-card h1 { margin: 17px 0 10px; font-size: clamp(36px, 9vw, 46px); line-height: 1.08; letter-spacing: -1.8px; }
.account-card h1 em { color: var(--accent); font-family: "Playfair Display", Georgia, serif; }
.account-intro { margin: 0 0 23px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 6px; background: #141312; }
.auth-tab { padding: 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.auth-tab.active { background: #2a2520; color: var(--accent-strong); }
.auth-label { display: block; margin: 17px 0 7px; color: #ded9d1; font-size: 11px; }
.auth-input { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #3a3834; border-radius: 5px; outline: 0; background: #141312; color: var(--text); font-size: 12px; }
.auth-input:focus { border-color: #aa7954; }
.auth-hint { margin: 7px 0 0; color: #89847c; font-size: 9px; line-height: 1.5; }
.auth-submit { width: 100%; height: 42px; margin: 21px 0 0; }
.auth-submit:disabled { opacity: .65; cursor: wait; }
.account-status { min-height: 18px; margin: 12px 0 0; color: var(--green); font-size: 10px; line-height: 1.6; }
.account-status.error { color: #e2a095; }
.forgot-password { margin-top: 12px; color: var(--accent); }
#reset-request-form .text-button, #reset-confirm-form .text-button { margin-top: 12px; }
.signed-in-panel { padding-top: 15px; color: var(--muted); font-size: 12px; }
.signed-in-panel strong { color: var(--text); }
.account-watchlist-link { width: 100%; min-height: 42px; margin: 9px 0; display: flex; align-items: center; justify-content: center; }
.account-logout { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.account-logout:hover { border-color: #8d674a; color: var(--text); }
.delete-account-form { margin-top: 24px; padding-top: 19px; border-top: 1px solid var(--border); }
.delete-account-form h2 { margin: 0 0 7px; color: #e2a095; font-size: 15px; font-weight: 500; }
.delete-account-form > p { margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.delete-account-button { width: 100%; min-height: 39px; margin-top: 12px; border: 1px solid #6c3935; border-radius: 5px; background: rgba(159,72,64,.12); color: #e2a095; cursor: pointer; font-size: 10px; }
.delete-account-button:hover { border-color: #a75b53; background: rgba(159,72,64,.2); }
.delete-account-button:disabled { opacity: .6; cursor: wait; }
.account-privacy { margin: 15px 8px 0; color: var(--faint); font-size: 9px; line-height: 1.6; text-align: center; }

@media (max-width: 720px) {
  .topbar { height: 64px; padding: 0 20px; }
  .topnav { gap: 18px; }
  .nav-link { font-size: 10px; }
  .account-link { max-width: 110px; font-size: 10px; }
  .logout-button { font-size: 9px; }
  main { padding: 0 18px; }
  .hero { min-height: 290px; }
  .hero-art { right: -95px; opacity: .52; transform: scale(.85); transform-origin: center right; }
  .hero-copy { padding: 35px 0; }
  h1 { font-size: 48px; }
  .hero-copy > p { font-size: 12px; }
  .discover-panel { padding: 23px 20px; }
  .mood-list { gap: 7px; }
  .mood-chip { padding: 9px 10px; font-size: 10px; }
  .results-heading { align-items: flex-start; gap: 15px; flex-direction: column; }
  .result-meta { padding: 0; }
  .movie-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
  .poster { height: 140px; }
}

@media (max-width: 420px) {
  .brand { font-size: 14px; }
  .topnav { gap: 13px; }
  .nav-link { font-size: 9px; }
  .account-actions { gap: 9px; }
  .account-link { max-width: 90px; font-size: 9px; }
  .hero { min-height: 274px; }
  .hero-art { right: -135px; opacity: .38; }
  h1 { font-size: 44px; }
  .desktop-break { display: none; }
  .discover-panel { padding: 21px 15px; }
  .mood-chip { padding: 8px; font-size: 9px; }
  .mood-chip span { margin-right: 3px; }
  .input-row { height: 42px; }
  .input-row input { font-size: 10px; }
  .find-button { padding: 0 9px; font-size: 9px; }
  .search-icon { padding: 0 8px 0 10px; }
  .movie-grid { gap: 9px; }
  .poster { height: 118px; padding: 11px; }
  .poster-title { font-size: 19px; }
  .card-content { padding: 10px; }
  .movie-title { font-size: 11px; }
  .movie-reason { font-size: 8px; }
  .footer { padding-right: 18px; padding-left: 18px; font-size: 7px; }
  .account-card { padding: 24px 19px; }
}
