/* ============================================================
   CINEMATHEQUE — MOVIE LIBRARY
   Aesthetic: Dark cinematic editorial — film archive meets
   brutalist precision. Bebas Neue headings, DM Sans body.
   ============================================================ */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0b0b0e;
  --surface:    #111116;
  --surface2:   #18181f;
  --border:     #252530;
  --border2:    #32323f;
  --text:       #e8e8f0;
  --text-muted: #9090a8;
  --text-dim:   #78788f;
  --accent:     #e8c547;        /* warm gold */
  --accent2:    #c4a030;
  --green:      #3ecf74;
  --red:        #f04f4f;
  --red-dim:    #2a1414;
  --green-dim:  #0e2a1c;
  --font-head:  'Bebas Neue', sans-serif;
  --font-body:  'DM Sans', sans-serif;
  --font-mono:  'DM Mono', monospace;
  --radius:     6px;
  --radius-lg:  12px;
  --transition: 180ms cubic-bezier(.4,0,.2,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NOISE TEXTURE ── */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11,11,14,.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-byline {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
  opacity: 0.55;
  text-transform: uppercase;
  padding-left: 2px;
  user-select: none;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-mark {
  font-size: 18px;
  color: var(--accent);
  animation: pulse-mark 3s ease-in-out infinite;
}

@keyframes pulse-mark {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.logo-text {
  font-family: var(--font-head);
  font-size: 26px;
  letter-spacing: 4px;
  color: var(--text);
  user-select: none;
}

.meta-updated {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .5px;
  color: var(--text-dim);
  opacity: 0.6;
}

.refresh-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color .2s, border-color .2s, transform .3s;
  margin-left: 4px;
}

.refresh-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.refresh-btn.spinning {
  animation: spin-refresh .7s linear infinite;
  pointer-events: none;
  opacity: 0.5;
}

@keyframes spin-refresh {
  to { transform: rotate(360deg); }
}

.header-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: .5px;
}

.dot { color: var(--border2); }

.online-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-online 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-online {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--green); }
  50%       { opacity: 0.5; box-shadow: 0 0 2px var(--green); }
}

/* ── SCAN BAR ── */
.scan-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  transition: opacity var(--transition), max-height .4s ease;
  overflow: hidden;
  max-height: 40px;
}

.scan-bar.hidden {
  max-height: 0;
  opacity: 0;
  padding: 0 28px;
  border-top-color: transparent;
}

.scan-patience {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-dim);
  white-space: nowrap;
  opacity: 0.7;
}

.scan-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--accent);
  white-space: nowrap;
  animation: blink-label 1.2s step-start infinite;
}

@keyframes blink-label {
  50% { opacity: 0; }
}

.scan-track {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.scan-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 99px;
  transition: width .6s ease;
  box-shadow: 0 0 8px var(--accent);
}

/* ── CONTROLS (legacy — hidden) ── */
.controls-section { display: none; }

.controls-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.search-group {
  flex: 1;
  min-width: 220px;
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-dim);
  pointer-events: none;
  line-height: 1;
}

#search-input {
  width: 100%;
  padding: 0 36px;
  height: 36px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,197,71,.12);
}

#search-input::placeholder { color: var(--text-dim); }

.clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 11px;
  padding: 4px;
  line-height: 1;
  display: none;
  transition: color var(--transition);
}

.clear-search:hover { color: var(--text); }
.clear-search.visible { display: block; }

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

select {
  padding: 0 12px;
  height: 36px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  min-width: 120px;
}

select:focus { border-color: var(--accent); }

.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 3px;
}

.view-group { margin-left: auto; }

.toggle-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 16px;
  line-height: 1;
  transition: background var(--transition), color var(--transition);
}

.toggle-btn.active {
  background: var(--accent);
  color: var(--bg);
}

.toggle-btn:hover:not(.active) {
  color: var(--text);
  background: var(--border);
}

