/* ═══════════════════════════════════════════════════════
   BLOODREEL — Horror Cinema Archive
   Stylesheet
═══════════════════════════════════════════════════════ */

:root {
  --black: #080608;
  --deep: #0d0508;
  --surface: #120a0d;
  --card: #17080d;
  --border: #2a0d12;
  --border-bright: #4a1520;
  --red: #8b0000;
  --red-bright: #b31b1b;
  --red-glow: #cc2222;
  --red-accent: #e03030;
  --text: #c8a8a8;
  --text-dim: #7a5555;
  --text-bright: #e8d0d0;
  --white: #f0e0e0;
  --gold: #7a4a2a;
  --gold-bright: #a0602a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

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

/* Vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
  z-index: 9998;
}

/* ═══════════════════════════════════
   HEADER
═══════════════════════════════════ */
header {
  position: relative;
  text-align: center;
  padding: 60px 20px 40px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0a0205 0%, var(--black) 100%);
  overflow: visible;
  z-index: 50;
}

header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--red), var(--red-glow), var(--red), transparent);
  box-shadow: 0 0 20px var(--red), 0 0 40px rgba(139,0,0,0.5);
}

.header-drip {
  position: absolute;
  top: 0;
  left: 0; right: 0;
  display: flex;
  justify-content: space-around;
  pointer-events: none;
  overflow: hidden;
  height: 100%;
}

.drip {
  width: 2px;
  background: linear-gradient(180deg, var(--red-glow), transparent);
  border-radius: 0 0 2px 2px;
  animation: drip-fall linear infinite;
  opacity: 0;
}

@keyframes drip-fall {
  0%   { opacity: 0; height: 0; transform: translateY(0); }
  10%  { opacity: 0.8; }
  80%  { opacity: 0.6; }
  100% { opacity: 0; height: 80px; transform: translateY(80px); }
}

.site-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--red-bright);
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.8;
}

.site-title {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: clamp(48px, 8vw, 96px);
  color: var(--white);
  letter-spacing: 0.05em;
  text-shadow:
    0 0 30px rgba(180,20,20,0.6),
    0 0 60px rgba(139,0,0,0.3),
    2px 2px 0 var(--red),
    4px 4px 20px rgba(0,0,0,0.8);
  line-height: 1;
  margin-bottom: 8px;
  animation: title-pulse 4s ease-in-out infinite;
}

@keyframes title-pulse {
  0%, 100% {
    text-shadow:
      0 0 30px rgba(180,20,20,0.6),
      0 0 60px rgba(139,0,0,0.3),
      2px 2px 0 var(--red),
      4px 4px 20px rgba(0,0,0,0.8);
  }
  50% {
    text-shadow:
      0 0 40px rgba(200,30,30,0.8),
      0 0 80px rgba(139,0,0,0.5),
      2px 2px 0 var(--red-glow),
      4px 4px 20px rgba(0,0,0,0.8);
  }
}

.site-subtitle {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--text-dim);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.header-ornament {
  color: var(--red);
  font-size: 22px;
  letter-spacing: 0.5em;
  opacity: 0.7;
}

.stats-bar {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.stat { text-align: center; }

.stat-num {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 28px;
  color: var(--red-bright);
  display: block;
  line-height: 1;
}

.stat-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ═══════════════════════════════════
   GLOBAL SEARCHBAR
═══════════════════════════════════ */
.global-search-bar {
  position: relative;
  max-width: 700px;
  margin: 28px auto 0;
  z-index: 100;
}

.global-search-wrap {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.global-search-wrap:focus-within {
  border-color: var(--red-bright);
  box-shadow: 0 0 20px rgba(139,0,0,0.35);
}

.global-search-icon {
  padding: 0 14px;
  color: var(--red);
  font-size: 16px;
  flex-shrink: 0;
  pointer-events: none;
}

.global-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-bright);
  font-family: 'Crimson Pro', serif;
  font-size: 17px;
  padding: 13px 4px;
}

.global-search-input::placeholder {
  color: var(--text-dim);
  font-style: italic;
}

.global-search-kbd {
  padding: 0 14px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}

.global-search-clear {
  background: none;
  border: none;
  color: var(--text-dim);
  padding: 0 14px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: none;
  transition: color 0.15s;
}

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

