/* NomadLouie TV — Retroma colors, Soap2Day-style compact layout, Tahoma */
:root {
  --bg: #070a1c;
  --bg-panel: #0b0f24;
  --bg-header: #080c20;
  --bg-nav: #0a0e22;
  --bg-table: #10162e;
  --border: #3b4fd8;
  --border-bright: #4a5cff;
  --glow: 0 0 8px rgba(59, 79, 216, 0.45);
  --coral: #ff7b72;
  --coral-dim: #e8746a;
  --gold: #e6c84a;
  --yellow: #d8cf4a;
  --orange: #e8a23c;
  --teal: #2ee6a6;
  --teal-dim: #3fd0b0;
  --text: #c9d1e6;
  --muted: #8b93b0;
  --danger: #ff6b6b;
  --radius: 8px;
  --font: Tahoma, Verdana, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.4;
  min-height: 100vh;
}

a { color: var(--teal); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #7ffff0; }
img { max-width: 100%; height: auto; border: 0; }
button, input, select, textarea { font-family: inherit; font-size: 13px; }

/* Header / logo */
.top {
  background: var(--bg-header);
  padding: 14px 16px 10px;
  border-bottom: 1px solid transparent;
}
.logo {
  font-size: 28px;
  font-weight: bold;
  color: var(--teal-dim);
  text-decoration: none;
  letter-spacing: 0.5px;
  text-shadow: 0 0 12px rgba(63, 208, 176, 0.35);
}
.logo:hover { color: var(--teal); text-decoration: none; }
.logo span { color: var(--gold); }

/* Nav */
.nav {
  background: var(--bg-nav);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--glow);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  flex-wrap: wrap;
}
.nav-links { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav-links a, .nav-links .drop > span {
  color: var(--text);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 4px;
  display: inline-block;
}
.nav-links a:hover, .nav-links .drop:hover > span { color: var(--teal); background: rgba(59,79,216,0.15); }
.nav-links a.active { color: var(--gold); }

.drop { position: relative; }
.drop > span { cursor: default; }
.drop-menu {
  display: none;
  position: absolute;
  left: 0; top: 100%;
  z-index: 40;
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  min-width: 160px;
  padding: 6px 0;
  max-height: 320px;
  overflow: auto;
}
.drop:hover .drop-menu, .drop:focus-within .drop-menu { display: block; }
.drop-menu a {
  display: block;
  padding: 4px 12px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.drop-menu a:hover { background: rgba(59,79,216,0.2); color: var(--teal); }

.search-form {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.search-form input[type="text"] {
  background: #070a1c;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  width: 180px;
  outline: none;
}
.search-form input[type="text"]:focus { border-color: var(--border-bright); box-shadow: var(--glow); }
.btn {
  display: inline-block;
  background: var(--bg-panel);
  color: var(--text);
  border: 1px solid var(--border-bright);
  border-radius: 5px;
  padding: 4px 10px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--glow);
  line-height: 1.3;
}
.btn:hover { color: var(--teal); text-decoration: none; }
.btn-primary { border-color: var(--teal-dim); color: var(--teal); }
.btn-danger { border-color: var(--coral-dim); color: var(--coral); }
.btn-gold { border-color: var(--gold); color: var(--gold); }
.icon-btn {
  width: 28px; height: 28px;
  padding: 0;
  border-radius: 6px;
  text-align: center;
  line-height: 26px;
  font-size: 13px;
}

.nav-right { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.nav-right a.login-link { color: var(--gold); text-decoration: none; padding: 4px 8px; }
.nav-right a.login-link:hover { color: var(--teal); }

/* Breadcrumb */
.crumb {
  background: #080c1e;
  border-bottom: 1px solid rgba(59,79,216,0.45);
  padding: 4px 16px;
  color: var(--muted);
  font-size: 12px;
}
.crumb b { color: var(--gold); font-weight: normal; }

/* Layout */
.wrap { max-width: 1180px; margin: 0 auto; padding: 10px 10px 24px; }
.layout { display: flex; gap: 10px; align-items: flex-start; }
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--glow);
  padding: 10px 12px 14px;
}
main.panel { flex: 1; min-width: 0; }
.side-stack { width: 280px; flex: 0 0 280px; display: flex; flex-direction: column; gap: 10px; }
aside.panel { width: 100%; padding: 8px 10px 12px; }

h1, h2, h3 { margin: 0 0 8px; font-weight: bold; }
h1, .panel-title, main.panel > h2 { color: var(--coral); font-size: 16px; }
h3, .subhead { color: var(--gold); font-size: 13px; }
.muted { color: var(--muted); }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0 0 10px;
  padding: 7px 8px;
  border: 1px solid var(--coral-dim);
  border-radius: 6px;
  background: rgba(232, 116, 106, 0.05);
  font-size: 12px;
}
.filters label { color: var(--muted); }
.filters select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 4px;
}
.sorts { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.sorts .lbl { color: var(--muted); margin-right: 2px; }
.pill {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
}
.pill:hover { color: var(--teal); text-decoration: none; border-color: var(--teal-dim); }
.pill.active {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(230, 200, 74, 0.08);
  box-shadow: 0 0 6px rgba(230, 200, 74, 0.25);
}

/* Poster grid */
.grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px 8px;
}
.card { text-decoration: none; color: var(--text); display: block; }
.card:hover { text-decoration: none; color: var(--teal); }
.card .poster-wrap { position: relative; }
.card .poster {
  aspect-ratio: 2 / 3;
  background: #080c1e;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--glow);
}
.card .poster img, .card .poster .ph {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.card .poster .ph {
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 22px; font-weight: bold;
  background: linear-gradient(160deg, #12183a 0%, #070a1c 100%);
}
.card .year {
  position: absolute;
  top: 5px; right: 5px;
  background: #070a1c;
  border: 1px solid var(--border-bright);
  color: var(--gold);
  font-size: 11px;
  padding: 0 5px;
  border-radius: 8px;
  line-height: 16px;
}
.card .ctitle {
  text-align: center;
  font-size: 12px;
  margin-top: 5px;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
}
.card:hover .poster { border-color: var(--teal-dim); }

.empty {
  padding: 18px 8px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 6px;
}

/* Pagination */
.pages { margin-top: 12px; text-align: center; }
.pages a, .pages span {
  display: inline-block;
  min-width: 22px;
  padding: 2px 6px;
  margin: 0 2px;
  border: 1px solid var(--border);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
}
.pages a:hover { color: var(--teal); }
.pages .here { color: var(--gold); border-color: var(--gold); }

/* Sidebar */
aside.panel h2 { color: var(--coral); font-size: 14px; margin-bottom: 8px; }
.side-sub { color: var(--gold); font-size: 11px; margin: -6px 0 8px; }
.fav-panel { border-color: var(--coral-dim); box-shadow: 0 0 8px rgba(255,123,114,0.28); }
.fav-panel h2 { color: var(--coral); }
.fav-panel h3 { color: var(--gold); font-size: 12px; margin: 8px 0 4px; padding-bottom: 3px; border-bottom: 1px solid var(--orange); }
.fav-list { list-style: none; margin: 0; padding: 0; }
.fav-list li { margin: 0 0 4px; }
.fav-list a { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--teal-dim); font-size: 12px; line-height: 1.25; }
.fav-list a:hover { color: var(--teal); text-decoration: underline; }
.fav-list img { width: 22px; height: 33px; object-fit: cover; border: 1px solid var(--border); border-radius: 3px; flex: 0 0 22px; }
.fav-all { margin: 8px 0 0; font-size: 12px; }
.side-cols { display: flex; gap: 8px; }
.side-col { flex: 1; min-width: 0; }
.side-col h3 {
  color: var(--gold);
  font-size: 12px;
  margin: 0 0 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--orange);
}
.side-col ol, .side-col ul { margin: 0; padding: 0 0 0 16px; }
.side-col li { margin: 0 0 4px; line-height: 1.25; }
.side-col a { font-size: 12px; text-decoration: none; color: var(--teal-dim); }
.side-col a:hover { text-decoration: underline; color: var(--teal); }
.side-col .yr { color: var(--muted); font-size: 11px; }