/* ── RESULTS SUMMARY ── */
.results-summary {
  padding: 14px 28px 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: .5px;
}

/* ── VIEWS ── */
.view-panel { display: none; }
.view-panel.active { display: block; }

/* ── TABLE ── */
.table-scroll {
  overflow-x: auto;
  padding: 0 28px 40px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead tr { border-bottom: 1px solid var(--border2); }

th {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-align: left;
  padding: 10px 12px;
  white-space: nowrap;
  user-select: none;
}

th.sortable { cursor: pointer; transition: color var(--transition); }
th.sortable:hover { color: var(--accent); }
th.sort-active { color: var(--accent); }

td {
  padding: 12px 12px;
  border-bottom: 1px solid rgba(37,37,48,.6);
  vertical-align: middle;
  transition: background var(--transition);
}

tbody tr {
  transition: background var(--transition);
  animation: row-in .25s ease both;
}

@keyframes row-in {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}

tbody tr:hover td { background: var(--surface2); }

.td-num { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); width: 36px; }
.td-title { font-weight: 500; color: var(--text); max-width: 280px; }
.td-res { font-family: var(--font-mono); font-size: 11px; font-weight: 500; }

.res-4k    { color: #c084fc; }
.res-1080  { color: #3ecf74; }
.res-720   { color: #e8c547; }
.res-other { color: #f04f4f; }

.rating-g   { color: #3ecf74; }
.rating-pg  { color: #3ecf74; }
.rating-pg13 { color: #e8c547; }
.rating-r   { color: #f04f4f; }

.td-rating  { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.td-year    { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.td-runtime { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.card-runtime { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.td-size    { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.td-imdb    { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }

.imdb-high { color: var(--green); }
.imdb-mid  { color: var(--accent); }
.imdb-low  { color: var(--text-dim); }

/* ── STATUS PILL ── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  font-weight: 500;
  white-space: nowrap;
}

.status-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.status-available {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(62,207,116,.25);
}
.status-available::before { background: var(--green); }

.status-missing {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(240,79,79,.18);
}
.status-missing::before { background: var(--red); }

/* ── DRIVE LINK ── */
.drive-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: rgba(232,197,71,.08);
  border: 1px solid rgba(232,197,71,.25);
  border-radius: var(--radius);
  color: var(--accent);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .5px;
  transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.drive-link:hover {
  background: rgba(232,197,71,.18);
  border-color: var(--accent);
}

.no-link {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--border2);
}

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 80px 28px;
  color: var(--text-dim);
}

.empty-icon {
  display: block;
  font-size: 40px;
  margin-bottom: 16px;
  opacity: .3;
}

/* ── GRID VIEW ── */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  padding: 0 28px 40px;
}

.movie-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  animation: card-in .3s ease both;
  cursor: default;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.movie-card:hover {
  border-color: var(--border2);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.card-poster {
  width: calc(100% + 36px);
  margin: -18px -18px 0 -18px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  aspect-ratio: 2/3;
  background: var(--surface2);
  position: relative;
}

.card-poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--surface2) 25%, var(--border) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity .3s ease, transform .4s ease;
}

.card-poster img.loaded { opacity: 1; }

.movie-card:hover .card-poster img { transform: scale(1.04); }

/* ── CARD PLAY OVERLAY ── */
.card-play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  text-decoration: none;
  transition: background 200ms ease;
}

.card-poster--playable:hover .card-play-overlay { background: rgba(0,0,0,0.45); }
.card-poster--playable:hover img { filter: blur(3px); transform: scale(1.04); }

.card-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(232,197,71,0.15);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 220ms ease, transform 220ms cubic-bezier(.34,1.56,.64,1), background 180ms ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.card-poster--playable:hover .card-play-btn { opacity: 1; transform: scale(1); }
.card-play-overlay:hover .card-play-btn { background: rgba(232,197,71,0.30); }

.card-play-icon {
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
  margin-left: 3px;
  display: block;
}

/* ── CARD REQUEST OVERLAY ── */
.card-poster--requestable:hover .card-play-overlay { background: rgba(0,0,0,0.50); }
.card-poster--requestable:hover img { filter: blur(3px); transform: scale(1.04); }

.card-request-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 99px;
  background: rgba(232,197,71,0.12);
  border: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms ease, transform 200ms cubic-bezier(.34,1.56,.64,1), background 160ms ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.card-poster--requestable:hover .card-request-btn { opacity: 1; transform: translateY(0); }
.card-request-overlay:hover .card-request-btn:not(.card-request-btn--done) { background: rgba(232,197,71,0.25); }

.card-request-icon { font-size: 15px; color: var(--accent); line-height: 1; }

.card-request-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--accent);
  white-space: nowrap;
}

.card-request-btn--done {
  background: rgba(62,207,116,0.12) !important;
  border-color: transparent !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
  cursor: default;
}

.card-request-btn--done .card-request-icon,
.card-request-btn--done .card-request-label { color: var(--green); }

.card-poster--requestable:hover .card-request-btn:not(.card-request-btn--done) .request-count {
  background: rgba(232,197,71,0.15);
  color: var(--accent);
}

.card-request-btn--done .request-count {
  background: rgba(62,207,116,0.15);
  color: var(--green);
}

.card-poster--requestable:has(.card-request-btn--done) .card-play-overlay { background: rgba(0,0,0,0.35); }
.card-poster--requestable:has(.card-request-btn--done) img { filter: blur(2px); }

.card-title {
  font-family: var(--font-head);
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--text);
  line-height: 1.1;
  min-height: calc(1.1em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-year { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.card-sep  { color: var(--border2); font-size: 10px; }
.card-rating { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); }
.card-row  { display: flex; align-items: center; justify-content: space-between; }
.card-imdb { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.card-res  { font-family: var(--font-mono); font-size: 10px; font-weight: 500; }
.card-size { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); white-space: nowrap; }

.card-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(7,7,10,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity .3s ease;
}

.modal-overlay.hidden { opacity: 0; pointer-events: none; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 24px 80px rgba(0,0,0,.7);
  animation: modal-in .35s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-logo { font-family: var(--font-head); font-size: 20px; letter-spacing: 3px; color: var(--accent); margin-bottom: 20px; }
.modal-title { font-family: var(--font-head); font-size: 32px; letter-spacing: 2px; color: var(--text); margin-bottom: 8px; }
.modal-desc { color: var(--text-dim); font-size: 13px; margin-bottom: 28px; line-height: 1.6; }

.modal-field { margin-bottom: 20px; }

.modal-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.modal-field input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  outline: none;
  transition: border-color var(--transition);
}

.modal-field input:focus { border-color: var(--accent); }
.modal-field small { display: block; margin-top: 5px; font-size: 11px; color: var(--text-dim); }

.modal-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: var(--bg);
  font-family: var(--font-head);
  font-size: 18px;
  letter-spacing: 3px;
  cursor: pointer;
  margin-top: 8px;
  transition: background var(--transition), transform var(--transition);
}

.modal-btn:hover { background: var(--accent2); transform: translateY(-1px); }

.modal-btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 1px;
  margin-top: 8px;
}

.modal-btn-secondary:hover { background: var(--border); color: var(--text); }

/* ── ACCESS GATE MODAL ── */
.gate-overlay-hidden { opacity: 0; pointer-events: none; }

.gate-box {
  text-align: center;
  padding: 48px 40px 40px;
  animation: modal-in .4s cubic-bezier(.34,1.56,.64,1) both;
}

.gate-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 4px; }
.gate-logo-text { font-family: var(--font-head); font-size: 28px; letter-spacing: 5px; color: var(--text); }
.gate-logo .logo-mark { font-size: 20px; color: var(--accent); animation: pulse-mark 3s ease-in-out infinite; }

.gate-byline {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
  opacity: 0.55;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.gate-title { font-size: 26px; margin-bottom: 10px; }

.gate-desc {
  font-size: 13px;
  margin-bottom: 28px;
  line-height: 1.65;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.modal-field { text-align: left; }

#gate-key-input {
  font-size: 14px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-align: center;
  padding: 14px;
}

.gate-error {
  display: block;
  margin-top: 7px;
  font-size: 11px;
  color: var(--red);
  font-family: var(--font-mono);
  letter-spacing: .5px;
  text-align: center;
}

.gate-submit-btn { margin-top: 16px; position: relative; }
.gate-submit-btn.loading { pointer-events: none; opacity: 0.6; }

.gate-submit-btn.loading::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 0;
  bottom: 0;
  margin: auto;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: var(--bg);
  border-radius: 50%;
  animation: spin-only .7s linear infinite;
}

@keyframes spin-only { to { transform: rotate(360deg); } }

/* ── ACCESS DENIED STATE ── */
.gate-denied-msg {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--red);
  text-transform: uppercase;
  margin-top: -4px;
  margin-bottom: 28px;
  opacity: 0.85;
}

.gate-submit-btn.denied {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text-dim);
  cursor: default;
  opacity: 0.45;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.gate-submit-btn.denied svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 2000;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text);
  max-width: 320px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

/* ── REQUEST BUTTON ── */
.request-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .5px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

.request-btn:hover {
  background: rgba(232,197,71,.08);
  border-color: rgba(232,197,71,.4);
  color: var(--accent);
}

.request-btn--fired {
  background: rgba(232,197,71,.18) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  transform: scale(1.08);
}

.request-btn--done {
  background: rgba(62,207,116,.08);
  border-color: rgba(62,207,116,.3);
  color: var(--green);
  cursor: default;
}

.request-btn--done:hover {
  background: rgba(62,207,116,.08);
  border-color: rgba(62,207,116,.3);
  color: var(--green);
}

.request-icon { font-size: 12px; line-height: 1; }

.request-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: rgba(232,197,71,.15);
  border-radius: 99px;
  font-size: 9px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.request-count:empty { display: none; }

.request-btn--card {
  width: 100%;
  justify-content: center;
  padding: 5px 8px;
  box-sizing: border-box;
}

/* ── RATING BUTTONS ── */
.rating-wrap { display: flex; align-items: center; gap: 4px; }

.rating-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.rating-btn:hover { border-color: var(--fg-dim); color: var(--fg); }
.rating-btn--up.active   { background: rgba(74,222,128,0.12); border-color: #4ade80; color: #4ade80; }
.rating-btn--down.active { background: rgba(248,113,113,0.12); border-color: #f87171; color: #f87171; }
.rating-count { font-size: 10px; line-height: 1; }

.td-link-inner { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-rating-row { display: flex; align-items: center; }

/* ── SORT ROW + DIRECTION BUTTON ── */
.sort-row { display: flex; gap: 4px; align-items: center; }
.sort-row select { flex: 1; min-width: 0; }

.sort-dir-btn {
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text-dim);
  cursor: pointer;
  padding: 0 12px;
  height: 36px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.sort-dir-btn:hover { color: var(--text); background: var(--border); border-color: var(--accent); }

/* ── REQUEST COUNT TOOLTIP ── */
.req-tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 6px 10px;
  border-radius: var(--radius);
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  transition: opacity 120ms ease;
  opacity: 0;
}

.req-tooltip.visible { opacity: 1; }
.req-tooltip .tt-count { color: var(--accent); font-weight: 600; }

/* ── SITE FOOTER ── */
.site-footer-bar {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 60px;
  padding: 48px 28px 56px;
}

.site-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 64px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.footer-brand { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.footer-logo-mark { font-size: 22px; color: var(--accent); animation: pulse-mark 3s ease-in-out infinite; }
.footer-logo-text { font-family: var(--font-head); font-size: 28px; letter-spacing: 4px; color: var(--text); line-height: 1; }
.footer-byline { font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px; color: var(--text-dim); opacity: 0.55; text-transform: uppercase; }

.footer-form-wrap { flex: 1; min-width: 260px; }

.footer-form-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.footer-form { display: flex; flex-direction: column; gap: 10px; }

.footer-form input,
.footer-form textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.footer-form input::placeholder,
.footer-form textarea::placeholder { color: var(--text-dim); }

.footer-form input:focus,
.footer-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,197,71,.10);
}

.footer-submit-btn {
  align-self: flex-start;
  padding: 9px 24px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: var(--bg);
  font-family: var(--font-head);
  font-size: 16px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), opacity var(--transition);
}

.footer-submit-btn:hover { background: var(--accent2); transform: translateY(-1px); }
.footer-submit-btn:disabled { opacity: 0.5; cursor: default; transform: none; }

.footer-form-status { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .5px; padding-top: 2px; }
.footer-form-status.success { color: var(--green); }
.footer-form-status.error   { color: var(--red); }

/* ── TAB NAV ── */
.tab-nav {
  display: flex;
  gap: 0;
  padding: 0 28px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  padding: 12px 20px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── TAB PANELS ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── STATS PAGE ── */
.stats-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 28px 80px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.stats-section { display: flex; flex-direction: column; gap: 16px; }

.stats-heading {
  font-family: var(--font-head);
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.stats-subheading {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-top: -8px;
}

/* ── UPLOAD PROGRESS ── */
.upload-progress-wrap { display: flex; flex-direction: column; gap: 10px; }
.upload-progress-labels { display: flex; justify-content: space-between; align-items: baseline; }
.upload-fraction { font-family: var(--font-mono); font-size: 13px; color: var(--text); }
.upload-pct { font-family: var(--font-head); font-size: 28px; letter-spacing: 2px; color: var(--accent); }

.upload-track {
  height: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.upload-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 99px;
  transition: width 1s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 12px rgba(232,197,71,.4);
}

/* ── CHARTS ── */
.chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  min-height: 240px;
}

/* ── STATS GRID ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--border2); }
.stat-label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; color: var(--text-dim); }
.stat-value { font-family: var(--font-head); font-size: 30px; letter-spacing: 1px; color: var(--text); line-height: 1; }

/* ============================================================
   NEW LAYOUT — Sidebar + Row Browse View
   ============================================================ */

/* ── HEADER SEARCH ── */
.header-center {
  flex: 1;
  max-width: 480px;
  margin: 0 32px;
}

.header-center .search-wrap { position: relative; }

.header-center .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--text-dim);
  pointer-events: none;
  line-height: 1;
}

.header-center #search-input {
  width: 100%;
  padding: 0 36px;
  height: 36px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.header-center #search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232,197,71,.12);
}