/* Dropdown results */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  box-shadow: 0 16px 48px rgba(0,0,0,0.7), 0 0 0 1px rgba(139,0,0,0.1);
  max-height: 480px;
  overflow-y: auto;
  display: none;
  z-index: 200;
}

.search-dropdown.open { display: block; }

.search-dropdown::-webkit-scrollbar { width: 4px; }
.search-dropdown::-webkit-scrollbar-thumb { background: var(--red); }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
  position: relative;
}

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

.search-result-item:hover,
.search-result-item.highlighted {
  background: rgba(139,0,0,0.12);
}

.search-result-item:hover .result-title,
.search-result-item.highlighted .result-title {
  color: var(--white);
}

.result-poster {
  width: 42px;
  height: 62px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-bright);
  background: var(--card);
  display: block;
}

.result-poster-placeholder {
  width: 42px;
  height: 62px;
  flex-shrink: 0;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-dim);
  flex-direction: column;
  gap: 2px;
}

.result-poster-placeholder span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.2;
  padding: 0 2px;
}

.result-info {
  flex: 1;
  min-width: 0;
}

.result-title {
  font-family: 'Crimson Pro', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.result-title mark {
  background: rgba(139,0,0,0.35);
  color: var(--red-accent);
  padding: 0 1px;
  border-radius: 1px;
}

.result-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.result-flag { font-size: 14px; }

.result-year {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
}

.result-score {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 17px;
  color: var(--red-glow);
  line-height: 1;
}

.result-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.result-genre-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border: 1px solid rgba(139,0,0,0.35);
  background: rgba(139,0,0,0.07);
  color: var(--red-accent);
  text-transform: uppercase;
}

.result-score-bar {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 2px;
  background: var(--border);
}

.result-score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--red-glow));
}

.search-no-results {
  padding: 28px;
  text-align: center;
  color: var(--text-dim);
  font-style: italic;
  font-size: 15px;
}

.search-no-results-icon {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.4;
}

.search-dropdown-header {
  padding: 8px 16px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  text-transform: uppercase;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-hint {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-top: 8px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.search-hint.visible {
  opacity: 0.7;
  pointer-events: all;
}

/* ═══════════════════════════════════
   MAIN LAYOUT
═══════════════════════════════════ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  min-height: calc(100vh - 300px);
}

/* ═══════════════════════════════════
   SIDEBAR
═══════════════════════════════════ */
.sidebar {
  border-right: 1px solid var(--border);
  padding: 30px 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--deep);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: var(--black); }
.sidebar::-webkit-scrollbar-thumb { background: var(--red); }

.sidebar-section {
  padding: 0 20px;
  margin-bottom: 28px;
}

.sidebar-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--red-bright);
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title::before {
  content: '▸';
  color: var(--red-glow);
}

.collapsible-title::before { content: none; }

.collapsible-title {
  cursor: pointer;
  user-select: none;
}

.collapsible-title:hover { color: var(--white); }

.section-arrow {
  font-size: 11px;
  color: var(--red-glow);
  display: inline-block;
  transition: transform 0.22s ease;
  line-height: 1;
  flex-shrink: 0;
  margin-right: 2px;
}

.section-arrow.collapsed {
  transform: rotate(-90deg);
}

.collapsible-body {
  max-height: 220px;
  opacity: 1;
  overflow-y: auto;
  overflow-x: hidden;
  transition: max-height 0.28s ease, opacity 0.2s ease;
}

.collapsible-body.collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.collapsible-body::-webkit-scrollbar { width: 3px; }
.collapsible-body::-webkit-scrollbar-track { background: transparent; }
.collapsible-body::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 2px; }
.collapsible-body::-webkit-scrollbar-thumb:hover { background: var(--red); }

.search-box {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text-bright);
  padding: 9px 14px;
  font-family: 'Crimson Pro', serif;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box::placeholder { color: var(--text-dim); font-style: italic; }
.search-box:focus {
  border-color: var(--red-bright);
  box-shadow: 0 0 12px rgba(139,0,0,0.3);
}

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

.filter-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 7px 12px;
  text-align: left;
  font-family: 'Crimson Pro', serif;
  font-size: 14px;
  transition: all 0.15s;
  border-left: 2px solid transparent;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-btn:hover {
  color: var(--white);
  border-left-color: var(--red);
  background: rgba(139,0,0,0.1);
  padding-left: 16px;
}

