/* Streaming-Dashboard nach der neuen BetterTube-Designvorlage. */
:root {
  --bt-blue: var(--bt-accent, #0987f7);
  --bt-blue-deep: var(--bt-accent-deep, #0867c7);
  --bt-theme-rgb: var(--bt-accent-rgb, 9, 135, 247);
  --bt-bg: #080c12;
  --bt-panel: #0d131c;
  --bt-line: rgba(255, 255, 255, .075);
  --bt-muted: #9ba6b6;
}

html { scroll-behavior: smooth; }

body {
  display: block;
  min-height: 100vh;
  background: var(--bt-bg);
  color: #f8fafc;
  font-family: Inter, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fixed-header,
#release,
#requestnew,
#favorite,
#login,
#statistics,
#settings,
#admin { display: none !important; }

.bt-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  box-sizing: border-box;
  height: 72px;
  align-items: center;
  gap: clamp(10px, 1.5vw, 24px);
  padding: 0 22px;
  border-bottom: 1px solid var(--bt-line);
  background: rgba(7, 11, 17, .94);
  box-shadow: 0 12px 38px rgba(0, 0, 0, .2);
  backdrop-filter: blur(18px);
}

.bt-brand { display: flex; width: 184px; align-items: center; gap: 10px; flex: 0 0 auto; }
.bt-brand-icon { width: 34px; height: 34px; object-fit: contain; }
.bt-brand-wordmark { width: 145px; height: 38px; object-fit: contain; object-position: left center; }

.bt-main-nav { display: flex; min-width: 0; align-items: center; gap: 4px; }
.bt-main-nav a,
.bt-sidebar a {
  color: #dce3ec;
  text-decoration: none;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.bt-main-nav a { display: flex; min-height: 44px; align-items: center; gap: 7px; padding: 0 10px; border-radius: 10px; font-weight: 700; white-space: nowrap; }
.bt-main-nav a:hover,
.bt-main-nav a.is-active { background: linear-gradient(135deg, var(--bt-blue-deep), var(--bt-blue)); color: #fff; }

.bt-topbar-user { display: flex; align-items: center; gap: 7px; margin-left: auto; padding-right: 112px; font-weight: 750; white-space: nowrap; }
.bt-chevron { color: var(--bt-muted); }

#profiles {
  top: 17px;
  right: 28px;
  z-index: 102;
}
#profiles span { width: 38px; height: 38px; border-color: rgba(var(--bt-theme-rgb), .48); }

#search {
  top: 13px;
  right: 78px;
  z-index: 104;
  display: grid !important;
  box-sizing: border-box;
  width: 42px;
  height: 42px;
  margin: 0 !important;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 11px;
  background: #0e131d;
  color: #eef3f9;
}
#search svg { width: 23px; height: 23px; }

#search-input {
  position: fixed !important;
  top: 0 !important;
  z-index: 103;
  display: none;
  box-sizing: border-box;
  width: 100% !important;
  height: 72px;
  padding: 0 72px !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  border-radius: 0 !important;
  background: #0e131d !important;
  box-shadow: none !important;
  color: #eef3f9 !important;
  font-family: inherit !important;
  font-size: clamp(1.1rem, 2.5vw, 1.65rem) !important;
  text-align: center !important;
  transform: translateX(-50%) !important;
  left: 50% !important;
  right: auto !important;
}
#search-input::placeholder { color: #8993a3; }
#search-input:focus { border-color: var(--bt-blue) !important; box-shadow: 0 0 0 3px rgba(var(--bt-theme-rgb), .15) !important; }

.bt-sidebar {
  position: fixed;
  inset: 72px auto 0 0;
  z-index: 80;
  display: flex;
  box-sizing: border-box;
  width: 235px;
  flex-direction: column;
  padding: 26px 14px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--bt-line);
  background: linear-gradient(180deg, #0c121a 0%, #090e15 100%);
}
.bt-sidebar nav { display: grid; gap: 7px; }
.bt-sidebar a { display: flex; min-height: 44px; align-items: center; gap: 14px; padding: 0 14px; border-radius: 10px; font-size: 15px; }
.bt-sidebar a:first-letter { color: #cbd5e1; font-size: 20px; }
.bt-sidebar a:hover { background: rgba(255,255,255,.06); color: #fff; transform: translateX(2px); }
.bt-sidebar a.is-active { background: linear-gradient(135deg, var(--bt-blue-deep), var(--bt-blue)); box-shadow: 0 7px 18px rgba(var(--bt-theme-rgb), .25); color: #fff; font-weight: 750; }
.bt-sidebar-label { margin: 25px 12px 11px; padding-top: 18px; border-top: 1px solid var(--bt-line); color: #8590a1; font-size: 13px; }
.bt-category-nav { gap: 3px !important; }
.bt-category-nav a { min-height: 40px; }
.bt-sidebar-bottom { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--bt-line); }

body > .container {
  box-sizing: border-box;
  width: auto;
  max-width: none;
  margin: 72px 0 0 235px;
  padding: 0 26px 48px;
  text-align: left;
}

body > .bt-site-footer {
  width: auto;
  margin-left: 235px;
}

.bt-hero {
  position: relative;
  min-height: 330px;
  margin: 0 -26px 24px;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--bt-line);
  background: radial-gradient(circle at 75% 40%, rgba(var(--bt-theme-rgb), .34), transparent 33%), linear-gradient(110deg, #080b11 28%, #111a31 100%);
}
.bt-hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, #080b11 3%, rgba(8, 11, 17, .96) 24%, rgba(8, 11, 17, .48) 61%, rgba(8, 11, 17, .08) 100%), linear-gradient(0deg, #080c12 0%, transparent 42%);
}
.bt-hero-backdrop {
  position: absolute;
  inset: 0 0 0 38%;
  z-index: -2;
  background-position: center 22%;
  background-size: cover;
  filter: saturate(.92) contrast(1.06);
  opacity: 0;
  transform: scale(1.03);
  transition: opacity .5s ease;
}
.bt-hero.has-image .bt-hero-backdrop { opacity: .8; }
.bt-hero-content { width: min(560px, 50%); padding: 36px 0 48px 48px; }
.bt-hero-kicker { margin: 0 0 8px; color: var(--bt-blue); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.bt-hero h1 { max-width: 520px; margin: 0 0 12px; font-size: clamp(2rem, 3.3vw, 3.1rem); line-height: 1.02; letter-spacing: -.045em; }
.bt-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.bt-hero-tags span { padding: 4px 9px; border: 1px solid rgba(255,255,255,.3); border-radius: 5px; background: rgba(8,12,18,.45); color: #e8edf5; font-size: 12px; font-weight: 750; }
.bt-hero-content > p:not(.bt-hero-kicker) { max-width: 520px; margin: 0; color: #d0d7e2; font-size: 16px; line-height: 1.55; }
.bt-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 19px; }
.bt-hero-actions a { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 19px; border-radius: 8px; color: #fff; font-weight: 800; text-decoration: none; }
.bt-primary-action { background: linear-gradient(135deg, var(--bt-blue), var(--bt-blue-deep)); box-shadow: 0 10px 24px rgba(var(--bt-theme-rgb), .26); }
.bt-secondary-action { border: 1px solid rgba(255,255,255,.65); background: rgba(6,10,16,.48); }
.bt-hero-actions a:hover { filter: brightness(1.12); transform: translateY(-1px); }
.bt-hero-dots { position: absolute; bottom: 16px; left: 50%; display: flex; gap: 10px; }
.bt-hero-dots i { width: 9px; height: 9px; border-radius: 50%; background: #8c96a6; }
.bt-hero-dots i:first-child { width: 19px; border-radius: 999px; background: var(--bt-blue); }

.activity-badges { justify-content: flex-end; margin: 0 0 2px !important; }
.activity-badge { padding: 6px 11px !important; background: transparent !important; border-color: var(--bt-line) !important; color: #8994a5 !important; font-size: 13px; }
.home-settings { border-color: var(--bt-line) !important; background: #0d131c !important; }

#hideOnSearch { margin: 0 !important; }
#hideOnSearch h2,
body > .container > h2,
.all-elements-heading h2 {
  position: relative;
  margin: 31px 0 12px !important;
  padding-left: 17px;
  color: #f6f8fb;
  font-size: 22px !important;
  letter-spacing: -.025em;
}
#hideOnSearch h2::before,
.all-elements-heading h2::before {
  position: absolute;
  inset: 3px auto 3px 0;
  width: 5px;
  border-radius: 99px;
  background: var(--bt-blue);
  content: "";
}
#hideOnSearch h2 span,
.all-elements-heading h2 span { color: #8d98a9 !important; font-size: .62em !important; }
#hideOnSearch > hr { display: none; }

#cover-container-last,
#cover-container-charts,
#cover-container-recommendations,
#cover-container-newest {
  gap: 18px;
  margin: 0 !important;
  padding: 0 0 8px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
#cover-container-last > *,
#cover-container-charts > *,
#cover-container-recommendations > *,
#cover-container-newest > * { flex: 0 0 clamp(210px, 22vw, 330px); min-width: 210px; max-width: 330px; }

#cover-container-charts .image-sticker {
  top: 10px;
  right: 10px;
  box-sizing: border-box;
  width: 46px;
  height: 46px;
  border: 2px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: #05080d;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .8), 0 0 0 3px rgba(0, 0, 0, .42);
  filter: contrast(1.18) saturate(1.08);
}

#cover-container-charts .cover-item h3 {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  margin: 9px 4px 2px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: rgba(3, 7, 12, .94);
  box-shadow: 0 5px 15px rgba(0, 0, 0, .38);
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  text-shadow: 0 1px 3px #000;
}

.cover-item { position: relative; width: 100%; max-width: none; overflow: visible; border-radius: 10px; text-align: left; filter: none; }
.cover-item:hover,
.cover-item.hover { transform: translateY(-4px) !important; }
.cover-item img { display: block; box-sizing: border-box; width: 100%; border: 1px solid var(--bt-line); border-radius: 10px; box-shadow: 0 10px 25px rgba(0,0,0,.3); object-fit: cover; }
.cover-item .delete-btn {
  top: 8px;
  left: 8px;
  z-index: 12;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  padding: 6px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 9px;
  background: rgba(145, 18, 28, .94);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .48);
  transform: none;
}
.cover-item .delete-btn svg {
  display: block;
  width: 22px;
  height: 22px;
}
.cover-item:hover .delete-btn,
.cover-item:focus-within .delete-btn,
.cover-item.hover .delete-btn { display: grid; place-items: center; }
.cover-item .delete-btn:hover,
.cover-item .delete-btn:focus-visible {
  background: #c51f2d;
  outline: 2px solid rgba(255, 255, 255, .75);
  outline-offset: 2px;
}
.bt-continue-preview {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: #111822;
}
.bt-continue-preview::after {
  position: absolute;
  inset: 0;
  content: "";
  border-radius: inherit;
  background: linear-gradient(180deg, transparent 48%, rgba(3, 7, 12, .7) 100%);
  pointer-events: none;
}
.bt-continue-preview img { border-radius: inherit !important; }
.bt-progress-track {
  position: absolute;
  right: 8px;
  bottom: 7px;
  left: 8px;
  z-index: 2;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .3);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .5);
}
.bt-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #087de8, #20a3ff);
  box-shadow: 0 0 10px rgba(32, 163, 255, .72);
}
.bt-progress-time {
  position: absolute;
  right: 9px;
  bottom: 17px;
  z-index: 2;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(2, 6, 12, .72);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  text-shadow: 0 1px 2px #000;
}
#cover-container-last .cover-item img,
#cover-container-charts .cover-item img,
#cover-container-recommendations .cover-item img { aspect-ratio: 16 / 8.3; }
#cover-container-newest .cover-item img { aspect-ratio: 16 / 10; }
.bt-card-title { display: block; margin: 9px 4px 2px; overflow: hidden; color: #f4f6fa; font-size: 15px; font-weight: 800; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.bt-card-meta { display: block; margin: 0 4px; color: #8e99a9; font-size: 13px; }

.all-elements-heading { margin-top: 34px !important; }
#cover-container.main-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 18px; margin-top: 17px; padding: 0; border: 0; background: transparent; }
#cover-container.main-container .cover-item { width: 100%; }
#cover-container.main-container .cover-item img { aspect-ratio: 3 / 4.2; }
.bt-library-loading {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px solid var(--bt-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .025);
  color: #aeb8c7;
  font-weight: 700;
}
.bt-library-loading.is-error { color: #ff9b9b; }
.series-sort-label { color: #929dad; }
.series-sort-label select,
#lastTimeSelect { border-color: var(--bt-line); background: #111822; color: #e8edf4; }

@media (max-width: 1180px) {
  .bt-topbar { gap: 8px; padding-inline: 16px; }
  .bt-brand { width: 160px; }
  .bt-brand-wordmark { width: 120px; }
  .bt-main-nav a { padding-inline: 8px; }
  .bt-topbar-user { display: none; }
}

@media (max-width: 820px) {
  .bt-topbar { height: 64px; padding: 0 14px; }
  .bt-brand { width: auto; }
  .bt-brand-wordmark { width: 124px; }
  .bt-main-nav { display: none; }
  .bt-sidebar { display: none; }
  #profiles { top: 13px; right: 14px; }
  #search { top: 11px; right: 64px; }
  #search-input { top: 0 !important; width: 100% !important; height: 64px; }
  body > .container { margin: 64px 0 0; padding: 0 14px 36px; }
  body > .bt-site-footer { width: auto; margin-left: 0; }
  .bt-hero { min-height: 360px; margin: 0 -14px 18px; }
  .bt-hero-backdrop { inset: 0; opacity: .26 !important; }
  .bt-hero::after { background: linear-gradient(90deg, rgba(8,11,17,.96), rgba(8,11,17,.55)), linear-gradient(0deg, #080c12, transparent 55%); }
  .bt-hero-content { box-sizing: border-box; width: 100%; padding: 58px 22px 48px; }
  .bt-hero-dots { left: 22px; }
  #cover-container-last > *, #cover-container-charts > *, #cover-container-recommendations > *, #cover-container-newest > * { flex-basis: 250px; }
}

@media (max-width: 520px) {
  .bt-brand-wordmark { display: none; }
  #search-input { left: 50% !important; right: auto !important; width: 100% !important; }
  .activity-badges { justify-content: flex-start; }
  .bt-hero h1 { font-size: 2rem; }
  #cover-container.main-container { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #cover-container-charts .image-sticker { width: 42px; height: 42px; }
  .all-elements-controls { width: 100%; }
}

@media (hover: none), (pointer: coarse) {
  #cover-container-last .cover-item .delete-btn { display: grid; place-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