.header-center #search-input::placeholder { color: var(--text-dim); }

.header-center .clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 11px;
  padding: 4px;
  line-height: 1;
  display: none;
  transition: color var(--transition);
}

.header-center .clear-search:hover { color: var(--text); }
.header-center .clear-search.visible { display: block; }

/* ── MOVIES LAYOUT ── */
.movies-layout {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 130px);
}

/* ── SIDEBAR ── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 130px;
  height: calc(100vh - 130px);
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding-bottom: 40px;
}

.sidebar-inner { padding: 20px 18px; display: flex; flex-direction: column; gap: 24px; }
.sidebar-section { display: flex; flex-direction: column; gap: 8px; }

.sidebar-heading {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-dim);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.sidebar-sort-wrap { display: flex; gap: 4px; align-items: center; }

.sidebar-select {
  flex: 1;
  padding: 0 10px;
  height: 34px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  min-width: 0;
}

.sidebar-select:focus { border-color: var(--accent); }

.sidebar-checks { display: flex; flex-direction: column; gap: 2px; }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 5px 6px;
  border-radius: 4px;
  transition: background var(--transition);
  user-select: none;
}

.check-row:hover { background: var(--surface2); }

.check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--border2);
  border-radius: 3px;
  background: var(--surface2);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background var(--transition), border-color var(--transition);
}

.check-row input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }

.check-row input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 5px;
  height: 8px;
  border: 2px solid var(--bg);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.check-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px; }

.sidebar-clear-btn {
  margin-top: 4px;
  padding: 7px 12px;
  background: transparent;
  border: 1px solid rgba(240,79,79,.3);
  border-radius: var(--radius);
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  text-align: center;
}

.sidebar-clear-btn:hover { background: rgba(240,79,79,.08); border-color: var(--red); }

/* ── MAIN CONTENT ── */
.main-content { flex: 1; min-width: 0; overflow: hidden; }