.filter-btn.active {
  color: var(--red-accent);
  border-left-color: var(--red-glow);
  background: rgba(139,0,0,0.15);
  font-weight: 600;
}

.filter-count {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  background: var(--surface);
  padding: 1px 6px;
  border: 1px solid var(--border);
}

.filter-btn.active .filter-count {
  color: var(--red-bright);
  border-color: var(--border-bright);
}

/* Score filter */
.score-range {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.score-range input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  height: 3px;
  background: var(--border-bright);
  outline: none;
  cursor: pointer;
}

.score-range input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--red-bright);
  border-radius: 0;
  cursor: pointer;
  border: 1px solid var(--red-glow);
}

.score-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--red-bright);
  min-width: 30px;
}

/* Sort */
.sort-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  color: var(--text);
  padding: 8px 12px;
  font-family: 'Crimson Pro', serif;
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

.sort-select option { background: var(--surface); }

/* View toggle */
.view-toggle { display: flex; gap: 0; }

.view-btn {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 8px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s;
}

.view-btn:first-child { border-right: none; }

.view-btn.active {
  background: var(--red);
  border-color: var(--red-bright);
  color: var(--white);
}

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

/* ═══════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════ */
.main-content {
  padding: 30px;
  background: var(--black);
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.results-info {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.1em;
}

.results-info span {
  color: var(--red-bright);
  font-size: 15px;
}

.active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag {
  background: rgba(139,0,0,0.2);
  border: 1px solid var(--border-bright);
  color: var(--red-accent);
  padding: 3px 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-tag:hover {
  background: rgba(139,0,0,0.4);
  color: var(--white);
}

.filter-tag::after { content: ' ×'; }

/* ═══════════════════════════════════
   GRID VIEW
═══════════════════════════════════ */
.films-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.film-card {
  background: var(--card);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  animation: card-in 0.3s ease forwards;
  opacity: 0;
  transform: translateY(8px);
  display: flex;
  flex-direction: column;
}

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

.film-card:hover {
  border-color: var(--border-bright);
  box-shadow: 0 4px 24px rgba(139,0,0,0.2), 0 0 0 1px rgba(139,0,0,0.1);
  transform: translateY(-2px);
}

.film-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--red-glow));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.film-card:hover::before { transform: scaleX(1); }

.card-header {
  padding: 16px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.film-title {
  font-family: 'Crimson Pro', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-bright);
  line-height: 1.3;
  flex: 1;
}

.film-card:hover .film-title { color: var(--white); }

.film-score {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 22px;
  color: var(--red-glow);
  white-space: nowrap;
  line-height: 1;
  text-shadow: 0 0 10px rgba(200,30,30,0.5);
  flex-shrink: 0;
}

.score-bar {
  height: 3px;
  background: var(--border);
  margin-bottom: 10px;
  overflow: hidden;
}

.score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--red-glow));
  box-shadow: 0 0 6px var(--red);
  transition: width 0.6s ease;
}

.card-body {
  padding: 10px 16px 14px;
  flex: 1;
}

.card-footer {
  padding: 8px 16px;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.film-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border: 1px solid;
  text-transform: uppercase;
}

.tag-genre {
  color: var(--red-accent);
  border-color: rgba(139,0,0,0.4);
  background: rgba(139,0,0,0.08);
}

.tag-country {
  color: var(--gold-bright);
  border-color: rgba(120,70,30,0.4);
  background: rgba(80,40,10,0.1);
}

.tag-year {
  color: var(--text-dim);
  border-color: rgba(100,60,60,0.3);
  background: rgba(30,15,15,0.3);
}

.film-flag { font-size: 18px; }

.film-year {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
}

.read-more {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--red);
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s;
}

.read-more:hover { color: var(--red-accent); }

