/* Xolta Ciné. Plain CSS for the Tesla browser (old Chromium): no aspect-ratio, no flex gap, no :has. */
:root {
  --bg: #0b0b0f;
  --bg-2: #16161d;
  --bg-3: #23232c;
  --text: #f2f2f2;
  --muted: #a6a6b0;
  --accent: #f5b301;
  --accent-ink: #111111;
  --pad: 4vw;
}

[hidden] { display: none !important; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.no-scroll { overflow: hidden; }

a { color: var(--accent); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

button:focus, a:focus, input:focus, .card:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}
.btn + .btn { margin-left: 12px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:active { background: #ffc933; }
.btn-secondary { background: rgba(120, 120, 135, 0.55); color: #fff; }
.btn-secondary:active { background: rgba(120, 120, 135, 0.8); }
.btn-ghost { background: rgba(0, 0, 0, 0.55); color: #fff; }
.btn-block { width: 100%; }

/* ---------- login ---------- */
.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(ellipse at top, #2a2110 0%, var(--bg) 60%);
}
.login-box {
  width: 100%;
  max-width: 420px;
  background: rgba(22, 22, 29, 0.92);
  padding: 36px 28px;
  border-radius: 10px;
}
.login-box label { display: block; margin: 28px 0 8px; color: var(--muted); }
.login-box input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  font-size: 20px;
  color: var(--text);
  background: var(--bg-3);
  border: 1px solid #3a3a46;
  border-radius: 6px;
}
.login-error { min-height: 1.4em; margin: 10px 0 18px; color: #ff8a7a; }

/* ---------- logo / top bar ---------- */
.logo {
  white-space: nowrap;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 1px;
  color: var(--text);
  padding: 8px 0;
  min-height: 48px;
}
.logo span { color: var(--accent); }
.logo-big { font-size: 34px; text-align: center; }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--pad);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
  transition: background-color 0.3s;
}
.topbar.solid { background-color: var(--bg); }
.topbar-left, .topbar-right { display: flex; align-items: center; }
.nav { display: flex; align-items: center; margin-left: 24px; }
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  white-space: nowrap;
  color: #d8d8de;
  text-decoration: none;
  font-size: 17px;
}
.nav-link[aria-current="page"] { color: #fff; font-weight: 700; }
.logout { margin-left: 10px; color: var(--muted); font-size: 15px; }

.search {
  position: relative;
  display: flex;
  align-items: center;
  width: 320px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid #55555f;
  border-radius: 6px;
}
.search-icon { padding: 0 6px 0 14px; color: var(--muted); font-size: 22px; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  font-size: 17px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline-offset: 0;
}
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { width: 48px; height: 46px; color: var(--muted); font-size: 18px; }

/* ---------- billboard ---------- */
.billboard {
  position: relative;
  height: 56.25vw;
  max-height: 82vh;
  min-height: 420px;
  overflow: hidden;
  background: var(--bg-2);
}
.bb-slide {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  pointer-events: none; /* hidden slides sit on top of each other: only the visible one takes clicks */
  transition: opacity 0.9s;
}
.bb-slide.active { opacity: 1; pointer-events: auto; }
.bb-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bb-shade {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    linear-gradient(to right, rgba(11, 11, 15, 0.92) 0%, rgba(11, 11, 15, 0.55) 40%, rgba(11, 11, 15, 0) 70%),
    linear-gradient(to top, var(--bg) 0%, rgba(11, 11, 15, 0) 35%);
}
.bb-content {
  position: absolute;
  left: var(--pad);
  bottom: calc(7vw + 56px); /* clears the first row, which overlaps the billboard by 7vw */
  width: 46%;
  max-width: 760px;
}
.bb-title {
  margin: 0 0 12px;
  font-size: 54px;
  line-height: 1.08;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.bb-overview {
  margin: 14px 0 22px;
  font-size: 19px;
  color: #e6e6ea;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}
.bb-dots { position: absolute; right: var(--pad); bottom: calc(7vw + 56px); display: flex; }
.bb-dot { width: 40px; height: 48px; display: flex; align-items: center; justify-content: center; }
.bb-dot span { display: block; width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.35); }
.bb-dot.active span { background: var(--accent); }

.meta { color: #d4d4da; font-size: 17px; }
.meta .sep { margin: 0 8px; color: var(--muted); }
.badge {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  vertical-align: 2px;
}
.badge-ok { border-color: var(--accent); color: var(--accent); }

/* ---------- rows ---------- */
.rows { position: relative; margin-top: -7vw; z-index: 2; padding-bottom: 20px; }
.row { margin: 0 0 30px; }
.row-title { margin: 0 var(--pad) 10px; font-size: 22px; font-weight: 700; }
.row-wrap { position: relative; }
.row-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px var(--pad) 8px;
  scroll-snap-type: x proximity;
  scroll-padding: 0 var(--pad);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.row-track::-webkit-scrollbar { display: none; }
.row-track .card {
  flex: 0 0 auto;
  width: 44vw;
  margin-right: 10px;
  scroll-snap-align: start;
}
.row-track .card:last-child { margin-right: 0; }
.arrow {
  position: absolute;
  top: 4px;
  bottom: 8px;
  width: var(--pad);
  min-width: 48px;
  z-index: 3;
  font-size: 40px;
  color: #fff;
  background: rgba(11, 11, 15, 0.6);
}
.arrow-left { left: 0; }
.arrow-right { right: 0; }
.arrow:disabled { opacity: 0; pointer-events: none; }

/* ---------- cards ---------- */
.card {
  position: relative;
  display: block;
  padding: 0;
  text-align: left;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-3);
}
.card-img { position: relative; padding-top: 56.25%; background: var(--bg-3); }
.card-img img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-fallback {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 12px 10px;
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0));
}
.card-blank {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-weight: 800;
  background: linear-gradient(135deg, #2b2b36, #17171e);
}
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, 0.25); }
.card-progress span { display: block; height: 100%; background: var(--accent); }
.card-ready {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-ink);
  background: var(--accent);
}
.card:active { transform: scale(0.98); }