/* ── ROW VIEW ── */
#row-view { padding: 8px 0 60px; }
.movie-row-section { padding: 20px 0 4px; }

.row-header { display: flex; align-items: baseline; gap: 12px; padding: 0 28px 12px; }
.row-title { font-family: var(--font-head); font-size: 22px; letter-spacing: 3px; color: var(--text); }
.row-subtitle { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); letter-spacing: 1px; }

.movie-row-scroll {
  overflow-x: auto;
  padding: 4px 28px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}

.row-scroll-wrapper { position: relative; }

.row-scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(calc(-50% - 10px));
  z-index: 10;
  width: 36px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, background 0.15s, transform 0.15s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.row-scroll-wrapper:hover .row-scroll-btn { opacity: 1; pointer-events: auto; }
.row-scroll-btn:hover { background: var(--accent); color: #000; }
.row-scroll-btn--left  { left: 4px; }
.row-scroll-btn--right { right: 4px; }

.row-scroll-btn--left[data-hidden="1"],
.row-scroll-btn--right[data-hidden="1"] { opacity: 0 !important; pointer-events: none !important; }

.movie-row-scroll::-webkit-scrollbar { height: 4px; }
.movie-row-scroll::-webkit-scrollbar-track { background: transparent; }
.movie-row-scroll::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

.movie-row { display: flex; gap: 14px; width: max-content; }

.row-card { width: 200px; flex-shrink: 0; }
.row-card .card-poster { width: calc(100% + 36px); aspect-ratio: 2/3; }
.row-card .card-title,
.row-card .card-meta,
.row-card .card-row,
.row-card .card-footer { overflow: hidden; }
.row-card .card-title { white-space: nowrap; text-overflow: ellipsis; }
.row-card .card-footer { flex-wrap: wrap; gap: 6px; }

/* ── GRID VIEW ── */
#grid-view .movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 8px 28px 40px;
}