/* Score color classes */
.score-10 .film-score { color: #ff4444; text-shadow: 0 0 15px rgba(255,68,68,0.7); }
.score-9  .film-score { color: #e03333; }
.score-8  .film-score { color: #c82020; }
.score-7  .film-score { color: #aa1515; }
.score-6  .film-score { color: #8b1010; }
.score-low .film-score { color: #5a3030; }

/* ═══════════════════════════════════
   LIST VIEW
═══════════════════════════════════ */
.films-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.film-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  animation: card-in 0.3s ease forwards;
  opacity: 0;
}

.film-row:hover {
  border-color: var(--border-bright);
  background: rgba(139,0,0,0.07);
  padding-left: 22px;
}

.row-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
}

.row-title {
  font-family: 'Crimson Pro', serif;
  font-size: 16px;
  color: var(--text-bright);
  font-weight: 400;
}

.film-row:hover .row-title { color: var(--white); }

.row-tags {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.row-country { font-size: 16px; }

.row-score {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 20px;
  color: var(--red-bright);
  min-width: 44px;
  text-align: right;
}

/* ═══════════════════════════════════
   MODAL
═══════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border-bright);
  max-width: 680px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 60px rgba(139,0,0,0.3);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.3s;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-thumb { background: var(--red); }

.modal-top-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red-glow), var(--red));
  box-shadow: 0 0 15px var(--red);
}

.modal-header {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 36px;
  color: var(--white);
  text-shadow: 0 0 20px rgba(180,20,20,0.4);
  margin-bottom: 8px;
}

.modal-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.modal-score {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 52px;
  color: var(--red-glow);
  line-height: 1;
  text-shadow: 0 0 20px rgba(200,30,30,0.6);
}

.modal-score-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.modal-body {
  padding: 24px 32px;
}

.modal-section-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--red-bright);
  text-transform: uppercase;
  margin-bottom: 12px;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.modal-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 4px 12px;
  border: 1px solid;
  text-transform: uppercase;
}

.modal-tag-genre {
  color: var(--red-accent);
  border-color: var(--border-bright);
  background: rgba(139,0,0,0.12);
}

.modal-score-breakdown {
  display: flex;
  gap: 4px;
  margin: 12px 0;
}

.score-block {
  height: 24px;
  background: var(--border);
  flex: 1;
  transition: background 0.3s;
}

.score-block.filled {
  background: var(--red);
  box-shadow: 0 0 4px rgba(139,0,0,0.4);
}

.verdict-text {
  font-family: 'Crimson Pro', serif;
  font-style: normal;
  font-size: 17px;
  color: var(--text-bright);
  line-height: 1.75;
  margin: 10px 0 4px;
  border-left: 2px solid var(--border-bright);
  padding-left: 16px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--border-bright);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.modal-close:hover {
  border-color: var(--red);
  color: var(--red-accent);
  background: rgba(139,0,0,0.15);
}

.modal-franchise-section {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  padding: 16px;
  margin-top: 16px;
}

.franchise-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.franchise-films {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.franchise-film {
  display: flex;
  justify-content: space-between;
  padding: 5px 8px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
}

.franchise-film:hover { background: rgba(139,0,0,0.1); color: var(--white); }
.franchise-film.current { color: var(--red-accent); font-weight: 600; }

.franchise-score {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}

/* ═══════════════════════════════════
   EMPTY STATE
═══════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-dim);
  grid-column: 1 / -1;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 28px;
  color: var(--red);
  margin-bottom: 8px;
}

/* ═══════════════════════════════════
   FOOTER
═══════════════════════════════════ */
footer {
  border-top: 1px solid var(--border);
  padding: 20px 28px;
  background: var(--deep);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

footer p {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}

footer .red { color: var(--red-bright); }

.footer-profiles {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.profile-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.profile-lbxd {
  color: #89a;
  border-color: rgba(100,130,120,0.3);
}

.profile-lbxd:hover {
  color: #adc;
  border-color: rgba(100,180,150,0.5);
  background: rgba(100,160,130,0.08);
  box-shadow: 0 0 10px rgba(100,160,130,0.15);
}

.profile-imdb {
  color: #c8a840;
  border-color: rgba(180,150,40,0.3);
}

.profile-imdb:hover {
  color: #f0c840;
  border-color: rgba(220,180,40,0.5);
  background: rgba(180,140,20,0.08);
  box-shadow: 0 0 10px rgba(180,140,20,0.15);
}

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0 20px;
  }
  .main-content { padding: 20px 16px; }
}

@media (max-width: 600px) {
  .films-grid { grid-template-columns: 1fr; }
  .modal { max-height: 90vh; }
  .modal-title { font-size: 26px; }
  .film-row { grid-template-columns: 1fr auto; }
  .row-num, .row-tags { display: none; }
  .global-search-bar { margin: 20px 16px 0; }
}

/* ═══════════════════════════════════
   SCROLLBAR & SELECTION
═══════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black); }
::-webkit-scrollbar-thumb { background: var(--red); }
::-webkit-scrollbar-thumb:hover { background: var(--red-bright); }

::selection { background: rgba(139,0,0,0.4); color: var(--white); }

/* ═══════════════════════════════════
   CARD ANIMATION DELAYS
═══════════════════════════════════ */
.film-card:nth-child(1),  .film-row:nth-child(1)  { animation-delay: 0.02s; }
.film-card:nth-child(2),  .film-row:nth-child(2)  { animation-delay: 0.04s; }
.film-card:nth-child(3),  .film-row:nth-child(3)  { animation-delay: 0.06s; }
.film-card:nth-child(4),  .film-row:nth-child(4)  { animation-delay: 0.08s; }
.film-card:nth-child(5),  .film-row:nth-child(5)  { animation-delay: 0.10s; }
.film-card:nth-child(6),  .film-row:nth-child(6)  { animation-delay: 0.12s; }
.film-card:nth-child(n+7), .film-row:nth-child(n+7) { animation-delay: 0.14s; }

/* ═══════════════════════════════════
   SUBGENRE SPOTLIGHT
═══════════════════════════════════ */
.spotlight-section {
  position: relative;
  background: var(--deep);
  border: 1px solid var(--border-bright);
  padding: 36px 36px 28px;
  margin-bottom: 40px;
  overflow: hidden;
}

.spotlight-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--red), var(--red-glow), var(--red), transparent);
  box-shadow: 0 0 16px rgba(139,0,0,0.4);
}

.spotlight-section::after {
  content: '"';
  position: absolute;
  top: -10px;
  right: 20px;
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 160px;
  color: var(--border);
  pointer-events: none;
  line-height: 1;
  opacity: 0.4;
}

.spotlight-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--red-bright);
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0.8;
}