/* Video page */
.player-box {
  background: #000;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--glow);
  margin-bottom: 10px;
}
.player-box video, .player-box iframe {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 0;
}
.meta { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.meta a { text-decoration: none; }
.desc {
  border: 1px solid var(--yellow);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 8px 0 12px;
  white-space: pre-wrap;
}
.desc.foldable {
  white-space: normal;
  min-height: 0;
}
.desc .fold-text {
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  overflow: hidden;
}
.desc.foldable.is-clamped:not(.is-open) .fold-text {
  display: block;
  max-height: calc(1.4em * 6);
  overflow: hidden;
  min-height: 0;
  -webkit-box-pack: start;
}
.fold-toggle {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal);
  cursor: pointer;
  font-size: 12px;
}
.fold-toggle[hidden] { display: none !important; }
.fold-toggle:hover { color: #7ffff0; }
.fav-form { margin: 0 0 8px; }
.fav-btn {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 12px;
  cursor: pointer;
}
.fav-btn.on { background: rgba(230,200,74,0.12); box-shadow: 0 0 6px rgba(230,200,74,0.25); }
.fav-btn:hover { color: #ffe37a; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.tag {
  border: 1px solid var(--border-bright);
  border-radius: 10px;
  padding: 0 8px;
  font-size: 11px;
  color: var(--teal);
  text-decoration: none;
}
.tag:hover { border-color: var(--teal); text-decoration: none; }

.related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

/* Series seasons */
.season {
  border: 1px solid var(--orange);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.season h3 { margin-bottom: 6px; }
.ep-list { width: 100%; border-collapse: collapse; }
.ep-list th {
  text-align: left;
  background: var(--bg-table);
  color: var(--gold);
  font-weight: normal;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
}
.ep-list td { padding: 4px 6px; border-bottom: 1px solid rgba(59,79,216,0.25); }
.ep-list tr:hover td { background: rgba(59,79,216,0.1); }

/* Forms / admin */
.form-grid { display: grid; grid-template-columns: 140px 1fr; gap: 7px 10px; align-items: start; }
.form-grid label { padding-top: 4px; color: var(--muted); }
.form-grid .full { grid-column: 1 / -1; }
input[type="text"], input[type="password"], input[type="number"], input[type="url"],
input[type="file"], select, textarea {
  background: #070a1c;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 8px;
  width: 100%;
  outline: none;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: var(--border-bright);
  box-shadow: var(--glow);
}
.checks { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.checks label { color: var(--text); padding-top: 0; }
.row-actions { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.error {
  border: 1px solid var(--coral-dim);
  background: rgba(232, 116, 106, 0.08);
  color: var(--coral);
  padding: 8px 10px;
  border-radius: 6px;
  margin: 0 0 10px;
}
.ok {
  border: 1px solid var(--teal-dim);
  background: rgba(46, 230, 166, 0.08);
  color: var(--teal);
  padding: 8px 10px;
  border-radius: 6px;
  margin: 0 0 10px;
}
.login-box { max-width: 360px; margin: 24px auto; }
.login-box h2 { text-align: center; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  text-align: left;
  background: var(--bg-table);
  color: var(--gold);
  font-weight: normal;
  padding: 5px 6px;
  border-bottom: 1px solid var(--border);
}
.admin-table td { padding: 5px 6px; border-bottom: 1px solid rgba(59,79,216,0.25); vertical-align: middle; }
.admin-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.progress {
  height: 8px;
  background: #070a1c;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 6px;
  display: none;
}
.progress > span { display: block; height: 100%; width: 0; background: var(--teal); }

footer.site {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 8px 12px 16px;
}
footer.site .tmdb-home-attr {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
}
footer.site .site-links { display: block; }
footer.site .site-links a { color: var(--teal); text-decoration: none; }
footer.site .site-links a:hover { color: #7ffff0; text-decoration: underline; }
footer.site .foot-sep { color: var(--muted); }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .related { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
  .layout { display: block; }
  .side-stack, aside.panel { width: auto; flex: none; margin-top: 10px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .search-form { margin-left: 0; width: 100%; }
  .search-form input[type="text"] { flex: 1; width: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .logo { font-size: 22px; }
  .related { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .nav { padding: 6px; }
}

/* TMDb catalog additions */
.section-head { margin-top: 16px; }
.watch-badge {
  position: absolute;
  left: 5px; bottom: 5px;
  background: #07140f;
  border: 1px solid var(--teal);
  color: var(--teal);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  letter-spacing: 0.02em;
  box-shadow: 0 0 6px rgba(46,230,166,0.35);
}
.btn-watch {
  display: inline-block;
  background: #0b1c18;
  color: var(--teal);
  border: 1px solid var(--teal);
  border-radius: 6px;
  padding: 7px 16px;
  text-decoration: none;
  font-weight: bold;
  letter-spacing: 0.03em;
  box-shadow: 0 0 10px rgba(46,230,166,0.35);
  margin: 8px 0;
}
.btn-watch:hover { color: #7ffff0; text-decoration: none; }
.btn-watch-sm { padding: 2px 8px; font-size: 11px; margin: 0 0 0 8px; font-weight: normal; }
.lib-toggle { color: var(--muted); display: flex; align-items: center; gap: 4px; }

.title-hero { position: relative; margin: -10px -12px 12px; padding: 12px; overflow: visible; border-radius: var(--radius) var(--radius) 0 0; }
.backdrop {
  position: absolute; inset: 0;
  background-size: cover; background-position: center top;
  opacity: 0.28; filter: saturate(0.9);
  pointer-events: none;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,15,36,0.2), var(--bg-panel) 90%);
}
.title-row {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: stretch;
  flex-wrap: nowrap;
}
.title-poster { flex: 0 0 92px; width: 92px; }
.title-poster img, .title-poster .ph {
  width: 92px; aspect-ratio: 2/3; object-fit: cover; display: block;
  border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--glow);
}
.title-poster .ph {
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 10px; color: var(--gold);
  background: linear-gradient(160deg, #12183a 0%, #070a1c 100%);
  overflow: hidden; padding: 4px;
  height: auto;
}
.title-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
}
.title-heading {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}
.title-info h2 {
  color: var(--coral);
  font-size: clamp(13px, 1.5vw, 18px);
  line-height: 1.2;
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
}
.title-info .meta { margin: 0; }
.title-info .tags { margin: 0; }
.title-info .fav-form { margin: 0; flex: 0 0 auto; }
.title-info .title-watch { margin: 0; }
.title-info .btn-watch { margin: 0; padding: 4px 10px; font-size: 12px; }

.card .csub {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
}
.cast-more, .bio-more { margin: 8px 0 12px; }
.cast-more > summary, .bio-more > summary {
  cursor: pointer;
  color: var(--teal);
  font-size: 12px;
  list-style: none;
}
.cast-more > summary::-webkit-details-marker,
.bio-more > summary::-webkit-details-marker { display: none; }
.cast-more .grid { margin-top: 8px; }

.person-photo { flex: 0 0 120px; width: 120px; }
.person-photo img, .person-photo .ph {
  width: 120px; aspect-ratio: 2/3; object-fit: cover; display: block;
  border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--glow);
}
.person-photo .ph {
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-size: 14px; color: var(--gold);
  background: linear-gradient(160deg, #12183a 0%, #070a1c 100%);
  overflow: hidden; padding: 6px;
}
.person-hero { margin-bottom: 8px; }

.ep-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(59,79,216,0.25); }
.ep-still { width: 120px; height: 68px; object-fit: cover; border: 1px solid var(--border); border-radius: 4px; flex: 0 0 120px; }
.ep-body { flex: 1; min-width: 0; }

.tmdb-attr { display: block; margin-top: 6px; color: var(--muted); }
.tmdb-logo { height: 14px; vertical-align: middle; margin-right: 6px; }

.tmdb-box {
  border: 1px solid var(--orange);
  border-radius: 6px;
  padding: 8px 10px;
  margin: 0 0 12px;
}
.tmdb-results { margin-top: 8px; }
.tmdb-hit {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 6px; border-bottom: 1px solid rgba(59,79,216,0.25);
  cursor: pointer; text-align: left; width: 100%;
  background: transparent; color: inherit; border-left: 0; border-right: 0; border-top: 0;
  border-radius: 0;
}
.tmdb-hit:hover { background: rgba(59,79,216,0.15); }
.tmdb-hit img { width: 40px; height: 60px; object-fit: cover; border-radius: 3px; border: 1px solid var(--border); }
.tmdb-hit .meta { font-size: 11px; }

@media (max-width: 800px) {
  .title-row { flex-direction: row; flex-wrap: nowrap; align-items: stretch; gap: 10px; }
  .title-poster, .title-poster img, .title-poster .ph { width: 110px; flex: 0 0 110px; }
  .person-photo, .person-photo img, .person-photo .ph { width: 110px; flex: 0 0 110px; }
  .title-info h2 { font-size: 15px; }
  .ep-still { width: 96px; height: 54px; flex-basis: 96px; }
}

.user-create { max-width: 420px; margin-bottom: 16px; }
.user-create input[type="text"], .user-create input[type="password"],
.account-box input[type="text"], .account-box input[type="password"],
.login-box input[type="text"], .login-box input[type="password"] {
  width: 100%;
  max-width: 320px;
  background: #070a1c;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
}


.pill.processing {
  background: #3a3420;
  color: #e8d48b;
  border: 1px solid #6a5a20;
}
.pill.warn {
  background: #3a2a18;
  color: #f0b36a;
  border: 1px solid #6a4a18;
}
.pill.danger {
  background: #3a1818;
  color: #f08a8a;
  border: 1px solid #6a2020;
}
.player-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 24px 16px;
  text-align: center;
  color: var(--text);
}
.player-note p {
  margin: 8px 0 0;
  max-width: 36em;
  color: var(--muted);
}
.player-note-warn strong { color: #f0b36a; }
.admin-status-msg {
  max-width: 22em;
  font-size: 12px;
  margin-top: 4px;
}


/* Where to Watch (TMDb / JustWatch providers) */
.where-watch { margin-top: 14px; }
.where-watch > .subhead { margin-bottom: 8px; }
.where-watch > .subhead a { color: inherit; text-decoration: none; }
.where-watch > .subhead a:hover { color: var(--teal); text-decoration: underline; }
.watch-row {
  display: flex;
  gap: 8px 12px;
  align-items: flex-start;
  margin: 4px 0;
}
.watch-label {
  flex: 0 0 108px;
  color: var(--gold);
  font-size: 12px;
  padding-top: 8px;
}
.watch-logos { display: flex; flex-wrap: wrap; gap: 8px 10px; min-width: 0; }
.watch-provider {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
  text-decoration: none;
  color: var(--text);
  font-size: 10px;
  text-align: center;
  line-height: 1.2;
}
a.watch-provider:hover { color: var(--teal); text-decoration: none; }
.watch-provider img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--border);
}
.watch-name {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 64px;
}
.watch-empty { margin: 4px 0 0; }
.justwatch-attr {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 0;
}
@media (max-width: 480px) {
  .watch-row { flex-direction: column; gap: 4px; }
  .watch-label { flex: none; padding-top: 2px; }
}


/* Traffic + Files */
.traffic-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}
.traffic-stats .stat { margin: 0; text-align: center; }
.traffic-stats .stat strong { display: block; font-size: 22px; color: var(--teal); margin-top: 2px; }
.traffic-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.traffic-ol { margin: 0; padding: 0 0 0 18px; }
.traffic-ol li { margin: 0 0 4px; overflow-wrap: anywhere; }
.traffic-filters input[type="text"], .traffic-filters input[type="date"] {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  margin-left: 4px;
}
.traffic-filters .chk { color: var(--text); }
.admin-table tr.is-admin td { background: rgba(230, 200, 74, 0.06); }
.ua { font-size: 11px; overflow-wrap: anywhere; }

.file-crumbs { margin: 0 0 10px; font-size: 13px; }
.file-crumbs .sep { color: var(--muted); margin: 0 6px; }
.file-crumbs .here { color: var(--gold); }
.file-table .file-icon.sm {
  display: inline-flex;
  width: 34px; height: 24px;
  align-items: center; justify-content: center;
  font-size: 9px; font-weight: bold;
  border-radius: 4px;
  background: var(--bg-table);
  border: 1px solid var(--border);
  color: var(--gold);
}
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.file-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 8px 8px;
  background: var(--bg-panel);
  min-width: 0;
}
.file-card .file-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  margin: 0 auto 8px;
  font-size: 11px; font-weight: bold;
  color: #fff;
  background: linear-gradient(135deg, var(--border), #1a2150);
}
.file-card.kind-folder .file-icon { background: linear-gradient(135deg, #7c6cff, #3b4fd8); }
.file-card.kind-image .file-icon { background: linear-gradient(135deg, #ec4899, #9d174d); }
.file-card.kind-audio .file-icon { background: linear-gradient(135deg, #7c6cff, #4c1d95); }
.file-card.kind-video .file-icon { background: linear-gradient(135deg, #f97316, #9a3412); }
.file-card.kind-doc .file-icon { background: linear-gradient(135deg, #3ec6ff, #0369a1); }
.file-card.kind-archive .file-icon { background: linear-gradient(135deg, #eab308, #854d0e); }
.file-card.kind-code .file-icon { background: linear-gradient(135deg, #22c55e, #166534); }
.file-name {
  font-weight: bold;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}
.file-actions { margin-top: 6px; font-size: 12px; }

.file-table { width: 100%; table-layout: auto; }
.file-table .file-col-name {
  min-width: 0;
}
.file-table .file-col-name .file-name,
.file-table .file-col-name a.file-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-table .file-col-action { white-space: nowrap; }

@media (max-width: 600px) {
  .file-table {
    width: 100%;
    table-layout: fixed;
  }
  .file-table .file-col-type,
  .file-table .file-col-size,
  .file-table .file-col-date {
    display: none;
  }
  .file-table .file-col-icon { width: 40px; }
  .file-table .file-col-action {
    width: 4.8em;
    text-align: right;
    white-space: nowrap;
    padding-right: 8px;
  }
  .file-table .file-col-name {
    min-width: 0;
    overflow: hidden;
  }
}

@media (max-width: 800px) {
  .traffic-cols { grid-template-columns: 1fr; }
}


.nowrap { white-space: nowrap; }
.top-titles { list-style: none; margin: 0; padding: 0; }
.top-title { display: flex; align-items: center; gap: 8px; margin: 6px 0; min-width: 0; }
.trail-list { list-style: none; margin: 0; padding: 0; }
.trail-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(59,79,216,0.25); min-width: 0; }
.trail-poster {
  width: 40px; height: 60px;
  object-fit: cover;
  border-radius: 3px;
  background: var(--bg-table);
  flex: 0 0 40px;
}
.trail-poster.sm { width: 28px; height: 42px; flex-basis: 28px; vertical-align: middle; }
.trail-poster.placeholder { display: inline-block; }
.trail-body { min-width: 0; }
.trail-title { font-weight: bold; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trail-meta { font-size: 12px; }
.reset-traffic { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bots-table .sample-paths { font-size: 12px; max-width: 280px; }
.sample-paths div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flash { color: var(--teal); }
p.error { color: #f87171; }

/* Blog */
.blog-search-form { display: flex; gap: 4px; }
.blog-search-form input[type="text"] {
  flex: 1;
  min-width: 0;
  background: #070a1c;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  outline: none;
}
.blog-search-form input[type="text"]:focus { border-color: var(--border-bright); box-shadow: var(--glow); }
.blog-recent, .blog-archives { list-style: none; margin: 0; padding: 0; }
.blog-recent li, .blog-archives li { margin: 0 0 8px; line-height: 1.3; }
.blog-recent a, .blog-archives a { text-decoration: none; color: var(--teal-dim); font-size: 12px; }
.blog-recent a:hover, .blog-archives a:hover { color: var(--teal); text-decoration: underline; }
.blog-recent .blog-date { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.tag-cloud .tag { line-height: 1.4; }
.tag-cloud .tw1 { font-size: 11px; }
.tag-cloud .tw2 { font-size: 12px; }
.tag-cloud .tw3 { font-size: 13px; }
.tag-cloud .tw4 { font-size: 15px; }
.tag-cloud .tw5 { font-size: 16px; font-weight: bold; }

.blog-list { display: flex; flex-direction: column; gap: 14px; }
.blog-teaser {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(59,79,216,0.28);
  align-items: flex-start;
}
.blog-teaser:last-child { border-bottom: 0; padding-bottom: 0; }
.blog-thumb {
  flex: 0 0 160px;
  width: 160px;
  text-decoration: none;
}
.blog-thumb img {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--glow);
  background: #080c1e;
}
.blog-teaser-body { min-width: 0; flex: 1; }
.blog-teaser-body h3 { margin: 0 0 4px; font-size: 15px; color: var(--coral); }
.blog-teaser-body h3 a { color: var(--coral); text-decoration: none; }
.blog-teaser-body h3 a:hover { color: var(--teal); }
.blog-meta { color: var(--muted); font-size: 12px; margin: 0 0 6px; }
.blog-meta a { text-decoration: none; }
.blog-excerpt { margin: 0 0 6px; color: var(--text); }

.blog-post { min-width: 0; }
.blog-body { margin-top: 10px; line-height: 1.55; }
.blog-body h1, .blog-body h2, .blog-body h3, .blog-body h4 {
  color: var(--gold);
  margin: 16px 0 8px;
}
.blog-body h1 { font-size: 18px; color: var(--coral); }
.blog-body h2 { font-size: 16px; color: var(--coral); }
.blog-body h3 { font-size: 14px; }
.blog-body p { margin: 0 0 10px; }
.blog-body a { color: var(--teal); }
.blog-body ul, .blog-body ol { margin: 0 0 10px; padding: 0 0 0 22px; }
.blog-body li { margin: 0 0 4px; }
.blog-body blockquote {
  margin: 0 0 12px;
  padding: 6px 10px;
  border-left: 3px solid var(--gold);
  background: rgba(230, 200, 74, 0.06);
  color: var(--text);
}
.blog-body blockquote p:last-child { margin-bottom: 0; }
.blog-body pre {
  background: #070a1c;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  overflow-x: auto;
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
}
.blog-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: #070a1c;
  border: 1px solid rgba(59,79,216,0.35);
  border-radius: 3px;
  padding: 0 4px;
}
.blog-body pre code { border: 0; padding: 0; background: transparent; }
.blog-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}
.blog-body img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--glow);
  margin: 6px 0 12px;
  background: #080c1e;
}
.blog-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 12px;
}
.blog-body th {
  text-align: left;
  background: var(--bg-table);
  color: var(--gold);
  font-weight: normal;
  padding: 5px 6px;
  border-bottom: 1px solid var(--border);
}
.blog-body td { padding: 5px 6px; border-bottom: 1px solid rgba(59,79,216,0.25); }

.blog-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(59,79,216,0.35);
  font-size: 12px;
}
.blog-nav a { text-decoration: none; max-width: 48%; }
.blog-next { text-align: right; margin-left: auto; }

@media (max-width: 800px) {
  .blog-teaser { flex-direction: column; }
  .blog-thumb, .blog-thumb img { width: 100%; flex-basis: auto; height: auto; max-height: 200px; }
}