/* ============================================================
   SHOWS TAB
   ============================================================ */

.shows-page { padding: 28px 28px 60px; max-width: 1400px; margin: 0 auto; }

.shows-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.show-card-item { cursor: pointer; }
.show-card-click-overlay { opacity: 0; transition: opacity var(--transition); }
.show-card-item:hover .show-card-click-overlay { opacity: 1; }

/* ── Show Overlay ── */
.show-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.show-overlay[hidden] { display: none; }

.show-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .28s ease;
}

.show-overlay--open .show-overlay-backdrop { opacity: 1; }

.show-overlay-panel {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: min(900px, calc(100vw - 32px));
  height: 75vh;
  min-height: 500px;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  transform: translateY(24px) scale(.97);
  opacity: 0;
  transition: transform .28s cubic-bezier(.22,1,.36,1), opacity .28s ease;
}

.show-overlay--open .show-overlay-panel { transform: translateY(0) scale(1); opacity: 1; }

/* Left Sidebar */
.show-overlay-sidebar {
  width: 280px;
  background: var(--surface2);
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.show-overlay-info { display: flex; flex-direction: column; gap: 8px; }

.show-overlay-title {
  font-family: var(--font-head);
  font-size: 26px;
  letter-spacing: 1.5px;
  color: var(--text);
  line-height: 1.1;
}

.show-overlay-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#show-overlay-seasons { display: flex; flex-direction: column; gap: 8px; margin-top: 32px; }

/* ── Season buttons with availability pill ── */
.show-overlay-season-btn {
  background: transparent;
  color: var(--text-dim);
  border: none;
  text-align: left;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.show-overlay-season-btn:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.show-overlay-season-btn.active { background: rgba(255,255,255,0.1); color: #fff; }

.season-btn-label { flex: 1; }

.season-pill {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.season-pill--full    { background: var(--green-dim); color: var(--green); border: 1px solid rgba(62,207,116,.25); }
.season-pill--partial { background: rgba(232,197,71,.08); color: var(--accent); border: 1px solid rgba(232,197,71,.2); }
.season-pill--none    { background: var(--red-dim); color: var(--red); border: 1px solid rgba(240,79,79,.18); }

/* Right Content */
.show-overlay-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  overflow: hidden;
}

#show-overlay-episodes {
  flex: 1;
  padding: 32px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.show-overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition), transform 0.2s ease;
  z-index: 10;
}

.show-overlay-close:hover { background: var(--red); border-color: var(--red); transform: scale(1.1); }

/* ── Episode Cards ── */
.show-overlay-ep {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 10px;
  background: rgba(255,255,255,0.02);
  border-radius: 8px;
  transition: background 0.2s;
}

.show-overlay-ep:hover { background: rgba(255,255,255,0.06); }

.ep-thumb-wrapper {
  position: relative;
  width: 140px;
  height: 78px;
  background: var(--surface2);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ep-thumb { width: 100%; height: 100%; object-fit: cover; }

.ep-thumb-placeholder { font-family: var(--font-mono); color: rgba(255,255,255,0.3); font-size: 16px; }

.ep-play-btn {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 24px;
  opacity: 0;
  transition: opacity 0.2s;
}

.ep-thumb-wrapper:hover .ep-play-btn { opacity: 1; }

.ep-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.ep-num-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.ep-title-text {
  font-family: var(--font-body);
  font-size: 15px;
  color: #fff;
  font-weight: 500;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar { width: 180px; }
  .header-center { max-width: 280px; margin: 0 16px; }
}

@media (max-width: 768px) {
  .header-inner { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .movies-layout { flex-direction: column; }
  .sidebar { width: 100%; position: static; height: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .sidebar-inner { flex-direction: row; flex-wrap: wrap; gap: 16px; padding: 14px 16px; }
  .sidebar-section { min-width: 140px; }
  .header-center { display: none; }
  .movie-row-scroll { padding: 4px 16px 16px; }
  .row-header { padding: 0 16px 10px; }
  #grid-view .movie-grid { padding: 8px 16px 40px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .results-summary { padding: 10px 16px 2px; }
  .tab-nav { padding: 0 16px; }
  .stats-page { padding: 24px 16px 60px; gap: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer-inner { gap: 36px; }
  .movie-grid { padding: 0 16px 40px; }

  .show-overlay-panel { flex-direction: column; width: calc(100vw - 24px); max-height: calc(100vh - 40px); }
  .show-overlay-sidebar { width: 100%; padding: 20px; border-right: none; border-bottom: 1px solid var(--border); flex-shrink: 0; }
  #show-overlay-seasons { flex-direction: row; margin-top: 16px; overflow-x: auto; }
  .show-overlay-season-btn { white-space: nowrap; padding: 8px 16px; }
  #show-overlay-episodes { padding: 16px; }
  .ep-thumb-wrapper { width: 110px; height: 62px; }
}