.spotlight-title {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: clamp(24px, 3.5vw, 38px);
  color: var(--white);
  text-shadow: 0 0 20px rgba(180,20,20,0.3);
  margin-bottom: 16px;
  line-height: 1.15;
}

.spotlight-intro {
  font-family: 'Crimson Pro', serif;
  font-size: 17px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 24px;
  max-width: 780px;
  border-left: 2px solid var(--border-bright);
  padding-left: 18px;
}

.spotlight-films {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.spotlight-film-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border-bright);
  padding: 7px 14px;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}

.spotlight-film-chip::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(139,0,0,0);
  transition: background 0.15s;
}

.spotlight-film-chip:hover {
  border-color: var(--red-glow);
  box-shadow: 0 0 12px rgba(139,0,0,0.25);
  transform: translateY(-1px);
}

.spotlight-film-chip:hover::before {
  background: rgba(139,0,0,0.08);
}

.chip-score {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 20px;
  color: var(--red-glow);
  line-height: 1;
  flex-shrink: 0;
}

.chip-title {
  font-family: 'Crimson Pro', serif;
  font-size: 15px;
  color: var(--text-bright);
  font-weight: 600;
}

.spotlight-film-chip:hover .chip-title { color: var(--white); }

.chip-year {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  margin-left: 2px;
}

.spotlight-explore {
  background: none;
  border: 1px solid var(--border-bright);
  color: var(--red-accent);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 9px 18px;
  cursor: pointer;
  transition: all 0.15s;
}

.spotlight-explore:hover {
  border-color: var(--red-glow);
  background: rgba(139,0,0,0.12);
  color: var(--white);
  box-shadow: 0 0 12px rgba(139,0,0,0.2);
}

/* ═══════════════════════════════════
   ARCHIVE HEADER (BLOG STYLE)
═══════════════════════════════════ */
.archive-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.archive-header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.archive-heading {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 28px;
  color: var(--red);
  text-shadow: 0 0 12px rgba(139,0,0,0.3);
  letter-spacing: 0.03em;
}

/* ═══════════════════════════════════
   HIDDEN GEM STYLES
═══════════════════════════════════ */
.gem-badge {
  font-size: 13px;
  vertical-align: middle;
  opacity: 0.9;
  display: inline-block;
  margin-left: 2px;
}

