/* nofak.wtf — 1:1 dark theme port of flickmetrix.com main.css.
   Class names mirror the saved theme HTML: .film, .posterContainer,
   .filmInfoContainer, .ratingContainer, .megascore, .rating-bar-* etc. */

@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lato-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/lato-bold.woff2') format('woff2');
}

:root {
  --bg:        #141414;
  --fg:        #e6e6e6;
  --fg-dim:    #b3b3b3;     /* darkText */
  --fg-mute:   #4d4d4d;     /* secondary fg / bar fill */
  --pill-bg:   #333333;     /* multiSelect button */
  --line:      #404040;
  --accent:    #4CAF50;     /* megascore green */
  --bad:       #D92B3A;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Lato', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 22.857px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--fg); text-decoration: none; cursor: pointer; }
a:hover { color: #fff; }

button { font-family: inherit; }
img { max-width: 100%; }

/* === LAYOUT === */
.page { padding: 16px 24px 64px; }
.content { max-width: 880px; margin: 0 auto; }

/* === LEFT ICON RAIL (matches flickmetrix fixed-left vertical column) === */
.iconRail {
  position: fixed; top: 18px; left: 14px;
  display: flex; flex-direction: column; gap: 24px;
  z-index: 10;
}
.iconRail a {
  width: 28px; height: 28px;
  color: var(--fg-mute);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.iconRail a:hover { color: var(--fg); }
.iconRail svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

.line-separator {
  border-bottom: 1px solid var(--line);
  height: 1px; margin-top: 10px; width: 90%;
}
.darkText { color: var(--fg-dim); }

/* === TOPBAR (logo + searchBox) — centered as one block, matches theme1 === */
.topbar {
  display: flex; align-items: center; justify-content: center; gap: 30px;
  margin-bottom: 16px;
}
.brand {
  font-size: 21px; font-weight: 500; line-height: 30px;
  letter-spacing: 0.45em;
  color: var(--fg);
  text-transform: uppercase;
  margin: 5px 0;
  flex-shrink: 0;
}
.brand b { font-weight: 700; }
.brand a { color: var(--fg); }

.searchBox {
  position: relative;
  width: 420px; max-width: 100%;
  display: flex; align-items: center;
  border-bottom: 1px solid #595959;
}
.searchBox input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--fg);
  font-size: 14px;
  font-family: inherit;
  padding: 2px;
  outline: none;
  border-radius: 0;
}
.searchBox input::placeholder { color: var(--fg-mute); }
.searchBoxMag {
  background: transparent; border: 0; color: var(--fg-mute);
  cursor: pointer; padding: 0 4px;
  font-size: 25px;
  display: flex; align-items: center;
}
.searchBoxMag svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.logout-link {
  position: fixed; top: 14px; right: 18px;
  font-size: 12px; color: var(--fg-mute);
}
.logout-link:hover { color: var(--fg); }

/* === MULTI-SELECT WIDGETS — 1:1 port of categories.html / on.html
   (angularjs-dropdown-multiselect under the dark-theme overrides).
   Selection is communicated by a green→black gradient on the row, not by a
   visible checkbox; the real <input> is shoved off-screen. */
.multiSelect { position: relative; display: inline-block; }

.multiSelect > button {
  display: inline-block;
  position: relative;
  text-align: left;
  cursor: pointer;
  background-color: #333; color: #fff;
  -webkit-appearance: none; appearance: none;
  border: 0;
  border-radius: 4px;
  padding: 6px 28px 6px 12px;
  min-height: 38px;
  max-width: 100%;
  font-family: inherit; font-size: 14px;
  line-height: 22px;
  /* Source rule: `white-space:normal` — let the comma-joined label wrap so
     all selected items stay visible (no ellipsis). */
  white-space: normal;
  word-break: normal;
  user-select: none;
}
.multiSelect .buttonLabel { display: inline; padding: 0; }
.multiSelect .caret {
  position: absolute;
  right: 12px; top: 50%;
  width: 0; height: 0;
  margin-top: -2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid #fff;
}

.checkboxLayer {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1000;
  min-width: 278px;
  background-color: #141414;
  color: #e6e6e6;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.45);
  text-align: left;
}
.checkboxLayer.show { display: block; }

.helperContainer { padding: 8px 8px 0 8px; overflow: hidden; }
.helperButton {
  display: inline-block;
  text-align: center;
  cursor: pointer;
  height: 26px;
  font-family: inherit; font-size: 13px;
  border-radius: 2px;
  line-height: 1.6;
  margin: 0 0 8px 0;
  padding: 0 10px;
  background: none;
  color: #e6e6e6;
  border: 1px solid transparent;
}
.helperButton:not(.reset) { background: none; margin-right: 4px; }
.helperButton.reset {
  float: right;
  background-color: var(--accent) !important;
  color: #fff;
  width: 90px;
  height: 27px;
  border-color: var(--accent);
  margin-top: 0;
}
.helperButton:hover, .helperButton:focus {
  border: none !important;
  color: #fff !important;
  box-shadow: none !important;
}

.checkBoxContainer { display: block; padding: 8px; overflow: hidden; }

.multiSelectItem {
  display: block;
  padding: 3px;
  white-space: nowrap;
  user-select: none;
  border: 1px solid transparent;
  position: relative;
  min-width: 270px;
  min-height: 20px;
  background-color: #141414;
  color: #e6e6e6;
  cursor: pointer;
}
.multiSelectItem.selected {
  background-color: #333 !important;
  background-image: linear-gradient(to right, #4CAF50, #141414);
  border-color: #141414;
}
.multiSelectItem .acol { display: inline-block; min-width: 12px; }
.multiSelectItem .acol label {
  display: inline-block;
  padding-right: 30px;
  margin: 0;
  line-height: normal;
  cursor: pointer;
}
/* Hide the real checkbox the same way the source does — selection state is
   conveyed by the .selected gradient on the row. */
.multiSelectItem input[type=checkbox] {
  position: absolute;
  left: -9999px;
}

/* === FILTER PILLS === */
.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px;
  padding: 12px 0 8px;
}
.filters .label-text { color: var(--fg); font-size: 14px; }

.pill-static, .pill {
  display: inline-flex; align-items: center;
  background: var(--pill-bg);
  border: 0;
  color: #fff;
  padding: 0 10px;
  height: 38px;
  border-radius: 4px;
  font-size: 14px; line-height: 20px;
  font-family: inherit;
  cursor: default;
}
.pill {
  cursor: pointer;
  appearance: none; -webkit-appearance: none;
  padding: 0 28px 0 10px;
  background-image: linear-gradient(45deg, transparent 50%, #e6e6e6 50%),
                    linear-gradient(135deg, #e6e6e6 50%, transparent 50%);
  background-position: calc(100% - 14px) 17px, calc(100% - 9px) 17px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.pill:hover { background-color: #404040; }
.pill-static svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* === DUAL RANGE SLIDERS (rzslider 1:1: 26px grey pointer with 8px white centre, 3px grey selection bar, transparent track) === */
.slider-row {
  display: grid; grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 30px; padding: 22px 0 12px;
}
.slider-row .name { color: var(--fg); font-size: 16px; line-height: 1.43; }

.dual-slider {
  position: relative;
  height: 60px;
  padding: 0 13px;
}
.dual-slider .track {
  position: absolute; left: 13px; right: 13px; top: 40px;
  height: 3px; background: transparent; border-radius: 2px;
}
.dual-slider .track-fill {
  position: absolute; top: 40px; height: 3px;
  background: #4d4d4d; border-radius: 2px;
  pointer-events: none;
}
.dual-slider .bubble {
  position: absolute; top: 9px;
  font-size: 13px; color: #f2f2f2;
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
  line-height: 18px;
  padding: 1px 3px;
}
.dual-slider input[type=range] {
  position: absolute; left: 0; right: 0; top: 29px;
  width: 100%; height: 26px;
  background: transparent;
  -webkit-appearance: none; appearance: none;
  pointer-events: none;
  margin: 0; padding: 0;
}
.dual-slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 4px, #4d4d4d 4px);
  cursor: pointer; pointer-events: all;
  border: 0;
}
.dual-slider input[type=range]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 4px, #4d4d4d 4px);
  cursor: pointer; pointer-events: all;
  border: 0;
}
.dual-slider input[type=range]::-webkit-slider-runnable-track { background: transparent; border: 0; }
.dual-slider input[type=range]::-moz-range-track { background: transparent; border: 0; }
.dual-slider input[type=range]:focus { outline: none; }

/* === Apply button === */
.apply-row {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 18px 0 4px;
}
.apply-row .reset-link { justify-self: start; }
.apply-row .more-opt { justify-self: end; }

.reset-link, .more-opt {
  background: transparent; border: 0;
  color: var(--fg-dim); font-size: 14px;
  font-family: inherit; cursor: pointer;
  padding: 8px 4px;
  display: inline-flex; align-items: center; gap: 6px;
}
.reset-link:hover, .more-opt:hover { color: #fff; }
.reset-link svg, .more-opt svg {
  width: 14px; height: 14px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Apply button — outlined, green border (matches flickmetrix .btn-success) */
.apply {
  display: inline-block;
  padding: 0 28px; height: 38px;
  background: transparent; color: #fff;
  border: 1px solid var(--accent); border-radius: 4px;
  font-size: 14px; line-height: 36px;
  font-family: inherit; cursor: pointer;
}
.apply:hover { background: rgba(76, 175, 80, 0.08); }

/* === Sort row (left: sort dropdown / dir, right: viewType toggles) === */
.sort-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-top: 1px solid #1f1f1f;
  margin-top: 14px;
}
.sort-row .spacer { flex: 1; }
.sort-row .pill {
  background-color: transparent;
  border: 1px solid #2a2a2a;
  color: var(--fg);
  height: 32px;
  padding: 0 28px 0 10px;
  background-position: calc(100% - 14px) 14px, calc(100% - 9px) 14px;
}
.sort-row .pill-static {
  background-color: transparent;
  border: 1px solid #2a2a2a;
  color: var(--fg);
  height: 32px;
  padding: 0 8px;
}
.sort-row .pill-static svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* viewType buttons (list/grid icons) — match flickmetrix .viewType */
.viewType-row { display: inline-flex; gap: 6px; }
.viewType {
  width: 25px; height: 25px; line-height: 25px;
  border-radius: 3px;
  color: #CBD1D5;
  text-align: center;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.viewType.selected { background: var(--fg-mute); color: #fff; }
.viewType svg { width: 16px; height: 16px; fill: currentColor; }

/* === Stats — hidden by default to match theme1 (which has no per-page count) === */
.stats { display: none; }

/* === FILM (list view) — matches .film/.posterContainer/.filmInfoContainer/.ratingContainer === */
.films-list { display: flex; flex-direction: column; gap: 0; }

.film {
  background: var(--bg);
  border-radius: 5px;
  padding: 15px;
  min-height: 360px;
  margin: 20px auto;
  overflow: auto;            /* clearfix for floats inside */
  display: grid;
  grid-template-columns: 220px minmax(0,1fr) 140px;
  gap: 20px;
  border-bottom: 1px solid #1f1f1f;
}

.posterContainer {
  width: 220px;
  position: relative;
}
img.poster {
  width: 100%;
  height: 330px;
  object-fit: cover;
  cursor: pointer;
  display: block;
  background: #000;
  border-radius: 3px;
}
.trailerButton {
  display: block; width: 100%;
  margin-top: 4px; height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--fg);
  font-family: inherit; font-size: 14px;
  cursor: pointer;
  text-align: center;
  line-height: 38px;
}
.trailerButton:hover { border-color: var(--accent); color: #fff; }
.trailerButton svg { width: 11px; height: 11px; fill: currentColor; vertical-align: -1px; margin-right: 4px; }

.filmInfoContainer {
  min-width: 0;
}
.filmInfoContainer .title {
  font-weight: 700;
  font-size: 16px;
  margin: 0;
  color: var(--fg);
}
.filmInfoContainer .title a { color: var(--fg); }

.film-section {
  padding-top: 2px;
  font-size: 14px;
  color: var(--fg);
  overflow: auto;
}
.film-content {
  padding-top: 5px;
  font-size: 14px;
  line-height: 1.5;
}

/* Director / Cast rows: label is .darkText, names are .person (underlined link) */
.person {
  color: var(--fg);
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
}
.person:hover { color: #fff; }
.cast { padding-bottom: 5px; }

/* === RATING COLUMN — theme1: megascore circle + 4 rating bars (Critic / Metacritic / IMDb / Letterboxd) === */
.ratingContainer {
  width: 140px;
  font-size: 14px;
  padding-top: 4px;
  text-align: center;
  overflow: hidden;
}
.megascore {
  margin: 3px auto 14px;
  width: 65px; height: 65px;
  font-size: 32px; line-height: 65px;
  color: white;
  border-radius: 100px;
  text-align: center;
  background-color: var(--accent);
  font-weight: 400;
}
.rating-bar-container {
  background-color: transparent;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
  color: white;
  height: 20px;
  line-height: 20px;
  font-size: 13px;
}
.rating-bar-meat {
  background-color: var(--fg-mute);
  padding-left: 5px;
  height: 20px;
  line-height: 20px;
  font-size: 13px;
}
.rating-bar-score {
  padding-right: 5px;
  position: absolute;
  right: 0; top: 0;
  z-index: 9999;
  height: 20px; line-height: 20px;
  font-size: 13px;
}

/* === AVAILABLE ON (provider chips) — flickmetrix .availableOn anchors === */
.availableOn {
  overflow: auto;
  margin-top: 3px;
}
.availableOn .label-row {
  font-size: 14px;
  margin-right: 4px;
  margin-bottom: 1px;
}
.availableOn a, .availableOn span.chip {
  color: white;
  padding: 0 7px;
  border-radius: 3px;
  text-decoration: none;
  opacity: 0.9;
  font-size: 14px;
  margin-right: 7px;
  display: inline-block;
  line-height: 22px;
  cursor: default;
}
.availableOn a:hover { opacity: 1; }

.availableOn .netflix   { background-color: #D20000; }
.availableOn .prime     { background-color: #F8981D; }
.availableOn .amzvid    { background-color: green; }
.availableOn .itunes    { background-color: darkorchid; }
.availableOn .hulu      { background-color: darkcyan; }
.availableOn .gplay     { background-color: red; }
.availableOn .vudu      { background-color: #0074C3; }
.availableOn .disney    { background-color: darkslateblue; }
.availableOn .hbn       { background-color: gray; }
.availableOn .iplayer   { background-color: #AA336A; }
.availableOn .hbo       { background-color: #265E57; }
.availableOn .all4      { background-color: #900C3F; }
.availableOn .britbox   { background-color: #995577; }
.availableOn .crave     { background-color: #0047AB; }
.availableOn .now       { background-color: #A52A2A; }
.availableOn .paramount { background-color: #4F7942; }
.availableOn .peacock   { background-color: #C04000; }
.availableOn .showtime  { background-color: #702963; }
.availableOn .stan      { background-color: #DC143C; }
.availableOn .starz     { background-color: #722F37; }
.availableOn .hbm       { background-color: #2E8B57; }
.availableOn .mubi      { background-color: darkblue; }
.availableOn .apple     { background-color: darkslateblue; }

/* === GRID VIEW (filmGridOuter — 197x292 per main.css) === */
.films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
  margin-top: 16px;
}
.films-grid .filmGridOuter {
  position: relative;
  display: block;
}
.films-grid .filmGridPoster {
  width: 100%; aspect-ratio: 2/3;
  object-fit: cover;
  display: block;
  background: #000;
  border-radius: 3px;
}
.films-grid .grid-title {
  font-size: 13px; font-weight: 700; margin-top: 6px; color: var(--fg);
  line-height: 1.3;
}
.films-grid .grid-meta { font-size: 11px; color: var(--fg-mute); }
.films-grid .megascore-mini {
  position: absolute; top: 6px; right: 6px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* === FILM-DETAIL MODAL (grid-view click) — mirrors theme1 .singleFilmModal:
   black backdrop @ opacity .9, .modal scroll layer, .modal-dialog.modal-lg
   centred. Toggled by adding/removing `.in` on backdrop + .modal. */
body.modal-open { overflow: hidden; }

.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background-color: #000;
  z-index: 1040;
}
.modal-backdrop.in { display: block; opacity: 0.9; }

.modal {
  display: none;
  position: fixed; inset: 0;
  z-index: 1050;
  overflow: hidden;
  outline: 0;
}
.modal.in { display: block; }
body.modal-open .modal { overflow-x: hidden; overflow-y: auto; }

.modal .modal-dialog {
  position: relative;
  width: 90%; max-width: 900px;
  margin: 25px auto;
}
.singleFilmModal .modal-dialog {
  width: 100%; max-width: 1100px;
  margin: 25px auto;
}
.modal-content {
  position: relative;
  background-color: var(--bg);
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 5px;
  outline: 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.modal-body { position: relative; padding: 0; }
#singleFilmModalContainer { position: relative; }

.modal-close {
  position: absolute;
  top: 6px; right: 10px;
  z-index: 2;
  background: transparent !important;
  border: 0;
  color: #da294e;
  font-family: inherit;
  font-size: 28px; line-height: 1;
  padding: 4px 10px;
  cursor: pointer;
}
.modal-close:hover, .modal-close:focus { color: var(--accent); outline: 0; }

/* The fragment uses the same `.film` grid as list view; collapse its outer
   margins so it fits the modal frame, and prevent poster cropping. */
.singleFilmModal .film {
  margin: 0;
  border-bottom: 0;
  background: var(--bg);
  border-radius: 5px;
  padding: 20px;
}
#singleFilm img.poster {
  height: auto; aspect-ratio: 2/3;
}

/* === LOGIN === */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card {
  width: 320px; padding: 32px 28px;
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 4px;
  text-align: center;
}
.login-card .brand { display: block; margin-bottom: 18px; text-align: center; }
.login-card input[type=password] {
  width: 100%; padding: 10px 12px;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  color: var(--fg); font-size: 16px; outline: none; font-family: inherit;
  margin-bottom: 18px;
}
.login-card .apply { width: 100%; padding: 10px; }
.login-card .err { color: var(--bad); font-size: 13px; margin-bottom: 12px; }

/* === FILM DETAIL === */
.detail {
  display: grid; grid-template-columns: 320px 1fr; gap: 28px;
  margin-top: 16px;
  padding: 15px;
  border-radius: 5px;
}
.detail .poster {
  width: 320px; height: auto; aspect-ratio: 2/3;
  border-radius: 4px; display: block; object-fit: cover;
}
.detail h2 { font-size: 26px; margin: 0 0 6px; font-weight: 700; }
.detail .sub { color: var(--fg-dim); font-size: 14px; margin-bottom: 16px; }
.detail .scores {
  display: flex; flex-direction: column; align-items: stretch; gap: 15px;
  margin: 18px 0;
  max-width: 360px;
}
.detail .scores .megascore { margin: 0 auto 14px; }
.detail .links { margin-top: 24px; display: flex; gap: 14px; flex-wrap: wrap; }
.detail .links a {
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  padding: 6px 14px; border-radius: 4px;
  font-size: 13px;
}
.detail .links a:hover { color: #fff; border-color: var(--accent); }
.detail .links svg { width: 12px; height: 12px; fill: currentColor; vertical-align: middle; margin-right: 4px; }

/* === UPLOAD (unchanged) === */
.upload-form { margin: 16px 0; }
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px;
  border: 2px dashed var(--line);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  background: #1a1a1a;
}
.dropzone:hover { border-color: var(--fg-mute); }
.dropzone.over { border-color: var(--accent); background: #1c2a1c; }
.dropzone input[type=file] {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
}
.dropzone .dz-icon svg { width: 36px; height: 36px; fill: none; stroke: var(--fg-mute); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.dropzone .dz-text { font-size: 16px; color: var(--fg); margin-bottom: 4px; }
.dropzone .dz-hint { font-size: 12px; color: var(--fg-mute); }

.progress-bar { width: 100%; height: 6px; background: var(--pill-bg); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: var(--accent); transition: width 0.15s linear; }
.progress-text { margin-top: 6px; font-size: 12px; color: var(--fg-mute); text-align: center; }

.uploads-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; margin-top: 8px; }
.uploads-table th, .uploads-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #2a2a2a; }
.uploads-table th { font-weight: 700; color: var(--fg-mute); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.uploads-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.uploads-table th.num { text-align: right; }
.uploads-table td.dim { color: var(--fg-mute); }
.uploads-table td.hash { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 12px; cursor: help; }
.uploads-table tr:hover td { background: rgba(255,255,255,0.02); }
.uploads-table .delete-btn { background: transparent; border: 0; color: var(--fg-mute); cursor: pointer; padding: 4px; }
.uploads-table .delete-btn:hover { color: var(--bad); }
.uploads-table .delete-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

/* === Mobile (1:1 port of flickmetrix mobile snapshot — uploads/1fe61…html) === */
@media (max-width: 768px) {
  .page { padding: 16px 18px 64px; }
  .iconRail { display: none; }
  .apply-row { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .reset-link, .more-opt { font-size: 13px; padding: 6px 2px; }

  /* Topbar: brand centered on its own row, search box full-width below */
  .topbar {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
  }
  .brand {
    margin: 12px 0 0;
    text-align: center;
    font-size: 19px;
    line-height: 27px;
    letter-spacing: 0.45em;
  }
  .searchBox { width: 100%; }
  .searchBox input {
    font-size: 19px;
    line-height: 27px;
    height: 34px;
  }
  .searchBoxMag { font-size: 25px; padding: 0 6px; }
  .searchBoxMag svg { width: 22px; height: 22px; }

  /* Filter pills row hidden on mobile (matches flickmetrix .advancedFilterLabel rule) */
  .filters { display: none; }

  /* Sliders: label stacks above slider, single column */
  .slider-row {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 12px 0 4px;
  }
  .slider-row .name {
    font-size: 14px;
    padding-left: 4px;
  }
  .dual-slider { height: 48px; }
  .dual-slider .track,
  .dual-slider .track-fill { top: 30px; }
  .dual-slider input[type=range] { top: 19px; }
  .dual-slider .bubble { font-size: 12px; top: 0; }

  .apply-row { margin: 6px 0 4px; }

  /* Sort row: tighter spacing on mobile */
  .sort-row { gap: 10px; padding: 12px 0; margin-top: 8px; }
  .sort-row .label-text { font-size: 13px; }
  .pill, .pill-static, .apply { height: 36px; }
  .stats { margin: 4px 0 12px; }

  /* List view: 2-col layout (poster | rating column) — matches mobile2.html */
  .film {
    grid-template-columns: 167px minmax(0,1fr);
    min-height: 0;
    margin: 20px 0;
    padding: 10px;
    gap: 11px;
    border-bottom: 0;
  }
  .posterContainer {
    width: 167px;
    margin: 0;
    text-align: center;
  }
  img.poster { height: 250px; }
  /* Watch Trailer becomes plain centered text on mobile (no border button) */
  .trailerButton {
    border: 0;
    height: auto;
    line-height: 1.4;
    padding: 6px 0 0;
    font-size: 13px;
    color: var(--fg);
    background: transparent;
  }
  .trailerButton:hover { border: 0; color: #fff; }
  /* Filminfo (title/cast/plot/providers) hidden in mobile list view — flickmetrix mobile collapses it */
  .filmInfoContainer { display: none; }
  .ratingContainer { width: auto; }
  .megascore { margin: 3px auto 14px; }

  .detail { grid-template-columns: 1fr; gap: 18px; padding: 8px; }
  .detail .poster { width: 100%; max-width: 240px; margin: 0 auto; }
  .rating-bar-container, .rating-bar-meat, .rating-bar-score { font-size: 13px; }

  /* Apply button: thin green outline on mobile to match theme */
  .apply {
    background: var(--bg);
    border: 1px solid var(--accent);
    padding: 0 32px;
  }
  .apply:hover { background: #1c2a1c; }

  /* Grid view: 1 full-width poster per row, white 4px frame, dark square score badge */
  .films-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px;
  }
  .films-grid .filmGridOuter {
    background: #fff;
    padding: 4px;
    border-radius: 4px;
  }
  .films-grid .filmGridPoster {
    aspect-ratio: auto;
    border-radius: 0;
  }
  .films-grid .megascore-mini {
    width: 35px; height: 35px;
    top: 4px; right: 4px;
    border-radius: 0;
    background: var(--bg);
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    box-shadow: none;
  }
  .films-grid .grid-title {
    color: var(--fg);
    font-size: 13px;
    margin: 6px 4px 0;
  }
  .films-grid .grid-meta { margin: 2px 4px 6px; }

  /* Film modal: full-width on mobile, single column inside (matches the
     mobile flickmetrix .singleFilmModal). */
  .modal .modal-dialog { width: 99%; margin: 8px auto; }
  .singleFilmModal .modal-dialog { width: 99%; margin: 8px auto; }
  .singleFilmModal .film {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
  }
  .singleFilmModal .posterContainer { width: 100%; max-width: 240px; margin: 0 auto; }
  .singleFilmModal .filmInfoContainer { display: block; }
  .singleFilmModal .ratingContainer { width: 100%; }
}