/* ---------- grid views ---------- */
.view-grid { padding: 110px var(--pad) 30px; min-height: 70vh; }
.view-title { margin: 0 0 20px; font-size: 30px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  grid-gap: 14px;
  gap: 14px;
}
.empty { color: var(--muted); font-size: 19px; }
.loading { padding: 140px var(--pad); color: var(--muted); text-align: center; }

/* ---------- footer ---------- */
.footer { padding: 30px var(--pad) 50px; color: var(--muted); font-size: 15px; border-top: 1px solid #1d1d25; }
.footer p { margin: 4px 0; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  padding: 40px 16px;
  background: rgba(0, 0, 0, 0.75);
  -webkit-overflow-scrolling: touch;
}
.modal {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 22px;
  background: rgba(11, 11, 15, 0.8);
}
.modal-hero { position: relative; padding-top: 56.25%; background: var(--bg-3); }
.modal-hero img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.modal-hero-shade { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, var(--bg-2) 0%, rgba(22, 22, 29, 0) 55%); }
.modal-hero-text { position: absolute; left: 32px; right: 32px; bottom: 20px; }
.modal-title { margin: 0; font-size: 40px; line-height: 1.1; font-weight: 900; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); }
.modal-original { margin: 6px 0 0; color: #d4d4da; font-style: italic; }
.modal-content { padding: 6px 32px 32px; }
.modal-actions { display: flex; flex-wrap: wrap; align-items: center; margin: 14px 0 18px; }
.modal-actions .btn { margin: 0 12px 10px 0; }
.modal-actions .btn + .btn { margin-left: 0; }
.modal-status { margin: 0 0 12px; color: var(--accent); font-weight: 700; }
.modal-hint { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.modal-overview { margin: 0 0 18px; font-size: 18px; }
.facts { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 16px; }
.facts li { margin: 0 0 6px; }
.facts strong { color: #d8d8de; font-weight: 600; }
.arte-link { display: inline-block; margin-top: 14px; padding: 12px 0; font-size: 16px; }
.ext-links { display: flex; flex-wrap: wrap; margin-top: 14px; }
.ext-link { display: inline-block; margin-right: 26px; padding: 12px 0; font-size: 16px; }
.attribution { margin: 10px 0 0; color: var(--muted); font-size: 13px; }

/* Where to watch (TMDB): logos on cards, grouped offers in the detail view. */
.card-offers { position: absolute; top: 8px; left: 8px; display: flex; }
.card-offers img { width: 30px; height: 30px; margin-right: 4px; border-radius: 6px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.card-offers span { margin-right: 4px; padding: 2px 6px; border-radius: 3px; font-size: 12px; font-weight: 700; background: rgba(0, 0, 0, 0.75); }
.offers { margin: 0 0 18px; }
.offers h3 { margin: 0 0 10px; font-size: 18px; }
.offer-group { display: flex; flex-wrap: wrap; align-items: center; margin: 0 0 8px; }
.offer-group strong { min-width: 150px; margin-right: 10px; color: #d8d8de; font-weight: 600; font-size: 15px; }
.offer {
  display: inline-flex;
  align-items: center;
  margin: 0 14px 6px 0;
  color: var(--text, #f2f2f5);
  font-size: 15px;
  text-decoration: none;
}
.offer img { width: 40px; height: 40px; margin-right: 8px; border-radius: 8px; }
.offers-source { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- player ---------- */
.player { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; background: #000; }
.player video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #000; }
.player-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  padding: 14px 20px 30px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  transition: opacity 0.4s;
}
.player-bar.faded { opacity: 0; pointer-events: none; }
.player-info { margin-left: 18px; min-width: 0; }
.player-title { font-weight: 800; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-status { color: var(--accent); font-size: 15px; }
.player-error {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 24px 28px;
  text-align: center;
  border-radius: 10px;
  background: rgba(22, 22, 29, 0.95);
}

/* ---------- server page ---------- */
.btn-small { min-height: 48px; padding: 0 18px; font-size: 16px; }
.btn-danger { background: #c0392b; color: #fff; }
.btn:disabled { opacity: 0.55; cursor: default; }
.server { max-width: 980px; }
.server-card { margin: 0 0 22px; padding: 20px 22px; border-radius: 10px; background: var(--bg-2); }
.server-card h2 { margin: 0 0 12px; font-size: 21px; }
.server-card p { margin: 0 0 12px; }
.server-bar { height: 14px; margin: 0 0 10px; border-radius: 7px; background: var(--bg-3); overflow: hidden; }
.server-bar-fill { height: 100%; background: var(--accent); }
.server-films { margin: 0; padding: 0; list-style: none; }
.server-film { display: flex; align-items: center; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--bg-3); }
.server-film:first-child { border-top: 0; }
.server-thumb { width: 160px; height: 90px; margin-right: 16px; border-radius: 6px; object-fit: cover; background: var(--bg-3); flex-shrink: 0; }
.server-film-text { flex: 1; min-width: 200px; margin-right: 12px; }
.server-film-text strong { display: block; margin-bottom: 2px; }
.server-line { display: block; color: var(--muted); font-size: 15px; }
.server-warn { color: #e8a33d; }
.server-error { color: #ff7b6b; }
.server-actions { display: flex; flex-wrap: wrap; align-items: center; }
.server-actions .btn { margin: 6px 10px 6px 0; }
.server-actions .btn + .btn { margin-left: 0; }
.server-note { color: var(--muted); font-size: 15px; margin: 14px 0 0; }

/* ---------- browser test (probe.html) ---------- */
.probe { max-width: 980px; }
.probe .logo { display: inline-block; margin: 0 0 18px; text-decoration: none; }
.probe-status { margin: 0 0 18px; color: var(--muted); }
.probe-facts { display: flex; flex-wrap: wrap; margin: 0 0 12px; font-size: 16px; }
.probe-facts dt { width: 180px; margin: 0 0 6px; color: var(--muted); }
.probe-facts dd { width: calc(100% - 180px); margin: 0 0 6px; word-break: break-word; }
.probe-legend { margin: 0 0 12px; }
.probe-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.probe-table th { text-align: left; color: var(--muted); font-weight: 600; }
.probe-table th, .probe-table td { padding: 7px 10px 7px 0; border-top: 1px solid var(--bg-3); }
.probe-yes { color: #5fd38d; }
.probe-maybe { color: #e8a33d; }
.probe-no { color: #ff7b6b; }
.probe-na { color: var(--muted); }
.probe-video-box { width: 320px; max-width: 100%; height: 180px; margin: 0 0 12px; border-radius: 6px; background: #000; overflow: hidden; }
.probe-video-box video { width: 100%; height: 100%; }
.probe-sent { margin: 0 0 12px; }
.probe-json { max-height: 320px; margin: 0; padding: 12px; overflow: auto; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.sources { margin: 0 0 14px; padding: 0; list-style: none; }
.source { padding: 12px 0; border-top: 1px solid var(--bg-3); }
.source:first-child { border-top: 0; padding-top: 0; }
.source-head { display: flex; align-items: center; }
.source-head strong { margin-right: 10px; font-size: 17px; }
.source-line, .source-test { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.source-good { color: #7fd18b; }
.source-bad { color: #ff7b72; }
.source-sub { padding-left: 16px; }

/* ---------- responsive ---------- */
@media (min-width: 700px) {
  .row-track .card { width: 30vw; }
}
@media (min-width: 1100px) {
  .row-track .card { width: 22vw; }
}
@media (min-width: 1500px) {
  .row-track .card { width: 17.6vw; }
}
@media (max-width: 1100px) {
  .bb-content { width: 70%; }
  .bb-title { font-size: 42px; }
  .search { width: 240px; }
}
@media (max-width: 760px) {
  html, body { font-size: 16px; }
  .topbar {
    position: relative;
    flex-wrap: wrap;
    padding: 6px 16px 10px;
    background: var(--bg);
  }
  .topbar-left, .topbar-right { width: 100%; }
  .topbar-left { justify-content: space-between; }
  .logo { font-size: 20px; letter-spacing: 0; }
  .nav { margin-left: 8px; }
  .nav-link { padding: 0 7px; font-size: 14px; }
  .server-thumb { width: 112px; height: 63px; margin-right: 12px; }
  .server-film-text { min-width: 0; }
  .server-actions { width: 100%; }
  .probe-facts dt { width: 100%; margin: 0; }
  .probe-facts dd { width: 100%; margin: 0 0 8px; }
  .search { flex: 1; width: auto; }
  .billboard { height: 118vw; min-height: 0; max-height: 78vh; }
  .bb-content { left: 16px; right: 16px; bottom: 8%; width: auto; }
  .bb-shade { background: linear-gradient(to top, var(--bg) 0%, rgba(11, 11, 15, 0.75) 38%, rgba(11, 11, 15, 0) 70%); }
  .bb-title { font-size: 30px; }
  .bb-overview { font-size: 16px; }
  .bb-dots { bottom: auto; top: 8px; right: 8px; }
  .rows { margin-top: 10px; }
  .view-grid { padding-top: 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-gap: 10px; gap: 10px; }
  .modal-backdrop { padding: 0; }
  .modal { border-radius: 0; min-height: 100vh; }
  .modal-hero-text { left: 16px; right: 16px; }
  .modal-title { font-size: 28px; }
  .modal-content { padding: 6px 16px 28px; }
  .btn { padding: 0 18px; }
}