.gem-badge-lg {
  font-size: 20px;
  vertical-align: middle;
  margin-left: 6px;
  opacity: 0.9;
}

.gem-btn {
  border: 1px solid var(--border-bright) !important;
  border-radius: 0;
  width: 100%;
  justify-content: flex-start;
  gap: 8px;
  transition: all 0.15s;
  font-size: 14px !important;
}

.gem-btn:hover {
  background: rgba(139,0,0,0.1) !important;
  border-color: var(--red) !important;
  padding-left: 16px !important;
}

.gem-btn.active {
  background: rgba(139,0,0,0.2) !important;
  border-color: var(--red-glow) !important;
  color: var(--red-accent) !important;
  font-weight: 600 !important;
}

/* Gem card highlight */
.film-card.gem-card {
  border-color: rgba(139,0,0,0.35);
}


/* ═══════════════════════════════════
   SCORE DISTRIBUTION CHART
═══════════════════════════════════ */
.score-dist-wrap {
  max-width: 480px;
  margin: 28px auto 0;
  padding: 0 10px;
}

.score-dist-label-top {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.35em;
  color: var(--text-dim);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 10px;
  opacity: 0.7;
}

.score-dist-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 64px;
  padding: 0 2px;
}

.dist-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  cursor: pointer;
}

.dist-col:hover .dist-bar {
  filter: brightness(1.4);
}

.dist-count {
  font-family: 'Share Tech Mono', monospace;
  font-size: 8px;
  color: var(--text-dim);
  line-height: 1;
  min-height: 10px;
}

.dist-bar-wrap {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
}

.dist-bar {
  width: 100%;
  background: var(--border-bright);
  min-height: 2px;
  transition: height 0.6s cubic-bezier(0.4,0,0.2,1), filter 0.15s;
  border-radius: 1px 1px 0 0;
}

.dist-bar-high {
  background: var(--red);
}

.dist-bar-peak {
  background: var(--red-glow);
  box-shadow: 0 0 8px rgba(200,30,30,0.5);
}

.score-dist-axis {
  display: flex;
  justify-content: space-between;
  padding: 5px 2px 0;
  border-top: 1px solid var(--border);
}

.score-dist-axis span {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--text-dim);
  flex: 1;
  text-align: center;
}

/* ═══════════════════════════════════
   SITE NAV
═══════════════════════════════════ */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 18px 0 0;
}

.nav-link {
  background: none;
  border: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-dim);
  cursor: pointer;
  padding: 6px 14px;
  border-bottom: 1px solid transparent;
  transition: all 0.15s;
}

.nav-link:hover {
  color: var(--text-bright);
  border-bottom-color: var(--border-bright);
}

.nav-link.active {
  color: var(--red-accent);
  border-bottom-color: var(--red);
}

.nav-sep {
  color: var(--border-bright);
  font-size: 12px;
  pointer-events: none;
  user-select: none;
}

/* ═══════════════════════════════════
   ABOUT PAGE
═══════════════════════════════════ */
.about-page {
  min-height: calc(100vh - 400px);
}

.about-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 60px 20px 80px;
}

.about-header {
  text-align: center;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.about-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-glow), transparent);
}

.about-eyebrow {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--red-bright);
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.8;
}

.about-title {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: clamp(52px, 8vw, 80px);
  color: var(--white);
  text-shadow:
    0 0 30px rgba(180,20,20,0.5),
    2px 2px 0 var(--red);
  line-height: 1;
  margin-bottom: 10px;
}

.about-subtitle {
  font-family: 'Crimson Pro', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--text-dim);
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.about-ornament {
  color: var(--red);
  font-size: 18px;
  letter-spacing: 0.5em;
  opacity: 0.6;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.about-section h2.about-section-title {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 26px;
  color: var(--red-bright);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 0 10px rgba(139,0,0,0.3);
}

.about-section h2.about-section-title::before {
  content: '†';
  color: var(--border-bright);
  font-size: 18px;
}

.about-section p {
  font-family: 'Crimson Pro', serif;
  font-size: 18px;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 14px;
}

.about-section p:last-child { margin-bottom: 0; }

.about-section p em {
  font-style: italic;
  color: var(--text-bright);
}

/* Score guide */
.about-score-guide {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.score-guide-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  font-family: 'Crimson Pro', serif;
  font-size: 16px;
  color: var(--text);
  transition: background 0.12s;
}

.score-guide-row:last-child { border-bottom: none; }
.score-guide-row:hover { background: rgba(139,0,0,0.06); }

.sgi {
  font-family: 'UnifrakturMaguntia', cursive;
  font-size: 22px;
  min-width: 28px;
  text-align: center;
  line-height: 1;
  flex-shrink: 0;
}

.sgi-10 { color: #ff4444; text-shadow: 0 0 8px rgba(255,68,68,0.5); }
.sgi-9  { color: #e03333; }
.sgi-8  { color: #c82020; }
.sgi-7  { color: #aa1515; }
.sgi-6  { color: #8b1010; }
.sgi-5  { color: #6a2020; }
.sgi-4  { color: #5a2828; }
.sgi-3  { color: #4a2020; }
.sgi-2  { color: #3a1818; }
.sgi-1  { color: #2a1010; }

/* About profile buttons */
.about-profiles {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.about-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 12px 20px;
  border: 1px solid;
  transition: all 0.15s;
}

.about-profile-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.about-profile-btn.profile-lbxd {
  color: #89a;
  border-color: rgba(100,130,120,0.4);
}

.about-profile-btn.profile-lbxd:hover {
  color: #adc;
  border-color: rgba(100,180,150,0.6);
  background: rgba(100,160,130,0.08);
  box-shadow: 0 0 16px rgba(100,160,130,0.12);
}

.about-profile-btn.profile-imdb {
  color: #c8a840;
  border-color: rgba(180,150,40,0.4);
}

.about-profile-btn.profile-imdb:hover {
  color: #f0c840;
  border-color: rgba(220,180,40,0.6);
  background: rgba(180,140,20,0.08);
  box-shadow: 0 0 16px rgba(180,140,20,0.12);
}

/* About footer ornament */
.about-footer-ornament {
  margin-top: 60px;
  text-align: center;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--text-dim);
  padding-top: 30px;
  border-top: 1px solid var(--border);
  opacity: 0.6;
}

/* ═══════════════════════════════════
   SEARCH GENRE CHIP
═══════════════════════════════════ */
.search-genre-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  background: rgba(139,0,0,0.05);
  transition: background 0.12s;
}

.search-genre-chip:hover {
  background: rgba(139,0,0,0.15);
}

.genre-chip-icon {
  font-size: 13px;
  color: var(--red);
  flex-shrink: 0;
}

.genre-chip-name {
  font-family: 'Crimson Pro', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-bright);
  flex: 1;
}

.search-genre-chip:hover .genre-chip-name {
  color: var(--white);
}

.genre-chip-count {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1px 7px;
}

.genre-chip-arrow {
  font-size: 13px;
  color: var(--red);
  opacity: 0;
  transition: opacity 0.12s, transform 0.12s;
}

.search-genre-chip:hover .genre-chip-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* ═══════════════════════════════════
   FILTER SECTION SEARCH
═══════════════════════════════════ */
.filter-search-wrap {
  padding: 6px 4px 4px;
  position: sticky;
  top: 0;
  background: var(--deep);
  z-index: 1;
}

.filter-search-input {
  width: 100%;
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text-bright);
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  outline: none;
  transition: border-color 0.15s;
}

.filter-search-input::placeholder {
  color: var(--text-dim);
  font-style: italic;
}

.filter-search-input:focus {
  border-color: var(--red);
}

/* ═══════════════════════════════════
   HOT TAKES
═══════════════════════════════════ */
.hot-badge {
  filter: none;
}

.film-card.hot-card {
  border-color: rgba(180, 80, 0, 0.35);
}

.film-card.hot-card::before {
  background: linear-gradient(90deg, #b84000, #e05000);
}

/* ═══════════════════════════════════
   SCORE CHART ACTIVE COLUMN
═══════════════════════════════════ */
.dist-col {
  cursor: pointer;
}

.dist-col-active .dist-bar {
  background: var(--red-glow) !important;
  box-shadow: 0 0 10px rgba(200,30,30,0.6) !important;
}

.dist-col-active .dist-count {
  color: var(--red-accent) !important;
}

.dist-col-active .score-dist-axis span {
  color: var(--red-accent);
}
