@import url('css/tokens.css');
@import url('css/reduced-motion.css');
@import url('css/a11y.css');
@import url('css/mobile.css');
:root {
  --bg: #0b0f14;
  --bg-deep: #0b0f14;
  --card: rgba(255, 255, 255, 0.03);
  --glass: rgba(255, 255, 255, 0.02);
  --glass-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --primary: #f59e0b;
  --primary-hover: #d97706;
  --accent: #0ea5e9;
  --accent-2: #2bb3ff;
  --text: #f8fafc;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --muted: #94a3b8;
  --danger: #ef4444;
  --success: #22c55e;
  --radius: 10px;
  --bg-body: #0b0f14;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-sidebar: rgba(8, 10, 14, 0.75);
  --bg-1: #0b0f14;
  --bg-2: #0a0d12;
  --ink: #e5e7eb;
}

/* Archive insights and recording health */
body:is(.page-admin,.page-index) .recording-health-panel,
body.page-streamer .streamer-insights {
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--tube-line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015)), var(--tube-surface);
  box-shadow: 0 1px 0 rgba(255,255,255,0.035), 0 18px 48px rgba(0,0,0,0.28);
}

body:is(.page-admin,.page-index) .recording-health-list {
  display: grid;
  gap: 8px;
}

body:is(.page-admin,.page-index) .recording-health-row {
  display: grid;
  grid-template-columns: 96px minmax(110px, .9fr) minmax(180px, 2fr) 86px 104px 92px 104px;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: var(--tube-text-2);
  text-decoration: none;
  background: rgba(255,255,255,0.025);
}

body:is(.page-admin,.page-index) .recording-health-row:hover {
  border-color: rgba(242,229,141,0.34);
  background: rgba(255,255,255,0.05);
}

body:is(.page-admin,.page-index) .health-status {
  display: inline-flex;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  color: #050505;
  background: var(--tube-muted);
  font-size: 11px;
  font-weight: 900;
}

body:is(.page-admin,.page-index) .recording-health-row.recording .health-status { background: var(--tube-live); color: #fff; }
body:is(.page-admin,.page-index) .recording-health-row.watching .health-status { background: #77c8ff; color: #061018; }
body:is(.page-admin,.page-index) .recording-health-row.stale .health-status { background: #ffcf6e; color: #161000; }
body:is(.page-admin,.page-index) .recording-health-row.starting .health-status { background: #b6f08f; color: #071107; }
body:is(.page-admin,.page-index) .recording-health-row.offline .health-status { background: #4d5661; color: #f0f3f5; }
body:is(.page-admin,.page-index) .recording-health-row.error .health-status { background: #ff6b6b; color: #160303; }

body:is(.page-admin,.page-index) .health-name {
  color: #fff;
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:is(.page-admin,.page-index) .health-file,
body:is(.page-admin,.page-index) .health-metric,
body:is(.page-admin,.page-index) .health-chat {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

body:is(.page-admin,.page-index) .health-chat.ok {
  color: var(--tube-success);
}

body.page-streamer .insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

body.page-streamer .insight-card {
  min-height: 92px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
}

body.page-streamer .insight-card span,
body.page-streamer .mini-head span {
  display: block;
  color: var(--tube-muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

body.page-streamer .insight-card strong {
  display: block;
  margin-top: 7px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
}

body.page-streamer .insight-card small {
  display: block;
  margin-top: 8px;
  color: var(--tube-text-2);
  font-size: 12px;
}

body.page-streamer .archive-insight-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, .7fr);
  gap: 12px;
  margin-top: 12px;
}

body.page-streamer .activity-panel,
body.page-streamer .insight-side {
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(0,0,0,0.18);
}

body.page-streamer .mini-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

body.page-streamer .mini-head strong {
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

body.page-streamer .activity-calendar {
  display: grid;
  grid-template-columns: repeat(30, minmax(8px, 1fr));
  gap: 4px;
}

body.page-streamer .activity-day {
  aspect-ratio: 1 / 1;
  min-height: 9px;
  border-radius: 3px;
  background: rgba(255,255,255,0.055);
  outline: 1px solid rgba(255,255,255,0.035);
}

body.page-streamer .activity-day:hover {
  outline-color: var(--tube-accent);
}

body.page-streamer .activity-day.level-1 { background: rgba(110,217,162,0.28); }
body.page-streamer .activity-day.level-2 { background: rgba(110,217,162,0.45); }
body.page-streamer .activity-day.level-3 { background: rgba(242,229,141,0.62); }
body.page-streamer .activity-day.level-4 { background: rgba(255,92,102,0.82); }

body.page-streamer .top-day-list {
  display: grid;
  gap: 7px;
}

body.page-streamer .top-day-list a {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 7px;
  color: var(--tube-text-2);
  text-decoration: none;
  background: rgba(255,255,255,0.04);
}

body.page-streamer .top-day-list a:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
}

body.page-streamer .top-day-list strong {
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
}

body.page-streamer .metadata-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

body.page-streamer .metadata-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: var(--tube-text-2);
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
  background: rgba(255,255,255,0.035);
}

body.page-streamer .metadata-chip:hover,
body.page-streamer .metadata-chip.active {
  color: #050505;
  border-color: var(--tube-accent);
  background: var(--tube-accent);
}

body.page-streamer .metadata-chip span {
  color: inherit;
  opacity: .72;
}

@media (max-width: 1100px) {
  body:is(.page-admin,.page-index) .recording-health-row {
    grid-template-columns: 86px minmax(120px, 1fr) minmax(120px, 1.3fr) 76px;
  }
  body:is(.page-admin,.page-index) .health-metric:nth-of-type(n+2),
  body:is(.page-admin,.page-index) .health-chat {
    display: none;
  }
  body.page-streamer .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  body.page-streamer .archive-insight-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body:is(.page-admin,.page-index) .recording-health-row {
    grid-template-columns: 82px minmax(0, 1fr);
  }
  body:is(.page-admin,.page-index) .health-file,
  body:is(.page-admin,.page-index) .health-metric,
  body:is(.page-admin,.page-index) .health-chat {
    display: none;
  }
  body.page-streamer .insight-grid {
    grid-template-columns: 1fr;
  }
  body.page-streamer .activity-calendar {
    grid-template-columns: repeat(15, minmax(9px, 1fr));
  }
}

/* Search, queue, watch progress and chat filters */
.global-search-bar,
.global-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
}

.global-search-bar {
  margin: 0 0 20px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(12, 12, 14, 0.72);
}

.global-search-bar input,
.global-search-form input {
  min-width: 0;
  flex: 1;
}

.global-results-head,
.task-queue-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.global-results-head h3,
.task-queue-head h3 {
  margin: 0;
}

.global-results-head span,
.task-queue-head span {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.global-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.global-results-grid h4 {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.global-result-row {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  text-decoration: none;
}

.global-result-row:hover {
  color: #fff;
}

.global-result-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-result-row span,
.global-result-empty {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

body.page-admin .task-queue-panel {
  min-height: 100%;
}

.task-queue-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.task-queue-stats span {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 11px;
  background: rgba(0, 0, 0, 0.18);
}

.task-queue-stats strong {
  color: #fff;
  font-size: 18px;
}

.task-queue-list {
  display: grid;
  gap: 6px;
}

.task-queue-row {
  display: grid;
  grid-template-columns: 82px minmax(80px, 120px) minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}

.task-status {
  display: inline-flex;
  justify-content: center;
  padding: 3px 7px;
  border-radius: 999px;
  color: #d7d7d7;
  background: rgba(255, 255, 255, 0.08);
}

.task-queue-row.running .task-status {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.18);
}

.task-queue-row.failed .task-status {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.2);
}

.task-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
}

.task-label small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fecaca;
  font-size: 11px;
  line-height: 1.2;
}

.task-age {
  color: var(--text-muted);
  text-align: right;
}

.watch-state {
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11px;
}

.watch-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.watch-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f2e58d, #22c55e);
}

.video-card.is-watched .thumb-img,
.page-mobile-streamer .video-card.is-watched .thumb {
  opacity: 0.72;
}

body.page-vod .chat-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto 32px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.page-vod .chat-filter-bar input[type="search"] {
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

body.page-vod .chat-filter-bar label {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

body.page-vod .chat-filter-bar button {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
}

body.page-mobile-streamer .watch-state {
  grid-template-columns: 74px minmax(0, 1fr);
  margin: 7px 0 0;
}

@media (max-width: 980px) {
  .global-results-grid {
    grid-template-columns: 1fr;
  }

  body.page-vod .chat-filter-bar {
    grid-template-columns: 1fr 1fr 1fr 1fr 32px;
  }

  body.page-vod .chat-filter-bar input[type="search"] {
    grid-column: 1 / -1;
  }
}

/* LOGIN */
body.page-login{
        margin: 0;
        font-family: 'Sora', sans-serif;
        color: var(--text);
        min-height: 100vh;
        overflow: hidden;
        background:
          radial-gradient(circle at 50% 78%, rgba(255, 88, 20, 0.26), transparent 18%),
          radial-gradient(circle at 50% 44%, rgba(255, 122, 33, 0.12), transparent 24%),
          linear-gradient(180deg, #040405 0%, #100707 32%, #1a0c0a 62%, #050505 100%);
      }
      body.page-login *{ box-sizing: border-box; }
      body.page-login .inferno-stage{
        position: fixed;
        inset: 0;
        overflow: hidden;
        pointer-events: none;
      }
      body.page-login .inferno-stage::before{
        content: "";
        position: absolute;
        inset: 0;
        background:
          linear-gradient(180deg, rgba(0,0,0,0.12) 0%, rgba(0,0,0,0.05) 26%, rgba(0,0,0,0.42) 100%),
          radial-gradient(circle at 50% 92%, rgba(255, 133, 45, 0.12), transparent 30%);
      }
      body.page-login .inferno-stage::after{
        content: "";
        position: absolute;
        left: -6%;
        right: -6%;
        bottom: -2vh;
        height: 24vh;
        background:
          radial-gradient(circle at 50% 0%, rgba(255, 137, 44, 0.12), transparent 24%),
          linear-gradient(180deg, rgba(18,10,8,0) 0%, rgba(10,8,8,0.86) 32%, #040404 100%);
        clip-path: ellipse(62% 88% at 50% 100%);
      }
      body.page-login .ash{
        position: absolute;
        inset: 0;
        opacity: .42;
        animation: drift-smoke 16s linear infinite;
      }
      body.page-login .ash::before,
      body.page-login .ash::after{
        content: "";
        position: absolute;
        inset: auto;
        width: 34vmax;
        height: 34vmax;
        border-radius: 50%;
        filter: blur(84px);
        background: radial-gradient(circle, rgba(255, 118, 26, 0.12) 0%, rgba(61, 17, 9, 0.11) 44%, transparent 74%);
      }
      body.page-login .ash-a::before{ top: -10vmax; left: -6vmax; }
      body.page-login .ash-a::after{ right: -8vmax; top: 10vmax; animation: pulse-haze 9s ease-in-out infinite; }
      body.page-login .ash-b{ animation-duration: 20s; animation-direction: reverse; opacity: .28; }
      body.page-login .ash-b::before{ right: 2vmax; top: -14vmax; }
      body.page-login .ash-b::after{ left: 10vmax; bottom: 14vmax; }
      body.page-login .portal-backglow{
        position: absolute;
        left: 50%;
        top: 50%;
        width: min(62vw, 760px);
        aspect-ratio: 1 / 1;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 133, 22, 0.5) 0%, rgba(255, 80, 18, 0.24) 32%, rgba(44, 7, 4, 0.08) 58%, transparent 74%);
        filter: blur(34px);
        animation: gate-breathe 4.2s ease-in-out infinite;
      }
      body.page-login .portal-frame{
        position: absolute;
        left: 50%;
        bottom: 18vh;
        width: min(46vw, 520px);
        min-width: 290px;
        aspect-ratio: 0.9 / 1;
        transform: translateX(-50%);
        display: grid;
        place-items: end center;
      }
      body.page-login .portal-arch{
        position: relative;
        width: 100%;
        height: 100%;
        border-radius: 46% 46% 4% 4% / 18% 18% 3% 3%;
        background:
          linear-gradient(180deg, #4c433f 0%, #2e2828 22%, #191617 66%, #0a0a0b 100%);
        box-shadow:
          0 0 0 2px rgba(255, 187, 120, 0.1),
          0 34px 80px rgba(0, 0, 0, 0.58),
          inset 0 10px 18px rgba(255,255,255,0.08),
          inset 0 -26px 34px rgba(0, 0, 0, 0.48);
        overflow: hidden;
      }
      body.page-login .portal-arch::before{
        content: "";
        position: absolute;
        inset: 5% 11% 3%;
        border-radius: 44% 44% 2% 2% / 14% 14% 2% 2%;
        background:
          linear-gradient(180deg, rgba(255,255,255,0.08), transparent 16%),
          linear-gradient(90deg, rgba(0,0,0,0.48) 0 4%, transparent 4% 96%, rgba(0,0,0,0.48) 96% 100%);
        box-shadow: inset 0 0 0 2px rgba(255, 170, 105, 0.16);
      }
      body.page-login .portal-lintel{
        position: absolute;
        top: 10%;
        left: 16%;
        right: 16%;
        height: 9%;
        border-radius: 999px;
        background:
          linear-gradient(180deg, rgba(130, 117, 109, 0.96) 0%, rgba(70, 63, 59, 0.98) 48%, rgba(19, 17, 18, 1) 100%);
        box-shadow: inset 0 2px 3px rgba(255,255,255,0.1);
      }
      body.page-login .portal-fire{
        position: absolute;
        inset: 15% 17% 8%;
        border-radius: 42% 42% 2% 2% / 13% 13% 2% 2%;
        background:
          radial-gradient(circle at 50% 22%, rgba(255, 245, 195, 0.82) 0%, rgba(255, 174, 60, 0.72) 14%, rgba(255, 88, 25, 0.9) 34%, rgba(128, 16, 4, 0.9) 64%, rgba(19, 3, 2, 1) 100%);
        filter: saturate(1.22);
        animation: inferno-roll 2.8s ease-in-out infinite;
      }
      body.page-login .portal-fire::before{
        content: "";
        position: absolute;
        inset: 10% 18% 0;
        background:
          radial-gradient(circle at 50% 100%, rgba(255, 247, 216, 0.7), rgba(255, 165, 58, 0.54) 18%, rgba(255, 82, 18, 0) 46%);
        animation: core-flicker 1.6s linear infinite;
      }
      body.page-login .portal-door{
        position: absolute;
        top: 18%;
        bottom: 8%;
        width: 31%;
        border-radius: 22px 22px 10px 10px;
        background:
          linear-gradient(180deg, rgba(122, 104, 92, 0.98) 0%, rgba(76, 61, 55, 0.98) 18%, rgba(41, 31, 31, 1) 62%, rgba(13, 12, 13, 1) 100%);
        box-shadow:
          inset 0 0 0 2px rgba(238, 199, 159, 0.08),
          inset 0 0 0 12px rgba(22, 16, 16, 0.72),
          inset 0 0 28px rgba(0,0,0,0.38),
          0 16px 26px rgba(0,0,0,0.28);
      }
      body.page-login .portal-door::before{
        content: "";
        position: absolute;
        inset: 14% 18%;
        border-radius: 12px;
        background:
          linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0) 18%),
          repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0 8px, rgba(0,0,0,0.04) 8px 16px),
          linear-gradient(180deg, rgba(56, 43, 39, 0.64), rgba(13, 11, 12, 0.2));
        box-shadow: inset 0 0 0 1px rgba(255, 173, 118, 0.08);
      }
      body.page-login .portal-door-left{
        left: 18%;
        transform: perspective(900px) rotateY(26deg);
        transform-origin: left center;
      }
      body.page-login .portal-door-right{
        right: 18%;
        transform: perspective(900px) rotateY(-26deg);
        transform-origin: right center;
      }
      body.page-login .portal-seam{
        position: absolute;
        top: 18%;
        bottom: 8%;
        left: 50%;
        width: 10px;
        transform: translateX(-50%);
        background: linear-gradient(180deg, rgba(243, 198, 145, 0.24) 0%, rgba(255, 112, 46, 0.34) 38%, rgba(24, 5, 5, 0.8) 100%);
        filter: blur(.2px);
      }
      body.page-login .portal-floorglow{
        position: absolute;
        left: 26%;
        right: 26%;
        bottom: 8%;
        height: 12%;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 184, 74, 0.7) 0%, rgba(255, 85, 28, 0.44) 34%, rgba(0,0,0,0) 72%);
        filter: blur(10px);
      }
      body.page-login .portal-runes{
        position: absolute;
        top: 6%;
        left: 50%;
        display: flex;
        gap: 16px;
        transform: translateX(-50%);
      }
      body.page-login .portal-runes span{
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #ffd18a;
        box-shadow: 0 0 12px rgba(255, 178, 92, 0.9);
        animation: rune-pulse 2.4s ease-in-out infinite;
      }
      body.page-login .portal-runes span:nth-child(2){ animation-delay: -.4s; }
      body.page-login .portal-runes span:nth-child(3){ animation-delay: -.8s; }
      body.page-login .portal-runes span:nth-child(4){ animation-delay: -1.2s; }
      body.page-login .portal-embers{
        position: absolute;
        inset: 0;
      }
      body.page-login .portal-embers span{
        position: absolute;
        bottom: 12%;
        width: 8px;
        aspect-ratio: 1;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(255, 246, 202, 0.92) 0%, rgba(255, 154, 67, 0.95) 44%, rgba(255, 96, 34, 0) 76%);
        filter: blur(.3px);
        animation: ember-rise 4.2s linear infinite;
      }
      body.page-login .portal-embers span:nth-child(1){ left: 24%; animation-delay: -.8s; }
      body.page-login .portal-embers span:nth-child(2){ left: 34%; animation-delay: -2.2s; width: 7px; }
      body.page-login .portal-embers span:nth-child(3){ left: 42%; animation-delay: -1.2s; width: 8px; }
      body.page-login .portal-embers span:nth-child(4){ left: 56%; animation-delay: -.2s; width: 6px; }
      body.page-login .portal-embers span:nth-child(5){ left: 64%; animation-delay: -3.3s; }
      body.page-login .portal-embers span:nth-child(6){ left: 74%; animation-delay: -2.8s; width: 7px; }
      body.page-login .portal-embers span:nth-child(7){ left: 50%; animation-delay: -1.7s; width: 9px; }
      body.page-login .portal-steps{
        position: absolute;
        left: 50%;
        bottom: 0;
        width: min(74vw, 900px);
        height: 23vh;
        transform: translateX(-50%);
        background:
          linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(8,7,9,0.26) 24%, rgba(4,4,5,0.9) 100%);
        clip-path: polygon(18% 100%, 28% 70%, 38% 70%, 44% 44%, 56% 44%, 62% 70%, 72% 70%, 82% 100%);
      }
      body.page-login .login-shell{
        position: relative;
        min-height: 100vh;
        padding: 28px 18px 22px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        gap: 18px;
        z-index: 1;
      }
      body.page-login .login-copy{
        max-width: 700px;
        padding-top: 3vh;
        text-align: center;
        animation: login-rise .9s ease-out both;
      }
      body.page-login .eyebrow{
        display: inline-block;
        align-items: center;
        padding: 8px 14px;
        border: 1px solid rgba(255, 155, 79, 0.32);
        border-radius: 999px;
        color: #ffba7a;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .14em;
        text-transform: uppercase;
        background: rgba(38, 12, 9, 0.56);
        box-shadow: inset 0 0 18px rgba(255, 120, 48, 0.08);
      }
      body.page-login h1{
        margin: 16px 0 12px;
        font-family: 'Fraunces', serif;
        font-size: clamp(42px, 7vw, 78px);
        line-height: .96;
        color: #fff2dc;
        text-shadow: 0 0 18px rgba(255, 117, 44, 0.24), 0 14px 38px rgba(0, 0, 0, 0.7);
      }
      body.page-login .subtitle{
        margin: 0;
        max-width: 46ch;
        color: #d8c0b5;
        font-size: 15px;
        line-height: 1.6;
      }
      body.page-login .login-panel{
        position: relative;
        width: min(100%, 420px);
        margin-bottom: 2vh;
        padding: 24px;
        border-radius: 20px;
        background: linear-gradient(180deg, rgba(22, 13, 13, 0.86) 0%, rgba(10, 8, 10, 0.94) 100%);
        border: 1px solid rgba(255, 154, 79, 0.16);
        box-shadow:
          0 22px 50px rgba(0, 0, 0, 0.5),
          inset 0 1px 0 rgba(255,255,255,0.05),
          inset 0 0 28px rgba(255, 95, 28, 0.06);
        backdrop-filter: none;
        animation: login-rise 1.05s ease-out both;
      }
      body.page-login .panel-glow{
        position: absolute;
        inset: -1px;
        border-radius: inherit;
        background: linear-gradient(135deg, rgba(255, 162, 91, 0.16), rgba(255, 98, 36, 0.03) 38%, rgba(255,255,255,0.02) 68%, rgba(255, 176, 93, 0.12) 100%);
        mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        padding: 1px;
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
      }
      body.page-login .login-form{
        position: relative;
        z-index: 1;
        display: grid;
        gap: 10px;
      }
      body.page-login .login-form label{
        color: #f2d5bc;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
      }
      body.page-login input{
        width: 100%;
        min-height: 50px;
        padding: 14px 16px;
        border-radius: 14px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(12, 10, 11, 0.72);
        color: #fff8f2;
        outline: none;
        transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
      }
      body.page-login input::placeholder{ color: #8f7b74; }
      body.page-login input:focus{
        border-color: rgba(255, 156, 72, 0.68);
        box-shadow: 0 0 0 4px rgba(255, 111, 36, 0.14);
        transform: translateY(-1px);
      }
      body.page-login button{
        width: 100%;
        min-height: 52px;
        margin-top: 10px;
        border: 0;
        border-radius: 16px;
        background:
          linear-gradient(180deg, rgba(255, 230, 182, 0.18), rgba(255,255,255,0) 24%),
          linear-gradient(135deg, #ff7a2f 0%, #ff521f 46%, #ffbe55 100%);
        color: #2f0d05;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: .04em;
        cursor: pointer;
        box-shadow: 0 18px 34px rgba(255, 83, 23, 0.24);
        transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
      }
      body.page-login button:hover{
        transform: translateY(-2px);
        box-shadow: 0 24px 46px rgba(255, 83, 23, 0.34);
        filter: brightness(1.04);
      }
      body.page-login .error{
        position: relative;
        z-index: 1;
        margin-top: 14px;
        padding: 12px 14px;
        border-radius: 14px;
        border: 1px solid rgba(239, 68, 68, 0.22);
        background: rgba(71, 13, 13, 0.42);
        color: #ffb4b4;
        font-size: 13px;
        line-height: 1.45;
      }
      @keyframes drift-smoke{
        0%{ transform: translate3d(0, 0, 0) scale(1); }
        50%{ transform: translate3d(1.6%, -1.2%, 0) scale(1.04); }
        100%{ transform: translate3d(0, 0, 0) scale(1); }
      }
      @keyframes pulse-haze{
        0%, 100%{ transform: scale(1); opacity: .7; }
        50%{ transform: scale(1.08); opacity: 1; }
      }
      @keyframes gate-breathe{
        0%, 100%{ transform: translate(-50%, -50%) scale(1); opacity: .8; }
        50%{ transform: translate(-50%, -50%) scale(1.05); opacity: 1; }
      }
      @keyframes inferno-roll{
        0%, 100%{ transform: scale(1) translateY(0); filter: saturate(1.12); }
        50%{ transform: scale(1.04) translateY(-1.5%); filter: saturate(1.24); }
      }
      @keyframes ember-rise{
        0%{ transform: translate3d(0, 0, 0) scale(.7); opacity: 0; }
        12%{ opacity: .95; }
        100%{ transform: translate3d(24px, -220px, 0) scale(.18); opacity: 0; }
      }
      @keyframes core-flicker{
        0%, 100%{ opacity: .7; }
        35%{ opacity: .94; }
        58%{ opacity: .52; }
        82%{ opacity: .86; }
      }
      @keyframes login-rise{
        from{ opacity: 0; transform: translateY(18px); }
        to{ opacity: 1; transform: translateY(0); }
      }
      @keyframes rune-pulse{
        0%, 100%{ opacity: .56; transform: scale(.88); }
        50%{ opacity: 1; transform: scale(1.15); }
      }
      @media (max-width: 640px){
        body.page-login .portal-frame{
          width: min(78vw, 360px);
          min-width: 230px;
          bottom: 26vh;
        }
        body.page-login .portal-backglow{
          width: min(100vw, 560px);
          top: 48%;
        }
        body.page-login .portal-steps{ width: min(100vw, 700px); height: 18vh; }
        body.page-login .login-shell{
          padding: 18px 14px 16px;
          gap: 16px;
        }
        body.page-login h1{ font-size: clamp(34px, 14vw, 56px); }
        body.page-login .subtitle{ font-size: 14px; line-height: 1.55; }
        body.page-login .login-panel{ padding: 18px; border-radius: 18px; }
        body.page-login input,
        body.page-login button{ min-height: 48px; }
      }

/* MAINTENANCE / WIP */
body.page-maintenance .maintenance-panel{
  display: grid;
  gap: 12px;
  align-content: start;
}
body.page-maintenance .maintenance-badge{
  margin: 0;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 140, 64, 0.35);
  background: rgba(255, 96, 24, 0.14);
  color: #ffc089;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
body.page-maintenance .maintenance-title{
  margin: 0;
  font-family: "Syne", "Sora", sans-serif;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff6ee;
}
body.page-maintenance .maintenance-text,
body.page-maintenance .maintenance-note{
  margin: 0;
  color: rgba(255, 236, 220, 0.78);
  font-size: 14px;
  line-height: 1.6;
}
body.page-maintenance .maintenance-note{
  color: rgba(255, 214, 186, 0.62);
  font-size: 13px;
}
body.page-maintenance .maintenance-actions{
  margin: 8px 0 0;
}
body.page-maintenance .maintenance-login-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid rgba(255, 140, 64, 0.28);
  background: rgba(255, 255, 255, 0.04);
  color: #ffd7b8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
body.page-maintenance .maintenance-login-link:hover{
  border-color: rgba(255, 160, 80, 0.5);
  background: rgba(255, 96, 24, 0.12);
  color: #fff;
}

/* ADMIN */
body.page-admin .tabs{ display: flex; gap: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--border); }
      body.page-admin .tab{
        padding: 12px 0;
        color: var(--text-muted);
        text-decoration: none;
        font-weight: 500;
        font-size: 15px;
        border-bottom: 2px solid transparent;
        transition: 0.2s;
        display: flex; align-items: center; gap: 8px;
        cursor: pointer;
        margin-bottom: -1px;
      }
      body.page-admin *{ box-sizing: border-box; }
      body.page-admin{
        margin: 0;
        font-family: 'Sora', sans-serif;
        background-color: var(--bg-deep);
        background-image: 
            radial-gradient(circle at 15% 50%, rgba(245, 158, 11, 0.1), transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.1), transparent 25%);
        background-size: 200% 200%;
        animation: none;
        color: var(--text);
        min-height: 100vh;
        display: flex;
      }
      @keyframes bg-pulse{ 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
      
      body.page-admin ::-webkit-scrollbar{ width: 6px; height: 6px; }
      body.page-admin ::-webkit-scrollbar-track{ background: transparent; }
      body.page-admin ::-webkit-scrollbar-thumb{ background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
      body.page-admin ::-webkit-scrollbar-thumb:hover{ background: rgba(255, 255, 255, 0.2); }
      
      body.page-admin .tab:hover{ color: var(--text); }
      body.page-admin .tab.active{ color: var(--primary); border-bottom-color: var(--primary); }
      body.page-admin .badge{ background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 10px; font-size: 11px; }
      body.page-admin .tab.active .badge{ background: var(--primary); color: white; }
      
      
      body.page-admin .sidebar{ width: 280px; background: rgba(3,3,5,0.6); backdrop-filter: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 32px; flex-shrink: 0; }
      body.page-admin .brand{ font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; color: white; margin-bottom: 48px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
      body.page-admin .nav-item{ display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text-muted); text-decoration: none; border-radius: 14px; margin-bottom: 6px; transition: all 0.3s ease; font-weight: 500; }
      body.page-admin .nav-item:hover{ background: var(--glass-hover); color: white; transform: translateX(4px); }
      body.page-admin .nav-item.active{ background: rgba(245, 158, 11, 0.15); color: white; border: 1px solid rgba(245, 158, 11, 0.2); }
      
      body.page-admin .main{ flex: 1; padding: 40px 60px; overflow-y: auto; animation: fade-in 0.5s ease-out; }
      @keyframes fade-in{ from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
      body.page-admin .header{ margin-bottom: 48px; }
      body.page-admin .page-title{ font-family: 'Fraunces', serif; font-size: 36px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
      
      body.page-admin .grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
      body.page-admin .panel{ background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; backdrop-filter: none; }
      body.page-admin h3{ margin: 0 0 20px; font-size: 18px; font-weight: 600; color: white; }
      body.page-admin table{ width: 100%; border-collapse: collapse; font-size: 14px; }
      body.page-admin th, body.page-admin td{ padding: 12px 8px; text-align: left; border-bottom: 1px solid var(--border); }
      body.page-admin th{ color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
      body.page-admin .success{ color: var(--success); }
      body.page-admin .fail{ color: var(--danger); }
      body.page-admin .ban-item{ display: flex; justify-content: space-between; align-items: center; padding: 12px; background: rgba(0,0,0,0.3); border-radius: 8px; margin-bottom: 8px; }
      body.page-admin button{ background: none; border: none; cursor: pointer; color: var(--danger); font-size: 16px; }
      body.page-admin .btn-primary{ background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; padding: 10px 20px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; transition: 0.3s; }
      body.page-admin .btn-primary:hover{ transform: scale(1.02); box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
      body.page-admin input{ background: rgba(0,0,0,0.3); border: 1px solid var(--border); color: white; padding: 10px 16px; border-radius: 12px; outline: none; width: 100%; transition: 0.2s; }
      body.page-admin input:focus{ border-color: var(--primary); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); }
      body.page-admin .full-width{ grid-column: 1 / -1; }
      body.page-admin .login-box{ max-width: 400px; margin: 100px auto; text-align: center; }
      body.page-admin .login-box input{ width: 100%; margin-bottom: 10px; padding: 12px; }
      body.page-admin .login-box button{ width: 100%; background: var(--primary); color: white; padding: 12px; border-radius: 6px; font-weight: bold; }
      body.page-admin .alert{ padding: 12px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
      body.page-admin .alert-error{ background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
      body.page-admin .alert-success{ background: rgba(34, 197, 94, 0.1); color: var(--success); border: 1px solid rgba(34, 197, 94, 0.2); }
      body.page-admin .stat-row{ display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
      body.page-admin .stat-val{ font-weight: 600; color: white; }
      @media (max-width: 900px){ body.page-admin .grid{ grid-template-columns: 1fr; } }
      @media (max-width: 768px){ body.page-admin{ flex-direction: column; } body.page-admin .sidebar{ width: 100%; padding: 16px; } body.page-admin .main{ padding: 20px; } }
      
      
      body.page-admin .input-sm{ padding: 6px 10px; font-size: 13px; border-radius: 8px; width: 100%; background: rgba(0,0,0,0.2); border: 1px solid var(--border); color: white; }
      body.page-admin .input-sm:focus{ border-color: var(--primary); }
      body.page-admin .btn-icon{ padding: 6px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center; }
      body.page-admin .btn-icon.save{ background: rgba(34, 197, 94, 0.1); color: var(--success); border-color: rgba(34, 197, 94, 0.2); }
      body.page-admin .btn-icon.save:hover{ background: rgba(34, 197, 94, 0.2); }
      body.page-admin .btn-icon.delete{ background: rgba(239, 68, 68, 0.1); color: var(--danger); border-color: rgba(239, 68, 68, 0.2); }
      body.page-admin .btn-icon.delete:hover{ background: rgba(239, 68, 68, 0.2); }
      body.page-admin select.input-sm{ appearance: none; background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23a1a1aa%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 10px; padding-right: 24px; }

body.page-mail .mail-header{ display:flex; justify-content:space-between; align-items:flex-start; gap:18px; }
body.page-mail .mail-webmail-btn{ text-decoration:none; white-space:nowrap; }
body.page-mail .mail-overview{ display:grid; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); gap:24px; margin-bottom:24px; }
body.page-mail .mail-grid{ grid-template-columns: 1fr 1fr; }
body.page-mail .mail-panel-head{ display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:18px; }
body.page-mail .mail-panel-head h3{ margin:0; }
body.page-mail .mail-status-line{ display:flex; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid var(--border); font-size:14px; }
body.page-mail .mail-status-line span{ color:var(--text-muted); }
body.page-mail .mail-note{ margin-top:14px; color:var(--text-muted); font-size:13px; line-height:1.5; }
body.page-mail .mail-note-warning{ color:#fbbf24; }
body.page-mail .mail-queue-form{ margin-top:14px; }
body.page-mail .mail-test-form{ display:grid; gap:10px; margin-top:16px; padding-top:14px; border-top:1px solid var(--border); }
body.page-mail .mail-test-form input,
body.page-mail .mail-test-form select{ width:100%; padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:rgba(0,0,0,.28); color:var(--text); outline:none; }
body.page-mail .mail-test-form input:focus,
body.page-mail .mail-test-form select:focus{ border-color:var(--primary); box-shadow:0 0 0 2px rgba(245,158,11,.2); }
body.page-mail .btn-secondary{ display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:9px 13px; border-radius:10px; border:1px solid var(--border); background:rgba(255,255,255,.08); color:var(--text); font-weight:700; cursor:pointer; }
body.page-mail .btn-secondary:hover{ background:rgba(255,255,255,.13); border-color:rgba(245,158,11,.35); }
body.page-mail .mail-config-list{ display:grid; gap:8px; }
body.page-mail .mail-config-list code{ display:block; padding:9px 11px; border-radius:8px; background:rgba(0,0,0,.28); border:1px solid var(--border); color:#dbeafe; font-size:12px; overflow-wrap:anywhere; }
body.page-mail .mail-create-form{ display:grid; gap:16px; }
body.page-mail .mail-form-grid{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; }
body.page-mail label span{ display:block; margin-bottom:7px; color:var(--text-muted); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; }
body.page-mail .mail-address-field{ display:flex; align-items:center; min-width:0; border:1px solid var(--border); border-radius:12px; background:rgba(0,0,0,.3); overflow:hidden; }
body.page-mail .mail-address-field:focus-within{ border-color:var(--primary); box-shadow:0 0 0 2px rgba(245,158,11,.2); }
body.page-mail .mail-address-field input{ border:0; background:transparent; border-radius:0; min-width:0; }
body.page-mail .mail-address-field em{ padding:0 12px; color:var(--text-muted); font-style:normal; font-size:13px; white-space:nowrap; border-left:1px solid var(--border); }
body.page-mail .mail-check-row{ display:flex; flex-wrap:wrap; gap:14px 22px; color:var(--text-muted); font-size:13px; }
body.page-mail .mail-check-row label,
body.page-mail .mail-inline-check{ display:flex; align-items:center; gap:7px; color:var(--text-muted); font-size:13px; text-transform:none; letter-spacing:0; margin:0; }
body.page-mail .mail-check-row input,
body.page-mail .mail-inline-check input{ width:auto; padding:0; }
body.page-mail .mail-table-wrap{ overflow-x:auto; }
body.page-mail .mail-row-actions{ display:flex; align-items:center; gap:8px; }
body.page-mail .mail-empty{ padding:28px; border:1px dashed var(--border); border-radius:12px; color:var(--text-muted); text-align:center; background:rgba(0,0,0,.16); }
body.page-admin .btn-primary:disabled,
body.page-admin input:disabled,
body.page-admin button:disabled{ opacity:.48; cursor:not-allowed; transform:none; box-shadow:none; }

@media (max-width: 1100px){
  body.page-mail .mail-overview,
  body.page-mail .mail-grid,
  body.page-mail .mail-form-grid{ grid-template-columns:1fr; }
}
@media (max-width: 640px){
  body.page-mail .mail-header{ flex-direction:column; }
  body.page-mail .mail-webmail-btn{ width:100%; text-align:center; }
  body.page-mail .mail-address-field{ flex-direction:column; align-items:stretch; }
  body.page-mail .mail-address-field em{ border-left:0; border-top:1px solid var(--border); padding:8px 12px; }
}
/* CLIP_EDITOR */
body.page-clip-editor *{ box-sizing: border-box; }
      body.page-clip-editor{
        margin: 0;
        font-family: 'Sora', sans-serif;
        color: var(--text);
        background: var(--bg);
        height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      
      body.page-clip-editor header{
        padding: 0 20px;
        height: 60px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--card);
        border-bottom: 1px solid var(--border);
        flex-shrink: 0;
      }
      body.page-clip-editor .brand{ font-family: 'Fraunces', serif; font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; }
      body.page-clip-editor .close-btn{ color: var(--text-muted); text-decoration: none; font-size: 24px; padding: 10px; transition: color 0.2s; }
      body.page-clip-editor .close-btn:hover{ color: var(--text); }
      
      body.page-clip-editor .main-area{
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      
      body.page-clip-editor .player-container{
        flex: 1;
        background: #000;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 0;
      }
      body.page-clip-editor video{ width: 100%; height: 100%; object-fit: contain; max-height: 100%; }
      
      body.page-clip-editor .editor-panel{
        background: var(--card);
        border-top: 1px solid var(--border);
        padding: 20px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 20px;
      }
      
      
      body.page-clip-editor .slider-container{ padding: 0 10px; margin-bottom: 10px; }
      body.page-clip-editor .noUi-target{ background: #3f3f46; border: none; box-shadow: none; height: 10px; }
      body.page-clip-editor .noUi-connect{ background: var(--primary); }
      body.page-clip-editor .noUi-handle{ 
        background: #fff; border: none; box-shadow: 0 0 5px rgba(0,0,0,0.5); 
        width: 18px; height: 18px; border-radius: 50%; top: -4px; cursor: grab;
      }
      body.page-clip-editor .noUi-handle:active{ cursor: grabbing; }
      body.page-clip-editor .noUi-handle::before, body.page-clip-editor .noUi-handle::after{ display: none; }
      
      body.page-clip-editor .controls-grid{
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 20px;
        align-items: center;
      }
      
      body.page-clip-editor .time-controls{ display: flex; gap: 10px; align-items: center; }
      body.page-clip-editor .time-label{ font-family: monospace; font-size: 14px; color: var(--text-muted); width: 60px; text-align: center; }
      body.page-clip-editor .btn-icon{
        background: #27272a; border: 1px solid #3f3f46; color: var(--text);
        width: 32px; height: 32px; border-radius: 6px; cursor: pointer;
        display: flex; align-items: center; justify-content: center; font-size: 14px;
        transition: 0.2s;
      }
      body.page-clip-editor .btn-icon:hover{ background: #3f3f46; }
      
      body.page-clip-editor .main-controls{ display: flex; gap: 10px; justify-content: center; }
      body.page-clip-editor .btn-main{
        background: #27272a; border: 1px solid #3f3f46; color: var(--text);
        padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px;
        display: flex; align-items: center; gap: 8px; transition: 0.2s;
      }
      body.page-clip-editor .btn-main:hover{ background: #3f3f46; }
      body.page-clip-editor .btn-primary{ background: var(--primary); border-color: var(--primary); color: #fff; }
      body.page-clip-editor .btn-primary:hover{ background: #9146ff; }
      
      body.page-clip-editor .meta-row{ display: flex; gap: 10px; }
      body.page-clip-editor input[type="text"]{
        flex: 1;
        background: #0e0e10; border: 1px solid #3f3f46; color: var(--text);
        padding: 10px; border-radius: 6px; outline: none; transition: border-color 0.2s;
      }
      body.page-clip-editor input[type="text"]:focus{ border-color: var(--primary); }
      
      body.page-clip-editor .msg{ padding: 10px; border-radius: 6px; margin-bottom: 10px; font-size: 14px; text-align: center; }
      body.page-clip-editor .msg.error{ background: rgba(255, 82, 82, 0.1); color: #ff8b8b; border: 1px solid rgba(255, 82, 82, 0.2); }
      body.page-clip-editor .msg.success{ background: rgba(34, 197, 94, 0.1); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.2); }
      
      @media (max-width: 768px){
        body.page-clip-editor .controls-grid{ grid-template-columns: 1fr; gap: 15px; }
        body.page-clip-editor .time-controls{ justify-content: center; }
        body.page-clip-editor .editor-panel{ padding: 15px; }
      }
/* DISCORD_TOOL */
body.page-discord-tool *{ box-sizing: border-box; }
      body.page-discord-tool{
        margin: 0;
        font-family: 'Sora', sans-serif;
        color: var(--text-main);
        background: var(--bg-body);
        min-height: 100vh;
        display: flex;
      }
      body.page-discord-tool .sidebar{ width: 260px; background: var(--bg-sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 24px; flex-shrink: 0; }
      body.page-discord-tool .brand{ font-size: 20px; font-weight: 700; color: white; margin-bottom: 40px; display: flex; align-items: center; gap: 10px; }
      body.page-discord-tool .nav-item{ display: flex; align-items: center; gap: 12px; padding: 12px; color: var(--text-muted); text-decoration: none; border-radius: 12px; margin-bottom: 4px; transition: 0.2s; font-weight: 500; }
      body.page-discord-tool .nav-item:hover, body.page-discord-tool .nav-item.active{ background: var(--bg-card); color: white; }
      body.page-discord-tool .nav-item.active{ color: var(--primary); }
      body.page-discord-tool .main{ flex: 1; padding: 40px; overflow-y: auto; }
      body.page-discord-tool .header{ margin-bottom: 30px; }
      body.page-discord-tool .page-title{ font-size: 28px; font-weight: 700; margin: 0; }
      body.page-discord-tool .panel{ background: var(--bg-sidebar); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
      body.page-discord-tool input{ width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: #000; color: var(--text-main); outline: none; transition: border-color 0.2s; margin-bottom: 16px; }
      body.page-discord-tool input:focus{ border-color: var(--primary); }
      body.page-discord-tool select{ width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: #000; color: var(--text-main); outline: none; margin-bottom: 16px; appearance: none; }
      body.page-discord-tool button{ width: 100%; padding: 12px; border: 0; border-radius: 12px; background: var(--primary); color: white; font-weight: 600; cursor: pointer; transition: background 0.2s; }
      body.page-discord-tool button:hover{ background: var(--primary-hover); }
      body.page-discord-tool .btn-danger{ background: var(--danger); }
      body.page-discord-tool .btn-danger:hover{ background: #dc2626; }
      
      body.page-discord-tool .profile-card{ display: flex; align-items: center; gap: 20px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
      body.page-discord-tool .avatar{ width: 80px; height: 80px; border-radius: 50%; background: #000; object-fit: cover; }
      body.page-discord-tool .info{ flex: 1; }
      body.page-discord-tool .username{ font-size: 20px; font-weight: 700; color: white; }
      body.page-discord-tool .discriminator{ color: var(--text-muted); font-size: 16px; }
      body.page-discord-tool .detail{ font-size: 14px; color: var(--text-muted); margin-top: 4px; }
      
      body.page-discord-tool .grid-list{ display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 20px; }
      body.page-discord-tool .grid-item{ background: rgba(0,0,0,0.2); padding: 12px; border-radius: 12px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); }
      body.page-discord-tool .item-icon{ width: 40px; height: 40px; border-radius: 12px; background: #000; object-fit: cover; }
      body.page-discord-tool .item-name{ font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      
      body.page-discord-tool .error{ color: var(--danger); margin-top: 16px; padding: 12px; background: rgba(239, 68, 68, 0.1); border-radius: 8px; }
      body.page-discord-tool .success{ color: var(--success); margin-top: 16px; padding: 12px; background: rgba(34, 197, 94, 0.1); border-radius: 8px; }
      
      body.page-discord-tool .tabs{ display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
      body.page-discord-tool .tab{ padding: 8px 16px; cursor: pointer; color: var(--text-muted); font-weight: 600; border-radius: 8px; }
      body.page-discord-tool .tab.active{ background: var(--bg-card); color: white; }
      
      body.page-discord-tool .token-list{ margin-top: 20px; }
      body.page-discord-tool .token-item{ display: flex; justify-content: space-between; align-items: center; padding: 12px; background: rgba(0,0,0,0.2); border-radius: 8px; margin-bottom: 8px; border: 1px solid var(--border); }
      @media (max-width: 768px){ body.page-discord-tool{ flex-direction: column; } body.page-discord-tool .sidebar{ width: 100%; padding: 16px; } body.page-discord-tool .main{ padding: 20px; } }
      
      body.page-discord-tool .script-box{ background: #000; padding: 12px; border-radius: 8px; font-family: monospace; font-size: 12px; color: var(--success); word-break: break-all; margin-top: 10px; cursor: pointer; border: 1px solid var(--border); position: relative; }
      body.page-discord-tool .script-box:hover{ border-color: var(--primary); }
      body.page-discord-tool .script-box::after{ content: 'Klicken zum Kopieren'; position: absolute; top: 0; right: 0; background: var(--primary); color: white; padding: 2px 6px; font-size: 10px; border-bottom-left-radius: 8px; }
      
      body.page-discord-tool .chat-input{ display: flex; gap: 10px; margin-top: 10px; }
      body.page-discord-tool .chat-input input{ margin-bottom: 0; }
/* INDEX */
body.page-index *{ box-sizing: border-box; }
      body.page-index{
        margin: 0;
        font-family: 'Sora', sans-serif;
        background-color: var(--bg-deep);
        background-image: 
            radial-gradient(circle at 15% 50%, rgba(245, 158, 11, 0.1), transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.1), transparent 25%);
        background-size: 200% 200%;
        animation: none;
        color: var(--text);
        min-height: 100vh;
        display: flex;
        overflow: hidden;
      }
      @keyframes bg-pulse{ 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
      
      body.page-index ::-webkit-scrollbar{ width: 6px; height: 6px; }
      body.page-index ::-webkit-scrollbar-track{ background: transparent; }
      body.page-index ::-webkit-scrollbar-thumb{ background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
      body.page-index ::-webkit-scrollbar-thumb:hover{ background: rgba(255, 255, 255, 0.2); }
      
      body.page-index a{ text-decoration: none; color: inherit; transition: 0.2s; }
      
      
body.page-index .sidebar{ width: 280px; background: var(--bg-sidebar); backdrop-filter: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 32px; flex-shrink: 0; }
      body.page-index .brand{ font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; color: white; margin-bottom: 48px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
      body.page-index .nav-item{ display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text-muted); text-decoration: none; border-radius: 14px; margin-bottom: 6px; transition: all 0.3s ease; font-weight: 500; }
      body.page-index .nav-item:hover{ background: var(--glass-hover); color: white; transform: translateX(4px); }
      body.page-index .nav-item.active{ background: rgba(245, 158, 11, 0.15); color: white; border: 1px solid rgba(245, 158, 11, 0.2); }
      
      body.page-index .main{ flex: 1; padding: 40px 60px; overflow-y: auto; animation: fade-in 0.5s ease-out; }
      @keyframes fade-in{ from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
body.page-index .header{ margin-bottom: 40px; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; }
body.page-index .page-title{ font-family: 'Fraunces', serif; font-size: 36px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
body.page-index .page-subtitle{ margin-top: 8px; color: var(--text-muted); font-size: 14px; max-width: 640px; line-height: 1.5; }

      
      body.page-index .stats-grid{
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 20px;
        margin-bottom: 40px;
      }
body.page-index .stat-card{
        background: var(--glass);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 28px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
        backdrop-filter: none;
        min-height: 180px;
        position: relative;
        overflow: hidden;
      }
body.page-index .stat-card::before{
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(14, 165, 233, 0.12));
        opacity: 0;
        transition: opacity 0.25s ease;
        pointer-events: none;
      }
body.page-index .stat-card > *{ position: relative; z-index: 1; }
body.page-index .stat-card:hover{
        transform: translateY(-6px);
        border-color: rgba(245, 158, 11, 0.35);
        box-shadow: 0 26px 50px -18px rgba(245, 158, 11, 0.28);
      }
body.page-index .stat-card:hover::before{ opacity: 1; }
      body.page-index .stat-head{ display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
      body.page-index .stat-label{ font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
      body.page-index .stat-icon{ font-size: 20px; opacity: 0.5; }
      body.page-index .stat-value{ font-size: 24px; font-weight: 700; color: white; line-height: 1.1; }
      body.page-index .stat-sub{ font-size: 13px; color: var(--text-muted); margin-top: 6px; }
      
      body.page-index .progress-track{
        height: 6px;
        background: rgba(0,0,0,0.3);
        border-radius: 3px;
        margin-top: 16px;
        overflow: hidden;
      }
      body.page-index .progress-fill{ height: 100%; border-radius: 3px; transition: width 0.5s ease; }

      
      body.page-index .res-row{ display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; }
      body.page-index .res-label{ width: 40px; color: var(--text-muted); font-weight: 600; }
      body.page-index .res-bar{ flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
      body.page-index .res-fill{ height: 100%; background: var(--primary); transition: width 0.5s; }
      body.page-index .res-val{ width: 50px; text-align: right; font-family: monospace; color: white; font-size: 12px; }
      
      
      body.page-index .live-input-group{ display: flex; gap: 8px; margin-top: auto; }
      body.page-index .live-input-group input{ flex: 1; background: rgba(0,0,0,0.3); border: 1px solid var(--border); color: white; padding: 10px; border-radius: 8px; width: 100%; outline:none; transition:0.2s; }
      body.page-index .live-input-group input:focus{ border-color: var(--primary); }
      body.page-index .live-input-group button{ background: var(--primary); color: white; border: none; border-radius: 8px; width: 40px; cursor: pointer; font-size: 16px; display:flex; align-items:center; justify-content:center; transition:0.2s; }
      body.page-index .live-input-group button:hover{ background: var(--accent); }

      
      body.page-index .mgmt-section{
        background: var(--glass);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 40px;
        overflow: hidden;
        backdrop-filter: none;
        scroll-margin-top: 20px;
      }
      body.page-index .mgmt-header{
        padding: 24px 32px;
        background: rgba(255,255,255,0.02);
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 16px;
      }
      body.page-index .mgmt-title{ font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600; color: white; display: flex; align-items: center; gap: 12px; }
      body.page-index .mgmt-body{ padding: 32px; }
      
      body.page-index .mgmt-controls{ display: flex; gap: 12px; align-items: center; flex-wrap: wrap; width: 100%; }
      
      body.page-index .channel-input-group{
        display: flex;
        background: rgba(0,0,0,0.3);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 6px;
        transition: border-color 0.2s;
        flex: 1;
        max-width: 600px;
      }
      body.page-index .channel-input-group:focus-within{ border-color: var(--primary); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); }
      body.page-index .channel-input-group input{
        border: none;
        background: transparent;
        padding: 10px 16px;
        outline: none;
        color: white;
        width: 100%;
        font-size: 16px;
      }
      body.page-index .channel-input-group button{
        border: none;
        background: linear-gradient(135deg, var(--primary), var(--accent));
        color: #fff;
        padding: 8px 24px;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        font-size: 14px;
        transition: 0.2s;
        white-space: nowrap;
      }
      body.page-index .channel-input-group button{ position: relative; overflow: hidden; }
      body.page-index .channel-input-group button::after{
        content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: 0.5s;
      }
      body.page-index .channel-input-group button:hover{ transform: scale(1.05); box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); }
      body.page-index .channel-input-group button:hover::after{ left: 100%; }
      
      body.page-index .btn-restart{
        background: rgba(255,255,255,0.05);
        color: var(--text-muted);
        border: 1px solid var(--border);
        padding: 12px 24px;
        border-radius: 12px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: 0.2s;
        font-size: 14px;
      }
      body.page-index .btn-restart:hover{ background: rgba(255,255,255,0.1); color: white; }
      
      body.page-index .channel-grid{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
      body.page-index .channel-chip{
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(0,0,0,0.3);
        border: 1px solid var(--border);
        padding: 8px 12px 8px 16px;
        border-radius: 100px;
        font-size: 14px;
        font-weight: 500;
        color: #fff;
        transition: 0.2s;
      }
      body.page-index .channel-chip:hover{
        border-color: var(--primary);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
      }
      body.page-index .channel-chip button{
        background: transparent;
        border: none;
        color: var(--muted);
        cursor: pointer;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.2s;
        font-size: 16px;
        width: 24px; height: 24px;
      }
      body.page-index .channel-chip button:hover{
        background: rgba(255, 82, 82, 0.2);
        color: var(--danger);
      }

      
      body.page-index .grid-title{ font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; margin-bottom: 32px; display: flex; align-items: center; gap: 12px; color: white; }
      body.page-index .live-pulse{ width: 10px; height: 10px; background: var(--danger); border-radius: 50%; box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.7); animation: pulse-red 2s infinite; }
      
      body.page-index .streamer-grid{
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
      }
      
      body.page-index .card{
        background: var(--glass);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        position: relative;
        display: flex;
        flex-direction: column;
        backdrop-filter: none;
      }
      body.page-index .card:hover{
        transform: translateY(-10px);
        box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.15);
        border-color: rgba(245, 158, 11, 0.3);
      }
      
      body.page-index .card-header{
        padding: 24px;
        display: flex;
        align-items: center;
        gap: 16px;
        background: linear-gradient(to bottom, rgba(255,255,255,0.03), transparent);
      }
      
      body.page-index .avatar{
        width: 56px;
        height: 56px;
        border-radius: 18px;
        background: linear-gradient(135deg, #3d4554, #2b303b);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        font-weight: 700;
        color: var(--text-muted);
        box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        position: relative;
        overflow: hidden;
      }
      body.page-index .avatar.online{ background: linear-gradient(135deg, var(--success), #27ae60); color: #fff; }
      body.page-index .avatar.recording{ background: linear-gradient(135deg, var(--danger), #c0392b); color: #fff; }
      body.page-index .avatar img{ width: 100%; height: 100%; object-fit: cover; display: block; }
      
      body.page-index .card-meta{ flex: 1; min-width: 0; }
      body.page-index .streamer-name{ font-family: 'Fraunces', serif; font-size: 18px; font-weight: 700; margin: 0 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: white; }
      body.page-index .status-badge{
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 11px;
        font-weight: 600;
        padding: 4px 10px;
        border-radius: 12px;
        background: rgba(0,0,0,0.4);
        color: var(--text-muted);
      }
      body.page-index .status-badge.live{ background: rgba(255, 82, 82, 0.15); color: var(--danger); }
      body.page-index .status-badge.online{ background: rgba(46, 204, 113, 0.15); color: var(--success); }
      
      body.page-index .card-stats{
        padding: 0 24px 24px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
      }
      body.page-index .stat-box{
        background: rgba(0,0,0,0.2);
        padding: 12px;
        border-radius: 12px;
        text-align: center;
      }
      body.page-index .stat-box-label{ font-size: 10px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; letter-spacing: 0.5px; }
      body.page-index .stat-box-val{ font-size: 14px; font-weight: 600; color: white; }
      
      body.page-index .card-actions{
        margin-top: auto;
        padding: 16px 24px;
        border-top: 1px solid var(--border);
        background: rgba(0,0,0,0.1);
        display: flex;
        gap: 10px;
      }
      body.page-index .action-btn{
        flex: 1;
        text-align: center;
        padding: 10px;
        border-radius: 12px;
        font-size: 13px;
        font-weight: 600;
        background: rgba(255,255,255,0.05);
        transition: 0.2s;
      }
      body.page-index .action-btn:hover{ background: rgba(255,255,255,0.1); color: #fff; transform: translateY(-2px); }
      body.page-index .action-btn.primary{ background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; position: relative; overflow: hidden; }
      body.page-index .action-btn.primary::after{
        content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: 0.5s;
      }
      body.page-index .action-btn.primary:hover{ box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
      body.page-index .action-btn.primary:hover::after{ left: 100%; }
      
      body.page-index .empty-state{
        text-align: center;
        padding: 60px;
        color: var(--text-muted);
        background: var(--glass);
        border-radius: 20px;
        border: 1px dashed var(--border);
      }

      @keyframes pulse-red{ 0% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.4); } 70% { box-shadow: 0 0 0 10px rgba(255, 82, 82, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0); } }
      @media (max-width: 768px){ body.page-index{ flex-direction: column; overflow: auto; } body.page-index .sidebar{ width: 100%; padding: 16px; } body.page-index .main{ padding: 20px; overflow: visible; } }
/* CHANNELS */
body.page-channels *{ box-sizing: border-box; }
      body.page-channels{
        margin: 0;
        font-family: 'Sora', sans-serif;
        background-color: var(--bg-deep);
        background-image: 
            radial-gradient(circle at 15% 50%, rgba(245, 158, 11, 0.1), transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.1), transparent 25%);
        background-size: 200% 200%;
        animation: none;
        color: var(--text);
        min-height: 100vh;
        display: flex;
      }
      @keyframes bg-pulse{ 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
      
      body.page-channels ::-webkit-scrollbar{ width: 6px; height: 6px; }
      body.page-channels ::-webkit-scrollbar-track{ background: transparent; }
      body.page-channels ::-webkit-scrollbar-thumb{ background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
      body.page-channels ::-webkit-scrollbar-thumb:hover{ background: rgba(255, 255, 255, 0.2); }
      
      body.page-channels a{ text-decoration: none; color: inherit; transition: 0.2s; }
      
      
      body.page-channels .sidebar{ width: 280px; background: rgba(3,3,5,0.6); backdrop-filter: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 32px; flex-shrink: 0; }
      body.page-channels .brand{ font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; color: white; margin-bottom: 48px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
      body.page-channels .nav-item{ display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text-muted); text-decoration: none; border-radius: 14px; margin-bottom: 6px; transition: all 0.3s ease; font-weight: 500; }
      body.page-channels .nav-item:hover{ background: var(--glass-hover); color: white; transform: translateX(4px); }
      body.page-channels .nav-item.active{ background: rgba(245, 158, 11, 0.15); color: white; border: 1px solid rgba(245, 158, 11, 0.2); }
      
      body.page-channels .main{ flex: 1; padding: 40px 60px; overflow-y: auto; animation: fade-in 0.5s ease-out; }
      @keyframes fade-in{ from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
      body.page-channels .header{ margin-bottom: 48px; display: flex; justify-content: space-between; align-items: center; }
      body.page-channels .page-title{ font-family: 'Fraunces', serif; font-size: 36px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }

      
      body.page-channels .mgmt-section{
        background: var(--glass);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 40px;
        overflow: hidden;
        backdrop-filter: none;
      }
      body.page-channels .mgmt-body{ padding: 32px; }
      
      body.page-channels .mgmt-controls{ display: flex; gap: 12px; align-items: center; flex-wrap: wrap; width: 100%; }
      
      body.page-channels .channel-input-group{
        display: flex;
        background: rgba(0,0,0,0.3);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 6px;
        transition: border-color 0.2s;
        flex: 1;
        max-width: 600px;
      }
      body.page-channels .channel-input-group:focus-within{ border-color: var(--primary); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); }
      body.page-channels .channel-input-group input{
        border: none;
        background: transparent;
        padding: 10px 16px;
        outline: none;
        color: white;
        width: 100%;
        font-size: 16px;
      }
      body.page-channels .channel-input-group button{
        border: none;
        background: linear-gradient(135deg, var(--primary), var(--accent));
        color: #fff;
        padding: 8px 24px;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        font-size: 14px;
        transition: 0.2s;
        white-space: nowrap;
      }
      body.page-channels .channel-input-group button{ position: relative; overflow: hidden; }
      body.page-channels .channel-input-group button::after{
        content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: 0.5s;
      }
      body.page-channels .channel-input-group button:hover{ transform: scale(1.05); box-shadow: 0 0 15px rgba(245, 158, 11, 0.4); }
      body.page-channels .channel-input-group button:hover::after{ left: 100%; }
      
      body.page-channels .btn-restart{
        background: rgba(255,255,255,0.05);
        color: var(--text-muted);
        border: 1px solid var(--border);
        padding: 12px 24px;
        border-radius: 12px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: 0.2s;
        font-size: 14px;
      }
      body.page-channels .btn-restart:hover{ background: rgba(255,255,255,0.1); color: white; }
      
      body.page-channels .channel-grid{ display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
      body.page-channels .channel-chip{
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(0,0,0,0.3);
        border: 1px solid var(--border);
        padding: 8px 12px 8px 16px;
        border-radius: 100px;
        font-size: 14px;
        font-weight: 500;
        color: #fff;
        transition: 0.2s;
      }
      body.page-channels .channel-chip:hover{
        border-color: var(--primary);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
      }
      body.page-channels .channel-chip button{
        background: transparent;
        border: none;
        color: var(--muted);
        cursor: pointer;
        padding: 0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: 0.2s;
        font-size: 16px;
        width: 24px; height: 24px;
      }
      body.page-channels .channel-chip button:hover{
        background: rgba(255, 82, 82, 0.2);
        color: var(--danger);
      }
      @media (max-width: 768px){ body.page-channels{ flex-direction: column; overflow: auto; } body.page-channels .sidebar{ width: 100%; padding: 16px; } body.page-channels .main{ padding: 20px; overflow: visible; } }
/* STREAMER */
body.page-streamer *{ box-sizing: border-box; }
      body.page-streamer{
        margin: 0;
        font-family: 'Sora', sans-serif;
        background-color: var(--bg-deep);
        background-image: 
            radial-gradient(circle at 15% 50%, rgba(245, 158, 11, 0.1), transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.1), transparent 25%);
        background-size: 200% 200%;
        animation: none;
        color: var(--text);
        min-height: 100vh;
        display: flex;
      }
      @keyframes bg-pulse{ 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
      
      body.page-streamer ::-webkit-scrollbar{ width: 6px; height: 6px; }
      body.page-streamer ::-webkit-scrollbar-track{ background: transparent; }
      body.page-streamer ::-webkit-scrollbar-thumb{ background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
      body.page-streamer ::-webkit-scrollbar-thumb:hover{ background: rgba(255, 255, 255, 0.2); }
      
      
      body.page-streamer .sidebar{ width: 280px; background: rgba(3,3,5,0.6); backdrop-filter: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 32px; flex-shrink: 0; }
      body.page-streamer .brand{ font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; color: white; margin-bottom: 48px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
      body.page-streamer .nav-item{ display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text-muted); text-decoration: none; border-radius: 14px; margin-bottom: 6px; transition: all 0.3s ease; font-weight: 500; }
      body.page-streamer .nav-item:hover{ background: var(--glass-hover); color: white; transform: translateX(4px); }
      body.page-streamer .nav-item.active{ background: rgba(245, 158, 11, 0.15); color: white; border: 1px solid rgba(245, 158, 11, 0.2); }
      
      body.page-streamer .main{ flex: 1; padding: 40px 60px; overflow-y: auto; animation: fade-in 0.5s ease-out; }
      @keyframes fade-in{ from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
      body.page-streamer .header{ margin-bottom: 48px; display: flex; justify-content: space-between; align-items: center; }
      body.page-streamer .page-title{ font-family: 'Fraunces', serif; font-size: 36px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
      
      
      body.page-streamer .video-grid{
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
      }
      body.page-streamer .video-card{
        background: var(--glass);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        overflow: hidden;
        transition: transform 0.2s, box-shadow 0.2s;
        display: flex;
        flex-direction: column;
        backdrop-filter: none;
      }
      body.page-streamer .video-card:hover{
        transform: translateY(-10px);
        box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.15);
        border-color: rgba(245, 158, 11, 0.3);
      }
      body.page-streamer .thumb-wrap{
        aspect-ratio: 16/9;
        background: #000;
        position: relative;
      }
      body.page-streamer .thumb-img{ width: 100%; height: 100%; object-fit: cover; }
      body.page-streamer .duration-badge{
        position: absolute;
        bottom: 8px; right: 8px;
        background: rgba(0,0,0,0.8);
        color: #fff;
        font-size: 11px;
        padding: 2px 6px;
        border-radius: 4px;
        font-weight: 600;
      }
      body.page-streamer .card-body{ padding: 20px; flex: 1; display: flex; flex-direction: column; }
      body.page-streamer .video-title{
        font-weight: 600; font-size: 16px; margin-bottom: 8px; color: white;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4;
      }
      body.page-streamer .video-meta{ font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
      body.page-streamer .card-actions{
        margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
      }
      body.page-streamer button{
        background: none; border: none; cursor: pointer; color: var(--text-muted);
      }
      body.page-streamer form{ margin: 0; }
      body.page-streamer .tag{
        font-size: 11px;
        padding: 2px 8px;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.14);
        color: var(--muted);
      }
      body.page-streamer .clip{ border-color: var(--primary); color: var(--primary); }
      body.page-streamer .empty-badge{ position: absolute; top: 8px; left: 8px; background: rgba(255,82,82,0.9); color: white; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; }
      body.page-streamer .row{ display: flex; align-items: center; gap: 8px; }
      body.page-streamer .muted{ color: var(--text-muted); font-size: 13px; white-space: nowrap; }
      body.page-streamer .btn-icon{
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: rgba(255,255,255,0.05);
        color: var(--text-muted);
        font-size: 12px;
        cursor: pointer;
        transition: 0.2s;
      }
      body.page-streamer .btn-icon:hover{ background: rgba(255,255,255,0.1); color: #fff; transform: scale(1.1); }
      body.page-streamer .btn-icon.share{
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: rgba(255,255,255,0.05);
        color: var(--text-muted);
        font-size: 12px;
        cursor: pointer;
      }
      body.page-streamer .btn-icon.download{
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: rgba(255,255,255,0.05);
        color: var(--text-muted);
      }
      body.page-streamer .panel{ margin-bottom: 32px; padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--glass); backdrop-filter: none; }
      body.page-streamer .share-box{
        margin-bottom: 20px;
        padding: 12px 16px;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: var(--glass);
        display: flex;
        gap: 8px;
        align-items: center;
        flex-wrap: wrap;
      }
      body.page-streamer .share-box input{
        flex: 1;
        min-width: 240px;
        background: rgba(0,0,0,0.3);
        border: 1px solid var(--border);
        color: white;
        padding: 8px;
        border-radius: 6px;
      }
      
      body.page-streamer .btn-action{
        background: linear-gradient(135deg, var(--primary), var(--accent));
        color: white;
        padding: 8px 16px;
        border-radius: 8px;
        font-weight: 600;
        font-size: 13px;
        transition: 0.3s;
      }
      body.page-streamer .btn-action:hover{ transform: scale(1.05); box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
      body.page-streamer .btn-action{ position: relative; overflow: hidden; }
      body.page-streamer .btn-action::after{
        content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: 0.5s;
      }
      body.page-streamer .btn-action:hover{ transform: scale(1.05); box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
      body.page-streamer .btn-action:hover::after{ left: 100%; }
      
      body.page-streamer select, body.page-streamer input[name="q"]{
        background: rgba(0,0,0,0.3);
        border: 1px solid var(--border);
        color: #fff;
        padding: 8px 12px;
        border-radius: 8px;
        outline: none;
      }
      
      
      body.page-streamer .tabs{ display: inline-flex; background: rgba(0,0,0,0.3); padding: 4px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 24px; }
      body.page-streamer .tab{ padding: 8px 20px; color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 14px; border-radius: 8px; transition: 0.2s; display: flex; align-items: center; gap: 8px; cursor: pointer; }
      body.page-streamer .tab:hover{ color: var(--text); background: rgba(255,255,255,0.05); }
      body.page-streamer .tab.active{ background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
      body.page-streamer .badge{ background: rgba(255,255,255,0.15); padding: 2px 8px; border-radius: 6px; font-size: 11px; }
      body.page-streamer .tab.active .badge{ background: rgba(255,255,255,0.2); color: white; }
/* VOD */
body.page-vod *{ box-sizing: border-box; }
      body.page-vod{
        margin: 0;
        font-family: 'Sora', sans-serif;
        background-color: var(--bg-deep);
        background-image: 
            radial-gradient(circle at 15% 50%, rgba(245, 158, 11, 0.1), transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.1), transparent 25%);
        background-size: 200% 200%;
        animation: none;
        color: var(--text);
        height: 100vh;
        display: flex;
        overflow: hidden;
      }
      @keyframes bg-pulse{ 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
      
      body.page-vod ::-webkit-scrollbar{ width: 6px; height: 6px; }
      body.page-vod ::-webkit-scrollbar-track{ background: transparent; }
      body.page-vod ::-webkit-scrollbar-thumb{ background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
      body.page-vod ::-webkit-scrollbar-thumb:hover{ background: rgba(255, 255, 255, 0.2); }
      
      
      body.page-vod .sidebar{ width: 280px; background: rgba(3,3,5,0.6); backdrop-filter: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 32px; flex-shrink: 0; }
      body.page-vod .brand{ font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; color: white; margin-bottom: 48px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
      body.page-vod .nav-item{ display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text-muted); text-decoration: none; border-radius: 14px; margin-bottom: 6px; transition: all 0.3s ease; font-weight: 500; }
      body.page-vod .nav-item:hover{ background: var(--glass-hover); color: white; transform: translateX(4px); }
      body.page-vod .nav-item.active{ background: rgba(245, 158, 11, 0.15); color: white; border: 1px solid rgba(245, 158, 11, 0.2); }

      body.page-vod .main{ flex: 1; display: flex; flex-direction: column; overflow: hidden; animation: fade-in 0.5s ease-out; }
      @keyframes fade-in{ from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
      body.page-vod header{ padding: 24px 40px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
      body.page-vod .page-title{ font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }

      body.page-vod .content{ flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; padding: 20px; min-height: 0; }
      body.page-vod .content.solo{ grid-template-columns: 1fr; }
      
      body.page-vod .main-col{ display: flex; flex-direction: column; gap: 16px; min-height: 0; }
      
      body.page-vod .player-wrapper{ flex: 1; min-height: 0; display: flex; flex-direction: column; background: #000; border-radius: 12px; position: relative; box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
      body.page-vod video{ width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
      
      body.page-vod .chat-panel{
        height: 100%;
        border-radius: 12px;
        border: 1px solid var(--border);
        background: var(--glass);
        backdrop-filter: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      body.page-vod .chat-header{
        padding: 16px;
        border-bottom: 1px solid var(--border);
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: var(--text-muted);
      }
      body.page-vod .chat-list{
        padding: 16px;
        flex: 1;
        overflow-y: auto;
      }
      body.page-vod .chat-line{ display: grid; grid-template-columns: 44px auto; gap: 8px; align-items: baseline; }
      body.page-vod .chat-time{ color: var(--text-muted); font-size: 11px; }
      body.page-vod .chat-user{ color: var(--primary); font-weight: 700; margin-right: 6px; }
      body.page-vod .chat-msg{ color: #fff; }
      body.page-vod .chat-text{ display: inline; }
      body.page-vod .chat-toggle{
        padding: 4px 10px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: rgba(255,255,255,0.05);
        color: var(--text-muted);
        font-size: 11px;
        cursor: pointer;
      }
      @media (max-width: 960px){
        body.page-vod{ height: auto; overflow: auto; display: block; }
        body.page-vod .content{ display: flex; flex-direction: column; height: auto; }
        body.page-vod .player-wrapper{ height: auto; aspect-ratio: 16/9; }
        body.page-vod .chat-panel{ height: 400px; }
      }
      
      body.page-vod .controls-panel{ flex-shrink: 0; padding: 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--glass); backdrop-filter: none; }
      
      body.page-vod .row{ display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
      body.page-vod input{
        padding: 8px 10px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: rgba(0,0,0,0.3);
        color: white;
      }
      body.page-vod button{
        padding: 10px 20px;
        border: 0;
        border-radius: 12px;
        background: linear-gradient(135deg, var(--primary), var(--accent));
        color: white;
        font-weight: 600;
        cursor: pointer;
        transition: 0.3s;
        position: relative; overflow: hidden;
      }
      body.page-vod button::after{
        content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: 0.5s;
      }
      body.page-vod button:hover{ transform: scale(1.05); box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
      body.page-vod button:hover::after{ left: 100%; }
      body.page-vod .note{ color: var(--text-muted); font-size: 12px; margin-top: 8px; }
      body.page-vod .error{ color: #ff8b8b; font-size: 13px; margin-top: 8px; }
      body.page-vod .quick{ border-radius: 999px; background: rgba(99, 102, 241, 0.1); color: var(--primary); border: 1px solid rgba(99, 102, 241, 0.2); font-weight: 600; }
      body.page-vod .dl-card{ display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; background: rgba(0,0,0,0.3); border-radius: 12px; text-align: center; padding: 20px; }
/* HLS */
body.page-hls *{ box-sizing: border-box; }
      body.page-hls{
        margin: 0;
        font-family: 'Fraunces', serif;
        color: var(--ink);
        background:
          radial-gradient(900px 400px at 10% -10%, rgba(255,138,61,0.18), transparent 60%),
          radial-gradient(700px 500px at 110% 0%, rgba(43,179,255,0.16), transparent 60%),
          linear-gradient(180deg, var(--bg-1), var(--bg-2));
        min-height: 100vh;
      }
      body.page-hls header{ padding: 22px 28px; display: flex; justify-content: space-between; align-items: center; }
      body.page-hls a{ color: var(--accent-2); text-decoration: none; }
      body.page-hls .content{ display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; padding: 0 28px 28px; }
      body.page-hls .player{ padding: 0; }
      body.page-hls video{ width: 100%; max-height: 80vh; background: #000; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
      body.page-hls .chat-panel{
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(255,255,255,0.03);
        display: flex;
        flex-direction: column;
        min-height: 240px;
        max-height: 80vh;
      }
      body.page-hls .chat-header{
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: var(--muted);
      }
      body.page-hls .chat-list{
        padding: 10px 12px;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-size: 13px;
      }
      body.page-hls .chat-line{ display: flex; gap: 8px; align-items: baseline; }
      body.page-hls .chat-time{ color: var(--muted); font-size: 11px; min-width: 44px; }
      body.page-hls .chat-user{ color: var(--accent-2); font-weight: 600; }
      body.page-hls .chat-msg{ color: var(--ink); }
      body.page-hls .chat-toggle{
        padding: 4px 10px;
        border-radius: 999px;
        border: 1px solid rgba(43,179,255,0.35);
        background: rgba(43,179,255,0.18);
        color: var(--accent-2);
        font-size: 11px;
        cursor: pointer;
      }
      @media (max-width: 960px){
        body.page-hls .content{ grid-template-columns: 1fr; }
        body.page-hls .chat-panel{ max-height: 320px; }
      }
      body.page-hls .note{ padding: 0 28px 16px; color: var(--muted); }
      body.page-hls button{
        padding: 10px 14px;
        border: 0;
        border-radius: 10px;
        background: linear-gradient(90deg, var(--accent), #ffb05a);
        color: #141414;
        font-weight: 700;
        cursor: pointer;
      }
/* LIVE */
body.page-live *{ box-sizing: border-box; }
      body.page-live{
        margin: 0;
        font-family: 'Fraunces', serif;
        color: var(--ink);
        background:
          radial-gradient(900px 400px at 10% -10%, rgba(255,138,61,0.18), transparent 60%),
          radial-gradient(700px 500px at 110% 0%, rgba(43,179,255,0.16), transparent 60%),
          linear-gradient(180deg, var(--bg-1), var(--bg-2));
        height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      body.page-live header{ padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; background: rgba(0,0,0,0.2); border-bottom: 1px solid rgba(255,255,255,0.05); }
      body.page-live a{ color: var(--accent-2); text-decoration: none; }
      body.page-live .content{ flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; padding: 20px; min-height: 0; }
      
      body.page-live .main-col{ display: flex; flex-direction: column; gap: 16px; min-height: 0; }
      
      body.page-live .player-wrapper{ flex: 1; min-height: 0; display: flex; flex-direction: column; background: #000; border-radius: 12px; position: relative; box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
      body.page-live video{ width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
      
      body.page-live .note{ color: var(--muted); font-size: 13px; }
      body.page-live .badge{ color: #ff8b8b; font-weight: 600; }
      
      body.page-live .controls-panel{ flex-shrink: 0; padding: 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); }
      body.page-live .controls-panel h3{ margin: 0 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
      
      body.page-live .row{ display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
      body.page-live input{
        padding: 8px 10px;
        border-radius: 10px;
        border: 1px solid rgba(255,255,255,0.1);
        background: #0f1218;
        color: var(--ink);
      }
      body.page-live button{
        padding: 8px 12px;
        border: 0;
        border-radius: 10px;
        background: linear-gradient(90deg, var(--accent), #ffb05a);
        color: #141414;
        font-weight: 700;
        cursor: pointer;
      }
      body.page-live .status{ color: var(--muted); font-size: 12px; margin-bottom: 8px; }
      
      body.page-live .chat-panel{
        height: 100%;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.08);
        background: rgba(15, 18, 24, 0.92);
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      body.page-live .chat-header{
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: var(--muted);
      }
      body.page-live .chat-list{
        padding: 10px;
        flex: 1;
        overflow-y: auto;
      }
      body.page-live .chat-line{ display: grid; grid-template-columns: 44px auto; gap: 8px; align-items: baseline; }
      body.page-live .chat-time{ color: var(--muted); font-size: 11px; }
      body.page-live .chat-user{ color: #ff9d4a; font-weight: 700; margin-right: 6px; }
      body.page-live .chat-msg{ color: var(--ink); }
      body.page-live .chat-toggle{
        padding: 4px 10px;
        border-radius: 999px;
        border: 1px solid rgba(43,179,255,0.35);
        background: rgba(43,179,255,0.18);
        color: var(--accent-2);
        font-size: 11px;
        cursor: pointer;
      }
      body.page-live .hls-link{
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.14);
        color: var(--muted);
        font-size: 12px;
      }
      @media (max-width: 1000px){
        
        html.page-live, body.page-live{ height: 100%; overflow: hidden; }
        body.page-live{ display: flex; flex-direction: column; }
        body.page-live header{ padding: 8px 12px; flex-shrink: 0; background: #000; border-bottom: 1px solid rgba(255,255,255,0.1); }
        
        body.page-live .content{ display: flex; flex-direction: column; height: 100%; padding: 0; gap: 0; overflow: hidden; }
        
        body.page-live .main-col{ flex: 2; min-height: 0; background: #000; gap: 0; justify-content: center; }
        body.page-live .player-wrapper{ height: 100%; width: 100%; border-radius: 0; box-shadow: none; aspect-ratio: auto; }
        body.page-live video{ border-radius: 0; }
        body.page-live .controls-panel{ display: none; }
        
        body.page-live .chat-panel{ flex: 1; min-height: 0; border-radius: 0; border: none; border-top: 1px solid rgba(255,255,255,0.1); }
        body.page-live .chat-header{ padding: 8px 12px; font-size: 11px; }
        body.page-live .chat-list{ padding: 8px 12px; font-size: 12px; }
        
        @media (orientation: landscape){
            body.page-live .content{ flex-direction: row; }
            body.page-live .main-col{ flex: 3; }
            body.page-live .chat-panel{ flex: 1; border-top: none; border-left: 1px solid rgba(255,255,255,0.1); }
            body.page-live header{ padding: 4px 12px; }
        }
      }
      body.page-live .viewer-badge{
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid rgba(255, 82, 82, 0.35);
        background: rgba(255, 82, 82, 0.18);
        color: #ff8b8b;
        font-size: 12px;
        cursor: pointer;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 6px;
      }
      body.page-live .viewer-panel{
        margin-top: 16px;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 12px;
        padding: 20px;
        display: none;
      }
      body.page-live .viewer-panel.open{ display: block; animation: rise 300ms ease-out; }
      body.page-live .chart-wrap{ position: relative; height: 200px; width: 100%; margin-bottom: 16px; }
      body.page-live .stat-row{ display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 4px; }
      body.page-live .stat-val{ font-weight: bold; color: var(--accent); }
/* FILES */
body.page-files *{ box-sizing: border-box; }
      body.page-files{
        margin: 0;
        font-family: 'Sora', sans-serif;
        background-color: var(--bg-deep);
        background-image: 
            radial-gradient(circle at 15% 50%, rgba(245, 158, 11, 0.1), transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.1), transparent 25%);
        background-size: 200% 200%;
        animation: none;
        color: var(--text);
        min-height: 100vh;
        display: flex;
      }
      @keyframes bg-pulse{ 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
      
      body.page-files ::-webkit-scrollbar{ width: 6px; height: 6px; }
      body.page-files ::-webkit-scrollbar-track{ background: transparent; }
      body.page-files ::-webkit-scrollbar-thumb{ background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
      body.page-files ::-webkit-scrollbar-thumb:hover{ background: rgba(255, 255, 255, 0.2); }
      
      
      body.page-files .sidebar{ width: 280px; background: rgba(3,3,5,0.6); backdrop-filter: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 32px; flex-shrink: 0; }
      body.page-files .brand{ font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; color: white; margin-bottom: 48px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
      body.page-files .nav-item{ display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text-muted); text-decoration: none; border-radius: 14px; margin-bottom: 6px; transition: all 0.3s ease; font-weight: 500; }
      body.page-files .nav-item:hover{ background: var(--glass-hover); color: white; transform: translateX(4px); }
      body.page-files .nav-item.active{ background: rgba(245, 158, 11, 0.15); color: white; border: 1px solid rgba(245, 158, 11, 0.2); }
      
      body.page-files .main{ flex: 1; padding: 40px 60px; overflow-y: auto; animation: fade-in 0.5s ease-out; }
      @keyframes fade-in{ from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
      body.page-files .header{ margin-bottom: 48px; }
      body.page-files .page-title{ font-family: 'Fraunces', serif; font-size: 36px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
      body.page-files .files-alert{ padding:12px 14px; border-radius:10px; margin:-28px 0 24px; font-size:14px; font-weight:600; }
      body.page-files .files-alert-error{ background:rgba(239,68,68,.12); color:#fecaca; border:1px solid rgba(239,68,68,.28); }
      body.page-files .files-alert-success{ background:rgba(34,197,94,.12); color:#bbf7d0; border:1px solid rgba(34,197,94,.28); }

      
      body.page-files .upload-section{
        background: var(--glass);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 24px;
        margin-bottom: 40px;
        backdrop-filter: none;
      }
      body.page-files .upload-title{ font-size: 18px; font-weight: 600; margin-bottom: 16px; color: white; }
      
      body.page-files .upload-dropzone{
        border: 2px dashed var(--border);
        border-radius: 8px;
        padding: 40px;
        text-align: center;
        background: rgba(0,0,0,0.1);
        transition: 0.2s;
        cursor: pointer;
        position: relative;
      }
      body.page-files .upload-dropzone:hover{ border-color: var(--primary); background: rgba(88, 166, 255, 0.05); }
      body.page-files .upload-dropzone input[type="file"]{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
      body.page-files .upload-icon{ font-size: 32px; color: var(--text-muted); margin-bottom: 10px; display: block; }
      body.page-files .upload-text{ color: var(--text-muted); font-size: 14px; }
      body.page-files .file-selected{ color: var(--success); font-weight: 500; margin-top: 10px; display: none; }

      body.page-files .upload-meta{ display: grid; grid-template-columns: 1fr 2fr auto; gap: 12px; margin-top: 16px; }
      body.page-files .input-field{
        background: rgba(0,0,0,0.3);
        border: 1px solid var(--border);
        color: white;
        padding: 10px 12px;
        border-radius: 6px;
        font-size: 14px;
        outline: none;
        transition: 0.2s;
      }
      body.page-files .input-field:focus{ border-color: var(--primary); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); }
      
      body.page-files .btn{
        padding: 10px 20px;
        border-radius: 6px;
        font-weight: 600;
        font-size: 14px;
        border: 1px solid transparent;
        cursor: pointer;
        transition: 0.2s;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-decoration: none;
      }
      body.page-files .btn-primary{ background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; position: relative; overflow: hidden; }
      body.page-files .btn-primary::after{
        content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); transition: 0.5s;
      }
      body.page-files .btn-primary:hover{ transform: scale(1.05); box-shadow: 0 0 15px rgba(245, 158, 11, 0.3); }
      body.page-files .btn-primary:hover::after{ left: 100%; }
      
      
      body.page-files .files-grid{ display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
      
      body.page-files .file-card{
        background: var(--glass);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 20px;
        transition: 0.2s;
        display: flex;
        flex-direction: column;
        position: relative;
        backdrop-filter: none;
      }
      body.page-files .file-card:hover{
        transform: translateY(-6px); border-color: rgba(245, 158, 11, 0.3);
        box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.15);
      }
      
      body.page-files .file-header{ display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
      body.page-files .file-icon{ font-size: 24px; background: rgba(255,255,255,0.05); padding: 10px; border-radius: 8px; }
      body.page-files .file-size{ font-size: 12px; color: var(--text-muted); font-family: monospace; background: rgba(0,0,0,0.2); padding: 4px 8px; border-radius: 4px; height: fit-content; }
      
      body.page-files .file-info{ flex: 1; margin-bottom: 16px; }
      body.page-files .file-name{ font-size: 16px; font-weight: 600; color: white; margin-bottom: 4px; word-break: break-all; }
      body.page-files .file-desc{ font-size: 13px; color: var(--text-muted); line-height: 1.5; }
      
      body.page-files .file-actions{ display: flex; gap: 8px; margin-top: auto; border-top: 1px solid var(--border); padding-top: 16px; }
      body.page-files .btn-sm{ padding: 6px 12px; font-size: 12px; border-radius: 6px; background: rgba(255,255,255,0.05); color: white; border: 1px solid var(--border); }
      body.page-files .btn-sm:hover{ background: var(--border); }
      body.page-files .btn-icon{ padding: 6px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: transparent; border: 1px solid transparent; color: var(--text-muted); cursor: pointer; transition: 0.2s; }
      body.page-files .btn-icon:hover{ background: rgba(255,255,255,0.1); color: white; transform: scale(1.1); }
      body.page-files .btn-icon.danger:hover{ color: var(--danger); background: rgba(248, 81, 73, 0.1); }
      
      body.page-files .edit-form{ display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
      body.page-files .file-card.editing .edit-form{ display: block; }
      body.page-files .file-card.editing .file-info{ display: none; }
      
      body.page-files .share-box{
        margin-top: 10px;
        background: rgba(56, 139, 253, 0.1);
        border: 1px solid rgba(56, 139, 253, 0.4);
        border-radius: 6px;
        padding: 8px 12px;
        display: flex;
        align-items: center;
        gap: 8px;
      }
      body.page-files .share-url{
        background: transparent;
        border: none;
        color: var(--primary);
        font-size: 12px;
        flex: 1;
        outline: none;
        font-family: monospace;
      }
      
      body.page-files .empty-state{
        text-align: center;
        padding: 60px;
        color: var(--text-muted);
        grid-column: 1 / -1;
      }
      @media (max-width: 768px){
        body.page-files{ flex-direction: column; }
        body.page-files .sidebar{ width: 100%; padding: 12px; border-right: none; border-bottom: 1px solid var(--border); flex-direction: row; align-items: center; justify-content: space-between; flex-shrink: 0; }
        body.page-files .brand{ margin-bottom: 0; font-size: 18px; }
        body.page-files nav{ display: flex; gap: 8px; overflow-x: auto; padding-bottom: 0; }
        body.page-files .nav-item{ margin-bottom: 0; padding: 6px 10px; font-size: 12px; white-space: nowrap; }
        body.page-files .nav-item[style*="margin-top:auto"]{ margin-top: 0 !important; }
        body.page-files .main{ padding: 16px; }
        body.page-files .files-grid{ grid-template-columns: 1fr; }
      }
/* MOBILE_INDEX */
body.page-mobile-index{ margin:0; font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background:#0b0d11; color:#fff; padding-bottom:80px; -webkit-tap-highlight-color: transparent; }
body.page-mobile-index .header{ padding:16px; background:#18181b; border-bottom:1px solid #27272a; font-weight:800; font-size:20px; display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; z-index:10; }
body.page-mobile-index .section{ padding:16px; }
body.page-mobile-index .section-title{ font-size:13px; color:#a1a1aa; margin-bottom:12px; text-transform:uppercase; letter-spacing:0.05em; font-weight:600; }
body.page-mobile-index .card{ background:#1f1f23; padding:16px; border-radius:12px; margin-bottom:12px; display:flex; align-items:center; justify-content:space-between; text-decoration:none; color:#fff; border:1px solid #27272a; transition:0.2s; }
body.page-mobile-index .card:active{ transform:scale(0.98); background:#27272a; }
body.page-mobile-index .live-card{ border-color:rgba(239,68,68,0.3); background:rgba(239,68,68,0.05); }
body.page-mobile-index .badge{ background:#27272a; padding:4px 8px; border-radius:6px; font-size:12px; color:#a1a1aa; }
body.page-mobile-index .live-badge, body.page-mobile-streamer .live-badge { background:#ef4444; color:white; padding:4px 8px; border-radius:6px; font-size:12px; font-weight:bold; box-shadow:0 0 10px rgba(239,68,68,0.4); position:relative; overflow:hidden; }
body.page-mobile-index .live-badge::after, body.page-mobile-streamer .live-badge::after { content:""; position:absolute; inset:0; background:rgba(255,255,255,0.2); animation:live-pulse 2s infinite ease-in-out; border-radius:inherit; }
@keyframes live-pulse { 0% { opacity:0.8; transform:scale(1); } 50% { opacity:0; transform:scale(1.5); } 100% { opacity:0; transform:scale(1.5); } }
body.page-mobile-index .mobile-live-start{
  display:flex;
  gap:8px;
  margin-bottom:12px;
}
body.page-mobile-index .mobile-live-start input{
  flex:1;
  min-width:0;
  background:#1f1f23;
  border:1px solid #27272a;
  color:#fff;
  padding:12px;
  border-radius:8px;
  outline:none;
}
body.page-mobile-index .mobile-live-start input:focus{ border-color:#ef4444; }
body.page-mobile-index .mobile-live-start button{
  flex-shrink:0;
  width:48px;
  border:none;
  border-radius:8px;
  background:#ef4444;
  color:#fff;
  font-size:14px;
  cursor:pointer;
}
@media (max-width: 768px) {
  .mobile-global-nav { position:fixed; bottom:0; left:0; right:0; height:64px; background:rgba(24,24,27,0.85); backdrop-filter: none; -webkit-backdrop-filter: none; border-top:1px solid rgba(255,255,255,0.05); display:flex; justify-content:space-around; align-items:center; z-index:9000; padding-bottom:env(safe-area-inset-bottom); }
  .mobile-global-nav a, .mobile-global-nav button { background:none; border:none; color:#71717a; text-decoration:none; font-size:10px; display:flex; flex-direction:column; align-items:center; gap:4px; width:100%; padding:10px 0; cursor:pointer; font-family:inherit; }
  .mobile-global-nav a.active { color:#f59e0b; }
  .mobile-global-nav svg { width:24px; height:24px; fill:currentColor; transition:0.2s; }
  .mobile-global-nav a.active svg { transform:scale(1.1); }
}
/* MOBILE_STREAMER */
body.page-mobile-streamer{ margin:0; font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background:#0b0d11; color:#fff; padding-bottom:80px; }
body.page-mobile-streamer .header{ padding:12px 16px; background:#18181b; border-bottom:1px solid #27272a; display:flex; align-items:center; gap:16px; position:sticky; top:0; z-index:100; }
body.page-mobile-streamer .back-btn{ font-size:24px; text-decoration:none; color:#fff; padding:4px; }
body.page-mobile-streamer .page-title{ font-weight:800; font-size:18px; flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
body.page-mobile-streamer .controls{ padding:16px; background:#121214; border-bottom:1px solid #27272a; }
body.page-mobile-streamer .btn-row{ display:flex; gap:8px; margin-bottom:12px; overflow-x:auto; padding-bottom:4px; }
body.page-mobile-streamer .btn{ background:#27272a; color:#fff; border:1px solid #3f3f46; padding:8px 12px; border-radius:8px; font-size:13px; font-weight:600; white-space:nowrap; text-decoration:none; cursor:pointer; display:flex; align-items:center; gap:6px; }
body.page-mobile-streamer .btn-primary{ background:#f59e0b; border-color:#d97706; }
body.page-mobile-streamer .btn-danger{ background:rgba(239,68,68,0.2); color:#fca5a5; border-color:rgba(239,68,68,0.4); }
body.page-mobile-streamer .search-row{ display:flex; gap:8px; }
body.page-mobile-streamer .search-input{ flex:1; background:#000; border:1px solid #3f3f46; padding:8px 12px; border-radius:8px; color:#fff; outline:none; }
body.page-mobile-streamer .tabs{ display:flex; padding:12px 16px; gap:10px; overflow-x:auto; border-bottom:1px solid #27272a; scrollbar-width:none; }
body.page-mobile-streamer .tabs::-webkit-scrollbar{ display:none; }
body.page-mobile-streamer .tab{ padding:8px 16px; background:rgba(255,255,255,0.05); border-radius:20px; color:#a1a1aa; text-decoration:none; font-size:14px; font-weight:600; white-space:nowrap; display:flex; align-items:center; gap:6px; transition:0.2s; border:1px solid transparent; }
body.page-mobile-streamer .tab.active{ background:rgba(245,158,11,0.15); color:#f59e0b; border-color:rgba(245,158,11,0.3); }
body.page-mobile-streamer .badge{ background:rgba(255,255,255,0.2); padding:2px 6px; border-radius:4px; font-size:10px; }
body.page-mobile-streamer .list{ padding:16px; display:grid; gap:16px; }
body.page-mobile-streamer .video-card{ background:#18181b; border-radius:12px; overflow:hidden; border:1px solid #27272a; }
body.page-mobile-streamer .thumb-area{ position:relative; aspect-ratio:16/9; display:block; }
body.page-mobile-streamer .thumb{ width:100%; height:100%; object-fit:cover; }
body.page-mobile-streamer .dur{ position:absolute; bottom:6px; right:6px; background:rgba(0,0,0,0.8); padding:2px 6px; border-radius:4px; font-size:11px; font-weight:600; }
body.page-mobile-streamer .meta{ padding:12px; }
body.page-mobile-streamer .title{ font-weight:600; font-size:14px; margin-bottom:6px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; color:#fff; text-decoration:none; }
body.page-mobile-streamer .info{ font-size:12px; color:#a1a1aa; margin-bottom:12px; }
body.page-mobile-streamer .actions{ display:flex; gap:8px; border-top:1px solid #27272a; padding-top:12px; }
body.page-mobile-streamer .act-btn{ flex:1; text-align:center; padding:6px; background:#27272a; border-radius:6px; font-size:12px; color:#a1a1aa; text-decoration:none; border:1px solid #3f3f46; }
body.page-mobile-streamer .pagination{
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  gap:12px !important;
  padding:16px 12px 24px !important;
  align-items:stretch !important;
  width:100% !important;
}
body.page-mobile-streamer .pagination-pages,
body.page-streamer .pagination-pages{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  align-items:center !important;
  gap:8px !important;
  width:100% !important;
  max-width:100% !important;
}
body.page-mobile-streamer .pagination-nav-row,
body.page-streamer .pagination-nav-row{
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  align-items:center !important;
  gap:10px !important;
  width:100% !important;
}
body.page-mobile-streamer .pagination-page,
body.page-streamer .pagination-page{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-width:44px !important;
  width:auto !important;
  height:44px !important;
  padding:0 12px !important;
  border-radius:10px !important;
  border:1px solid rgba(255,255,255,0.14) !important;
  background:rgba(255,255,255,0.06) !important;
  color:#f5f5f5 !important;
  font-size:15px !important;
  font-weight:700 !important;
  text-decoration:none !important;
  line-height:1 !important;
  box-sizing:border-box !important;
  flex:0 0 auto !important;
}
body.page-mobile-streamer .pagination-page:hover,
body.page-streamer .pagination-page:hover{
  background:rgba(255,255,255,0.12) !important;
  border-color:rgba(255,255,255,0.28) !important;
}
body.page-mobile-streamer .pagination-page.is-current,
body.page-streamer .pagination-page.is-current{
  background:rgba(242,229,141,0.18) !important;
  border-color:rgba(242,229,141,0.55) !important;
  color:#fff3a9 !important;
  cursor:default !important;
}
body.page-streamer .streamer-pagination{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  justify-content:center !important;
  gap:12px !important;
  width:100% !important;
  min-height:0 !important;
  padding:4px 0 !important;
}
body.page-streamer .pagination-nav{
  color:var(--text-muted);
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid transparent;
}
body.page-streamer .pagination-nav:hover{
  color:#fff;
  background:rgba(255,255,255,0.08);
  border-color:rgba(255,255,255,0.12);
}
body.page-streamer .streamer-pagination-panel{
  width:100% !important;
}
body.page-mobile-streamer .empty{ text-align:center; padding:40px; color:#52525b; }
/* MOBILE_PLAYER */
body.page-mobile-player{ margin:0; background:#000; color:#fff; height:100vh; height:100dvh; display:flex; flex-direction:column; overflow:hidden; font-family:-apple-system, sans-serif; }


body.page-mobile-player .video-container{ flex:none; width:100%; aspect-ratio:16/9; position:relative; background:#000; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
body.page-mobile-player .chat-container{
  flex: 1;
  background:#0e0e10;
  border-top:1px solid #333;
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}
body.page-mobile-player .chat-list{
  flex:1 1 auto;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  padding:10px 10px 40px 10px;
  font-size:13px;
  line-height:1.4;
}
body.page-twitch-watch-mobile .chat-container{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}
body.page-twitch-watch-mobile .chat-list{
  flex:1 1 auto;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  padding:8px 12px 24px;
}
body.page-mobile-player video{ width:100%; height:100%; object-fit:contain; }
body.page-mobile-player iframe{ width:100%; height:100%; border:none; }
body.page-mobile-player .overlay-header{
  position:absolute;
  top:0; left:0; right:0;
  padding:10px;
  padding-top:max(10px, env(safe-area-inset-top));
  background:linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
  z-index:50;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  pointer-events:none;
}
body.page-mobile-player .back-btn{
  pointer-events:auto;
  color:white;
  text-decoration:none;
  font-size:24px;
  text-shadow:0 1px 3px rgba(0,0,0,0.8);
  padding:5px;
}
body.page-mobile-player .chat-line{ margin-bottom:4px; word-wrap:break-word; }
body.page-mobile-player .u{ font-weight:700; color:#a970ff; margin-right:4px; }
body.page-mobile-player .m{ color:#efeff1; }
body.page-mobile-player .t{ color:#555; font-size:10px; margin-right:4px; }

/* Landscape layout: physical rotate OR forced via Vollbild button */
body.page-mobile-player.is-landscape-active{
  flex-direction: row !important;
}
body.page-mobile-player.is-landscape-active .video-container{
  flex: 1 1 100% !important;
  width: auto !important;
  max-width: none !important;
  aspect-ratio: unset !important;
  height: 100% !important;
  min-width: 0 !important;
}
body.page-mobile-player.is-landscape-active .mobile-vod-details {
  display: none !important;
}
/* Closed = fullscreen video, chat fully gone (override chat-panel-tabs display:flex) */
body.page-mobile-player.is-landscape-active .chat-container,
body.page-mobile-player.is-landscape-active .chat-container.chat-panel-tabs,
body.page-mobile-player.is-landscape-active .chat-container.chat-panel-split{
  display: none !important;
  flex: 0 0 0 !important;
  width: 0 !important;
  max-width: 0 !important;
  min-width: 0 !important;
  border: none !important;
  overflow: hidden !important;
}
/* Open = exactly 2/3 video + 1/3 chat */
body.page-mobile-player.is-landscape-active.landscape-chat-open .video-container{
  flex: 1 1 66.666% !important;
  width: 66.666% !important;
  max-width: 66.666% !important;
}
body.page-mobile-player.is-landscape-active.landscape-chat-open .chat-container,
body.page-mobile-player.is-landscape-active.landscape-chat-open .chat-container.chat-panel-tabs,
body.page-mobile-player.is-landscape-active.landscape-chat-open .chat-container.chat-panel-split{
  display: flex !important;
  flex: 0 0 33.334% !important;
  width: 33.334% !important;
  max-width: 33.334% !important;
  min-width: 33.334% !important;
  height: 100% !important;
  border-top: none !important;
  border-left: 1px solid #333 !important;
  overflow: hidden !important;
}

/* Overlay action buttons */
body.page-mobile-player .overlay-header-actions{
  display:flex;
  align-items:center;
  gap:8px;
  pointer-events:auto;
  position: relative;
  z-index: 2;
}
body.page-mobile-player .mobile-force-landscape-toggle,
body.page-mobile-player .mobile-landscape-chat-toggle{
  display: none;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 10px;
  background: rgba(12,12,14,0.82);
  color: #f3f3f3;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  position: relative;
  z-index: 3;
}
body.page-mobile-player .mobile-force-landscape-toggle:focus-visible,
body.page-mobile-player .mobile-landscape-chat-toggle:focus-visible{
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
}
body.page-mobile-player .mobile-force-landscape-toggle.is-active{
  border-color: rgba(125, 211, 252, 0.55);
  background: rgba(14, 40, 56, 0.9);
}
body.page-mobile-player .force-landscape-icon,
body.page-mobile-player .landscape-chat-icon{
  display: none;
  pointer-events: none;
}
body.page-mobile-player .force-landscape-icon-enter{
  display: block;
}
body.page-mobile-player.is-landscape-layout .force-landscape-icon-enter{
  display: none;
}
body.page-mobile-player.is-landscape-layout .force-landscape-icon-exit{
  display: block;
}
body.page-mobile-player .landscape-chat-icon-expand{
  display: block;
}
body.page-mobile-player.landscape-chat-open .landscape-chat-icon-expand{
  display: none;
}
body.page-mobile-player.landscape-chat-open .landscape-chat-icon-collapse{
  display: block;
}
/* Portrait: Vollbild-Toggle. Landscape: Chat-Toggle. */
body.page-mobile-player:not(.is-landscape-active) .mobile-force-landscape-toggle,
body.page-mobile-player.is-landscape-layout .mobile-force-landscape-toggle{
  display: inline-flex;
}
body.page-mobile-player.is-landscape-active .mobile-landscape-chat-toggle,
body.page-mobile-player .mobile-landscape-chat-toggle.is-visible{
  display: inline-flex;
}

/* CHAT_EXPORT */
body.page-chat-export{ background: #0e0e10; color: #efeff1; font-family: 'Segoe UI', Helvetica, Arial, sans-serif; padding: 40px; margin: 0; }
  body.page-chat-export .container{ max-width: 800px; margin: 0 auto; }
  body.page-chat-export h1{ color: #fff; border-bottom: 1px solid #333; padding-bottom: 20px; }
  body.page-chat-export .vod-group{ margin-bottom: 40px; background: #18181b; border-radius: 8px; overflow: hidden; border: 1px solid #333; }
  body.page-chat-export .vod-header{ background: #1f1f23; padding: 15px 20px; font-weight: bold; color: #a970ff; border-bottom: 1px solid #333; display: flex; justify-content: space-between; }
  body.page-chat-export .chat-list{ padding: 10px 0; }
  body.page-chat-export .chat-line{ padding: 4px 20px; display: flex; gap: 10px; line-height: 1.5; font-size: 14px; }
  body.page-chat-export .chat-line:hover{ background: #1f1f23; }
  body.page-chat-export .time{ color: #adadb8; font-family: monospace; font-size: 12px; min-width: 60px; }
  body.page-chat-export .user{ font-weight: 700; color: #efeff1; }
  body.page-chat-export .msg{ color: #efeff1; word-break: break-word; }
  body.page-chat-export .footer{ margin-top: 50px; color: #555; font-size: 12px; text-align: center; }
/* SEARCH */
body.page-search *{ box-sizing: border-box; }
      body.page-search{
        margin: 0;
        font-family: 'Sora', sans-serif;
        background-color: var(--bg-deep);
        background-image: 
            radial-gradient(circle at 15% 50%, rgba(245, 158, 11, 0.1), transparent 25%),
            radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.1), transparent 25%);
        background-size: 200% 200%;
        animation: none;
        color: var(--text);
        min-height: 100vh;
        display: flex;
      }
      @keyframes bg-pulse{ 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
      
      body.page-search ::-webkit-scrollbar{ width: 6px; height: 6px; }
      body.page-search ::-webkit-scrollbar-track{ background: transparent; }
      body.page-search ::-webkit-scrollbar-thumb{ background: rgba(255, 255, 255, 0.1); border-radius: 3px; }
      body.page-search ::-webkit-scrollbar-thumb:hover{ background: rgba(255, 255, 255, 0.2); }
      
      body.page-search a{ text-decoration: none; color: inherit; transition: 0.2s; }
      
      body.page-search .sidebar{ width: 280px; background: rgba(3,3,5,0.6); backdrop-filter: none; border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 32px; flex-shrink: 0; }
      body.page-search .brand{ font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; color: white; margin-bottom: 48px; display: flex; align-items: center; gap: 10px; letter-spacing: -0.02em; }
      body.page-search .nav-item{ display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text-muted); text-decoration: none; border-radius: 14px; margin-bottom: 6px; transition: all 0.3s ease; font-weight: 500; }
      body.page-search .nav-item:hover{ background: var(--glass-hover); color: white; transform: translateX(4px); }
      body.page-search .nav-item.active{ background: rgba(245, 158, 11, 0.15); color: white; border: 1px solid rgba(245, 158, 11, 0.2); }
      
      body.page-search .main{ flex: 1; padding: 40px 60px; overflow-y: auto; animation: fade-in 0.5s ease-out; }
      @keyframes fade-in{ from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
      body.page-search .header{ margin-bottom: 48px; }
      body.page-search .page-title{ font-family: 'Fraunces', serif; font-size: 36px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
      
      body.page-search .panel{ background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; backdrop-filter: none; margin-bottom: 24px; }
      
      body.page-search input{ background: rgba(0,0,0,0.3); border: 1px solid var(--border); color: white; padding: 12px 16px; border-radius: 12px; outline: none; width: 100%; transition: 0.2s; font-size: 16px; }
      body.page-search input:focus{ border-color: var(--primary); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); }
      
      body.page-search button{ background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; padding: 12px 24px; border-radius: 12px; font-size: 16px; font-weight: 600; cursor: pointer; border: none; transition: 0.3s; margin-top: 16px; }
      body.page-search button:hover{ transform: scale(1.02); box-shadow: 0 0 20px rgba(245, 158, 11, 0.3); }
      
      body.page-search table{ width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 20px; }
      body.page-search th, body.page-search td{ padding: 12px 8px; text-align: left; border-bottom: 1px solid var(--border); }
      body.page-search th{ color: var(--text-muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
      body.page-search tr:hover{ background: rgba(255,255,255,0.02); }
      
      body.page-search .link-btn{ color: var(--accent); font-weight: 600; }
      body.page-search .link-btn:hover{ text-decoration: underline; }
      
      @media (max-width: 768px){ body.page-search{ flex-direction: column; } body.page-search .sidebar{ width: 100%; padding: 16px; } body.page-search .main{ padding: 20px; } }

@keyframes spin { 100% { transform: rotate(360deg); } }

/* APP REDESIGN 2026 */
:root {
  --sr-bg: #070808;
  --sr-bg-soft: #0d1010;
  --sr-surface: rgba(18, 22, 22, 0.94);
  --sr-surface-2: rgba(24, 29, 29, 0.92);
  --sr-line: rgba(226, 232, 240, 0.12);
  --sr-line-strong: rgba(226, 232, 240, 0.2);
  --sr-text: #f3f4f0;
  --sr-text-2: #c8d1cc;
  --sr-muted: #8f9c96;
  --sr-warm: #f28c28;
  --sr-warm-2: #ffb15f;
  --sr-cyan: #49c7c0;
  --sr-green: #5bd39a;
  --sr-red: #ff6b5f;
  --sr-radius: 8px;
  --sr-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
  --primary: var(--sr-warm);
  --primary-hover: #d96f19;
  --accent: var(--sr-cyan);
  --text: var(--sr-text);
  --text-main: var(--sr-text);
  --text-muted: var(--sr-muted);
  --border: var(--sr-line);
  --card: var(--sr-surface);
  --glass: var(--sr-surface);
  --glass-hover: rgba(255, 255, 255, 0.06);
  --radius: var(--sr-radius);
}

body:is(.page-index,.page-channels,.page-streamer,.page-vod,.page-live,.page-admin,.page-files,.page-search,.page-discord-tool,.page-hls) {
  background:
    linear-gradient(135deg, rgba(242, 140, 40, 0.06), transparent 26%),
    linear-gradient(215deg, rgba(73, 199, 192, 0.055), transparent 30%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.014) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, #070808 0%, #0a0d0d 42%, #070808 100%) !important;
  color: var(--sr-text) !important;
  font-family: 'Sora', sans-serif !important;
  min-height: 100vh;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .sidebar {
  width: 252px !important;
  padding: 18px 14px !important;
  background: linear-gradient(180deg, rgba(10, 12, 12, 0.98), rgba(10, 12, 12, 0.9)) !important;
  border-right: 1px solid var(--sr-line) !important;
  box-shadow: 18px 0 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .brand {
  margin: 0 0 22px !important;
  padding: 10px 10px 18px !important;
  border-bottom: 1px solid var(--sr-line);
  color: var(--sr-text) !important;
  font-family: 'Fraunces', serif !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .nav-item {
  min-height: 42px !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid transparent !important;
  color: var(--sr-text-2) !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  transform: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .nav-item:hover {
  color: var(--sr-text) !important;
  background: rgba(255,255,255,0.055) !important;
  border-color: var(--sr-line) !important;
  transform: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .nav-item.active {
  color: #11100d !important;
  background: linear-gradient(135deg, var(--sr-warm), var(--sr-warm-2)) !important;
  border-color: rgba(255, 207, 151, 0.35) !important;
  box-shadow: 0 12px 24px rgba(242, 140, 40, 0.16);
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .main {
  padding: 28px 34px !important;
  background: transparent !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .header {
  margin: 0 0 22px !important;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--sr-line);
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .page-title {
  color: var(--sr-text) !important;
  font-family: 'Fraunces', serif !important;
  font-size: 34px !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .page-subtitle,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .muted {
  color: var(--sr-muted) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .panel,
body.page-index .stat-card,
body.page-index .card,
body.page-streamer .panel,
body.page-streamer .video-card,
body.page-files .upload-section,
body.page-files .file-card,
body.page-live .controls-panel,
body.page-live .chat-panel,
body.page-vod .controls-panel,
body.page-vod .chat-panel,
body.page-discord-tool .profile-card,
body.page-discord-tool .grid-item,
body.page-discord-tool .token-item {
  background: linear-gradient(180deg, rgba(22, 27, 27, 0.96), rgba(14, 17, 17, 0.96)) !important;
  border: 1px solid var(--sr-line) !important;
  border-radius: 8px !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24) !important;
  backdrop-filter: none !important;
}

body:is(.page-index,.page-channels,.page-admin,.page-files,.page-search,.page-discord-tool) .panel,
body.page-files .upload-section {
  padding: 22px !important;
}

body.page-index .stats-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 26px !important;
}

body.page-index .stat-card {
  min-height: 150px !important;
  padding: 18px !important;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

body.page-index .stat-card:hover,
body.page-index .card:hover,
body.page-streamer .video-card:hover,
body.page-files .file-card:hover {
  border-color: rgba(242, 140, 40, 0.38) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.34) !important;
}

body.page-index .stat-head,
body.page-index .card-header {
  gap: 12px;
}

body.page-index .stat-label,
body.page-index .stat-sub,
body.page-index .stat-box-label,
body.page-streamer .video-meta,
body.page-files .file-desc,
body.page-files .upload-text {
  color: var(--sr-muted) !important;
}

body.page-index .stat-value,
body.page-index .stat-box-val,
body.page-streamer .video-title,
body.page-files .file-name {
  color: var(--sr-text) !important;
}

body.page-index .streamer-grid,
body.page-streamer .video-grid,
body.page-files .files-grid,
body.page-discord-tool .grid-list {
  gap: 16px !important;
}

body.page-index .card,
body.page-streamer .video-card,
body.page-files .file-card {
  overflow: hidden;
}

body.page-index .avatar,
body.page-index .avatar img,
body.page-discord-tool .item-icon,
body.page-files .file-icon {
  border-radius: 8px !important;
}

body.page-index .avatar {
  background: linear-gradient(135deg, rgba(242, 140, 40, 0.28), rgba(73, 199, 192, 0.2)) !important;
}

body.page-index .status-badge,
body.page-streamer .status-badge,
body.page-index .badge,
body.page-streamer .badge,
body.page-files .file-size {
  border-radius: 999px !important;
  border: 1px solid var(--sr-line) !important;
  background: rgba(255,255,255,0.06) !important;
  color: var(--sr-text-2) !important;
}

body.page-index .status-badge.live,
body.page-streamer .status-badge.live,
body.page-mobile-index .live-badge {
  background: rgba(255, 107, 95, 0.18) !important;
  border-color: rgba(255, 107, 95, 0.36) !important;
  color: #ffb6ad !important;
}

body.page-index .status-badge.online,
body.page-streamer .status-badge.online {
  background: rgba(91, 211, 154, 0.14) !important;
  border-color: rgba(91, 211, 154, 0.28) !important;
  color: #9df0c3 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) input,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) select,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) textarea,
body.page-files .input-field {
  min-height: 40px !important;
  border-radius: 8px !important;
  border: 1px solid var(--sr-line) !important;
  background: rgba(5, 7, 7, 0.78) !important;
  color: var(--sr-text) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) input:focus,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) select:focus,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) textarea:focus,
body.page-files .input-field:focus {
  border-color: rgba(73, 199, 192, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(73, 199, 192, 0.12) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) button,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn-action,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .action-btn,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn-primary {
  border-radius: 8px !important;
  border: 1px solid var(--sr-line) !important;
  background: rgba(255,255,255,0.06) !important;
  color: var(--sr-text) !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) button:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn-action:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .action-btn:hover {
  background: rgba(255,255,255,0.1) !important;
  border-color: var(--sr-line-strong) !important;
  transform: translateY(-1px) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn-primary,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .action-btn.primary,
body.page-files .btn-primary {
  background: linear-gradient(135deg, var(--sr-warm), var(--sr-warm-2)) !important;
  border-color: rgba(255, 207, 151, 0.36) !important;
  color: #15100a !important;
  font-weight: 800 !important;
}

body.page-streamer .tabs,
body.page-admin .tabs,
body.page-discord-tool .tabs {
  gap: 6px !important;
  padding: 4px !important;
  border: 1px solid var(--sr-line) !important;
  border-radius: 8px !important;
  background: rgba(255,255,255,0.035) !important;
  width: fit-content;
}

body.page-streamer .tab,
body.page-admin .tab,
body.page-discord-tool .tab {
  border-radius: 6px !important;
  border: 0 !important;
  padding: 9px 13px !important;
  color: var(--sr-muted) !important;
  margin: 0 !important;
}

body.page-streamer .tab.active,
body.page-admin .tab.active,
body.page-discord-tool .tab.active {
  background: var(--sr-surface-2) !important;
  color: var(--sr-text) !important;
}

body.page-streamer .thumb-wrap {
  background: #020303 !important;
  border-bottom: 1px solid var(--sr-line);
}

body.page-streamer .thumb-img {
  filter: saturate(1.04) contrast(1.04);
}

body.page-streamer .duration-badge,
body.page-mobile-streamer .dur {
  border-radius: 6px !important;
  background: rgba(0, 0, 0, 0.78) !important;
  border: 1px solid rgba(255,255,255,0.12);
}

body.page-streamer .card-body {
  padding: 14px !important;
}

body.page-vod,
body.page-live,
body.page-hls,
body.page-clip-editor {
  background:
    linear-gradient(180deg, #050606 0%, #0a0d0d 100%) !important;
  color: var(--sr-text) !important;
}

body.page-vod header,
body.page-live header,
body.page-clip-editor header {
  background: rgba(8, 10, 10, 0.96) !important;
  border-bottom: 1px solid var(--sr-line) !important;
}

body.page-vod .player-wrapper,
body.page-live .player-wrapper,
body.page-hls video,
body.page-clip-editor .player-container {
  border-radius: 8px !important;
  background: #000 !important;
  border: 1px solid var(--sr-line) !important;
  box-shadow: var(--sr-shadow) !important;
}

body.page-vod .chat-header,
body.page-live .chat-header {
  background: rgba(255,255,255,0.035) !important;
  border-bottom: 1px solid var(--sr-line) !important;
}

body.page-vod .chat-line,
body.page-live .chat-line {
  border-radius: 6px;
}

body.page-vod .chat-line:hover,
body.page-live .chat-line:hover {
  background: rgba(255,255,255,0.045);
}

body.page-admin table,
body.page-search table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden;
}

body.page-admin th,
body.page-search th {
  color: var(--sr-muted) !important;
  background: rgba(255,255,255,0.035);
  letter-spacing: 0 !important;
}

body.page-admin td,
body.page-admin th,
body.page-search td,
body.page-search th {
  border-bottom: 1px solid var(--sr-line) !important;
}

body.page-files .upload-dropzone {
  border-radius: 8px !important;
  border-color: var(--sr-line) !important;
  background: rgba(255,255,255,0.035) !important;
}

body.page-files .upload-dropzone:hover {
  border-color: rgba(73, 199, 192, 0.5) !important;
  background: rgba(73, 199, 192, 0.06) !important;
}

body.page-mobile-index,
body.page-mobile-streamer {
  background: #080a0a !important;
  color: var(--sr-text) !important;
  font-family: 'Sora', sans-serif !important;
}

body.page-mobile-index .header,
body.page-mobile-streamer .header,
body.page-mobile-streamer .controls,
body.page-mobile-index .nav {
  background: rgba(12, 15, 15, 0.96) !important;
  border-color: var(--sr-line) !important;
}

body.page-mobile-index .card,
body.page-mobile-streamer .video-card,
body.page-mobile-streamer .tab {
  background: var(--sr-surface) !important;
  border-color: var(--sr-line) !important;
  border-radius: 8px !important;
}

body.page-mobile-streamer .tab.active,
body.page-mobile-streamer .btn-primary,
body.page-mobile-index .nav a.active {
  color: var(--sr-warm-2) !important;
}

@media (max-width: 900px) {
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) {
    flex-direction: column !important;
  }
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .sidebar {
    width: 100% !important;
    padding: 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--sr-line) !important;
  }
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .brand {
    padding: 4px 8px 10px !important;
    margin-bottom: 10px !important;
  }
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) nav {
    flex-direction: row !important;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .nav-item {
    white-space: nowrap;
    min-height: 38px !important;
  }
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .main {
    padding: 18px !important;
  }
  body.page-index .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

/* NACHTSILO TWITCH CONTROL - 2026-06 */
:root {
  --ns-bg: #08070d;
  --ns-bg-2: #0e0b17;
  --ns-panel: #14101f;
  --ns-panel-2: #191329;
  --ns-panel-3: #211837;
  --ns-line: rgba(255, 255, 255, 0.105);
  --ns-line-strong: rgba(255, 255, 255, 0.18);
  --ns-text: #f7f4ff;
  --ns-text-2: #c9c2dc;
  --ns-muted: #8d84a4;
  --ns-purple: #9147ff;
  --ns-purple-2: #b46cff;
  --ns-fire: #ff6a2a;
  --ns-fire-2: #ffb04f;
  --ns-cyan: #26d9d0;
  --ns-green: #3ee58d;
  --ns-red: #ff4f69;
  --ns-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --primary: var(--ns-purple);
  --primary-hover: #772ce8;
  --accent: var(--ns-cyan);
  --danger: var(--ns-red);
  --success: var(--ns-green);
  --text: var(--ns-text);
  --text-main: var(--ns-text);
  --text-muted: var(--ns-muted);
  --muted: var(--ns-muted);
  --border: var(--ns-line);
  --card: var(--ns-panel);
  --glass: var(--ns-panel);
  --radius: 8px;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-clip-editor) {
  font-family: Inter, "Sora", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  color: var(--ns-text) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(145, 71, 255, 0.18), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(38, 217, 208, 0.08), transparent 24%),
    linear-gradient(180deg, #090711 0%, #0d0a15 42%, #08070d 100%) !important;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) {
  min-height: 100vh;
  display: flex;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .sidebar {
  width: 252px !important;
  padding: 18px 14px !important;
  background: linear-gradient(180deg, rgba(13, 10, 22, 0.98), rgba(8, 7, 13, 0.98)) !important;
  border-right: 1px solid var(--ns-line) !important;
  box-shadow: 10px 0 34px rgba(0, 0, 0, 0.24) !important;
  backdrop-filter: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .brand {
  margin: 0 0 22px !important;
  min-height: 52px;
  padding: 8px 10px 16px !important;
  border-bottom: 1px solid var(--ns-line);
  color: var(--ns-text) !important;
  font-family: Inter, "Sora", sans-serif !important;
  font-size: 0 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .brand::before {
  content: "NachtSilo";
  display: block;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
  color: #fff;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .brand::after {
  content: "Stream Vault";
  display: block;
  margin-top: 6px;
  color: var(--ns-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-height: calc(100vh - 110px);
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .nav-item {
  min-height: 42px !important;
  padding: 10px 12px !important;
  border-radius: 6px !important;
  color: var(--ns-text-2) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transform: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .nav-item:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.07) !important;
  transform: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .nav-item.active {
  color: #fff !important;
  background: linear-gradient(90deg, rgba(145, 71, 255, 0.32), rgba(145, 71, 255, 0.10)) !important;
  border-color: rgba(145, 71, 255, 0.34) !important;
  box-shadow: inset 3px 0 0 var(--ns-purple) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .main {
  flex: 1 !important;
  padding: 26px 30px 44px !important;
  overflow-y: auto !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .header {
  min-height: 70px;
  margin: 0 0 22px !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 18px !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .page-title {
  margin: 0 !important;
  font-family: Inter, "Sora", sans-serif !important;
  font-size: clamp(28px, 3vw, 44px) !important;
  line-height: 1.02 !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  color: #fff !important;
}

body.page-index .page-title::after {
  content: "NachtSilo Control";
}

body.page-index .page-title {
  font-size: 0 !important;
}

body.page-index .page-title::after {
  font-size: clamp(30px, 3.6vw, 48px);
}

body.page-index .page-subtitle {
  margin-top: 9px;
  max-width: 720px;
  color: var(--ns-text-2) !important;
  font-size: 14px !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .panel,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .stat-card,
body:is(.page-index,.page-streamer) .card,
body.page-streamer .video-card,
body.page-files .file-card,
body.page-files .upload-dropzone {
  border-radius: 8px !important;
  border: 1px solid var(--ns-line) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)),
    var(--ns-panel) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.035), var(--ns-shadow) !important;
  backdrop-filter: none !important;
}

body:is(.page-index,.page-streamer) .card:hover,
body.page-streamer .video-card:hover,
body.page-files .file-card:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .stat-card:hover {
  border-color: rgba(145, 71, 255, 0.42) !important;
  transform: translateY(-2px) !important;
}

body.page-index .stats-grid {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.15fr) minmax(260px, 1fr) minmax(220px, .75fr) !important;
  gap: 14px !important;
  margin-bottom: 28px !important;
}

body.page-index .stat-card {
  min-height: 156px !important;
  padding: 18px !important;
  overflow: hidden;
  position: relative;
}

body.page-index .stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 85% 18%, rgba(145, 71, 255, 0.18), transparent 34%);
}

body.page-index .stat-label,
body:is(.page-index,.page-streamer) .stat-box-label {
  color: var(--ns-muted) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

body.page-index .stat-value,
body:is(.page-index,.page-streamer) .stat-box-val {
  color: #fff !important;
  font-weight: 900 !important;
}

body.page-index .res-row {
  display: grid !important;
  grid-template-columns: 42px 1fr 48px !important;
  gap: 10px !important;
  align-items: center !important;
}

body.page-index .res-bar,
body.page-index .progress-track {
  height: 7px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,0.08) !important;
  overflow: hidden;
}

body.page-index .res-fill,
body.page-index .progress-fill {
  background: linear-gradient(90deg, var(--ns-purple), var(--ns-cyan)) !important;
}

body.page-index .grid-title {
  margin: 28px 0 14px !important;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff !important;
  font-size: 20px !important;
  font-weight: 950 !important;
}

body.page-index .grid-title::after {
  content: "Channels";
  padding: 4px 8px;
  border: 1px solid var(--ns-line);
  border-radius: 999px;
  color: var(--ns-muted);
  font-size: 11px;
  font-weight: 800;
}

body.page-index .streamer-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(285px, 1fr)) !important;
  gap: 14px !important;
}

body.page-index .card {
  padding: 16px !important;
  min-height: 210px !important;
}

body.page-index .card-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

body.page-index .avatar {
  width: 58px !important;
  height: 58px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255,255,255,0.12) !important;
  background: linear-gradient(135deg, var(--ns-purple), #2b1b49) !important;
  color: #fff !important;
  overflow: hidden;
}

body.page-index .avatar.recording,
body.page-index .avatar.online {
  border-color: var(--ns-purple) !important;
  box-shadow: 0 0 0 4px rgba(145, 71, 255, 0.14), 0 0 28px rgba(145, 71, 255, 0.24) !important;
}

body.page-index .streamer-name {
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body.page-index .card-stats {
  margin-top: 16px !important;
  display: grid !important;
  grid-template-columns: 1fr 1.35fr !important;
  gap: 8px !important;
}

body.page-index .stat-box {
  border-radius: 7px !important;
  border: 1px solid var(--ns-line) !important;
  background: rgba(0,0,0,0.18) !important;
  padding: 10px !important;
}

body.page-index .card-actions,
body.page-streamer .card-actions {
  display: flex !important;
  gap: 8px !important;
  margin-top: 16px !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) button,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn-action,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .action-btn,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn-primary {
  min-height: 36px !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  border: 1px solid var(--ns-line) !important;
  background: rgba(255,255,255,0.075) !important;
  color: var(--ns-text) !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) button:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn-action:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .action-btn:hover {
  border-color: rgba(145,71,255,0.55) !important;
  background: rgba(145,71,255,0.18) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .btn-primary,
body:is(.page-index,.page-streamer) .action-btn.primary,
body.page-files .btn-primary {
  background: var(--ns-purple) !important;
  border-color: rgba(180,108,255,0.45) !important;
  color: #fff !important;
}

body.page-index .status-badge,
body.page-streamer .status-badge,
body.page-index .badge,
body.page-streamer .badge,
body.page-files .file-size {
  border-radius: 999px !important;
  border: 1px solid var(--ns-line) !important;
  background: rgba(255,255,255,0.06) !important;
  color: var(--ns-text-2) !important;
  padding: 4px 8px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
}

body.page-index .status-badge.live,
body.page-streamer .status-badge.live {
  background: rgba(255,79,105,0.16) !important;
  border-color: rgba(255,79,105,0.34) !important;
  color: #ffb2bf !important;
}

body.page-index .status-badge.online,
body.page-streamer .status-badge.online {
  background: rgba(62,229,141,0.13) !important;
  border-color: rgba(62,229,141,0.28) !important;
  color: #a8f7c9 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) input,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) select,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) textarea,
body.page-files .input-field {
  min-height: 38px !important;
  border-radius: 6px !important;
  border: 1px solid var(--ns-line) !important;
  background: #0b0812 !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.025) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) input:focus,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) select:focus,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) textarea:focus {
  border-color: var(--ns-purple) !important;
  box-shadow: 0 0 0 3px rgba(145, 71, 255, 0.18) !important;
}

body.page-streamer .header {
  align-items: center !important;
}

body.page-streamer .panel {
  margin-bottom: 14px !important;
  padding: 14px !important;
}

body.page-streamer .tabs,
body.page-admin .tabs,
body.page-discord-tool .tabs {
  display: inline-flex !important;
  gap: 2px !important;
  padding: 4px !important;
  border: 1px solid var(--ns-line) !important;
  border-radius: 8px !important;
  background: rgba(0,0,0,0.18) !important;
  width: auto !important;
}

body.page-streamer .tab,
body.page-admin .tab,
body.page-discord-tool .tab {
  border-radius: 6px !important;
  padding: 9px 13px !important;
  color: var(--ns-muted) !important;
  border: 0 !important;
  margin: 0 !important;
  font-weight: 900 !important;
}

body.page-streamer .tab.active,
body.page-admin .tab.active,
body.page-discord-tool .tab.active {
  background: var(--ns-purple) !important;
  color: #fff !important;
}

body.page-streamer .video-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
  gap: 14px !important;
}

body.page-streamer .video-card {
  overflow: hidden !important;
}

body.page-streamer .thumb-wrap {
  display: block;
  aspect-ratio: 16 / 9;
  background: #020104 !important;
  border-bottom: 1px solid var(--ns-line) !important;
  position: relative;
}

body.page-streamer .thumb-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  filter: saturate(1.08) contrast(1.06) !important;
}

body.page-streamer .duration-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 6px;
  border-radius: 4px !important;
  background: rgba(0,0,0,0.82) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.page-streamer .card-body {
  padding: 12px !important;
}

body.page-streamer .video-title {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
  color: #fff !important;
  font-weight: 850 !important;
  text-decoration: none !important;
}

body.page-streamer .video-meta {
  margin-top: 8px !important;
  color: var(--ns-muted) !important;
}

body.page-vod,
body.page-live {
  display: flex !important;
}

body.page-vod .sidebar,
body.page-live .sidebar {
  width: 230px !important;
  padding: 18px 14px !important;
  background: #0d0a16 !important;
  border-right: 1px solid var(--ns-line) !important;
}

body.page-vod .brand,
body.page-live .brand {
  margin: 0 0 18px !important;
  padding: 8px 10px 16px !important;
  border-bottom: 1px solid var(--ns-line);
  color: #fff !important;
  font-family: Inter, "Sora", sans-serif !important;
  font-size: 22px !important;
  font-weight: 950 !important;
}

body.page-vod nav,
body.page-live nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
}

body.page-vod .nav-item,
body.page-live .nav-item {
  min-height: 42px !important;
  padding: 10px 12px !important;
  border-radius: 6px !important;
  color: var(--ns-text-2) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  font-size: 14px !important;
  font-weight: 750 !important;
  text-decoration: none !important;
}

body.page-vod .nav-item:hover,
body.page-live .nav-item:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.07) !important;
}

body.page-vod .main,
body.page-live .main {
  flex: 1 !important;
  padding: 18px !important;
}

body.page-vod header,
body.page-live header,
body.page-hls header,
body.page-clip-editor header {
  min-height: 58px !important;
  background: rgba(13, 10, 22, 0.98) !important;
  border-bottom: 1px solid var(--ns-line) !important;
}

body.page-vod .page-title,
body.page-live .page-title {
  color: #fff !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

body.page-vod .player-wrapper,
body.page-live .player-wrapper,
body.page-hls video,
body.page-clip-editor .player-container {
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #000 !important;
  border: 1px solid var(--ns-line) !important;
  box-shadow: var(--ns-shadow) !important;
}

body.page-vod .controls-panel,
body.page-vod .chat-panel,
body.page-live .chat-panel,
body.page-live .controls-panel {
  border-radius: 8px !important;
  border: 1px solid var(--ns-line) !important;
  background: var(--ns-panel) !important;
}

body.page-vod .main {
  gap: 16px !important;
}

body.page-vod .vod-hero {
  position: relative;
  align-items: center !important;
  gap: 24px !important;
  margin: 0 18px 16px;
  padding: 16px 18px !important;
  overflow: hidden;
  border: 1px solid var(--ns-line) !important;
  border-radius: 10px;
  background:
    linear-gradient(110deg, rgba(124, 92, 255, 0.12), transparent 38%),
    rgba(16, 19, 24, 0.86) !important;
}

body.page-vod .vod-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -110px auto;
  width: 220px;
  height: 220px;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.06);
  filter: blur(4px);
}

body.page-vod .vod-header-main {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 11px;
}

body.page-vod .vod-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

body.page-vod .vod-heading-icon {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid rgba(124, 92, 255, 0.32);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(124, 92, 255, 0.28), rgba(34, 211, 238, 0.12));
}

body.page-vod .vod-heading-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 53%;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #fff;
  transform: translate(-50%, -50%);
}

body.page-vod .vod-title-block {
  min-width: 0;
  display: grid;
  gap: 2px;
}

body.page-vod .vod-back-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ns-soft);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

body.page-vod .vod-back-link:hover {
  color: #fff;
}

body.page-vod .vod-kicker {
  color: var(--ns-accent-2);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

body.page-vod .page-title {
  max-width: min(760px, 62vw);
  overflow-wrap: anywhere;
  line-height: 1.1 !important;
  font-size: 24px !important;
}

body.page-vod .vod-filename {
  max-width: min(760px, 62vw);
  overflow: hidden;
  color: var(--ns-muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-vod .vod-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--ns-muted);
}

body.page-vod .vod-meta-row span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--ns-line);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  padding: 5px 9px;
  font-variant-numeric: tabular-nums;
}

body.page-vod .vod-meta-row small {
  color: var(--ns-muted);
  font-size: 10px;
}

body.page-vod .vod-meta-row strong {
  color: var(--ns-soft);
  font-size: 11px;
  font-weight: 750;
}

body.page-vod .vod-header-actions,
body.page-vod .vod-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

body.page-vod .vod-icon-btn,
body.page-vod .vod-link-btn,
body.page-vod .vod-actions .btn,
body.page-vod .vod-actions button {
  min-height: 34px !important;
  padding: 7px 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--ns-line) !important;
  background: rgba(255,255,255,0.06) !important;
  color: var(--ns-text) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

body.page-vod .vod-header-actions {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

body.page-vod .vod-header-actions .vod-icon-btn,
body.page-vod .vod-header-actions .vod-link-btn {
  min-height: 38px !important;
  padding-inline: 14px !important;
}

body.page-vod .vod-icon-btn:hover,
body.page-vod .vod-link-btn:hover,
body.page-vod .vod-actions .btn:hover,
body.page-vod .vod-actions button:hover {
  border-color: var(--ns-line-strong) !important;
  background: rgba(255,255,255,0.1) !important;
  transform: translateY(-1px) !important;
}

body.page-vod .vod-actions .vod-primary-action {
  background: linear-gradient(135deg, var(--ns-warm), var(--ns-warm-2)) !important;
  border-color: rgba(255, 207, 151, 0.36) !important;
  color: #14100a !important;
}

body.page-vod .vod-actions .vod-success-action {
  background: rgba(91, 211, 154, 0.14) !important;
  border-color: rgba(91, 211, 154, 0.28) !important;
  color: #a9f3ce !important;
}

body.page-vod .content {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) !important;
  gap: 16px !important;
  padding: 0 18px 18px !important;
}

body.page-vod .content.solo {
  grid-template-columns: minmax(0, 1fr) !important;
}

body.page-vod .main-col {
  gap: 12px !important;
}

body.page-vod .player-wrapper {
  flex: 0 0 auto !important;
  aspect-ratio: 16 / 9;
  min-height: 420px !important;
  max-height: calc(100vh - 255px);
}

body.page-vod .vod-tools-panel {
  padding: 14px !important;
}

body.page-vod .vod-tools-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

body.page-vod .vod-panel-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--ns-text);
}

body.page-vod .vod-panel-subtitle {
  margin-top: 4px;
  color: var(--ns-muted);
  font-size: 12px;
  line-height: 1.35;
}































body.page-vod .chat-panel {
  min-height: 0;
}

body.page-vod .chat-list {
  padding: 12px !important;
  font-size: 13px;
  line-height: 1.35;
}

body.page-vod .chat-line {
  grid-template-columns: 40px minmax(0, 1fr) !important;
  padding: 3px 4px;
}

body.page-vod .chat-time {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1180px) {
  body.page-vod .content {
    grid-template-columns: 1fr !important;
  }

  body.page-vod .chat-panel {
    height: 360px !important;
  }
}

@media (max-width: 760px) {
  body.page-vod .vod-hero,
body.page-vod .vod-tools-head {
    align-items: stretch !important;
    flex-direction: column;
  }

  body.page-vod .page-title {
    max-width: 100%;
    font-size: 20px !important;
  }

  body.page-vod .vod-hero {
    margin: 0 0 14px;
    padding: 14px !important;
  }

  body.page-vod .vod-filename {
    max-width: calc(100vw - 110px);
  }

  body.page-vod .vod-header-actions,
  body.page-vod .vod-actions {
    justify-content: flex-start;
  }

  body.page-vod .vod-header-actions {
    width: 100%;
  }

  body.page-vod .player-wrapper {
    min-height: 0 !important;
    max-height: none;
  }
}

body.page-vod .chat-header,
body.page-live .chat-header {
  background: rgba(255,255,255,0.04) !important;
  border-bottom: 1px solid var(--ns-line) !important;
}

body.page-admin table,
body.page-search table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body.page-admin th,
body.page-search th {
  background: rgba(255,255,255,0.045) !important;
  color: var(--ns-muted) !important;
  letter-spacing: 0 !important;
}

body.page-admin td,
body.page-admin th,
body.page-search td,
body.page-search th {
  border-bottom: 1px solid var(--ns-line) !important;
}

body.page-login {
  background:
    radial-gradient(circle at 50% 58%, rgba(145, 71, 255, 0.16), transparent 22%),
    radial-gradient(circle at 50% 72%, rgba(255, 106, 42, 0.24), transparent 20%),
    linear-gradient(180deg, #05030a 0%, #120815 48%, #050306 100%) !important;
}

body.page-login .login-shell {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 420px) !important;
  align-items: center !important;
  justify-items: center !important;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px !important;
}

body.page-login .login-copy {
  justify-self: start !important;
  text-align: left !important;
  max-width: 520px !important;
  padding-top: 0 !important;
}

body.page-login h1 {
  font-family: Inter, "Sora", sans-serif !important;
  font-weight: 950 !important;
  letter-spacing: 0 !important;
  color: #fff !important;
}

body.page-login h1::after {
  content: "NachtSilo";
}

body.page-login h1 {
  font-size: 0 !important;
}

body.page-login h1::after {
  font-size: clamp(48px, 7vw, 84px);
  line-height: .94;
}

body.page-login .eyebrow {
  border-color: rgba(145, 71, 255, 0.42) !important;
  background: rgba(145, 71, 255, 0.14) !important;
  color: #d8c2ff !important;
}

body.page-login .subtitle {
  color: #d9d2e8 !important;
  font-size: 16px !important;
}

body.page-login .login-panel {
  justify-self: end !important;
  border-radius: 8px !important;
  border: 1px solid rgba(145, 71, 255, 0.28) !important;
  background: rgba(18, 13, 30, 0.92) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.62), 0 0 0 1px rgba(255,255,255,0.035) inset !important;
}

body.page-login input {
  border-radius: 6px !important;
  background: #0b0812 !important;
}

body.page-login button {
  border-radius: 6px !important;
  background: linear-gradient(135deg, var(--ns-purple), var(--ns-purple-2)) !important;
  color: #fff !important;
  box-shadow: 0 18px 34px rgba(145, 71, 255, 0.26) !important;
}

body.page-login .portal-frame {
  left: 48% !important;
  opacity: .9;
}

@media (max-width: 980px) {
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) {
    flex-direction: column !important;
  }
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .sidebar {
    width: 100% !important;
    padding: 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--ns-line) !important;
  }
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) nav {
    min-height: 0 !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    padding-bottom: 4px;
  }
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .main {
    padding: 18px !important;
  }
  body.page-index .stats-grid {
    grid-template-columns: 1fr !important;
  }
  body.page-login .login-shell {
    grid-template-columns: 1fr !important;
    align-content: center !important;
    gap: 22px !important;
  }
  body.page-login .login-copy,
  body.page-login .login-panel {
    justify-self: center !important;
    text-align: center !important;
  }
}


/* NACHTSILO STUDIO CONSOLE */
:root {
  --ns-bg: #0b0d10;
  --ns-rail: #101318;
  --ns-panel: #151922;
  --ns-panel-2: #1b202b;
  --ns-panel-3: #222936;
  --ns-line: rgba(255,255,255,.10);
  --ns-line-strong: rgba(255,255,255,.16);
  --ns-text: #f3f6fb;
  --ns-muted: #9aa5b5;
  --ns-soft: #cbd5e1;
  --ns-accent: #7c5cff;
  --ns-accent-2: #22d3ee;
  --ns-live: #ff3b5f;
  --ns-good: #22c55e;
  --ns-warn: #f59e0b;
  --ns-radius: 10px;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) {
  margin: 0 !important;
  min-height: 100vh;
  display: flex;
  color: var(--ns-text) !important;
  background:
    linear-gradient(180deg, rgba(124,92,255,.08), transparent 260px),
    radial-gradient(circle at 84% 8%, rgba(34,211,238,.08), transparent 280px),
    var(--ns-bg) !important;
  font-family: Inter, Sora, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) * {
  box-sizing: border-box;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live)::before,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live)::after {
  display: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) a {
  color: inherit;
  text-decoration: none;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .sidebar {
  position: sticky !important;
  top: 0;
  width: 260px !important;
  height: 100vh;
  flex-shrink: 0;
  padding: 18px 14px !important;
  display: flex !important;
  flex-direction: column !important;
  background: rgba(16,19,24,.94) !important;
  border-right: 1px solid var(--ns-line) !important;
  backdrop-filter: none;
  box-shadow: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .brand {
  min-height: 52px;
  margin: 0 0 18px !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  color: var(--ns-text) !important;
  font-family: Inter, Sora, system-ui, sans-serif !important;
  font-size: 19px !important;
  font-weight: 800 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .brand::before {
  content: "";
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--ns-accent), var(--ns-accent-2));
  box-shadow: 0 10px 22px rgba(124,92,255,.26);
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) nav {
  min-height: 0 !important;
  display: flex !important;
  flex: 1;
  flex-direction: column !important;
  gap: 4px !important;
  overflow: visible !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .nav-item {
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  border: 1px solid transparent !important;
  border-radius: var(--ns-radius) !important;
  background: transparent !important;
  color: var(--ns-muted) !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  transform: none !important;
  box-shadow: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .nav-item:hover {
  color: var(--ns-text) !important;
  background: rgba(255,255,255,.06) !important;
  transform: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .nav-item.active {
  color: var(--ns-text) !important;
  background: linear-gradient(135deg, rgba(124,92,255,.20), rgba(34,211,238,.10)) !important;
  border-color: rgba(124,92,255,.34) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .nav-item[style*="margin-top"] {
  margin-top: auto !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .main {
  flex: 1;
  min-width: 0;
  padding: 28px 36px 52px !important;
  overflow-y: auto;
  background: transparent !important;
  animation: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .header {
  min-height: 58px;
  margin: 0 0 18px !important;
  padding: 0 !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  gap: 20px !important;
  border: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .page-title {
  margin: 0 !important;
  color: var(--ns-text) !important;
  font-family: Inter, Sora, system-ui, sans-serif !important;
  font-size: 30px !important;
  line-height: 1.15 !important;
  font-weight: 800 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .page-subtitle,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .muted {
  color: var(--ns-muted) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .page-subtitle {
  margin-top: 7px !important;
  max-width: 720px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

.header-actions,
.overview-actions,
.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.studio-btn,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .btn-action,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .btn-restart,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .action-btn,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .btn-icon,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) button {
  min-height: 38px;
  padding: 9px 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid var(--ns-line) !important;
  border-radius: var(--ns-radius) !important;
  background: rgba(255,255,255,.055) !important;
  color: var(--ns-text) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  transform: none !important;
  cursor: pointer;
}

.studio-btn:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .btn-action:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .btn-restart:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .action-btn:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .btn-icon:hover,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) button:hover {
  background: rgba(255,255,255,.09) !important;
  border-color: var(--ns-line-strong) !important;
}

.studio-btn.primary,
body.page-index .action-btn.primary,
body.page-index .live-input-group button,
body:is(.page-channels,.page-streamer) .btn-action:not([style*="rgba"]) {
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--ns-accent), #5b8cff) !important;
  color: #fff !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) input,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) select,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) textarea {
  border-radius: var(--ns-radius) !important;
  border: 1px solid var(--ns-line) !important;
  background: rgba(7,9,12,.85) !important;
  color: var(--ns-text) !important;
  box-shadow: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) input:focus,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) select:focus,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) textarea:focus {
  outline: none !important;
  border-color: rgba(34,211,238,.62) !important;
}

.studio-quickbar {
  margin: 0 0 22px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.studio-chip {
  min-height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid var(--ns-line);
  border-radius: 999px;
  background: rgba(255,255,255,.045);
  color: var(--ns-soft);
  font-size: 13px;
  font-weight: 700;
}

.studio-chip.active {
  color: #fff;
  border-color: rgba(124,92,255,.42);
  background: rgba(124,92,255,.18);
}

.studio-chip.danger {
  color: #ffd6de;
  border-color: rgba(255,59,95,.38);
  background: rgba(255,59,95,.14);
}

.studio-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, .85fr);
  gap: 18px;
  margin-bottom: 18px;
}

.overview-panel,
.signal-panel,
body.page-index .stat-card,
body.page-index .streamer-card,
body:is(.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool) .panel,
body.page-channels .mgmt-section,
body.page-streamer .share-box,
body.page-streamer .video-card,
body.page-files .file-card,
body.page-files .folder-card {
  border: 1px solid var(--ns-line) !important;
  border-radius: var(--ns-radius) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.032)) !important;
  box-shadow: 0 18px 50px rgba(0,0,0,.22) !important;
}

.overview-panel {
  min-height: 210px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.overview-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -120px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,211,238,.16), transparent 65%);
  pointer-events: none;
}

.overview-kicker {
  color: var(--ns-accent-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-panel h2 {
  max-width: 620px;
  margin: 10px 0 10px;
  color: var(--ns-text);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.03;
}

.overview-panel p {
  max-width: 670px;
  margin: 0 0 22px;
  color: var(--ns-muted);
  font-size: 15px;
  line-height: 1.6;
}

.signal-panel {
  min-height: 210px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.signal-head,
.signal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.signal-head span {
  color: var(--ns-muted);
  font-size: 13px;
  font-weight: 700;
}

.signal-head strong {
  color: var(--ns-good);
  font-size: 12px;
  letter-spacing: .04em !important;
}

.signal-head .signal-live {
  color: var(--ns-live);
}

.signal-bars {
  min-height: 82px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 7px;
}

.signal-bars span {
  display: block;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, var(--ns-accent-2), var(--ns-accent));
  min-height: 18px;
  opacity: .85;
}

.signal-bars span:nth-child(1) { height: 24px; }
.signal-bars span:nth-child(2) { height: 46px; }
.signal-bars span:nth-child(3) { height: 32px; }
.signal-bars span:nth-child(4) { height: 70px; }
.signal-bars span:nth-child(5) { height: 50px; }
.signal-bars span:nth-child(6) { height: 36px; }
.signal-bars span:nth-child(7) { height: 78px; }
.signal-bars span:nth-child(8) { height: 42px; }
.signal-bars span:nth-child(9) { height: 58px; }
.signal-bars span:nth-child(10) { height: 30px; }
.signal-bars span:nth-child(11) { height: 64px; }
.signal-bars span:nth-child(12) { height: 40px; }

.signal-meta > div {
  min-width: 0;
}

.signal-meta span {
  display: block;
  color: var(--ns-muted);
  font-size: 11px;
  font-weight: 700;
}

.signal-meta strong {
  display: block;
  margin-top: 3px;
  color: var(--ns-text);
  font-size: 20px;
}

body.page-index .stats-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr)) !important;
  gap: 14px !important;
  margin: 0 0 26px !important;
}

body.page-index .stat-card {
  min-height: 150px !important;
  padding: 18px !important;
  transition: border-color .16s ease, background .16s ease;
}

body.page-index .stat-card::before,
body.page-index .action-btn.primary::after,
body.page-index .channel-input-group button::after {
  display: none !important;
}

body.page-index .stat-card:hover,
body.page-index .streamer-card:hover,
body.page-streamer .video-card:hover,
body.page-files .file-card:hover,
body.page-files .folder-card:hover {
  border-color: var(--ns-line-strong) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.044)) !important;
  transform: none !important;
}

body.page-index .stat-head {
  margin-bottom: 13px !important;
}

body.page-index .stat-label,
body.page-index .stat-box-label {
  color: var(--ns-muted) !important;
  font-size: 12px !important;
  text-transform: none !important;
  font-weight: 800 !important;
}

body.page-index .stat-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255,255,255,.07);
  color: var(--ns-soft);
  font-size: 17px !important;
  opacity: 1 !important;
}

body.page-index .stat-value {
  color: var(--ns-text) !important;
  font-size: 25px !important;
  font-weight: 800 !important;
}

body.page-index .stat-sub {
  color: var(--ns-muted) !important;
}

body.page-index .progress-track,
body.page-index .res-bar {
  height: 7px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.09) !important;
}

body.page-index .res-fill,
body.page-index .progress-fill {
  border-radius: 999px !important;
  background: linear-gradient(90deg, var(--ns-accent), var(--ns-accent-2)) !important;
}

body.page-index .live-input-group {
  margin-top: auto !important;
}

body.page-index .live-input-group input {
  min-width: 0;
}

body.page-index .grid-title {
  margin: 6px 0 14px !important;
  color: var(--ns-text) !important;
  font-family: Inter, Sora, system-ui, sans-serif !important;
  font-size: 20px !important;
  font-weight: 800 !important;
}

body.page-index .live-pulse {
  background: var(--ns-live) !important;
  box-shadow: 0 0 0 0 rgba(255,59,95,.62) !important;
}

body.page-index .streamer-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 14px !important;
}

body.page-index .streamer-card {
  min-height: 218px !important;
  padding: 16px !important;
  display: flex;
  flex-direction: column;
}

body.page-index .card-header {
  gap: 12px !important;
  align-items: flex-start !important;
}

body.page-index .avatar {
  width: 48px !important;
  height: 48px !important;
  border-radius: 12px !important;
  border: 1px solid var(--ns-line) !important;
  background: linear-gradient(135deg, rgba(124,92,255,.36), rgba(34,211,238,.20)) !important;
  color: #fff !important;
  font-weight: 800;
}

body.page-index .avatar.online {
  border-color: rgba(34,197,94,.42) !important;
}

body.page-index .avatar.recording {
  border-color: rgba(255,59,95,.58) !important;
  box-shadow: 0 0 0 3px rgba(255,59,95,.12);
}

body.page-index .streamer-name {
  margin: 0 0 7px !important;
  color: var(--ns-text) !important;
  font-family: Inter, Sora, system-ui, sans-serif !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

body.page-index .status-badge {
  border-radius: 999px !important;
  background: rgba(255,255,255,.07) !important;
  color: var(--ns-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.page-index .status-badge.live {
  background: rgba(255,59,95,.14) !important;
  color: #ff8aa0 !important;
}

body.page-index .status-badge.online {
  background: rgba(34,197,94,.14) !important;
  color: #7ee39a !important;
}

body.page-index .card-stats {
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  margin-top: 18px !important;
}

body.page-index .stat-box {
  padding: 10px !important;
  border-radius: 8px !important;
  background: rgba(0,0,0,.18) !important;
  border: 1px solid var(--ns-line) !important;
}

body.page-index .stat-box-val {
  color: var(--ns-text) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

body.page-index .card-actions {
  margin-top: auto !important;
  padding-top: 16px;
}

body.page-index .action-btn {
  flex: 1;
  min-height: 36px !important;
}

body.page-index .empty-state {
  border: 1px solid var(--ns-line) !important;
  border-radius: var(--ns-radius) !important;
  background: rgba(255,255,255,.04) !important;
}

body.page-streamer .tabs {
  gap: 8px !important;
  margin-bottom: 18px !important;
  border-bottom: 1px solid var(--ns-line) !important;
}

body.page-streamer .tab {
  border-radius: 8px 8px 0 0 !important;
  color: var(--ns-muted) !important;
}

body.page-streamer .tab.active {
  color: var(--ns-text) !important;
  border-bottom: 3px solid var(--ns-accent-2) !important;
}

body.page-streamer .video-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 16px !important;
}

body.page-streamer .video-card {
  overflow: hidden !important;
}

body.page-streamer .thumb-wrap {
  aspect-ratio: 16 / 9;
  border-radius: 8px 8px 0 0 !important;
  background: #05070a !important;
}

body.page-streamer .thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.page-streamer .card-body {
  padding: 12px !important;
}

body.page-streamer .video-title {
  color: var(--ns-text) !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  font-weight: 750;
}

body.page-streamer .video-meta {
  color: var(--ns-muted) !important;
}

body.page-streamer .duration-badge,
body.page-streamer .empty-badge {
  border-radius: 5px !important;
  background: rgba(0,0,0,.78) !important;
}

body.page-channels .mgmt-body,
body.page-index .mgmt-body {
  padding: 24px !important;
}

body.page-channels .channel-input-group,
body.page-index .channel-input-group {
  border-radius: var(--ns-radius) !important;
  background: rgba(7,9,12,.8) !important;
  border-color: var(--ns-line) !important;
}

body.page-channels .channel-input-group button,
body.page-index .channel-input-group button {
  background: linear-gradient(135deg, var(--ns-accent), #5b8cff) !important;
  border-color: transparent !important;
}

body.page-channels .channel-chip,
body.page-index .channel-chip {
  border-radius: 999px !important;
  background: rgba(255,255,255,.055) !important;
  border: 1px solid var(--ns-line) !important;
  color: var(--ns-text) !important;
}

body.page-admin table,
body.page-files table,
body.page-search table {
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}

body.page-admin th,
body.page-files th,
body.page-search th {
  color: var(--ns-muted) !important;
  font-weight: 700 !important;
}

body.page-admin td,
body.page-files td,
body.page-search td {
  background: rgba(255,255,255,.04) !important;
  border-top: 1px solid var(--ns-line) !important;
  border-bottom: 1px solid var(--ns-line) !important;
}

body.page-admin td:first-child,
body.page-files td:first-child,
body.page-search td:first-child {
  border-left: 1px solid var(--ns-line) !important;
  border-radius: 8px 0 0 8px !important;
}

body.page-admin td:last-child,
body.page-files td:last-child,
body.page-search td:last-child {
  border-right: 1px solid var(--ns-line) !important;
  border-radius: 0 8px 8px 0 !important;
}

@media (max-width: 1100px) {
  .studio-overview {
    grid-template-columns: 1fr;
  }

  body.page-index .stats-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) {
    flex-direction: column !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .sidebar {
    position: relative !important;
    width: 100% !important;
    height: auto;
    padding: 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--ns-line) !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .brand {
    min-height: 38px;
    margin-bottom: 8px !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) nav {
    flex-direction: row !important;
    overflow-x: auto !important;
    padding-bottom: 3px;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .nav-item {
    white-space: nowrap;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .nav-item[style*="margin-top"] {
    margin-top: 0 !important;
    margin-left: auto !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .main {
    padding: 18px !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live) .header {
    flex-direction: column;
    align-items: stretch !important;
  }

  .header-actions,
  .overview-actions {
    width: 100%;
  }

  .studio-btn,
  .header-actions > a,
  .overview-actions > a {
    flex: 1;
  }

  .overview-panel,
  .signal-panel {
    min-height: auto;
    padding: 20px;
  }

  .overview-panel h2 {
    font-size: 30px;
  }

  body.page-index .streamer-grid,
  body.page-streamer .video-grid {
    grid-template-columns: 1fr !important;
  }
}

/* FUNCTIONAL OVERVIEW PASS */
body.page-index .page-title::before,
body.page-index .page-title::after,
body.page-index .grid-title::after {
  content: none !important;
  display: none !important;
}

body.page-index {
  background: #0b0d10 !important;
}

body.page-index .main {
  padding: 24px 30px 42px !important;
}

body.page-index .header {
  min-height: 0 !important;
  margin-bottom: 16px !important;
  align-items: center !important;
}

body.page-index .page-title {
  display: block !important;
  font-size: 34px !important;
  line-height: 1.1 !important;
}

body.page-index .page-subtitle {
  font-size: 14px !important;
}

body.page-index .studio-quickbar {
  margin-bottom: 16px !important;
}

body.page-index .stats-grid {
  grid-template-columns: minmax(320px, 1.1fr) minmax(300px, 1fr) minmax(240px, .75fr) !important;
  gap: 12px !important;
  margin-bottom: 22px !important;
}

body.page-index .stat-card {
  min-height: 132px !important;
  padding: 16px !important;
  border-radius: 10px !important;
}

body.page-index .stat-head {
  margin-bottom: 10px !important;
}

body.page-index .stat-icon {
  width: 32px;
  height: 32px;
}

body.page-index .res-row {
  margin-bottom: 10px !important;
}

body.page-index .live-input-group {
  margin-top: 14px !important;
}

body.page-index .live-input-group input {
  height: 38px;
}

body.page-index .overview-section {
  border: 1px solid var(--ns-line);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  overflow: hidden;
}

body.page-index .section-head {
  min-height: 70px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--ns-line);
}

body.page-index .section-head h2 {
  margin: 0;
  color: var(--ns-text);
  font-size: 20px;
  line-height: 1.2;
}

body.page-index .section-head p {
  margin: 4px 0 0;
  color: var(--ns-muted);
  font-size: 13px;
}

body.page-index .streamer-list {
  display: flex;
  flex-direction: column;
}

body.page-index .streamer-row {
  min-height: 74px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: minmax(230px, 1.3fr) minmax(72px, .35fr) minmax(160px, .75fr) minmax(240px, auto);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--ns-line);
}

body.page-index .streamer-row:last-child {
  border-bottom: 0;
}

body.page-index .streamer-row:hover {
  background: rgba(255,255,255,.04);
}

body.page-index .streamer-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

body.page-index .streamer-row .avatar {
  width: 42px !important;
  height: 42px !important;
  border-radius: 10px !important;
  flex: 0 0 42px;
}

body.page-index .streamer-row .streamer-name {
  margin: 0 0 5px !important;
  font-size: 15px !important;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-index .streamer-cell span {
  display: block;
  color: var(--ns-muted);
  font-size: 11px;
  font-weight: 700;
}

body.page-index .streamer-cell strong {
  display: block;
  margin-top: 4px;
  color: var(--ns-text);
  font-size: 14px;
  line-height: 1.25;
}

body.page-index .streamer-cell.wide strong {
  font-size: 13px;
  color: var(--ns-soft);
}

body.page-index .streamer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.page-index .streamer-actions .action-btn {
  flex: 0 0 auto;
  min-width: 74px;
  min-height: 34px !important;
  padding: 7px 10px !important;
}

body.page-index .streamer-actions .action-btn.danger {
  border-color: rgba(255,59,95,.36) !important;
  background: rgba(255,59,95,.14) !important;
  color: #ff9bad !important;
}

body.page-index .status-badge {
  padding: 4px 8px !important;
  display: inline-flex;
  width: fit-content;
}

@media (max-width: 1200px) {
  body.page-index .stats-grid {
    grid-template-columns: 1fr !important;
  }

  body.page-index .streamer-row {
    grid-template-columns: minmax(220px, 1fr) minmax(70px, auto) minmax(150px, auto);
  }

  body.page-index .streamer-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body.page-index .main {
    padding: 16px !important;
  }

  body.page-index .header {
    align-items: stretch !important;
  }

  body.page-index .page-title {
    font-size: 28px !important;
  }

  body.page-index .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  body.page-index .streamer-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body.page-index .streamer-actions {
    justify-content: stretch;
  }

  body.page-index .streamer-actions .action-btn {
    flex: 1;
  }
}

.logout-form {
  margin: 0;
}

.nav-logout-form {
  margin-top: auto;
}

.logout-button {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.inline-logout-form {
  display: inline;
}

.link-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: inherit;
}

.link-button:hover {
  text-decoration: underline;
}

.mobile-logout-button {
  color: #a1a1aa;
  font-size: 12px;
  font-weight: normal;
  text-decoration: none;
}

/* Mythic+ log analyzer */
body.page-mplus {
  min-height: 100vh;
  display: flex;
  margin: 0;
  color: #edf6f3;
  background:
    linear-gradient(135deg, rgba(50, 190, 150, 0.08), transparent 28%),
    linear-gradient(215deg, rgba(244, 185, 78, 0.06), transparent 32%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, #07100f 0%, #091312 48%, #060909 100%);
  font-family: Inter, "Sora", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.page-mplus * {
  box-sizing: border-box;
}

body.page-mplus a {
  color: inherit;
}

body.page-mplus .sidebar {
  width: 252px;
  flex: 0 0 252px;
  padding: 18px 14px;
  background: linear-gradient(180deg, rgba(6, 12, 12, 0.98), rgba(8, 10, 9, 0.96));
  border-right: 1px solid rgba(255,255,255,0.1);
  box-shadow: 14px 0 34px rgba(0,0,0,0.26);
}

body.page-mplus .brand {
  margin: 0 0 22px;
  min-height: 52px;
  padding: 8px 10px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 0;
  font-weight: 900;
}

body.page-mplus .brand::before {
  content: "NachtSilo";
  display: block;
  font-size: 22px;
  line-height: 1;
}

body.page-mplus .brand::after {
  content: "M+ Lab";
  display: block;
  margin-top: 6px;
  color: #89a39a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

body.page-mplus nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: calc(100vh - 110px);
}

body.page-mplus .nav-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #b8cbc3;
  background: transparent;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

body.page-mplus .nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

body.page-mplus .nav-item.active {
  color: #06110f;
  background: linear-gradient(135deg, #65d8ac, #e8c060);
  border-color: rgba(255,255,255,0.22);
  box-shadow: 0 12px 26px rgba(101, 216, 172, 0.15);
}

body.page-mplus .main {
  width: 100%;
  min-width: 0;
  padding: 28px 34px;
}

body.page-mplus .header {
  display: flex;
  gap: 18px;
  justify-content: space-between;
  align-items: flex-start;
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

body.page-mplus .page-title {
  margin: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

body.page-mplus .page-subtitle,
body.page-mplus .mplus-muted {
  color: #95aaa2;
  font-size: 14px;
}

.mplus-api-state {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  font-weight: 800;
}

.mplus-api-state.ok {
  color: #bdf2d6;
  background: rgba(59, 214, 139, 0.12);
}

.mplus-api-state.warn {
  color: #f6ce87;
  background: rgba(244, 185, 78, 0.12);
}

.mplus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.mplus-panel,
.mplus-stat,
.mplus-compare-hero > div {
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 8px;
  background: rgba(11, 20, 19, 0.78);
  box-shadow: 0 18px 40px rgba(0,0,0,0.22);
}

.mplus-panel {
  padding: 18px;
}

.mplus-wide {
  margin-bottom: 18px;
}

.mplus-panel-head {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mplus-panel-head h2 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  letter-spacing: 0;
}

.mplus-panel-head span {
  color: #85a097;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.mplus-import-form,
.mplus-compare-form,
.mplus-inline-form {
  display: grid;
  gap: 10px;
}

body.page-mplus label {
  color: #a9beb6;
  font-size: 12px;
  font-weight: 800;
}

body.page-mplus input,
body.page-mplus select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #f5fbf8;
  background: rgba(0,0,0,0.28);
  outline: none;
}

body.page-mplus input:focus,
body.page-mplus select:focus {
  border-color: rgba(101, 216, 172, 0.72);
  box-shadow: 0 0 0 3px rgba(101, 216, 172, 0.12);
}

.mplus-primary,
.mplus-link.buttonlike {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  color: #06110f;
  background: linear-gradient(135deg, #65d8ac, #e8c060);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.mplus-primary:disabled,
.mplus-link.buttonlike:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mplus-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  font-weight: 750;
}

.mplus-alert.ok {
  color: #c9f7dc;
  background: rgba(59, 214, 139, 0.12);
}

.mplus-alert.bad {
  color: #ffc3bc;
  background: rgba(240, 91, 74, 0.14);
}

.mplus-table-wrap {
  overflow-x: auto;
}

.mplus-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.mplus-table th {
  padding: 0 10px 6px;
  color: #88a199;
  font-size: 11px;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.mplus-table td {
  padding: 12px 10px;
  color: #e9f5f1;
  background: rgba(255,255,255,0.045);
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  vertical-align: middle;
  white-space: nowrap;
}

.mplus-table td:first-child {
  border-left: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px 0 0 8px;
}

.mplus-table td:last-child {
  border-right: 1px solid rgba(255,255,255,0.08);
  border-radius: 0 8px 8px 0;
}

.mplus-table strong {
  display: block;
  color: #fff;
  font-weight: 850;
}

.mplus-table span {
  display: block;
  margin-top: 3px;
  color: #8da59d;
  font-size: 11px;
}

.mplus-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.mplus-actions form {
  margin: 0;
}

.mplus-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(101, 216, 172, 0.34);
  border-radius: 6px;
  color: #c9f7dc;
  background: rgba(101, 216, 172, 0.1);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.mplus-link.secondary {
  color: #dae5e0;
  border-color: rgba(255,255,255,0.13);
  background: rgba(255,255,255,0.055);
}

.mplus-empty {
  padding: 28px 12px;
  color: #95aaa2;
  text-align: center;
}

.mplus-empty h3 {
  margin: 0 0 6px;
  color: #fff;
}

.mplus-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mplus-stat {
  min-height: 86px;
  padding: 14px;
}

.mplus-stat span {
  display: block;
  color: #88a199;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.mplus-stat strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.mplus-good {
  color: #7ee3aa !important;
}

.mplus-bad {
  color: #ff8e81 !important;
}

.mplus-finding-list {
  display: grid;
  gap: 10px;
}

.mplus-finding {
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
}

.mplus-finding strong {
  color: #fff;
}

.mplus-finding p {
  margin: 5px 0 0;
  color: #a8bab4;
  font-size: 13px;
}

.mplus-finding.ok {
  border-color: rgba(93, 214, 139, 0.32);
}

.mplus-finding.warn,
.mplus-finding.info {
  border-color: rgba(232, 192, 96, 0.3);
}

.mplus-finding.bad {
  border-color: rgba(255, 119, 100, 0.36);
}

.mplus-definition {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.mplus-definition dt {
  color: #87a096;
  font-size: 12px;
  font-weight: 850;
}

.mplus-definition dd {
  margin: 0;
  color: #f4fbf8;
  font-size: 13px;
}

.mplus-inline-form {
  margin-top: 14px;
}

.mplus-simc-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mplus-simc-summary div {
  min-height: 68px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
}

.mplus-simc-summary span {
  display: block;
  color: #88a199;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.mplus-simc-summary strong {
  display: block;
  margin-top: 6px;
  color: #fff;
  font-size: 18px;
}

.mplus-pull-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.mplus-pull {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  background: rgba(255,255,255,0.042);
}

.mplus-pull strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mplus-pull span {
  color: #9cb1aa;
  font-size: 12px;
  white-space: nowrap;
}

.mplus-pull-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #06110f !important;
  background: #65d8ac;
  font-weight: 900;
}

.mplus-delete-form {
  display: flex;
  justify-content: flex-end;
  margin: 18px 0 0;
}

.mplus-delete-form button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 119, 100, 0.35);
  border-radius: 6px;
  color: #ffb3a9;
  background: rgba(255, 119, 100, 0.1);
  cursor: pointer;
}

.mplus-compare-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}

.mplus-compare-hero > div {
  min-height: 130px;
  padding: 18px;
}

.mplus-compare-hero > div > span {
  color: #8ba49b;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.mplus-compare-hero h2 {
  margin: 8px 0;
  color: #fff;
  font-size: 24px;
}

.mplus-compare-hero p {
  margin: 0 0 12px;
  color: #9db2aa;
}

.mplus-compare-hero a {
  color: #bdf2d6;
  font-weight: 800;
  text-decoration: none;
}

.mplus-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #07100f;
  background: linear-gradient(135deg, #65d8ac, #e8c060) !important;
  font-weight: 950;
  text-transform: uppercase;
}

.mplus-gear-result {
  display: grid;
  gap: 5px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
}

.mplus-gear-result strong {
  color: #fff;
  font-size: 32px;
}

.mplus-gear-result.left strong {
  color: #7ee3aa;
}

.mplus-gear-result.right strong {
  color: #ffb06e;
}

.mplus-winner {
  display: inline-flex !important;
  width: auto;
  margin: 0 !important;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #a8bab4 !important;
  font-size: 11px !important;
  font-weight: 850;
}

.mplus-winner.left {
  color: #07100f !important;
  background: #65d8ac;
}

.mplus-winner.right {
  color: #07100f !important;
  background: #e8c060;
}

@media (max-width: 1180px) {
  .mplus-stat-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 840px) {
  body.page-mplus {
    flex-direction: column;
  }

  body.page-mplus .sidebar {
    width: 100%;
    flex-basis: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  body.page-mplus nav {
    min-height: 0;
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  body.page-mplus .nav-item {
    white-space: nowrap;
  }

  body.page-mplus .main {
    padding: 18px;
  }

  body.page-mplus .header,
  .mplus-layout,
  .mplus-compare-hero {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .mplus-vs {
    min-height: 42px !important;
  }

  .mplus-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mplus-simc-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body.page-mplus .page-title {
    font-size: 28px;
  }

  .mplus-stat-grid {
    grid-template-columns: 1fr;
  }

  .mplus-definition {
    grid-template-columns: 1fr;
  }

  .mplus-pull {
    grid-template-columns: 28px minmax(0, 1fr);
  }
}

/* Unified NachtSilo Tube theme */
:root {
  --ns-bg-0: #050909;
  --ns-bg-1: #07100f;
  --ns-bg-2: #0b1513;
  --ns-panel: rgba(9, 18, 16, 0.82);
  --ns-panel-2: rgba(16, 28, 25, 0.78);
  --ns-line: rgba(188, 224, 210, 0.12);
  --ns-line-strong: rgba(188, 224, 210, 0.2);
  --ns-text: #f3fbf8;
  --ns-text-2: #c8ddd5;
  --ns-muted: #8ea79e;
  --ns-green: #65d8ac;
  --ns-green-soft: rgba(101, 216, 172, 0.13);
  --ns-gold: #e8c060;
  --ns-gold-soft: rgba(232, 192, 96, 0.13);
  --ns-red: #ff8e81;
  --ns-radius: 8px;
  --bg: var(--ns-bg-0);
  --bg-deep: var(--ns-bg-0);
  --card: var(--ns-panel);
  --glass: var(--ns-panel);
  --glass-hover: rgba(255,255,255,0.065);
  --border: var(--ns-line);
  --primary: var(--ns-green);
  --primary-hover: #50c99b;
  --accent: var(--ns-gold);
  --accent-2: var(--ns-green);
  --text: var(--ns-text);
  --text-main: var(--ns-text);
  --text-muted: var(--ns-muted);
  --muted: var(--ns-muted);
  --danger: var(--ns-red);
  --success: var(--ns-green);
  --radius: var(--ns-radius);
}

body:is(
  .page-login,
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-hls,
  .page-clip-editor,
  .page-mobile-index,
  .page-mobile-streamer,
  .page-mobile-player,
  .page-chat-export,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) {
  color: var(--ns-text) !important;
  background:
    linear-gradient(135deg, rgba(50, 190, 150, 0.075), transparent 28%),
    linear-gradient(215deg, rgba(232, 192, 96, 0.055), transparent 31%),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.018) 0 1px, transparent 1px 42px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.012) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, var(--ns-bg-1) 0%, #081210 48%, var(--ns-bg-0) 100%) !important;
  font-family: Inter, "Sora", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) {
  display: flex !important;
  min-height: 100vh !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .sidebar {
  width: 248px !important;
  flex: 0 0 248px !important;
  padding: 18px 14px !important;
  background: linear-gradient(180deg, rgba(5, 11, 10, 0.98), rgba(5, 8, 8, 0.96)) !important;
  border-right: 1px solid var(--ns-line) !important;
  box-shadow: 16px 0 38px rgba(0,0,0,0.32) !important;
  backdrop-filter: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .brand {
  min-height: 66px !important;
  margin: 0 0 22px !important;
  padding: 8px 6px 18px !important;
  border-bottom: 1px solid var(--ns-line) !important;
  color: var(--ns-text) !important;
  font-size: 0 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .brand::before {
  content: "NachtSilo Tube" !important;
  display: block !important;
  color: #fff !important;
  font-size: 23px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .brand::after {
  content: "Private Archive" !important;
  display: block !important;
  margin-top: 7px !important;
  color: var(--ns-green) !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
  min-height: calc(100vh - 112px) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .nav-item {
  min-height: 43px !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  color: var(--ns-text-2) !important;
  background: transparent !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  text-decoration: none !important;
  transform: none !important;
  box-shadow: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .nav-item:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.055) !important;
  border-color: var(--ns-line) !important;
  transform: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .nav-item.active {
  color: #06110f !important;
  background: linear-gradient(135deg, var(--ns-green), var(--ns-gold)) !important;
  border-color: rgba(255,255,255,0.18) !important;
  box-shadow: 0 12px 26px rgba(101, 216, 172, 0.14) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .main {
  width: 100% !important;
  min-width: 0 !important;
  padding: 28px 34px !important;
  background: transparent !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) .header {
  margin: 0 0 22px !important;
  padding: 0 0 18px !important;
  border-bottom: 1px solid var(--ns-line) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) .page-title {
  margin: 0 !important;
  color: #fff !important;
  font-size: 34px !important;
  line-height: 1.08 !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.45) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) .page-subtitle,
body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) .muted {
  color: var(--ns-muted) !important;
}



body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) :is(
  .panel h2,
  .panel h3,
  .section-head h2,
  .grid-title,
  .vod-panel-title,
  .mplus-panel-head h2
) {
  color: #fff !important;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) :is(
  button,
  .btn,
  .btn-action,
  .btn-restart,
  .action-btn,
  .btn-primary,
  .studio-btn,
  .mplus-primary,
  .mplus-link.buttonlike
) {
  border-radius: 6px !important;
  border: 1px solid var(--ns-line-strong) !important;
  color: var(--ns-text) !important;
  background: rgba(255,255,255,0.055) !important;
  box-shadow: none !important;
  transform: none !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) :is(
  .btn-primary,
  .studio-btn.primary,
  .action-btn.primary,
  .mplus-primary,
  .mplus-link.buttonlike,
  .live-input-group button,
  .channel-input-group button
) {
  color: #06110f !important;
  background: linear-gradient(135deg, var(--ns-green), var(--ns-gold)) !important;
  border-color: rgba(255,255,255,0.2) !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) :is(button,.btn,.btn-action,.btn-restart,.action-btn,.btn-primary,.studio-btn,.mplus-primary):hover {
  border-color: rgba(101,216,172,0.42) !important;
  filter: brightness(1.04);
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) :is(input, select, textarea) {
  border: 1px solid var(--ns-line) !important;
  border-radius: 6px !important;
  color: var(--ns-text) !important;
  background: rgba(0,0,0,0.24) !important;
  outline: none !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) :is(input, select, textarea):focus {
  border-color: rgba(101,216,172,0.72) !important;
  box-shadow: 0 0 0 3px rgba(101,216,172,0.12) !important;
}

body:is(.page-admin,.page-files,.page-search,.page-mplus) table {
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}

body:is(.page-admin,.page-files,.page-search,.page-mplus) th {
  color: #88a199 !important;
  border: 0 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

body:is(.page-admin,.page-files,.page-search,.page-mplus) td {
  color: var(--ns-text) !important;
  background: rgba(255,255,255,0.045) !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

body:is(.page-admin,.page-files,.page-search,.page-mplus) td:first-child {
  border-left: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 8px 0 0 8px !important;
}

body:is(.page-admin,.page-files,.page-search,.page-mplus) td:last-child {
  border-right: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 0 8px 8px 0 !important;
}

body.page-index .studio-chip,
body.page-streamer .tab,
body.page-admin .tab,
body.page-mplus .mplus-api-state,
body.page-mplus .mplus-winner,
body:is(.page-index,.page-streamer,.page-vod,.page-live) .status-badge {
  border: 1px solid var(--ns-line) !important;
  border-radius: 999px !important;
  color: var(--ns-text-2) !important;
  background: rgba(255,255,255,0.055) !important;
}

body.page-index .studio-chip.active,
body.page-streamer .tab.active,
body.page-admin .tab.active {
  color: #06110f !important;
  background: linear-gradient(135deg, var(--ns-green), var(--ns-gold)) !important;
  border-color: rgba(255,255,255,0.2) !important;
}

body:is(.page-vod,.page-live,.page-hls) {
  min-height: 100vh !important;
}

body:is(.page-vod,.page-live,.page-hls) .layout,
body:is(.page-vod,.page-live,.page-hls) .main {
  background: transparent !important;
}

body:is(.page-vod,.page-live) .player-wrapper,
body.page-hls .player-shell {
  border: 1px solid var(--ns-line) !important;
  border-radius: var(--ns-radius) !important;
  background: #020505 !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.26) !important;
}

body:is(.page-vod,.page-live) .chat-line {
  background: rgba(255,255,255,0.035) !important;
  border-color: rgba(255,255,255,0.075) !important;
}

body.page-clip-editor header {
  background: rgba(5, 11, 10, 0.96) !important;
  border-bottom: 1px solid var(--ns-line) !important;
}

body.page-clip-editor .editor-panel,
body.page-clip-editor .player-container {
  border-color: var(--ns-line) !important;
  background: var(--ns-panel) !important;
}

body.page-login {
  overflow: auto !important;
}

body.page-login .inferno-stage {
  opacity: 0.55 !important;
  filter: hue-rotate(82deg) saturate(0.65) brightness(0.74) !important;
}

body.page-login .login-shell {
  position: relative !important;
  z-index: 1 !important;
  width: min(1120px, calc(100vw - 40px)) !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 420px) !important;
  gap: 42px !important;
  align-items: center !important;
  padding: 42px 0 !important;
}

body.page-login .login-copy {
  max-width: 620px !important;
}

body.page-login .eyebrow {
  color: var(--ns-green) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

body.page-login h1 {
  color: #fff !important;
  font-size: clamp(42px, 7vw, 78px) !important;
  line-height: 0.98 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 2px 0 rgba(0,0,0,0.42) !important;
}

body.page-login h1::after {
  background: linear-gradient(90deg, var(--ns-green), var(--ns-gold)) !important;
}

body.page-login .subtitle {
  color: var(--ns-text-2) !important;
  max-width: 540px !important;
}

body.page-login .login-panel {
  border: 1px solid var(--ns-line) !important;
  border-radius: var(--ns-radius) !important;
  background: rgba(9, 18, 16, 0.86) !important;
  box-shadow: 0 22px 54px rgba(0,0,0,0.36) !important;
  backdrop-filter: none !important;
}

body.page-login .panel-glow {
  display: none !important;
}

body.page-login .login-form label {
  color: var(--ns-muted) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.page-login input {
  border: 1px solid var(--ns-line) !important;
  border-radius: 6px !important;
  color: var(--ns-text) !important;
  background: rgba(0,0,0,0.28) !important;
}

body.page-login input:focus {
  border-color: rgba(101,216,172,0.72) !important;
  box-shadow: 0 0 0 3px rgba(101,216,172,0.12) !important;
}

body.page-login button {
  min-height: 44px !important;
  border-radius: 6px !important;
  color: #06110f !important;
  background: linear-gradient(135deg, var(--ns-green), var(--ns-gold)) !important;
  box-shadow: none !important;
}

body.page-login .error {
  border: 1px solid rgba(255,142,129,0.3) !important;
  color: #ffc3bc !important;
  background: rgba(255,142,129,0.1) !important;
}

body:is(.page-mobile-index,.page-mobile-streamer,.page-mobile-player) {
  min-height: 100vh !important;
}

body:is(.page-mobile-index,.page-mobile-streamer,.page-mobile-player) .header {
  color: #fff !important;
  background: rgba(5, 11, 10, 0.96) !important;
  border-bottom: 1px solid var(--ns-line) !important;
}

body:is(.page-mobile-index,.page-mobile-streamer,.page-mobile-player) .section,
body:is(.page-mobile-index,.page-mobile-streamer,.page-mobile-player) .card,
body:is(.page-mobile-index,.page-mobile-streamer,.page-mobile-player) .player-container {
  border-color: var(--ns-line) !important;
  background: var(--ns-panel) !important;
  border-radius: var(--ns-radius) !important;
}

body:is(.page-mobile-index,.page-mobile-streamer,.page-mobile-player) .nav {
  border-top: 1px solid var(--ns-line) !important;
  background: rgba(5, 11, 10, 0.98) !important;
}

body:is(.page-mobile-index,.page-mobile-streamer,.page-mobile-player) .nav a {
  color: var(--ns-muted) !important;
}

body:is(.page-mobile-index,.page-mobile-streamer,.page-mobile-player) .nav a.active {
  color: var(--ns-green) !important;
}

body.page-chat-export {
  color: var(--ns-text) !important;
  padding: 24px !important;
}

body.page-chat-export .container,
body.page-chat-export .vod-group {
  border: 1px solid var(--ns-line) !important;
  border-radius: var(--ns-radius) !important;
  background: var(--ns-panel) !important;
}

@media (max-width: 840px) {
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) {
    flex-direction: column !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .sidebar {
    width: 100% !important;
    flex-basis: auto !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--ns-line) !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) nav {
    min-height: 0 !important;
    flex-direction: row !important;
    overflow-x: auto !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .nav-item {
    white-space: nowrap !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-mplus) .main {
    padding: 18px !important;
  }

  body.page-login .login-shell {
    min-height: 100vh !important;
    grid-template-columns: 1fr !important;
    gap: 22px !important;
    width: min(100vw - 28px, 560px) !important;
  }

  body.page-login .login-copy {
    text-align: left !important;
  }
}

@media (max-width: 560px) {
  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-files,.page-search,.page-discord-tool,.page-vod,.page-live,.page-hls,.page-mplus) .page-title {
    font-size: 28px !important;
  }
}

/* NachtSilo Tube clean platform shell - 2026-06-07 */
:root {
  --tube-bg: #050505;
  --tube-surface: #111111;
  --tube-surface-2: #171717;
  --tube-surface-3: #202020;
  --tube-line: #292929;
  --tube-line-soft: #1d1d1d;
  --tube-text: #f7f7f7;
  --tube-text-2: #c7c7c7;
  --tube-muted: #858585;
  --tube-accent: #f2e58d;
  --tube-accent-hover: #fff3a9;
  --tube-live: #ff5c66;
  --tube-success: #6ed9a2;
  --tube-radius: 10px;
  --tube-rail: 76px;
  --bg: var(--tube-bg);
  --bg-deep: var(--tube-bg);
  --card: var(--tube-surface);
  --glass: var(--tube-surface);
  --glass-hover: var(--tube-surface-2);
  --border: var(--tube-line);
  --primary: var(--tube-accent);
  --primary-hover: var(--tube-accent-hover);
  --accent: var(--tube-accent);
  --accent-2: var(--tube-accent);
  --text: var(--tube-text);
  --text-main: var(--tube-text);
  --text-muted: var(--tube-muted);
  --muted: var(--tube-muted);
  --danger: var(--tube-live);
  --success: var(--tube-success);
  --radius: var(--tube-radius);
}

html {
  color-scheme: dark;
  background: var(--tube-bg);
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-hls,
  .page-clip-editor
) {
  min-height: 100vh !important;
  margin: 0 !important;
  color: var(--tube-text) !important;
  background: var(--tube-bg) !important;
  font-family: Inter, "Sora", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) {
  display: flex !important;
  align-items: stretch !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .sidebar {
  position: sticky !important;
  top: 0 !important;
  z-index: 40 !important;
  width: var(--tube-rail) !important;
  height: 100vh !important;
  flex: 0 0 var(--tube-rail) !important;
  padding: 0 10px 14px !important;
  overflow: hidden !important;
  background: #070707 !important;
  border: 0 !important;
  border-right: 1px solid var(--tube-line-soft) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .brand {
  width: 56px !important;
  min-height: 74px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
  border: 0 !important;
  border-bottom: 1px solid var(--tube-line-soft) !important;
  color: transparent !important;
  font-size: 0 !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .brand::before {
  content: "N" !important;
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 8px !important;
  color: #090909 !important;
  background: linear-gradient(145deg, #d9fff4 0%, var(--tube-accent) 100%) !important;
  font-size: 19px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
  letter-spacing: -0.06em !important;
  transform: skewX(-7deg);
  box-shadow: none !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .brand::after {
  display: none !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live
) nav {
  min-height: calc(100vh - 90px) !important;
  padding: 16px 0 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: visible !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.8'%3E%3Crect x='4' y='4' width='6' height='6' rx='1'/%3E%3Crect x='14' y='4' width='6' height='6' rx='1'/%3E%3Crect x='4' y='14' width='6' height='6' rx='1'/%3E%3Crect x='14' y='14' width='6' height='6' rx='1'/%3E%3C/svg%3E");
  position: relative !important;
  width: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: visible !important;
  border: 1px solid transparent !important;
  border-radius: 9px !important;
  color: var(--tube-muted) !important;
  background: transparent !important;
  font-size: 0 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  transform: none !important;
  box-shadow: none !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item::before {
  content: "" !important;
  width: 21px !important;
  height: 21px !important;
  display: block !important;
  background: currentColor !important;
  mask: var(--tube-nav-icon) center / contain no-repeat !important;
  -webkit-mask: var(--tube-nav-icon) center / contain no-repeat !important;
}

.nav-item[href="/"],
.nav-item[href$="/"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 10.8 12 3l9 7.8V21a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1V10.8Z'/%3E%3C/svg%3E");
}

.nav-item[href="/live"],
.nav-item[href$="/live"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath stroke-linecap='round' d='M5.5 8.5a8 8 0 0 1 13 0M3 6a11 11 0 0 1 18 0M8.5 18.5h7'/%3E%3C/svg%3E");
}


.nav-item[href*="/mplus"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m7 4 10 16M17 4 7 20M5 7h14M5 17h14'/%3E%3C/svg%3E");
}

.nav-item[href*="/channels"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3Ccircle cx='16.5' cy='9.5' r='2.5'/%3E%3Cpath stroke-linecap='round' d='M2.5 20c.5-4 2.4-6 5.5-6s5 2 5.5 6M13 19.5c.4-2.8 1.7-4.2 4-4.2 2.2 0 3.7 1.5 4 4.2'/%3E%3C/svg%3E");
}

.nav-item[href*="/files"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.8'%3E%3Cpath stroke-linejoin='round' d='M3 6.5A1.5 1.5 0 0 1 4.5 5H9l2 2h8.5A1.5 1.5 0 0 1 21 8.5v9A1.5 1.5 0 0 1 19.5 19h-15A1.5 1.5 0 0 1 3 17.5v-11Z'/%3E%3C/svg%3E");
}

.nav-item[href*="/admin/chat"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath stroke-linecap='round' d='m15.5 15.5 5 5'/%3E%3C/svg%3E");
}

.nav-item[href*="/admin/mail"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath stroke-linejoin='round' d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}

.nav-item[href="/admin"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1-2.8 2.8-.1-.1a1.7 1.7 0 0 0-1.9-.3 1.7 1.7 0 0 0-1 1.6v.2h-4V21a1.7 1.7 0 0 0-1-1.6 1.7 1.7 0 0 0-1.9.3l-.1.1L4.2 17l.1-.1a1.7 1.7 0 0 0 .3-1.9A1.7 1.7 0 0 0 3 14H2.8v-4H3a1.7 1.7 0 0 0 1.6-1 1.7 1.7 0 0 0-.3-1.9L4.2 7 7 4.2l.1.1A1.7 1.7 0 0 0 9 4.6 1.7 1.7 0 0 0 10 3V2.8h4V3a1.7 1.7 0 0 0 1 1.6 1.7 1.7 0 0 0 1.9-.3l.1-.1L19.8 7l-.1.1a1.7 1.7 0 0 0-.3 1.9 1.7 1.7 0 0 0 1.6 1h.2v4H21a1.7 1.7 0 0 0-1.6 1Z'/%3E%3C/svg%3E");
}

.logout-button {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5M14 8l4 4-4 4M18 12H8'/%3E%3C/svg%3E") !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item:hover {
  color: var(--tube-text) !important;
  background: var(--tube-surface-2) !important;
  border-color: var(--tube-line) !important;
  transform: none !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item.active {
  color: var(--tube-accent) !important;
  background: #1c1b16 !important;
  border-color: rgba(242, 229, 141, 0.22) !important;
  box-shadow: none !important;
}

.nav-logout-form {
  width: 44px !important;
  margin: auto 0 0 !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .main {
  width: calc(100% - var(--tube-rail)) !important;
  min-width: 0 !important;
  min-height: 100vh !important;
  padding: 0 28px 36px !important;
  overflow: visible !important;
  background: var(--tube-bg) !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .main > .header {
  min-height: 75px !important;
  margin: 0 -28px 24px !important;
  padding: 0 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 20px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--tube-line-soft) !important;
  background: rgba(5, 5, 5, 0.96) !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-vod,
  .page-live
) .page-title {
  margin: 0 !important;
  color: var(--tube-text) !important;
  font-family: inherit !important;
  font-size: 22px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  letter-spacing: -0.025em !important;
  text-shadow: none !important;
}

.page-subtitle {
  margin-top: 4px !important;
  color: var(--tube-muted) !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live
) :is(
  .panel,
  .stat-card,
  .card,
  .overview-section,
  .mgmt-section,
  .upload-section,
  .file-card,
  .folder-card,
  .video-card,
  .controls-panel,
  .chat-panel,
  .mplus-panel,
  .mplus-stat,
  .share-box
) {
  color: var(--tube-text) !important;
  background: var(--tube-surface) !important;
  border: 1px solid var(--tube-line-soft) !important;
  border-radius: var(--tube-radius) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live
) :is(input, select, textarea) {
  min-height: 40px !important;
  border: 1px solid var(--tube-line) !important;
  border-radius: 8px !important;
  color: var(--tube-text) !important;
  background: #0d0d0d !important;
  box-shadow: none !important;
  outline: none !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live
) :is(input, select, textarea):focus {
  border-color: rgba(242, 229, 141, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(242, 229, 141, 0.08) !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live
) :is(
  button,
  .btn,
  .btn-action,
  .btn-restart,
  .action-btn,
  .btn-primary,
  .btn-secondary,
  .studio-btn,
  .vod-link-btn,
  .vod-icon-btn,
  .mplus-primary
) {
  min-height: 38px !important;
  padding: 8px 13px !important;
  border: 1px solid var(--tube-line) !important;
  border-radius: 8px !important;
  color: var(--tube-text-2) !important;
  background: var(--tube-surface-2) !important;
  box-shadow: none !important;
  transform: none !important;
  font-family: inherit !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  text-decoration: none !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live
) :is(
  button,
  .btn,
  .btn-action,
  .btn-restart,
  .action-btn,
  .btn-primary,
  .btn-secondary,
  .studio-btn,
  .vod-link-btn,
  .vod-icon-btn,
  .mplus-primary
):hover {
  color: var(--tube-text) !important;
  background: var(--tube-surface-3) !important;
  border-color: #3a3a3a !important;
  filter: none !important;
  transform: none !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live
) :is(
  .btn-primary,
  .studio-btn.primary,
  .action-btn.primary,
  .vod-primary-action,
  .mplus-primary,
  .live-input-group button,
  .channel-input-group button
) {
  color: #11100a !important;
  background: var(--tube-accent) !important;
  border-color: var(--tube-accent) !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live
) :is(
  .btn-primary,
  .studio-btn.primary,
  .action-btn.primary,
  .vod-primary-action,
  .mplus-primary,
  .live-input-group button,
  .channel-input-group button
):hover {
  color: #11100a !important;
  background: var(--tube-accent-hover) !important;
  border-color: var(--tube-accent-hover) !important;
}

button:disabled,
.btn:disabled {
  cursor: not-allowed !important;
  opacity: 0.45 !important;
}

/* Home */
body.page-index .studio-quickbar {
  margin: 0 0 20px !important;
  padding: 0 !important;
  display: flex !important;
  gap: 8px !important;
  overflow-x: auto !important;
  scrollbar-width: none;
}

body.page-index .studio-chip,
body.page-streamer .tab {
  min-height: 34px !important;
  padding: 8px 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid var(--tube-line) !important;
  border-radius: 8px !important;
  color: var(--tube-text-2) !important;
  background: var(--tube-surface) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}

body.page-index .studio-chip.active,
body.page-streamer .tab.active {
  color: #11100a !important;
  background: var(--tube-accent) !important;
  border-color: var(--tube-accent) !important;
}

body.page-index .studio-chip.danger {
  color: #ffd4d7 !important;
  background: rgba(255, 92, 102, 0.13) !important;
  border-color: rgba(255, 92, 102, 0.3) !important;
}

body.page-index .stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin: 0 0 24px !important;
}

body.page-index .stat-card {
  min-height: 132px !important;
  padding: 16px !important;
}

body.page-index .stat-card:hover,
body.page-index .streamer-row:hover,
body.page-streamer .video-card:hover,
body.page-files .file-card:hover {
  border-color: #383838 !important;
  background: #151515 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.page-index .stat-head {
  margin-bottom: 12px !important;
}

body.page-index .stat-label {
  color: var(--tube-text-2) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

body.page-index .stat-icon {
  color: var(--tube-muted) !important;
  font-size: 15px !important;
}

body.page-index .stat-value {
  color: var(--tube-text) !important;
  font-size: 24px !important;
}

body.page-index .res-bar,
body.page-index .progress-track {
  height: 4px !important;
  background: #292929 !important;
}

body.page-index .res-fill,
body.page-index .progress-fill {
  background: var(--tube-accent) !important;
}

body.page-index .overview-section {
  padding: 0 !important;
  overflow: hidden !important;
}

body.page-index .section-head {
  min-height: 68px !important;
  margin: 0 !important;
  padding: 15px 18px !important;
  border-bottom: 1px solid var(--tube-line-soft) !important;
}

body.page-index .section-head h2 {
  color: var(--tube-text) !important;
  font-size: 17px !important;
}

body.page-index .section-head p {
  color: var(--tube-muted) !important;
  font-size: 12px !important;
}

body.page-index .streamer-list {
  gap: 0 !important;
}

body.page-index .streamer-row {
  min-height: 78px !important;
  padding: 13px 18px !important;
  border-bottom: 1px solid var(--tube-line-soft) !important;
  background: transparent !important;
}

body.page-index .streamer-row:last-child {
  border-bottom: 0 !important;
}

body.page-index .streamer-row .avatar {
  width: 46px !important;
  height: 46px !important;
  border-radius: 50% !important;
  background: var(--tube-surface-3) !important;
}

body.page-index .streamer-row .avatar img {
  border-radius: 50% !important;
}

body.page-index .streamer-name {
  color: var(--tube-text) !important;
  font-size: 14px !important;
}

body.page-index .status-badge {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--tube-muted) !important;
  font-size: 11px !important;
}

body.page-index .status-badge.live {
  color: var(--tube-live) !important;
}

body.page-index .status-badge.online {
  color: var(--tube-success) !important;
}

body.page-index .streamer-cell span {
  color: var(--tube-muted) !important;
  font-size: 10px !important;
}

body.page-index .streamer-cell strong {
  color: var(--tube-text-2) !important;
  font-size: 12px !important;
}

/* Streamer archive */
body.page-streamer .tabs {
  width: auto !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  display: flex !important;
  gap: 8px !important;
  border: 0 !important;
  background: transparent !important;
}

body.page-streamer .panel {
  margin-bottom: 14px !important;
  padding: 16px !important;
}

body.page-streamer .video-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
  gap: 18px 14px !important;
  padding: 4px 0 20px !important;
}

body.page-streamer .video-card {
  overflow: hidden !important;
  background: transparent !important;
  border-color: transparent !important;
}

body.page-streamer .video-card:hover {
  background: var(--tube-surface) !important;
}

body.page-streamer .thumb-wrap {
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  border-radius: 9px !important;
  border: 1px solid var(--tube-line-soft) !important;
  background: #0b0b0b !important;
}

body.page-streamer .thumb-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body.page-streamer .card-body {
  padding: 11px 4px 4px !important;
}

body.page-streamer .video-title {
  min-height: 0 !important;
  color: var(--tube-text) !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

body.page-streamer .video-meta {
  color: var(--tube-muted) !important;
  font-size: 11px !important;
}

body.page-streamer .duration-badge,
body.page-streamer .empty-badge {
  border: 0 !important;
  border-radius: 5px !important;
  color: #fff !important;
  background: rgba(0, 0, 0, 0.86) !important;
}

body.page-streamer .card-actions {
  gap: 6px !important;
}

body.page-streamer .btn-icon,
body.page-files .btn-icon,
body.page-admin .btn-icon {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 7px !important;
}

/* Player and live pages */
body:is(.page-vod,.page-live) .main {
  padding: 0 18px 26px !important;
}

body.page-vod .vod-hero,
body.page-live .live-hero {
  min-height: 75px !important;
  margin: 0 -18px 18px !important;
  padding: 12px 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--tube-line-soft) !important;
  background: var(--tube-bg) !important;
}

body.page-vod .vod-header-main,
body.page-live .live-header-main {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}

body.page-vod .vod-back-link,
body.page-live .live-back-link {
  flex: 0 0 auto !important;
  color: var(--tube-muted) !important;
  font-size: 12px !important;
  text-decoration: none !important;
}

body.page-vod .vod-heading {
  min-width: 0 !important;
}

body.page-vod .vod-heading-icon {
  display: none !important;
}

body.page-vod .vod-title-block {
  min-width: 0 !important;
}

body.page-vod .vod-kicker,
body.page-live .live-kicker {
  margin-bottom: 3px !important;
  color: var(--tube-live) !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
}

body.page-vod .vod-filename {
  max-width: min(44vw, 620px) !important;
  overflow: hidden !important;
  color: var(--tube-muted) !important;
  font-size: 11px !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.page-vod .vod-meta-row {
  display: none !important;
}

body.page-vod .vod-header-actions,
body.page-live .live-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body:is(.page-vod,.page-live) .content {
  height: auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 330px !important;
  gap: 12px !important;
  align-items: start !important;
}

body:is(.page-vod,.page-live) .content.solo {
  grid-template-columns: minmax(0, 1fr) !important;
}

body:is(.page-vod,.page-live) .main-col {
  min-width: 0 !important;
  height: auto !important;
}

body:is(.page-vod,.page-live) .player-wrapper {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: 16 / 9 !important;
  overflow: hidden !important;
  border: 1px solid var(--tube-line-soft) !important;
  border-radius: var(--tube-radius) !important;
  background: #000 !important;
  box-shadow: none !important;
}

body:is(.page-vod,.page-live) .player-wrapper video {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

body:is(.page-vod,.page-live) .chat-panel {
  position: sticky !important;
  top: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  height: min(69vh, 720px) !important;
  min-height: 480px !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

body:is(.page-vod,.page-live) .chat-header {
  min-height: 52px !important;
  padding: 0 16px !important;
  border-bottom: 1px solid var(--tube-line-soft) !important;
  background: var(--tube-surface) !important;
  color: var(--tube-text) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body:is(.page-vod,.page-live) .chat-list {
  padding: 10px 8px 18px !important;
  background: var(--tube-surface) !important;
}

body:is(.page-vod,.page-live) .chat-line {
  margin: 0 !important;
  padding: 8px !important;
  border: 0 !important;
  border-radius: 7px !important;
  color: var(--tube-text-2) !important;
  background: transparent !important;
  font-size: 12px !important;
}

body:is(.page-vod,.page-live) .chat-line:hover {
  background: rgba(255, 255, 255, 0.035) !important;
}

body:is(.page-vod,.page-live) .controls-panel {
  margin-top: 12px !important;
  padding: 14px !important;
}

body.page-vod .vod-tools-head {
  gap: 12px !important;
}

body.page-vod .vod-panel-title {
  color: var(--tube-text) !important;
  font-size: 14px !important;
}

body.page-vod .vod-panel-subtitle {
  color: var(--tube-muted) !important;
  font-size: 11px !important;
}



body.page-live .live-title-group {
  min-width: 0 !important;
}

body.page-live .live-title-group .page-title {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.page-live .live-state {
  color: var(--tube-live) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

/* Operator pages */
body:is(.page-admin,.page-files,.page-search,.page-mplus) .grid {
  gap: 14px !important;
}

body:is(.page-admin,.page-files,.page-search,.page-mplus) .panel,
body.page-files .upload-section {
  padding: 18px !important;
}

body:is(.page-admin,.page-search,.page-mplus) table {
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}

body:is(.page-admin,.page-search,.page-mplus) th {
  padding: 10px 12px !important;
  color: var(--tube-muted) !important;
  background: #0d0d0d !important;
  border-bottom: 1px solid var(--tube-line) !important;
  font-size: 10px !important;
  letter-spacing: 0.04em !important;
}

body:is(.page-admin,.page-search,.page-mplus) td {
  padding: 10px 12px !important;
  color: var(--tube-text-2) !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--tube-line-soft) !important;
  border-radius: 0 !important;
}

body.page-files .upload-dropzone {
  min-height: 150px !important;
  border: 1px dashed #383838 !important;
  border-radius: 9px !important;
  background: #0d0d0d !important;
}

body.page-files .files-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
  gap: 14px !important;
}

body.page-files .file-card {
  padding: 16px !important;
}

/* Login */
body.page-login {
  min-height: 100vh !important;
  overflow: auto !important;
  color: var(--tube-text) !important;
  background: var(--tube-bg) !important;
}

body.page-login .inferno-stage {
  display: none !important;
}

body.page-login .login-shell {
  width: min(100%, 920px) !important;
  min-height: 100vh !important;
  margin: 0 auto !important;
  padding: 40px 24px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px) !important;
  gap: 64px !important;
  align-items: center !important;
}

body.page-login .eyebrow {
  color: var(--tube-accent) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: 0.1em !important;
}

body.page-login h1 {
  margin: 12px 0 18px !important;
  color: var(--tube-text) !important;
  font-size: clamp(42px, 7vw, 72px) !important;
  line-height: 0.95 !important;
  letter-spacing: -0.065em !important;
  text-shadow: none !important;
}

body.page-login h1::after {
  display: none !important;
}

body.page-login .subtitle {
  max-width: 520px !important;
  color: var(--tube-muted) !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
}

body.page-login .login-panel {
  padding: 28px !important;
  border: 1px solid var(--tube-line) !important;
  border-radius: var(--tube-radius) !important;
  background: var(--tube-surface) !important;
  box-shadow: none !important;
}

body.page-login .panel-glow {
  display: none !important;
}

body.page-login .login-form label {
  color: var(--tube-text-2) !important;
  font-size: 11px !important;
}

body.page-login input {
  min-height: 44px !important;
  border: 1px solid var(--tube-line) !important;
  border-radius: 8px !important;
  color: var(--tube-text) !important;
  background: #0b0b0b !important;
}

body.page-login input:focus {
  border-color: rgba(242, 229, 141, 0.7) !important;
  box-shadow: 0 0 0 3px rgba(242, 229, 141, 0.08) !important;
}

body.page-login button {
  min-height: 44px !important;
  border: 1px solid var(--tube-accent) !important;
  border-radius: 8px !important;
  color: #11100a !important;
  background: var(--tube-accent) !important;
  box-shadow: none !important;
}

/* Existing dedicated mobile templates */
body:is(.page-mobile-index,.page-mobile-streamer,.page-mobile-player) {
  color: var(--tube-text) !important;
  background: var(--tube-bg) !important;
  font-family: Inter, "Sora", system-ui, sans-serif !important;
}

body:is(.page-mobile-index,.page-mobile-streamer) .header {
  min-height: 58px !important;
  background: #080808 !important;
  border-bottom: 1px solid var(--tube-line-soft) !important;
}

body:is(.page-mobile-index,.page-mobile-streamer) :is(.section,.controls,.card,.video-card,.tab) {
  border-color: var(--tube-line-soft) !important;
  border-radius: 9px !important;
  background: var(--tube-surface) !important;
  box-shadow: none !important;
}

body.page-mobile-index .nav {
  height: 62px !important;
  background: rgba(7, 7, 7, 0.98) !important;
  border-top: 1px solid var(--tube-line) !important;
}

body.page-mobile-index .nav a {
  color: var(--tube-muted) !important;
}

body.page-mobile-index .nav a.active {
  color: var(--tube-accent) !important;
}

body.page-mobile-streamer .thumb-area {
  border-radius: 8px !important;
  overflow: hidden !important;
}

body.page-mobile-player .video-container {
  background: #000 !important;
}

body.page-mobile-player .chat-container {
  background: var(--tube-surface) !important;
  border-color: var(--tube-line) !important;
}

@media (max-width: 1180px) {
  body.page-index .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:is(.page-vod,.page-live) .content {
    grid-template-columns: minmax(0, 1fr) 290px !important;
  }
}

@media (max-width: 920px) {
  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live
  ) {
    display: block !important;
    padding-bottom: 68px !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live
  ) .sidebar {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    z-index: 100 !important;
    width: 100% !important;
    height: 64px !important;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom)) !important;
    display: block !important;
    border: 0 !important;
    border-top: 1px solid var(--tube-line) !important;
    background: rgba(7, 7, 7, 0.98) !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live
  ) .brand {
    display: none !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live
  ) nav {
    min-height: 0 !important;
    height: 52px !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    gap: 4px !important;
    overflow-x: auto !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live
  ) .nav-item {
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
  }

  .nav-logout-form {
    width: 42px !important;
    margin: 0 !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live
  ) .main {
    width: 100% !important;
    padding: 0 16px 24px !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live
  ) .main > .header {
    min-height: 66px !important;
    margin: 0 -16px 18px !important;
    padding: 10px 16px !important;
  }

  body.page-vod .vod-hero,
  body.page-live .live-hero {
    min-height: 66px !important;
    margin: 0 -16px 14px !important;
    padding: 10px 16px !important;
  }

  body.page-vod .vod-back-link,
  body.page-live .live-back-link,
  body.page-vod .vod-filename {
    display: none !important;
  }

  body:is(.page-vod,.page-live) .content {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  body:is(.page-vod,.page-live) .chat-panel {
    position: static !important;
    height: 420px !important;
    min-height: 360px !important;
  }

  body.page-login .login-shell {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}

@media (max-width: 640px) {
  body.page-index .stats-grid {
    grid-template-columns: 1fr !important;
  }

  body.page-index .streamer-row {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  body.page-index .streamer-cell {
    display: none !important;
  }

  body.page-index .streamer-actions {
    width: auto !important;
  }

  body.page-index .streamer-actions .action-btn:not(.primary):not(.danger) {
    display: none !important;
  }

  body.page-streamer .video-grid {
    grid-template-columns: 1fr !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-mail,.page-files,.page-search,.page-mplus) .page-title {
    font-size: 19px !important;
  }

  body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-mail,.page-files,.page-search,.page-mplus) .header-actions {
    display: none !important;
  }

  body.page-vod .vod-header-actions .vod-icon-btn,
  body.page-live .live-header-actions .studio-btn {
    display: none !important;
  }

  body:is(.page-vod,.page-live) .player-wrapper {
    margin: 0 -16px !important;
    width: calc(100% + 32px) !important;
    border-right: 0 !important;
    border-left: 0 !important;
    border-radius: 0 !important;
  }

  body.page-login .login-copy {
    display: none !important;
  }

  body.page-login .login-shell {
    width: 100% !important;
    min-height: 100vh !important;
    padding: 18px !important;
    align-content: center !important;
  }
}

/* Navigation and player corrections - 2026-06-07 */
@media (min-width: 921px) {
  :root {
    --tube-rail: 196px;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live,
    .page-twitch-watch
  ) .sidebar {
    padding: 0 12px 16px !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live,
    .page-twitch-watch
  ) .brand {
    width: 100% !important;
    min-height: 68px !important;
    display: flex !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 0 8px !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live,
    .page-twitch-watch
  ) .brand::before {
    flex: 0 0 32px !important;
    width: 32px !important;
    height: 32px !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live,
    .page-twitch-watch
  ) .brand::after {
    content: "NachtSilo Tube" !important;
    display: block !important;
    color: var(--tube-text) !important;
    font-size: 13px !important;
    font-weight: 850 !important;
    letter-spacing: -0.02em !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live,
    .page-twitch-watch
  ) nav {
    align-items: stretch !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live,
    .page-twitch-watch
  ) .nav-item {
    width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: 22px minmax(0, 1fr) !important;
    justify-content: start !important;
    column-gap: 12px !important;
    padding: 0 11px !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool,
    .page-mplus,
    .page-twitch-live,
    .page-twitch-watch
  ) .nav-item::after {
    content: "Bereich" !important;
    overflow: hidden !important;
    color: currentColor !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .nav-item[href="/"]::after,
  .nav-item[href$="/"]::after {
    content: "Übersicht" !important;
  }

  .nav-item[href="/live"]::after,
  .nav-item[href$="/live"]::after {
    content: "Live" !important;
  }

  
  .nav-item[href*="/mplus"]::after {
    content: "M+ Analyse" !important;
  }

  .nav-item[href*="/channels"]::after {
    content: "Streamer" !important;
  }

  .nav-item[href*="/files"]::after {
    content: "Dateien" !important;
  }

  .nav-item[href*="/admin/chat"]::after {
    content: "Chat-Tracker" !important;
  }

  .nav-item[href*="/admin/mail"]::after {
    content: "Mail" !important;
  }

  .nav-item[href="/admin"]::after {
    content: "Administration" !important;
  }

  .nav-item[href*="/admin/discord"]::after {
    content: "Discord" !important;
  }

  .logout-button::after {
    content: "Abmelden" !important;
  }

  .nav-logout-form {
    width: 100% !important;
  }
}

.nav-item[href*="/mplus"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M5.2 3.5 12 10.3l6.8-6.8 1.7 1.7-6.8 6.8 6.8 6.8-1.7 1.7-6.8-6.8-6.8 6.8-1.7-1.7 6.8-6.8-6.8-6.8 1.7-1.7Z'/%3E%3C/svg%3E");
}

.nav-item[href*="/channels"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8.5 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm7-1a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM8.5 13C4.4 13 2 15.2 2 19v2h13v-2c0-3.8-2.4-6-6.5-6Zm7 .3c-.8 0-1.5.1-2.1.3 2.1 1.2 3.3 3.3 3.3 6.2V21H22v-1.7c0-3.8-2.4-6-6.5-6Z'/%3E%3C/svg%3E");
}

.nav-item[href*="/files"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 5a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v11a3 3 0 0 1-3 3H5a2 2 0 0 1-2-2V5Zm2 3v11h13a1 1 0 0 0 1-1V8H5Z'/%3E%3C/svg%3E");
}

.nav-item[href*="/admin/chat"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 3a7 7 0 1 0 4.3 12.5l4.1 4.1 1.4-1.4-4.1-4.1A7 7 0 0 0 10 3Zm0 2a5 5 0 1 1 0 10 5 5 0 0 1 0-10Z'/%3E%3C/svg%3E");
}

.nav-item[href*="/admin/mail"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 4h18a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Zm0 3v11h18V7l-9 6L3 7Zm1.8-1L12 10.8 19.2 6H4.8Z'/%3E%3C/svg%3E");
}

.nav-item[href="/admin"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='m9.7 2 .6 2.2c.6-.2 1.1-.2 1.7-.2s1.1 0 1.7.2L14.3 2l3.5 1.5-1.1 2c.9.7 1.6 1.4 2.1 2.3l2.2-.6 1 3.7-2.2.6v1c0 .6 0 1.1-.2 1.7l2 1.1-1.9 3.3-2-1.1c-.7.8-1.5 1.4-2.4 1.9l.6 2.2-3.7 1-.6-2.2H12c-.6 0-1.1 0-1.7-.2l-1.1 2-3.3-1.9 1.1-2c-.8-.7-1.4-1.5-1.9-2.4l-2.2.6-1-3.7 2.2-.6V12c0-.6 0-1.1.2-1.7l-2-1.1 1.9-3.3 2 1.1c.7-.8 1.5-1.4 2.4-1.9L8 3l1.7-1Zm2.3 6a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z'/%3E%3C/svg%3E");
}

body.page-vod .vod-hero {
  min-height: 58px !important;
  margin-bottom: 14px !important;
  padding-block: 10px !important;
}

body.page-vod .vod-header-main {
  display: block !important;
}

body.page-vod .player-wrapper {
  position: relative !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 16 / 9 !important;
  contain: layout paint !important;
}

body.page-vod .player-wrapper video {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit !important;
  object-fit: contain !important;
  background: #000 !important;
}

body.page-vod .vod-details {
  padding: 16px 18px !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 24px !important;
  border: 1px solid var(--tube-line-soft) !important;
  border-radius: var(--tube-radius) !important;
  background: var(--tube-surface) !important;
}

body.page-vod .vod-details-main {
  min-width: 0 !important;
}

body.page-vod .vod-display-title {
  margin: 4px 0 7px !important;
  overflow-wrap: anywhere !important;
  color: var(--tube-text) !important;
  font-size: 17px !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  letter-spacing: -0.015em !important;
}

body.page-vod .vod-channel-link {
  color: var(--tube-text-2) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

body.page-vod .vod-channel-link:hover {
  color: var(--tube-accent) !important;
}

body.page-vod .vod-facts {
  margin: 0 !important;
  display: flex !important;
  flex: 0 0 auto !important;
  flex-wrap: wrap !important;
  gap: 18px !important;
}

body.page-vod .vod-facts div {
  min-width: 74px !important;
}

body.page-vod .vod-facts dt {
  margin-bottom: 4px !important;
  color: var(--tube-muted) !important;
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

body.page-vod .vod-facts dd {
  margin: 0 !important;
  color: var(--tube-text-2) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
}

body.page-vod .chat-panel {
  position: static !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: calc(100vh - 102px) !important;
  align-self: stretch !important;
}

@media (max-width: 1180px) {
  body.page-vod .chat-panel {
    height: 380px !important;
    max-height: none !important;
  }
}

@media (max-width: 720px) {
  body.page-vod .vod-details {
    flex-direction: column !important;
    gap: 14px !important;
  }

  body.page-vod .vod-facts {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.page-vod .vod-facts div {
    min-width: 0 !important;
  }
}

/* Compact icon-only navigation; M+ and Mail removed - 2026-06-07 */
@media (min-width: 921px) {
  :root {
    --tube-rail: 76px;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-files,
    .page-search,
    .page-discord-tool
  ) .sidebar {
    width: var(--tube-rail) !important;
    flex-basis: var(--tube-rail) !important;
    padding: 0 10px 14px !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-files,
    .page-search,
    .page-discord-tool
  ) .brand {
    width: 56px !important;
    min-height: 74px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-files,
    .page-search,
    .page-discord-tool
  ) .brand::before {
    flex: none !important;
    width: 34px !important;
    height: 34px !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-files,
    .page-search,
    .page-discord-tool
  ) .brand::after,
  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-files,
    .page-search,
    .page-discord-tool
  ) .nav-item::after {
    content: none !important;
    display: none !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-files,
    .page-search,
    .page-discord-tool
  ) nav {
    align-items: center !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-vod,
    .page-live,
    .page-admin,
    .page-files,
    .page-search,
    .page-discord-tool
  ) .nav-item {
    width: 44px !important;
    min-width: 44px !important;
    grid-template-columns: 1fr !important;
    justify-content: center !important;
    column-gap: 0 !important;
    padding: 0 !important;
  }

  .nav-logout-form {
    width: 44px !important;
  }
}

/* Stable VOD viewport and distinct icon rail */
@media (min-width: 921px) {
  body.page-vod .main-col {
    width: 100% !important;
    max-width: none !important;
    justify-self: stretch !important;
  }

  body.page-vod .player-wrapper {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
  }
}

@media (min-width: 1900px) {
  body.page-vod .content {
    grid-template-columns:
      minmax(0, min(1440px, calc(177.78vh - 320px)))
      minmax(360px, 400px) !important;
    justify-content: center !important;
  }
}

/* Compact VOD controls below the player */
body.page-vod .vod-library-nav {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m10 6-6 6 6 6M4 12h16'/%3E%3C/svg%3E") !important;
}

body.page-vod .vod-file-actions {
  display: flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 7px !important;
}

body.page-vod .vod-file-action {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  border: 1px solid var(--tube-line) !important;
  border-radius: 8px !important;
  color: var(--tube-text-2) !important;
  background: var(--tube-surface-2) !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

body.page-vod .vod-file-action::after {
  display: none !important;
}

body.page-vod .vod-file-action svg {
  width: 19px !important;
  height: 19px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body.page-vod .vod-file-action:hover {
  color: var(--tube-text) !important;
  border-color: #3a3a3a !important;
  background: var(--tube-surface-3) !important;
  transform: none !important;
}

body.page-vod .vod-file-action.is-loading {
  opacity: 0.55 !important;
}

body.page-vod .vod-file-action.is-success {
  color: #9ce8bf !important;
  border-color: rgba(91, 211, 154, 0.35) !important;
}

body.page-vod .vod-file-action.is-error {
  color: #ff9a9a !important;
  border-color: rgba(255, 106, 106, 0.35) !important;
}

@media (min-width: 921px) {
  body.page-vod .main {
    padding: 12px 18px 20px !important;
  }

  body.page-vod .content {
    padding: 0 !important;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 400px) !important;
    gap: 12px !important;
    align-items: start !important;
  }

  body.page-vod .main-col {
    gap: 10px !important;
  }

  body.page-vod .vod-details {
    min-height: 76px !important;
    padding: 11px 14px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    align-items: center !important;
    gap: 18px !important;
  }

  body.page-vod .vod-display-title {
    margin: 2px 0 4px !important;
    font-size: 15px !important;
  }

  body.page-vod .vod-facts {
    gap: 14px !important;
  }

  body.page-vod .vod-tools-panel {
    padding: 9px 12px !important;
  }

  body.page-vod .vod-tools-head {
    min-height: 38px !important;
  }

  body.page-vod .vod-panel-subtitle {
    display: none !important;
  }

  body.page-vod .vod-actions .btn,
  body.page-vod .vod-actions button {
    min-height: 34px !important;
    padding: 6px 10px !important;
  }

  

  body.page-vod .chat-panel {
    height: calc(100vh - 32px) !important;
    max-height: calc(100vh - 32px) !important;
  }
}

@media (min-width: 1900px) {
  body.page-vod .content {
    grid-template-columns: minmax(0, 1320px) minmax(360px, 400px) !important;
    justify-content: center !important;
  }
}

@media (max-width: 720px) {
  body.page-vod .vod-details {
    grid-template-columns: 1fr !important;
  }

  body.page-vod .vod-file-actions {
    justify-content: flex-start !important;
  }
}

/* Clean single-row VOD metadata and dense chat */
body.page-vod .player-wrapper {
  border-color: rgba(255, 255, 255, 0.08) !important;
  border-radius: 9px !important;
}

body.page-vod .vod-details {
  min-height: 0 !important;
  padding: 12px 16px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px 20px !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  border-radius: 8px !important;
  background: #0d0d0d !important;
}

body.page-vod .vod-details-main {
  min-width: 280px !important;
  flex: 1 1 360px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

body.page-vod .vod-details-side {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  flex: 0 1 auto !important;
  flex-shrink: 0 !important;
}

body.page-vod .vod-kicker {
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  gap: 6px !important;
  margin: 0 0 2px !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: var(--tube-live, #ef4444) !important;
  line-height: 1.3 !important;
}

body.page-vod .vod-kicker .platform-badge {
  display: inline-flex !important;
  align-items: center !important;
  padding: 1px 6px !important;
  font-size: 9px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  vertical-align: middle !important;
}

body.page-vod .vod-display-title {
  margin: 0 0 2px !important;
  font-size: 17px !important;
  line-height: 1.35 !important;
  font-weight: 750 !important;
  color: #fff !important;
  overflow-wrap: break-word !important;
}

body.page-vod .vod-channel-link {
  font-size: 12px !important;
  font-weight: 650 !important;
  color: var(--tube-text-2, #a1a1aa) !important;
}

body.page-vod .vod-facts {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px 16px !important;
  margin: 0 !important;
}

body.page-vod .vod-facts div {
  min-width: 58px !important;
}

body.page-vod .vod-facts dt {
  margin-bottom: 2px !important;
  font-size: 9px !important;
  color: var(--tube-muted, #71717a) !important;
}

body.page-vod .vod-facts dd {
  margin: 0 !important;
  font-size: 11px !important;
  font-weight: 650 !important;
  color: var(--tube-text, #f4f4f5) !important;
}

body.page-vod .vod-file-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

body.page-vod .vod-file-actions form {
  margin: 0 !important;
}

body:is(.page-vod, .page-live) .vod-inline-tool {
  min-height: 32px !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  border: 1px solid transparent !important;
  border-radius: 7px !important;
  color: var(--tube-text-2) !important;
  background: transparent !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

body:is(.page-vod, .page-live) .vod-inline-tool::after {
  display: none !important;
}

body:is(.page-vod, .page-live) .vod-inline-tool:hover {
  border-color: var(--tube-line) !important;
  color: var(--tube-text) !important;
  background: var(--tube-surface-2) !important;
  transform: none !important;
}

body:is(.page-vod, .page-live) .vod-inline-tool-warning {
  color: #ffe082 !important;
  border-color: rgba(255, 224, 130, 0.22) !important;
  background: rgba(255, 224, 130, 0.06) !important;
}

body:is(.page-vod, .page-live) .vod-inline-tool-warning:hover {
  color: #fff3b0 !important;
  border-color: rgba(255, 224, 130, 0.36) !important;
  background: rgba(255, 224, 130, 0.1) !important;
}

body:is(.page-vod, .page-live) .vod-inline-tool:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
}

body:is(.page-vod, .page-live) .vod-inline-tool:disabled:hover {
  color: #ffe082 !important;
  border-color: rgba(255, 224, 130, 0.22) !important;
  background: rgba(255, 224, 130, 0.06) !important;
}

body.page-vod .vod-file-action {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-color: rgba(255, 255, 255, 0.09) !important;
  border-radius: 7px !important;
  background: transparent !important;
}

body.page-vod .vod-file-action svg {
  width: 17px !important;
  height: 17px !important;
}

body:is(.page-vod, .page-live).clip-overlay-open {
  overflow: hidden !important;
}

body:is(.page-vod, .page-live) .vod-clip-flash {
  padding: 10px 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  color: var(--tube-text) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

body:is(.page-vod, .page-live) .vod-clip-flash.success {
  color: #b7f3cf !important;
  border-color: rgba(91, 211, 154, 0.28) !important;
  background: rgba(91, 211, 154, 0.08) !important;
}

body:is(.page-vod, .page-live) .vod-clip-flash.error {
  color: #ffb6b6 !important;
  border-color: rgba(255, 106, 106, 0.28) !important;
  background: rgba(255, 106, 106, 0.08) !important;
}

body:is(.page-vod, .page-live) .vod-clip-overlay[hidden] {
  display: none !important;
}

body:is(.page-vod, .page-live) .vod-clip-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 8000 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 42vw) !important;
  pointer-events: none !important;
}

body:is(.page-vod, .page-live) .vod-clip-scrim {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  background: rgba(0, 0, 0, 0.54) !important;
  backdrop-filter: blur(2px) !important;
  pointer-events: auto !important;
}

body:is(.page-vod, .page-live) .vod-clip-panel {
  grid-column: 2 !important;
  grid-row: 1 !important;
  position: relative !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-width: 0 !important;
  padding: 16px 18px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  color: var(--tube-text) !important;
  background: #08090b !important;
  border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: -18px 0 52px rgba(0, 0, 0, 0.46) !important;
  pointer-events: auto !important;
}

body:is(.page-vod, .page-live) .vod-clip-head {
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body:is(.page-vod, .page-live) .vod-clip-kicker {
  margin-bottom: 2px !important;
  color: var(--tube-muted) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
}

body:is(.page-vod, .page-live) .vod-clip-head h2 {
  margin: 0 !important;
  color: #fff !important;
  font-size: 18px !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
}

body:is(.page-vod, .page-live) .vod-clip-head-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

body:is(.page-vod, .page-live) .vod-clip-icon-button,
body:is(.page-vod, .page-live) .vod-clip-icon-link {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  color: var(--tube-text-2) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

body:is(.page-vod, .page-live) .vod-clip-icon-button:hover,
body:is(.page-vod, .page-live) .vod-clip-icon-link:hover,
body:is(.page-vod, .page-live) .vod-clip-icon-button:focus-visible,
body:is(.page-vod, .page-live) .vod-clip-icon-link:focus-visible {
  color: #fff !important;
  border-color: rgba(242, 229, 141, 0.36) !important;
  outline: none !important;
}

body:is(.page-vod, .page-live) .vod-clip-icon-button svg,
body:is(.page-vod, .page-live) .vod-clip-icon-link svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body:is(.page-vod, .page-live) .vod-clip-preview-shell {
  position: relative !important;
  aspect-ratio: 16 / 9 !important;
  width: 100% !important;
  flex: 0 0 auto !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  background: #000 !important;
}

body:is(.page-vod, .page-live) .vod-clip-preview-shell video {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  background: #000 !important;
}

body:is(.page-vod, .page-live) .vod-clip-preview-toggle {
  position: absolute !important;
  right: 10px !important;
  bottom: 10px !important;
  width: 38px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  color: #fff !important;
  background: rgba(0, 0, 0, 0.64) !important;
  cursor: pointer !important;
}

body:is(.page-vod, .page-live) .vod-clip-preview-toggle svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body:is(.page-vod, .page-live) .vod-clip-form {
  min-height: 0 !important;
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  gap: 14px !important;
}

body:is(.page-vod, .page-live) .vod-clip-timebar {
  padding: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.035) !important;
}

body:is(.page-vod, .page-live) .vod-clip-time-row {
  min-height: 20px !important;
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: center !important;
  gap: 10px !important;
  color: var(--tube-text-2) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  font-variant-numeric: tabular-nums !important;
}

body:is(.page-vod, .page-live) .vod-clip-time-row strong {
  color: #f2e58d !important;
  font-size: 12px !important;
}

body:is(.page-vod, .page-live) .vod-clip-time-row span:last-child {
  text-align: right !important;
}

body:is(.page-vod, .page-live) .vod-clip-range {
  position: relative !important;
  height: 42px !important;
  margin-top: 8px !important;
}

body:is(.page-vod, .page-live) .vod-clip-range-base,
body:is(.page-vod, .page-live) .vod-clip-range-fill {
  position: absolute !important;
  top: 17px !important;
  height: 10px !important;
  border-radius: 999px !important;
}

body:is(.page-vod, .page-live) .vod-clip-range-base {
  left: 0 !important;
  right: 0 !important;
  background: #242830 !important;
}

body:is(.page-vod, .page-live) .vod-clip-range-fill {
  background: linear-gradient(90deg, #f2e58d, #5bd39a) !important;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset !important;
}

body:is(.page-vod, .page-live) .vod-clip-range input[type="range"] {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 42px !important;
  margin: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  pointer-events: none !important;
}

body:is(.page-vod, .page-live) .vod-clip-range input[type="range"]::-webkit-slider-runnable-track {
  height: 42px !important;
  background: transparent !important;
}

body:is(.page-vod, .page-live) .vod-clip-range input[type="range"]::-webkit-slider-thumb {
  width: 18px !important;
  height: 28px !important;
  margin-top: 7px !important;
  border: 2px solid #111318 !important;
  border-radius: 7px !important;
  background: #f2e58d !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.36) !important;
  cursor: ew-resize !important;
  pointer-events: auto !important;
  -webkit-appearance: none !important;
}

body:is(.page-vod, .page-live) .vod-clip-range input[type="range"]::-moz-range-track {
  height: 42px !important;
  background: transparent !important;
}

body:is(.page-vod, .page-live) .vod-clip-range input[type="range"]::-moz-range-thumb {
  width: 18px !important;
  height: 28px !important;
  border: 2px solid #111318 !important;
  border-radius: 7px !important;
  background: #f2e58d !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.36) !important;
  cursor: ew-resize !important;
  pointer-events: auto !important;
}

body:is(.page-vod, .page-live) .vod-clip-nudge-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body:is(.page-vod, .page-live) .vod-clip-nudge-group {
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: auto repeat(3, minmax(48px, 1fr)) !important;
  align-items: center !important;
  gap: 6px !important;
}

body:is(.page-vod, .page-live) .vod-clip-nudge-group span {
  color: var(--tube-muted) !important;
  font-size: 11px !important;
  font-weight: 850 !important;
}

body:is(.page-vod, .page-live) .vod-clip-nudge-group button,
body:is(.page-vod, .page-live) .vod-clip-secondary,
body:is(.page-vod, .page-live) .vod-clip-primary {
  min-height: 34px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  color: var(--tube-text) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

body:is(.page-vod, .page-live) .vod-clip-nudge-group button:hover,
body:is(.page-vod, .page-live) .vod-clip-secondary:hover {
  border-color: rgba(242, 229, 141, 0.28) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

body:is(.page-vod, .page-live) .vod-clip-title-field {
  display: grid !important;
  gap: 7px !important;
}

body:is(.page-vod, .page-live) .vod-clip-title-field span {
  color: var(--tube-muted) !important;
  font-size: 11px !important;
  font-weight: 850 !important;
}

body:is(.page-vod, .page-live) .vod-clip-title-field input {
  width: 100% !important;
  min-height: 42px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  color: #fff !important;
  background: #0d1014 !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  outline: none !important;
}

body:is(.page-vod, .page-live) .vod-clip-title-field input:focus {
  border-color: rgba(242, 229, 141, 0.5) !important;
  box-shadow: 0 0 0 3px rgba(242, 229, 141, 0.12) !important;
}

body:is(.page-vod, .page-live) .vod-clip-status {
  min-height: 20px !important;
  color: var(--tube-text-2) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

body:is(.page-vod, .page-live) .vod-clip-status[data-state="pending"] {
  color: #f2e58d !important;
}

body:is(.page-vod, .page-live) .vod-clip-status[data-state="success"] {
  color: #9ce8bf !important;
}

body:is(.page-vod, .page-live) .vod-clip-status[data-state="error"] {
  color: #ffaaa5 !important;
}

body:is(.page-vod, .page-live) .vod-clip-result {
  padding: 10px 12px !important;
  border: 1px solid rgba(91, 211, 154, 0.24) !important;
  border-radius: 8px !important;
  color: #b7f3cf !important;
  background: rgba(91, 211, 154, 0.07) !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

body:is(.page-vod, .page-live) .vod-clip-result a {
  color: #f2e58d !important;
  text-decoration: none !important;
}

body:is(.page-vod, .page-live) .vod-clip-actions {
  margin-top: auto !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
}

body:is(.page-vod, .page-live) .vod-clip-secondary,
body:is(.page-vod, .page-live) .vod-clip-primary {
  min-width: 124px !important;
  padding: 0 14px !important;
}

body:is(.page-vod, .page-live) .vod-clip-primary {
  color: #111318 !important;
  border-color: rgba(242, 229, 141, 0.68) !important;
  background: #f2e58d !important;
}

body:is(.page-vod, .page-live) .vod-clip-primary:hover {
  background: #fff1a6 !important;
}

body:is(.page-vod, .page-live) .vod-clip-primary:disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
}

.clip-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10050;
  min-width: 220px;
  max-width: min(420px, calc(100vw - 24px));
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 12, 14, 0.94);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  color: #f4f4f5;
  text-align: center;
  pointer-events: auto;
}
.clip-toast[hidden] { display: none !important; }
.clip-toast-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f2e58d;
}
.clip-toast[data-state="success"] .clip-toast-kicker { color: #86efac; }
.clip-toast[data-state="error"] .clip-toast-kicker { color: #fca5a5; }
.clip-toast-msg {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(244, 244, 245, 0.86);
}
.clip-toast-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #f2e58d;
}
#btnInstantClip {
  font-weight: 700;
}

@media (max-width: 920px) {
  body:is(.page-vod, .page-live) .vod-clip-overlay {
    display: block !important;
    overflow: hidden !important;
  }

  body:is(.page-vod, .page-live) .vod-clip-scrim {
    display: none !important;
  }

  body:is(.page-vod, .page-live) .vod-clip-panel {
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 12px !important;
    border-left: 0 !important;
  }

  body:is(.page-vod, .page-live) .vod-clip-nudge-grid {
    grid-template-columns: 1fr !important;
  }

  body:is(.page-vod, .page-live) .vod-clip-nudge-group {
    grid-template-columns: 44px repeat(3, minmax(0, 1fr)) !important;
  }

  body:is(.page-vod, .page-live) .vod-clip-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  body:is(.page-vod, .page-live) .vod-clip-secondary,
  body:is(.page-vod, .page-live) .vod-clip-primary {
    min-width: 0 !important;
    width: 100% !important;
  }
}

@media (max-height: 700px) and (min-width: 921px) {
  body:is(.page-vod, .page-live) .vod-clip-panel {
    overflow-y: auto !important;
  }

  body:is(.page-vod, .page-live) .vod-clip-preview-shell {
    max-height: 38vh !important;
  }
}

body.page-vod .chat-panel {
  border-color: rgba(255, 255, 255, 0.08) !important;
  border-radius: 9px !important;
  background: #0d0d0d !important;
}

body.page-vod .chat-header {
  min-height: 48px !important;
  padding: 0 13px !important;
  background: #0d0d0d !important;
}

body.page-vod .chat-list {
  padding: 7px 10px 12px !important;
  background: #0d0d0d !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}

body.page-vod .chat-line {
  grid-template-columns: 56px minmax(0, 1fr) !important;
  column-gap: 6px !important;
  margin: 0 !important;
  padding: 3px 2px !important;
  border-radius: 4px !important;
  align-items: start !important;
}

body.page-vod .chat-line + .chat-line {
  margin-top: 1px !important;
}

body.page-vod .chat-time {
  padding-top: 1px !important;
  font-size: 10px !important;
  line-height: 1.25 !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
}

body.page-mobile-player .t {
  color: var(--tube-muted) !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
}

body.page-vod .chat-text,
body.page-vod .chat-msg {
  line-height: 1.25 !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-redeem {
  padding: 6px 8px !important;
  margin: 4px 0 !important;
  border-left: 3px solid #f2e58d !important;
  border-radius: 8px !important;
  background: rgba(242, 229, 141, 0.1) !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-redeem-badge {
  display: inline-block !important;
  margin-right: 4px !important;
  padding: 1px 6px !important;
  border: 1px solid rgba(242, 229, 141, 0.35) !important;
  border-radius: 999px !important;
  color: #111318 !important;
  background: #f2e58d !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: 0.02em !important;
  vertical-align: 0.1em !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-redeem-title {
  color: #f2e58d !important;
  font-weight: 800 !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-redeem-cost {
  color: var(--tube-muted, #9aa3b2) !important;
  font-weight: 750 !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-redeem-sep {
  color: var(--tube-muted, #9aa3b2) !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-redeem-msg {
  color: inherit !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-mod {
  padding: 6px 8px !important;
  margin: 4px 0 !important;
  border-left: 3px solid #ff7b72 !important;
  border-radius: 8px !important;
  background: rgba(255, 123, 114, 0.1) !important;
  color: #ffb4ae !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-mod-timeout {
  border-left-color: #f0b429 !important;
  background: rgba(240, 180, 41, 0.1) !important;
  color: #f6d48a !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-mod-delete,
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-mod-clear {
  border-left-color: #8b949e !important;
  background: rgba(139, 148, 158, 0.12) !important;
  color: #c9d1d9 !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-mod-badge {
  display: inline-block !important;
  margin-right: 4px !important;
  padding: 1px 6px !important;
  border-radius: 999px !important;
  color: #111318 !important;
  background: #ff7b72 !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  letter-spacing: 0.02em !important;
  vertical-align: 0.1em !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-mod-badge-timeout {
  background: #f0b429 !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-mod-badge-delete,
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-mod-badge-clear {
  background: #8b949e !important;
  color: #111318 !important;
}

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-mod-text {
  font-weight: 650 !important;
}

body:is(.page-vod,.page-live,.page-mobile-player) .chat-emote {
  display: inline-block;
  width: auto;
  height: 1.45em;
  max-width: 8em;
  margin: 0 1px;
  object-fit: contain;
  vertical-align: -0.32em;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  margin-right: 5px;
  vertical-align: -0.18em;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badges:empty {
  display: none;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge {
  --badge-size: 20px;
  --badge-bg-a: #3b3b44;
  --badge-bg-b: #24242b;
  --badge-fg: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--badge-size);
  width: var(--badge-size);
  height: var(--badge-size);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  background: linear-gradient(145deg, var(--badge-bg-a), var(--badge-bg-b));
  color: var(--badge-fg);
  font-size: 0;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 1px 2px rgba(0, 0, 0, 0.28);
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge.has-badge-image {
  min-width: 0;
  width: var(--badge-size);
  height: var(--badge-size);
  padding: 0;
  background: transparent;
  border-color: transparent;
  color: inherit;
  box-shadow: none;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge.has-badge-fallback-icon {
  min-width: 0;
  width: var(--badge-size);
  height: var(--badge-size);
  padding: 0;
  border-radius: 5px;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge-img {
  display: block;
  width: var(--badge-size);
  height: var(--badge-size);
  object-fit: contain;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge-fallback-icon {
  display: block;
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: none;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="broadcaster"] {
  --badge-bg-a: #ff667f;
  --badge-bg-b: #d92352;
  --badge-fg: #fff;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="moderator"] {
  --badge-bg-a: #4ade80;
  --badge-bg-b: #159447;
  --badge-fg: #042414;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="subscriber"],
body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="founder"] {
  --badge-bg-a: #a78bfa;
  --badge-bg-b: #6d4ee8;
  --badge-fg: #fff;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="vip"] {
  --badge-bg-a: #fb6fbd;
  --badge-bg-b: #cb257e;
  --badge-fg: #fff;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="bits"],
body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="sub_gifter"] {
  --badge-bg-a: #5eead4;
  --badge-bg-b: #0ea5b7;
  --badge-fg: #06282f;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="staff"],
body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="admin"],
body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="partner"] {
  --badge-bg-a: #facc15;
  --badge-bg-b: #f59e0b;
  --badge-fg: #2a1700;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="premium"],
body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge[data-badge="turbo"] {
  --badge-bg-a: #60a5fa;
  --badge-bg-b: #4f46e5;
  --badge-fg: #fff;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge.has-badge-image {
  background: transparent;
  color: inherit;
  box-shadow: none;
}

body.page-vod .chat-user {
  margin-right: 4px !important;
  font-weight: 750 !important;
}

body.page-search .log-word-hit {
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(242, 229, 141, 0.22);
  color: #fff7ad;
  box-shadow: inset 0 0 0 1px rgba(242, 229, 141, 0.28);
}

body.page-search .log-vod-link {
  width: 24px;
  height: 24px;
  margin-left: 8px;
  display: inline-grid;
  place-items: center;
  vertical-align: -6px;
  border: 1px solid rgba(242, 229, 141, 0.26);
  border-radius: 6px;
  background: rgba(242, 229, 141, 0.1);
  color: #f2e58d;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

body.page-search .log-vod-link:hover,
body.page-search .log-vod-link:focus-visible {
  background: rgba(242, 229, 141, 0.18);
  border-color: rgba(242, 229, 141, 0.48);
  color: #fff6a3;
  outline: none;
}

body.page-search .log-vod-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

@media (max-width: 1250px) {
  body.page-vod .vod-details-side {
    align-items: flex-end !important;
    flex-direction: column !important;
    gap: 7px !important;
  }
}

@media (max-width: 720px) {
  body.page-vod .vod-details-side {
    width: 100% !important;
    align-items: stretch !important;
  }

  body.page-vod .vod-file-actions {
    flex-wrap: wrap !important;
  }
}








































@media (min-width: 921px) {
  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool
  ) .main {
    padding: 0 18px 24px !important;
  }

  body:is(
    .page-index,
    .page-channels,
    .page-streamer,
    .page-admin,
    .page-mail,
    .page-files,
    .page-search,
    .page-discord-tool
  ) .main > .header {
    min-height: 58px !important;
    margin: 0 -18px 16px !important;
    padding: 0 18px !important;
  }
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool
) .page-title {
  font-size: 19px !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool
) :is(
  .panel,
  .stat-card,
  .card,
  .overview-section,
  .mgmt-section,
  .upload-section,
  .file-card,
  .folder-card,
  .share-box
) {
  border-radius: 8px !important;
}

body:is(.page-admin,.page-mail,.page-files,.page-search,.page-discord-tool) :is(.panel,.upload-section,.mgmt-section) {
  padding: 14px !important;
}

body:is(.page-admin,.page-mail,.page-files,.page-search,.page-discord-tool) :is(.grid,.mail-grid) {
  gap: 12px !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-mail,.page-files,.page-search,.page-discord-tool) :is(
  input,
  select,
  textarea
) {
  min-height: 36px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
}

body:is(.page-index,.page-channels,.page-streamer,.page-admin,.page-mail,.page-files,.page-search,.page-discord-tool) :is(
  button,
  .btn,
  .btn-action,
  .btn-restart,
  .action-btn,
  .btn-primary,
  .btn-secondary
) {
  min-height: 34px !important;
  padding: 6px 10px !important;
  border-radius: 7px !important;
  font-size: 11px !important;
}

body.page-index .studio-quickbar {
  margin-bottom: 12px !important;
}

body.page-index .stats-grid {
  gap: 10px !important;
  margin-bottom: 14px !important;
}

body.page-index .stat-card {
  min-height: 98px !important;
  padding: 12px !important;
}

body.page-index .stat-head {
  margin-bottom: 7px !important;
}

body.page-index .stat-value {
  font-size: 20px !important;
}

body.page-index .section-head {
  min-height: 54px !important;
  padding: 11px 14px !important;
}

body.page-index .streamer-row {
  min-height: 64px !important;
  padding: 9px 14px !important;
}

body.page-index .streamer-row .avatar {
  width: 40px !important;
  height: 40px !important;
}

body.page-streamer .panel {
  margin-bottom: 10px !important;
  padding: 12px !important;
}

body.page-streamer .tabs {
  margin-bottom: 12px !important;
  gap: 6px !important;
}

body.page-streamer .video-grid {
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important;
  gap: 14px 10px !important;
}

body.page-streamer .thumb-wrap {
  border-radius: 8px !important;
}

body.page-streamer .card-body {
  padding-top: 8px !important;
}

body:is(.page-admin,.page-mail,.page-files,.page-search) table {
  border-spacing: 0 4px !important;
}

body:is(.page-admin,.page-mail,.page-files,.page-search) th {
  padding: 7px 9px !important;
  font-size: 9px !important;
}

body:is(.page-admin,.page-mail,.page-files,.page-search) td {
  padding: 8px 9px !important;
  font-size: 11px !important;
}

body.page-files .file-grid,
body.page-files .folder-grid {
  gap: 10px !important;
}

body.page-files .file-card,
body.page-files .folder-card {
  padding: 12px !important;
}

body.page-search .grid {
  gap: 12px !important;
}

body.page-search .panel {
  padding: 13px !important;
}

body.page-live .main {
  padding: 0 14px 20px !important;
}

body.page-live .live-hero {
  min-height: 58px !important;
  margin: 0 -14px 12px !important;
  padding: 8px 14px !important;
}

body.page-live .content {
  gap: 10px !important;
}

body.page-clip-editor header {
  min-height: 58px !important;
  padding: 0 16px !important;
}

body.page-clip-editor .main-area {
  gap: 12px !important;
  padding: 14px !important;
}

body.page-clip-editor .editor-panel {
  padding: 14px !important;
  border-radius: 8px !important;
}

@media (max-width: 720px) {
  body.page-clip-editor .editor-panel {
    padding: 12px !important;
  }
}

/* Restore document scrolling for long dashboard/library pages. */
html:has(body.page-index),
html:has(body.page-channels),
html:has(body.page-streamer),
html:has(body.page-admin),
html:has(body.page-mail),
html:has(body.page-files),
html:has(body.page-search),
html:has(body.page-discord-tool),
html:has(body.page-mplus),
html:has(body.page-twitch-live) {
  height: auto !important;
  min-height: 100% !important;
  overflow-y: auto !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) {
  height: auto !important;
  min-height: 100vh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  align-items: flex-start !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .main {
  min-height: 100vh !important;
  height: auto !important;
  overflow: visible !important;
}

/* Dashboard product redesign and account themes - 2026-06-24 */
:root {
  --bg: #08090a;
  --sidebar: #0c0d0f;
  --surface: #111316;
  --surface-raised: #17191d;
  --surface-hover: #1c1f23;
  --surface-active: #202329;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text-primary: #f2f3f5;
  --text-secondary: #979ba3;
  --text-muted: #62666e;
  --brand: #d8eb72;
  --brand-hover: #e4f58b;
  --brand-muted: rgba(216, 235, 114, 0.12);
  --success: #65d59a;
  --warning: #efc66b;
  --danger: #ef7474;
  --offline: #737780;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

body.theme-silo {
  --bg: #0b0b0b;
  --sidebar: #0f0f0f;
  --surface: #141414;
  --surface-raised: #1a1a1a;
  --surface-hover: #222222;
  --surface-active: #2a2a2a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text-primary: #f5f5f5;
  --text-secondary: #b0b0b0;
  --text-muted: #7a7a7a;
  --brand: #c8f53a;
  --brand-hover: #d8ff5c;
  --brand-muted: rgba(200, 245, 58, 0.12);
  --success: #c8f53a;
  --warning: #f59e0b;
  --danger: #ef4444;
  --offline: #6b6b6b;
  --theme-accent-rgb: 200, 245, 58;
  --theme-success-rgb: 200, 245, 58;
  --theme-button-text: #0b0b0b;
  --radius: 14px;
  --radius-card: 16px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

body.theme-aurora {
  --bg: #07100f;
  --sidebar: #0a1413;
  --surface: #101918;
  --surface-raised: #162220;
  --surface-hover: #1b2b28;
  --surface-active: #20332f;
  --border: rgba(203, 255, 235, 0.08);
  --border-strong: rgba(203, 255, 235, 0.14);
  --text-primary: #f1fffb;
  --text-secondary: #9fb8b1;
  --text-muted: #647a73;
  --brand: #78e8c6;
  --brand-hover: #9ff5db;
  --brand-muted: rgba(120, 232, 198, 0.12);
  --success: #a8e76e;
  --warning: #efd26b;
  --danger: #ef747f;
  --offline: #71807d;
  --theme-accent-rgb: 120, 232, 198;
  --theme-success-rgb: 168, 231, 110;
  --theme-button-text: #06110f;
}

body.theme-cyber {
  --bg: #090910;
  --sidebar: #0d0d16;
  --surface: #13131d;
  --surface-raised: #1a1a28;
  --surface-hover: #222033;
  --surface-active: #29263d;
  --border: rgba(229, 222, 255, 0.08);
  --border-strong: rgba(229, 222, 255, 0.14);
  --text-primary: #f5f2ff;
  --text-secondary: #aaa3c5;
  --text-muted: #6f6886;
  --brand: #a895ff;
  --brand-hover: #c2b5ff;
  --brand-muted: rgba(168, 149, 255, 0.13);
  --success: #6fd4e7;
  --warning: #e2c86c;
  --danger: #ef74a0;
  --offline: #777285;
  --theme-accent-rgb: 168, 149, 255;
  --theme-success-rgb: 111, 212, 231;
  --theme-button-text: #090910;
}

body.theme-ember {
  --bg: #100b09;
  --sidebar: #130d0b;
  --surface: #19120f;
  --surface-raised: #211814;
  --surface-hover: #2a1e18;
  --surface-active: #32241c;
  --border: rgba(255, 218, 190, 0.08);
  --border-strong: rgba(255, 218, 190, 0.15);
  --text-primary: #fff7f2;
  --text-secondary: #c3a9a0;
  --text-muted: #806a62;
  --brand: #f0b86e;
  --brand-hover: #ffd08f;
  --brand-muted: rgba(240, 184, 110, 0.13);
  --success: #73d69b;
  --warning: #efc66b;
  --danger: #f07b70;
  --offline: #7d7470;
  --theme-accent-rgb: 240, 184, 110;
  --theme-success-rgb: 115, 214, 155;
  --theme-button-text: #130b07;
}

body.theme-ocean {
  --bg: #071018;
  --sidebar: #09131d;
  --surface: #101923;
  --surface-raised: #162231;
  --surface-hover: #1c2c3e;
  --surface-active: #21364d;
  --border: rgba(206, 232, 255, 0.08);
  --border-strong: rgba(206, 232, 255, 0.14);
  --text-primary: #f1f8ff;
  --text-secondary: #9db3ca;
  --text-muted: #61778f;
  --brand: #6caeff;
  --brand-hover: #93c6ff;
  --brand-muted: rgba(108, 174, 255, 0.13);
  --success: #5dd6c8;
  --warning: #efc66b;
  --danger: #ef7484;
  --offline: #707b86;
  --theme-accent-rgb: 108, 174, 255;
  --theme-success-rgb: 93, 214, 200;
  --theme-button-text: #06101b;
}

body:is(.theme-silo,.theme-aurora,.theme-cyber,.theme-ember,.theme-ocean) {
  --tube-bg: var(--bg);
  --tube-surface: var(--surface);
  --tube-surface-2: var(--surface-raised);
  --tube-surface-3: var(--surface-hover);
  --tube-line: var(--border-strong);
  --tube-line-soft: var(--border);
  --tube-text: var(--text-primary);
  --tube-text-2: var(--text-secondary);
  --tube-muted: var(--text-muted);
  --tube-accent: var(--brand);
  --tube-accent-hover: var(--brand-hover);
  --tube-live: var(--danger);
  --tube-success: var(--success);
  --primary: var(--brand);
  --primary-hover: var(--brand-hover);
  --accent: var(--brand);
  --accent-2: var(--success);
  --text: var(--text-primary);
  --text-main: var(--text-primary);
  --muted: var(--text-muted);
  --card: var(--surface);
  --glass: var(--surface);
  --glass-hover: var(--surface-hover);
  --ns-bg-0: var(--bg);
  --ns-bg-1: var(--surface);
  --ns-panel: var(--surface);
  --ns-line: var(--border);
  --ns-line-strong: var(--border-strong);
  --ns-text: var(--text-primary);
  --ns-text-2: var(--text-secondary);
  --ns-muted: var(--text-muted);
  --ns-accent: var(--brand);
  --ns-accent-2: var(--success);
}

body.page-index {
  min-height: 100vh !important;
  color: var(--text-primary) !important;
  background: var(--bg) !important;
  font-family: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

body.page-index .sidebar {
  width: 76px !important;
  flex: 0 0 76px !important;
  background: var(--sidebar) !important;
  border-right: 1px solid var(--border) !important;
}

body.page-index .brand::before {
  color: var(--theme-button-text) !important;
  background: var(--brand) !important;
  box-shadow: none !important;
}

body.page-index nav {
  min-height: calc(100vh - 90px) !important;
  gap: 8px !important;
}

body.page-index .nav-item {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-muted) !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Dashboard home icon comes from the shared rail map below (house), not the default grid. */

body.page-index .nav-item:hover,
body.page-index .nav-item:focus-visible {
  color: var(--text-primary) !important;
  background: var(--surface-hover) !important;
  border-color: var(--border) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.12) !important;
}

body.page-index .nav-item.active {
  color: var(--brand) !important;
  background: var(--brand-muted) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.page-index .nav-item[aria-label]::after {
  content: attr(aria-label) !important;
  position: absolute !important;
  left: 56px !important;
  top: 50% !important;
  z-index: 100 !important;
  height: auto !important;
  min-width: max-content !important;
  padding: 7px 9px !important;
  display: block !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-primary) !important;
  background: var(--surface-active) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  opacity: 0 !important;
  transform: translate(4px, -50%) !important;
  pointer-events: none !important;
  transition: opacity 140ms ease, transform 140ms ease !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28) !important;
}

body.page-index .nav-item[aria-label]:hover::after,
body.page-index .nav-item[aria-label]:focus-visible::after {
  opacity: 1 !important;
  transform: translate(0, -50%) !important;
}

body.page-index .nav-logout-form {
  border-top-color: var(--border) !important;
}

body.page-index .logout-button {
  color: var(--text-secondary) !important;
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

body.page-index .main {
  width: calc(100% - 76px) !important;
  padding: 0 32px 40px !important;
  background: var(--bg) !important;
}

body.page-index .dashboard-header {
  min-height: 76px !important;
  margin: 0 -32px 18px !important;
  padding: 0 32px !important;
  border-bottom: 1px solid var(--border) !important;
  background: var(--bg) !important;
}

body.page-index .page-title {
  font-size: 26px !important;
  font-weight: 650 !important;
  letter-spacing: -0.03em !important;
}

body.page-index .page-subtitle {
  color: var(--text-secondary) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
}

body.page-index :is(.btn-primary,.btn-secondary,.btn-ghost,.action-btn) {
  min-height: 40px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

body.page-index .btn-primary {
  color: var(--theme-button-text) !important;
  background: var(--brand) !important;
  border: 1px solid transparent !important;
}

body.page-index .btn-primary:hover,
body.page-index .btn-primary:focus-visible {
  background: var(--brand-hover) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.16) !important;
}

body.page-index .btn-secondary {
  color: var(--text-primary) !important;
  background: var(--surface-raised) !important;
  border: 1px solid var(--border) !important;
}

body.page-index .btn-secondary:hover,
body.page-index .btn-secondary:focus-visible {
  background: var(--surface-hover) !important;
  border-color: var(--border-strong) !important;
  outline: none !important;
}

body.page-index .btn-ghost {
  color: var(--text-secondary) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
}

body.page-index .btn-ghost:hover,
body.page-index .btn-ghost:focus-visible {
  color: var(--text-primary) !important;
  background: var(--surface-hover) !important;
  outline: none !important;
}

body.page-index .btn-secondary.danger {
  color: #ffd5d5 !important;
  border-color: rgba(239, 116, 116, 0.28) !important;
  background: rgba(239, 116, 116, 0.08) !important;
}

body.page-index :is(.btn-primary,.btn-secondary,.btn-ghost,button,select):disabled,
body.page-index :is(.btn-primary,.btn-secondary,.btn-ghost,button,select)[aria-disabled="true"] {
  opacity: 0.48 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

body.page-index .dashboard-search-button kbd {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  background: var(--surface);
  font: inherit;
  font-size: 11px;
}

body.page-index .dashboard-statusline {
  margin: 0 0 18px !important;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

body.page-index .statusline-items {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

body.page-index .statusline-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 560;
}

body.page-index .status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: var(--offline);
}

body.page-index .status-ready .status-dot,
body.page-index .status-dot.status-ready {
  background: var(--success);
}

body.page-index .status-recording .status-dot,
body.page-index .status-dot.status-recording {
  background: var(--danger);
  animation: dashboard-live-pulse 1.8s ease-in-out infinite;
}

body.page-index .storage-warning {
  color: var(--warning);
}

body.page-index .storage-critical {
  color: var(--danger);
}

body.page-index .theme-picker {
  min-height: 32px !important;
  padding: 3px 4px 3px 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  background: var(--surface) !important;
}

body.page-index .theme-picker-label {
  color: var(--text-secondary) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

body.page-index .theme-swatches {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

body.page-index .theme-picker .theme-swatch {
  --swatch-a: var(--brand);
  --swatch-b: var(--success);
  --swatch-c: var(--surface-active);
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 7px !important;
  background:
    radial-gradient(circle at 75% 25%, var(--swatch-c) 0 18%, transparent 19%),
    linear-gradient(135deg, var(--swatch-a), var(--swatch-b)) !important;
  box-shadow: none !important;
}

body.page-index .theme-picker .swatch-silo {
  --swatch-a: #d8eb72;
  --swatch-b: #65d59a;
  --swatch-c: #202329;
}

body.page-index .theme-picker .swatch-aurora {
  --swatch-a: #78e8c6;
  --swatch-b: #a8e76e;
  --swatch-c: #20332f;
}

body.page-index .theme-picker .swatch-cyber {
  --swatch-a: #a895ff;
  --swatch-b: #6fd4e7;
  --swatch-c: #29263d;
}

body.page-index .theme-picker .swatch-ember {
  --swatch-a: #f0b86e;
  --swatch-b: #f07b70;
  --swatch-c: #32241c;
}

body.page-index .theme-picker .swatch-ocean {
  --swatch-a: #6caeff;
  --swatch-b: #5dd6c8;
  --swatch-c: #21364d;
}

body.page-index .theme-picker .theme-swatch span {
  display: none !important;
}

body.page-index .theme-picker .theme-swatch:hover,
body.page-index .theme-picker .theme-swatch:focus-visible,
body.page-index .theme-picker .theme-swatch.active {
  border-color: var(--text-primary) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(var(--theme-accent-rgb), 0.28) !important;
}

body.page-index .dashboard-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: var(--surface);
  font-size: 13px;
}

body.page-index .dashboard-alert.info {
  border-color: rgba(var(--theme-accent-rgb), 0.24);
  background: var(--brand-muted);
}

body.page-index .dashboard-alert.danger {
  border-color: rgba(239, 116, 116, 0.34);
  background: rgba(239, 116, 116, 0.09);
}

body.page-index .dashboard-main-grid {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 16px;
}

body.page-index .panel,
body.page-index .overview-section {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

body.page-index .live-watch-panel {
  padding: 20px !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.page-index .live-watch-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.page-index .live-watch-head h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

body.page-index .live-watch-head p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

body.page-index .live-watch-browse {
  flex-shrink: 0;
  white-space: nowrap;
}

body.page-index .live-watch-panel .live-input-group {
  display: flex;
  gap: 8px;
  margin-top: 0 !important;
}

body.page-index .live-watch-panel .live-input-group input {
  flex: 1;
  min-width: 0;
  height: 42px;
  background: rgba(0,0,0,0.28);
  border: 1px solid var(--border);
  color: var(--text-primary, #fff);
  padding: 10px 12px;
  border-radius: 8px;
  outline: none;
}

body.page-index .live-watch-panel .live-input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

body.page-index .live-watch-panel .live-input-group button {
  flex-shrink: 0;
  width: 44px;
  height: 42px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,92,102,.95), rgba(220,50,60,.95));
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.page-index .live-watch-panel .live-input-group button:hover {
  filter: brightness(1.06);
}

body.page-index .live-watch-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-index .live-watch-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,92,102,.35);
  background: rgba(255,92,102,.12);
  color: #fecaca;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}

body.page-index .live-watch-chip:hover {
  border-color: rgba(255,92,102,.55);
  background: rgba(255,92,102,.2);
}

body.page-index .live-watch-chip.watching {
  border-color: rgba(245,158,11,.4);
  background: rgba(245,158,11,.12);
  color: #fcd34d;
}

body.page-index .storage-panel {
  padding: 20px !important;
}

body.page-index .panel-kicker {
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.08em;
}

body.page-index .storage-head h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 32px;
  font-weight: 680;
  letter-spacing: -0.03em;
}

body.page-index .storage-head p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
}

body.page-index .storage-meta {
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

body.page-index .storage-meta div {
  min-width: 0;
}

body.page-index dt {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

body.page-index dd {
  margin: 3px 0 0;
  color: var(--text-primary);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.page-index :is(input, select, textarea) {
  min-height: 40px !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--text-primary) !important;
  background: var(--surface-raised) !important;
}

body.page-index :is(input, select, textarea):focus {
  border-color: rgba(var(--theme-accent-rgb), 0.58) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.12) !important;
}

body.page-index .storage-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-active);
}

body.page-index .storage-progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 180ms ease;
}

body.page-index .storage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body.page-index .storage-state {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: var(--surface-raised);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

body.page-index .storage-progress {
  margin-top: 22px;
  height: 10px;
}

body.page-index .storage-warning .storage-progress-fill {
  background: var(--warning);
}

body.page-index .storage-critical .storage-progress-fill {
  background: var(--danger);
}

body.page-index .storage-meta {
  margin-top: 18px;
}

body.page-index .overview-section {
  overflow: visible !important;
}

body.page-index .section-head {
  min-height: 68px !important;
  padding: 18px 20px !important;
  border-bottom: 1px solid var(--border) !important;
}

body.page-index .section-head h2 {
  margin: 0 !important;
  color: var(--text-primary) !important;
  font-size: 17px !important;
  font-weight: 620 !important;
  letter-spacing: -0.015em !important;
}

body.page-index .section-head p {
  margin: 4px 0 0 !important;
  color: var(--text-secondary) !important;
  font-size: 13px !important;
}

body.page-index .streamer-list {
  display: block;
}

body.page-index .streamer-row {
  position: relative;
  min-height: 76px;
  padding: 14px 20px;
  display: grid !important;
  grid-template-columns: minmax(260px, 1.4fr) minmax(110px, 0.45fr) minmax(160px, 0.6fr) auto;
  align-items: center;
  gap: 16px;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color 140ms ease;
}

body.page-index .streamer-row:last-child {
  border-bottom: 0 !important;
}

body.page-index .streamer-row:hover,
body.page-index .streamer-row:focus-visible {
  background: var(--surface-hover) !important;
  outline: none;
}

body.page-index .streamer-row:has(.streamer-menu[open]) {
  z-index: 80;
  background: var(--surface-hover) !important;
}

body.page-index .streamer-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

body.page-index .avatar {
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px !important;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  color: var(--text-primary) !important;
  background: var(--surface-raised) !important;
}

body.page-index .avatar.recording,
body.page-index .avatar.online {
  background: var(--surface-active) !important;
}

body.page-index .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.page-index .streamer-name {
  margin: 0 0 5px !important;
  color: var(--text-primary) !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  letter-spacing: -0.01em !important;
}

body.page-index .status-badge {
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  border: 0 !important;
  border-radius: 0 !important;
  color: var(--text-secondary) !important;
  background: transparent !important;
  font-size: 12px !important;
  font-weight: 560 !important;
}

body.page-index .status-badge .status-dot {
  width: 7px;
  height: 7px;
  flex-basis: 7px;
  background: var(--offline);
}

body.page-index .status-badge.live {
  color: var(--danger) !important;
}

body.page-index .status-badge.live .status-dot {
  background: var(--danger);
}

body.page-index .status-badge.online {
  color: var(--success) !important;
}

body.page-index .status-badge.online .status-dot {
  background: var(--success);
}

body.page-index .streamer-cell span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

body.page-index .streamer-cell strong {
  margin-top: 4px;
  display: block;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 620;
}

body.page-index .streamer-cell.wide strong {
  color: var(--text-secondary);
}

body.page-index .streamer-actions {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

body.page-index .streamer-actions .action-btn.primary {
  min-width: 112px;
}

body.page-index .streamer-menu {
  position: relative;
  z-index: 90;
}

body.page-index .streamer-menu summary {
  width: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  list-style: none;
}

body.page-index .streamer-menu summary::-webkit-details-marker {
  display: none;
}

body.page-index .streamer-menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 100;
  min-width: 176px;
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--surface-active);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

body.page-index .streamer-menu-popover a,
body.page-index .streamer-menu-popover button {
  width: 100% !important;
  min-height: 34px !important;
  padding: 0 9px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  border: 0 !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-secondary) !important;
  background: transparent !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  cursor: pointer;
}

body.page-index .streamer-menu-popover a:hover,
body.page-index .streamer-menu-popover button:hover,
body.page-index .streamer-menu-popover a:focus-visible,
body.page-index .streamer-menu-popover button:focus-visible {
  color: var(--text-primary) !important;
  background: var(--surface-hover) !important;
  outline: none !important;
}

body.page-index .streamer-menu-popover form {
  margin: 0;
}

body.page-index .dashboard-empty {
  padding: 36px 20px !important;
  text-align: center;
  color: var(--text-secondary) !important;
}

body.page-index .dashboard-empty h3 {
  margin: 0 0 8px;
  color: var(--text-primary);
  font-size: 18px;
}

body.page-index .dashboard-empty p {
  margin: 0 0 18px;
}

@keyframes dashboard-live-pulse {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body.page-index * {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 1000px) {
  body.page-index .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  body.page-index .streamer-row {
    grid-template-columns: minmax(220px, 1fr) minmax(100px, auto) auto;
  }

  body.page-index .streamer-cell.wide {
    display: none;
  }
}

@media (max-width: 720px) {
  body.page-index {
    display: block !important;
  }

  body.page-index .sidebar {
    position: sticky !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 64px !important;
    padding: 0 12px !important;
    border-right: 0 !important;
    border-bottom: 1px solid var(--border) !important;
  }

  body.page-index .brand {
    display: none !important;
  }

  body.page-index nav {
    min-height: 64px !important;
    padding: 0 !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
  }

  body.page-index .nav-logout-form {
    width: auto !important;
    margin-left: auto !important;
    padding-top: 0 !important;
    border-top: 0 !important;
  }

  body.page-index .nav-item[aria-label]::after {
    display: none !important;
  }

  body.page-index .main {
    width: 100% !important;
    padding: 0 16px 28px !important;
  }

  body.page-index .dashboard-header {
    min-height: auto !important;
    margin: 0 -16px 16px !important;
    padding: 14px 16px !important;
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  body.page-index .dashboard-header-actions {
    width: 100% !important;
    display: flex !important;
  }

  body.page-index .dashboard-search-button {
    flex: 1;
  }

  body.page-index .dashboard-statusline {
    align-items: flex-start;
  }

  body.page-index .statusline-tools,
  body.page-index .theme-picker {
    width: 100%;
  }

  body.page-index .theme-picker {
    justify-content: space-between;
  }

  body.page-index .streamer-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  body.page-index .streamer-cell {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
  }

  body.page-index .streamer-cell span,
  body.page-index .streamer-cell strong {
    margin: 0;
  }

  body.page-index .streamer-actions {
    justify-content: space-between;
  }

  body.page-index .streamer-menu-popover {
    top: auto;
    bottom: calc(100% + 8px);
  }
}

/* === Tube audit 20260720 — brand + multi-source === */
:root {
  --ns-purple: var(--tube-accent, #f2e58d) !important;
  --ns-purple-2: var(--tube-accent-hover, #fff3a9) !important;
  --radius: 10px;
  --radius-card: 10px;
}

body.page-mobile-index .header,
body.page-mobile-streamer .header,
body.page-mobile-player .header {
  letter-spacing: 0.01em;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  border: 1px solid color-mix(in srgb, var(--tube-accent, #f2e58d) 45%, transparent);
  background: color-mix(in srgb, var(--tube-accent, #f2e58d) 16%, transparent);
  color: var(--tube-accent, #f2e58d);
  text-transform: uppercase;
}

.platform-badge.platform-youtube {
  border-color: color-mix(in srgb, #ff6b6b 50%, transparent);
  background: color-mix(in srgb, #ff6b6b 14%, transparent);
  color: #ffb4b4;
}

.platform-badge.platform-twitch {
  border-color: color-mix(in srgb, var(--tube-accent, #f2e58d) 45%, transparent);
  background: color-mix(in srgb, var(--tube-accent, #f2e58d) 16%, transparent);
  color: var(--tube-accent, #f2e58d);
}

.source-chip,
.source-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.source-chip-row {
  margin-top: 4px;
}

.source-external-link {
  color: var(--tube-accent, #f2e58d);
  font-size: 13px;
  text-decoration: none;
}

.source-external-link:hover {
  color: var(--tube-accent-hover, #fff3a9);
  text-decoration: underline;
}

.archive-sources-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.archive-sources-label {
  margin-bottom: 8px;
}

.archive-sources-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.archive-source-row {
  gap: 10px;
}

.archive-source-name {
  font-size: 13px;
}

.source-record-toggle {
  padding: 4px 10px;
  font-size: 12px;
}

.source-record-toggle.is-on {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

.source-record-toggle.is-off {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

.btn-empty-folder {
  background: color-mix(in srgb, var(--tube-accent, #f2e58d) 18%, transparent);
  color: var(--tube-accent, #f2e58d);
}

.channel-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}

.channel-group-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #a1a1aa);
  margin-bottom: 8px;
}

.channel-chip.source-chip {
  gap: 8px;
}

.channel-chip-archive {
  opacity: 0.7;
  font-weight: 500;
  font-size: 12px;
}

.recording-now-strip {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card, 10px);
  background: color-mix(in srgb, var(--panel, #18181b) 92%, var(--tube-accent, #f2e58d));
}

.recording-now-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.recording-now-head span,
.continue-watching-shelf .section-head p {
  color: var(--muted, #a1a1aa);
  font-size: 13px;
}

.recording-now-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.recording-now-item {
  min-width: 180px;
  max-width: 260px;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  text-decoration: none;
}

.recording-now-item:hover {
  border-color: color-mix(in srgb, var(--tube-accent, #f2e58d) 55%, transparent);
}

.recording-now-status {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--tube-accent, #f2e58d);
}

.recording-now-item.status-recording .recording-now-status,
.recording-now-item.status-starting .recording-now-status {
  color: #f87171;
}

.recording-now-name {
  font-weight: 700;
}

.recording-now-meta,
.recording-now-viewers {
  font-size: 12px;
  color: var(--muted, #a1a1aa);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continue-watching-shelf {
  margin: 0 0 22px;
}

.continue-watching-shelf[hidden] {
  display: none !important;
}

.continue-watching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.continue-watching-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: var(--radius-card, 10px);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.18);
  color: inherit;
  text-decoration: none;
}

.continue-watching-card:hover {
  border-color: color-mix(in srgb, var(--tube-accent, #f2e58d) 50%, transparent);
}

.continue-watching-title {
  font-weight: 650;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.continue-watching-meta {
  font-size: 12px;
  color: var(--muted, #a1a1aa);
}

.vod-card .thumb-wrap,
.video-card .thumb-wrap {
  position: relative;
}

.vod-card .platform-badge,
.video-card .thumb-wrap .platform-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
}

.mobile-archive-sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid var(--border, #27272a);
}

.vod-filename-meta {
  margin-top: 4px;
  font-size: 12px;
}

.vod-description,
.mobile-vod-description {
  margin-top: 10px;
  max-width: 72ch;
  color: var(--text-muted, #cfcfcf);
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.vod-admin-meta {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
}
.vod-admin-meta-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #f5f5f5;
}
.vod-admin-meta-form,
.vod-admin-rename-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.vod-admin-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted, #a1a1aa);
}
.vod-admin-field input,
.vod-admin-field textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: #f5f5f5;
  padding: 10px 12px;
  font: inherit;
}
.vod-admin-field textarea {
  resize: vertical;
  min-height: 96px;
}
.mobile-vod-admin {
  margin: 0 12px 16px;
}

/* Chat-jump lane removed from VOD player (was overlaying the video). */
.chat-jump-lane,
.chat-jump-track,
.chat-jump-mark,
.chat-jump-legend {
  display: none !important;
}

/* Chat-Jump + related recordings (feature styles) */
.related-recordings {
  margin: 16px 0 8px;
  padding: 14px 16px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
  background: var(--surface, rgba(255, 255, 255, 0.03));
}
.related-recordings-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.related-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted, #9a9488);
}
.related-recordings-head strong {
  font-size: 18px;
  font-weight: 700;
}
.related-recordings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.related-recording-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: rgba(0, 0, 0, 0.18);
  text-decoration: none;
  color: inherit;
}
.related-recording-card:hover {
  border-color: var(--tube-accent, var(--accent, #c8f53a));
}



/* ===== Twitch Live Hub + Embed Watch (NachtSilo Tube) ===== */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.btn-live-watch{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:40px;
  padding:8px 14px;
  border-radius:10px;
  border:1px solid rgba(255,92,102,.45);
  background: linear-gradient(180deg, rgba(255,92,102,.95), rgba(220,50,60,.95));
  color:#fff !important;
  font-weight:800;
  font-size:12px;
  letter-spacing:.04em;
  text-transform:uppercase;
  text-decoration:none;
  white-space:nowrap;
  box-shadow:0 8px 20px rgba(255,92,102,.18);
}
.btn-live-watch:hover{ filter:brightness(1.05); }
.btn-live-watch:focus-visible{ outline:2px solid var(--tube-accent, #f2e58d); outline-offset:2px; }

body.page-twitch-live,
body.page-twitch-watch{
  --twitch-gap: 16px;
  background: var(--tube-bg, var(--bg, #0b0b0f));
  color: var(--tube-text, var(--ink, #f4f4f5));
  min-height:100vh;
  display:flex;
}
body.page-twitch-live .main,
body.page-twitch-watch .main{
  flex:1;
  min-width:0;
  padding:20px 22px 32px;
}
body.page-twitch-live .twitch-live-header,
body.page-twitch-watch .twitch-watch-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:18px;
  flex-wrap:wrap;
}
body.page-twitch-live .page-subtitle{ color:var(--tube-muted, var(--muted, #a1a1aa)); margin:4px 0 0; }
body.page-twitch-live .twitch-live-search{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  min-width:min(100%, 420px);
}
body.page-twitch-live .twitch-live-search input,
body.page-twitch-live .twitch-category-search input{
  flex:1;
  min-width:180px;
  min-height:42px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(0,0,0,.28);
  color:inherit;
  outline:none;
}
body.page-twitch-live .twitch-live-search input:focus,
body.page-twitch-live .twitch-category-search input:focus{
  border-color: var(--tube-accent, #f2e58d);
  box-shadow:0 0 0 2px rgba(242,229,141,.18);
}
body.page-twitch-live .twitch-banner{
  padding:12px 14px;
  border-radius:10px;
  margin-bottom:16px;
  font-size:13px;
  line-height:1.45;
}
body.page-twitch-live .twitch-banner.warn,
body.page-twitch-live .twitch-status.warn{
  background:rgba(245,158,11,.12);
  border:1px solid rgba(245,158,11,.35);
  color:#fbbf24;
}
body.page-twitch-live .twitch-status{
  margin-bottom:12px;
  font-size:13px;
  color:var(--tube-muted, #a1a1aa);
}
body.page-twitch-live .twitch-status.error{ color:#f87171; }
body.page-twitch-live .twitch-section{ margin-bottom:28px; }
body.page-twitch-live .twitch-section-head,
body.page-twitch-watch .twitch-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
  flex-wrap:wrap;
}
body.page-twitch-live .twitch-section-head h2,
body.page-twitch-watch .twitch-section-head h3{
  margin:0;
  font-size:18px;
}
body.page-twitch-live .twitch-section-meta{ color:var(--tube-muted, #a1a1aa); font-size:13px; }
body.page-twitch-live .twitch-chip-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
body.page-twitch-live .twitch-chip{
  min-height:34px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:inherit;
  cursor:pointer;
  font-size:12px;
  font-weight:600;
}
body.page-twitch-live .twitch-chip.active,
body.page-twitch-live .twitch-chip:hover{
  border-color: rgba(242,229,141,.45);
  background: rgba(242,229,141,.12);
  color: var(--tube-accent, #f2e58d);
}
body.page-twitch-live .twitch-category-search{ margin-bottom:12px; }
body.page-twitch-live .twitch-stream-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap:14px;
}
body.page-twitch-live .twitch-stream-card{
  display:flex;
  flex-direction:column;
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color:inherit;
  text-decoration:none;
  min-width:0;
  transition: border-color .15s ease, transform .15s ease;
}
body.page-twitch-live .twitch-stream-card:hover,
body.page-twitch-live .twitch-stream-card:focus-visible{
  border-color: rgba(255,92,102,.45);
  transform: translateY(-1px);
  outline:none;
}
body.page-twitch-live .twitch-thumb-wrap{
  position:relative;
  aspect-ratio:16/9;
  background:#000;
  overflow:hidden;
}
body.page-twitch-live .twitch-thumb-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
body.page-twitch-live .twitch-thumb-offline{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#71717a;
  font-size:13px;
  background:linear-gradient(180deg, #18181b, #0e0e10);
}
body.page-twitch-live .twitch-live-pill,
body.page-twitch-watch .twitch-live-pill{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:6px;
  background: var(--tube-live, #ff5c66);
  color:#fff;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
}
body.page-twitch-live .twitch-thumb-wrap .twitch-live-pill{
  position:absolute;
  top:8px;
  left:8px;
}
body.page-twitch-live .twitch-viewers{
  position:absolute;
  left:8px;
  bottom:8px;
  padding:3px 7px;
  border-radius:6px;
  background:rgba(0,0,0,.72);
  color:#fff;
  font-size:11px;
  font-weight:600;
}
body.page-twitch-live .twitch-card-body{
  display:grid;
  gap:4px;
  padding:10px 12px 12px;
  min-width:0;
}
body.page-twitch-live .twitch-card-title{
  font-size:14px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.page-twitch-live .twitch-card-meta,
body.page-twitch-live .twitch-card-game{
  font-size:12px;
  color:var(--tube-muted, #a1a1aa);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.page-twitch-live .twitch-empty,
body.page-twitch-watch .twitch-empty{
  padding:22px;
  border:1px dashed rgba(255,255,255,.12);
  border-radius:10px;
  color:var(--tube-muted, #a1a1aa);
  text-align:center;
  grid-column:1 / -1;
}
body.page-twitch-watch .twitch-empty.compact{ padding:12px; }

/* Watch layout */
body.page-twitch-watch .twitch-watch-heading{
  display:flex;
  align-items:flex-start;
  gap:14px;
  min-width:0;
}
body.page-twitch-watch .twitch-watch-kicker{
  display:flex;
  gap:8px;
  align-items:center;
  margin-bottom:4px;
  flex-wrap:wrap;
}
body.page-twitch-watch .twitch-offline-pill,
body.page-twitch-watch .twitch-monitored-pill{
  display:inline-flex;
  padding:3px 8px;
  border-radius:6px;
  font-size:11px;
  font-weight:700;
}
body.page-twitch-watch .twitch-offline-pill{
  background:rgba(255,255,255,.08);
  color:#a1a1aa;
}
body.page-twitch-watch .twitch-monitored-pill{
  background:rgba(242,229,141,.12);
  color:var(--tube-accent, #f2e58d);
}
body.page-twitch-watch .twitch-watch-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
body.page-twitch-watch .twitch-watch-layout{
  display:grid;
  gap:16px;
  align-items:start;
}
body.page-twitch-watch .twitch-watch-layout.chat-open{
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
}
body.page-twitch-watch .twitch-watch-layout.chat-closed{
  grid-template-columns: minmax(0, 1fr);
}
body.page-twitch-watch .twitch-player-shell{
  width:100%;
  max-width: min(100%, 1600px);
  margin:0 auto;
}
body.page-twitch-watch .twitch-player-frame{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  max-height:min(72vh, 900px);
  background:#000;
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  flex:0 0 auto;
}
body.page-twitch-watch .twitch-player-frame iframe,
body.page-twitch-watch .twitch-proxy-video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  background:#000;
  object-fit:contain;
}
body.page-twitch-watch .twitch-embed-wrapper{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  max-height:min(72vh, 900px);
  background:#000;
  border-radius:10px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  flex:0 0 auto;
}
body.page-twitch-watch .twitch-proxy-wait{
  position:absolute;
  inset:0;
  display:none;
  place-items:center;
  padding:24px;
  background:#050505;
  z-index:2;
}
body.page-twitch-watch .twitch-proxy-wait.is-visible{
  display:grid;
}
body.page-twitch-watch .twitch-proxy-status{
  margin:0;
  font-size:12px;
  color:#7a7a7a;
  font-family:"IBM Plex Mono", ui-monospace, monospace;
}
body.page-twitch-watch .twitch-proxy-wait-card{
  max-width:420px;
  text-align:center;
  display:grid;
  gap:8px;
  color:#f5f5f5;
}
body.page-twitch-watch .twitch-proxy-wait-card strong{
  font-size:16px;
}
body.page-twitch-watch .twitch-proxy-wait-card p{
  margin:0;
  color:#a1a1aa;
  font-size:14px;
  line-height:1.45;
}
/* Mobile live/VOD meta bar under the player */
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details{
  flex:0 0 auto;
  padding:10px 12px 12px;
  background:#0e0e10;
  border-bottom:1px solid #27272a;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-details-main{
  margin-bottom:8px;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-kicker{
  margin-bottom:4px;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-display-title{
  margin:0;
  font-size:16px;
  font-weight:700;
  line-height:1.25;
  letter-spacing:-0.01em;
  color:#f5f5f5;
  overflow-wrap:anywhere;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .mobile-vod-stream-title{
  margin:4px 0 0;
  font-size:12px;
  font-weight:500;
  line-height:1.35;
  color:#a1a1aa;
  overflow-wrap:anywhere;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-details-side{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px 12px;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-facts{
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px 16px;
  min-width:0;
  flex:1 1 auto;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-facts div{
  display:flex;
  flex-direction:row;
  align-items:baseline;
  gap:6px;
  min-width:0;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-facts dt{
  margin:0;
  font-size:10px;
  font-weight:800;
  letter-spacing:0.06em;
  text-transform:uppercase;
  color:#8f8f8f;
  flex:0 0 auto;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-facts dd{
  margin:0;
  font-size:13px;
  font-weight:700;
  color:#d4d4d8;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  min-width:0;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-file-actions{
  display:flex;
  flex:0 0 auto;
  gap:6px;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-inline-tool,
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .ns-cast-trigger{
  min-height:34px;
  padding:0 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #2e2e2e;
  border-radius:8px;
  color:#cfcfcf;
  background:#1a1a1a;
  font-size:12px;
  font-weight:700;
  letter-spacing:0.01em;
  line-height:1;
  cursor:pointer;
  box-shadow:none;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .vod-inline-tool:focus-visible,
body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details .ns-cast-trigger:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(242, 229, 141, 0.28);
}
/* Prefer the details cast trigger; hide the auto-injected overlay duplicate */
body:is(.page-twitch-watch-mobile, .page-mobile-player) .video-container > .ns-cast-btn,
body:is(.page-twitch-watch-mobile, .page-mobile-player) .twitch-mobile-player-frame .ns-cast-btn{
  display:none !important;
}
body:is(.page-twitch-watch-mobile, .page-mobile-player) .twitch-live-pill{
  font-size:10px;
  padding:2px 7px;
}
body.page-twitch-watch-mobile .chat-container{
  flex:1 1 auto;
  min-height:0;
}
body.page-twitch-watch-mobile .chat-list{
  padding:8px 12px 24px;
}
body.page-twitch-watch-mobile .chat-line{
  display:grid;
  grid-template-columns:36px minmax(0, 1fr);
  gap:6px;
  align-items:baseline;
  margin-bottom:6px;
}
body.page-twitch-watch-mobile .chat-text{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}

body.page-twitch-watch-mobile .twitch-mobile-player-frame{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  background:#000;
}
body.page-twitch-watch-mobile .twitch-proxy-video,
body.page-twitch-watch-mobile .twitch-proxy-wait{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
}
body.page-twitch-watch-mobile .twitch-proxy-wait{
  display:none;
  place-items:center;
  padding:16px;
  background:#050505;
  z-index:2;
}
body.page-twitch-watch-mobile .twitch-proxy-wait.is-visible{
  display:grid;
}
body.page-twitch-watch .twitch-watch-meta{
  margin-top:12px;
  display:grid;
  gap:10px;
}
body.page-twitch-watch .twitch-watch-meta h2{
  margin:0;
  font-size:18px;
  line-height:1.35;
  word-break:break-word;
}
body.page-twitch-watch .twitch-watch-meta-row{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  color:var(--tube-muted, #a1a1aa);
  font-size:13px;
}
body.page-twitch-watch .twitch-offline-banner{
  padding:12px 14px;
  border-radius:10px;
  background:rgba(255,92,102,.1);
  border:1px solid rgba(255,92,102,.28);
  color:#fecaca;
  font-size:13px;
}
body.page-twitch-watch .twitch-switcher{ margin-top:18px; }
body.page-twitch-watch .twitch-switcher-list{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding-bottom:4px;
  -webkit-overflow-scrolling:touch;
}
body.page-twitch-watch .twitch-switcher-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.03);
  color:inherit;
  text-decoration:none;
  white-space:nowrap;
  flex:0 0 auto;
}
body.page-twitch-watch .twitch-switcher-item.active,
body.page-twitch-watch .twitch-switcher-item:hover{
  border-color: rgba(255,92,102,.4);
}
body.page-twitch-watch .twitch-live-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--tube-live, #ff5c66);
}
body.page-twitch-watch .twitch-switcher-viewers{
  color:var(--tube-muted, #a1a1aa);
  font-size:12px;
}
body.page-twitch-watch .twitch-chat-shell{
  border-radius:10px;
  border:1px solid rgba(255,255,255,.08);
  background:#0e0e10;
  overflow:hidden;
  min-height:420px;
  display:flex;
  flex-direction:column;
  max-height: min(72vh, 900px);
}
body.page-twitch-watch .twitch-chat-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-size:13px;
  font-weight:700;
}
body.page-twitch-watch .twitch-chat-shell iframe{
  flex:1;
  width:100%;
  border:0;
  min-height:360px;
  background:#0e0e10;
}

@media (max-width: 1100px){
  body.page-twitch-watch .twitch-watch-layout.chat-open{
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  }
}
@media (max-width: 900px){
  body.page-twitch-live,
  body.page-twitch-watch{
    flex-direction:column;
  }
  body.page-twitch-live .sidebar,
  body.page-twitch-watch .sidebar{
    width:100%;
  }
  body.page-twitch-live .main,
  body.page-twitch-watch .main{
    padding:14px 12px 88px;
  }
  body.page-twitch-live .twitch-stream-grid{
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap:10px;
  }
  body.page-twitch-watch .twitch-watch-layout.chat-open,
  body.page-twitch-watch .twitch-watch-layout.chat-closed{
    grid-template-columns:1fr;
  }
  body.page-twitch-watch .twitch-player-frame{
    max-height:none;
    border-radius:8px;
  }
  body.page-twitch-watch .twitch-chat-shell{
    max-height:none;
    min-height:320px;
  }
  body.page-twitch-watch .twitch-watch-actions .btn-ghost{ min-height:40px; }
}
@media (max-width: 560px){
  body.page-twitch-live .twitch-stream-grid{
    grid-template-columns:1fr 1fr;
  }
  body.page-index .streamer-actions{
    flex-wrap:wrap;
  }
  body.page-index .btn-live-watch{
    width:100%;
  }
}
@media (min-width: 1800px){
  body.page-twitch-watch .twitch-player-shell{
    max-width: min(100%, 1800px);
  }
  body.page-twitch-watch .twitch-player-frame{
    max-height: min(78vh, 980px);
  }
}
@media (orientation: landscape) and (max-height: 500px){
  body.page-twitch-watch .twitch-watch-header{ margin-bottom:8px; }
  body.page-twitch-watch .twitch-player-frame{
    max-height:58vh;
  }
  body.page-twitch-watch .vod-details{ padding:6px 10px !important; }
  body.page-twitch-watch .twitch-switcher{ display:block !important; }
}

/* ===== Twitch Watch aligned with VOD / mobile player ===== */
body.page-twitch-watch.page-vod .twitch-embed-wrapper{
  position:relative;
  width:100%;
  aspect-ratio:16/9;
  max-height:min(72vh, 900px);
  background:#000;
  border-radius:12px;
  overflow:hidden;
  flex:0 0 auto;
}
body.page-twitch-watch.page-vod .twitch-embed-wrapper iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  display:block;
}
body.page-twitch-watch .twitch-live-pill{
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:6px;
  background:var(--tube-live, #ff5c66);
  color:#fff;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  margin-right:6px;
}
body.page-twitch-watch .twitch-offline-pill,
body.page-twitch-watch .twitch-monitored-pill{
  display:inline-flex;
  padding:3px 8px;
  border-radius:6px;
  font-size:11px;
  font-weight:700;
  margin-right:6px;
}
body.page-twitch-watch .twitch-offline-pill{ background:rgba(255,255,255,.08); color:#a1a1aa; }
body.page-twitch-watch .twitch-monitored-pill{ background:rgba(242,229,141,.12); color:var(--tube-accent, #f2e58d); }
body.page-twitch-watch .twitch-offline-banner{
  padding:12px 14px;
  border-radius:10px;
  background:rgba(255,92,102,.1);
  border:1px solid rgba(255,92,102,.28);
  color:#fecaca;
  font-size:13px;
}
body.page-twitch-watch .twitch-chat-empty{
  padding:14px 16px;
  color:var(--text-muted, #a1a1aa);
  font-size:13px;
}
body.page-twitch-watch .twitch-chat-empty.compact{ padding:8px 10px; font-size:12px; }
body.page-twitch-watch .twitch-switcher{ margin-top:4px; }
body.page-twitch-watch .twitch-switcher-list{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding-bottom:4px;
  -webkit-overflow-scrolling:touch;
}
body.page-twitch-watch .twitch-switcher-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:40px;
  padding:8px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.03);
  color:inherit;
  text-decoration:none;
  white-space:nowrap;
  flex:0 0 auto;
}
body.page-twitch-watch .twitch-switcher-item.active,
body.page-twitch-watch .twitch-switcher-item:hover{ border-color:rgba(255,92,102,.4); }
body.page-twitch-watch .twitch-live-dot{
  width:8px; height:8px; border-radius:50%; background:var(--tube-live, #ff5c66);
}
body.page-twitch-watch .twitch-switcher-viewers{ color:var(--text-muted, #a1a1aa); font-size:12px; }
body.page-twitch-watch .twitch-section-head h3{ margin:0 0 8px; font-size:14px; }

/* Mobile watch = same shell as VOD mobile player */
body.page-twitch-watch-mobile.page-mobile-player .twitch-mobile-player-frame{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  background:#000;
}
body.page-twitch-watch-mobile.page-mobile-player .twitch-mobile-player-frame iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
}
body.page-twitch-watch-mobile .overlay-header-meta{
  pointer-events:none;
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex:1 1 auto;
  margin:0 10px;
}
body.page-twitch-watch-mobile .overlay-stream-name{
  color:#fff;
  font-size:14px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-shadow:0 1px 3px rgba(0,0,0,0.85);
}

body.page-twitch-watch-mobile .chat-toggle{
  background:transparent;
  border:1px solid rgba(255,255,255,.15);
  color:#ccc;
  border-radius:6px;
  padding:4px 8px;
  font-size:11px;
  min-height:32px;
}
/* chat-line grid defined with mobile-vod-details block above */
body.page-twitch-watch-mobile .chat-time{ color:#555; font-size:10px; }
body.page-twitch-watch-mobile .chat-user{ font-weight:700; margin-right:4px; }
body.page-twitch-watch-mobile .chat-msg{ color:#efeff1; }
body.page-twitch-watch-mobile .overlay-header .twitch-live-pill{
  font-size:9px;
  padding:2px 6px;
  vertical-align:middle;
}
body.page-twitch-watch-mobile .mobile-vod-meta{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
  margin-top:2px;
  color:rgba(255,255,255,0.62);
  font-size:10px;
  font-weight:700;
  text-shadow:0 1px 2px black;
}
body.page-twitch-watch-mobile .twitch-mode-link,
body.page-twitch-watch .twitch-mode-link{
  color:#9ad0ff;
  text-decoration:none;
  font-weight:700;
}
body.page-twitch-watch-mobile .twitch-mode-link:hover,
body.page-twitch-watch .twitch-mode-link:hover{
  text-decoration:underline;
}
body.page-twitch-watch-mobile .chat-actions,
body.page-twitch-watch-mobile .twitch-mobile-chat-head{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:4px;
  flex-wrap:wrap;
}

body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-emote,
body:is(.page-vod,.page-live,.page-mobile-player,.page-twitch-live,
  .page-twitch-watch,.page-twitch-watch-mobile) .chat-badge-img{
  vertical-align:middle;
}

@media (max-width: 900px){
  body.page-twitch-watch.page-vod .sidebar{ display:none; }
  body.page-twitch-watch.page-vod{
    display:block;
    height:auto;
    overflow:auto;
  }
  body.page-twitch-watch.page-vod .content{
    display:flex;
    flex-direction:column;
    padding:0;
    gap:0;
  }
  body.page-twitch-watch.page-vod .twitch-embed-wrapper{
    border-radius:0;
    max-height:none;
  }
  body.page-twitch-watch.page-vod .chat-panel{
    height:min(45vh, 420px);
    border-radius:0;
    border-left:none;
    border-top:1px solid rgba(255,255,255,.08);
  }
  body.page-twitch-watch.page-vod .vod-details{
    padding:12px 14px;
  }
  body.page-twitch-watch.page-vod .twitch-switcher{ display:block !important; }
}
@media (orientation: landscape) and (max-height: 500px){
  body.page-twitch-watch-mobile.page-mobile-player{ flex-direction:row; }
  body:is(.page-twitch-watch-mobile, .page-mobile-player) .mobile-vod-details{ display:none !important; }
}


/* Watch UX only — do not touch player sizing */
body.page-twitch-watch .twitch-offline-pill { display: none !important; }
body.page-twitch-watch .twitch-section-head { display: none !important; }
body.page-twitch-watch .twitch-live-pill[hidden],
body.page-twitch-watch [hidden] { display: none !important; }
body.page-twitch-watch .twitch-watch-stream-title {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--tube-muted, #a1a1aa);
}

/* Live channel tabs: one horizontal row under title/viewers inside details card */
body.page-twitch-watch.page-vod .vod-details {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: flex-start !important;
  align-self: stretch !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  column-gap: 24px !important;
  row-gap: 10px !important;
  padding: 12px 18px !important;
  box-sizing: border-box !important;
}
body.page-twitch-watch.page-vod .vod-details-main,
body.page-twitch-watch.page-vod .vod-details-side {
  grid-row: 1;
}
body.page-twitch-watch .twitch-switcher,
nav.twitch-switcher {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 8px 0 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}
body.page-twitch-watch .twitch-switcher-list {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 2px !important;
}
body.page-twitch-watch .twitch-switcher-item {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  white-space: nowrap !important;
}

/* =========================================================================
   Canonical sidebar nav icons (2026-08-03)
   Must beat `body:is(...) .nav-item { --tube-nav-icon: grid }` specificity.
   ========================================================================= */
body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item[href="/"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 10.8 12 3l9 7.8V21h-6v-6H9v6H3V10.8Z'/%3E%3C/svg%3E") !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item[href="/live"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3Cpath stroke-linecap='round' d='M6.2 8.6a7.2 7.2 0 0 1 11.6 0M3.8 6a10.2 10.2 0 0 1 16.4 0M8.8 18.2h6.4'/%3E%3C/svg%3E") !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item[href*="/channels"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3Ccircle cx='17' cy='9' r='2.5'/%3E%3Cpath stroke-linecap='round' d='M2.5 20c.5-4 2.3-6 5.5-6s5 2 5.5 6M14 19.5c.4-2.8 1.7-4.2 4-4.2 2 0 3.3 1.4 3.7 4.2'/%3E%3C/svg%3E") !important;
}


body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item[href*="/mplus"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m7 4 10 16M17 4 7 20M5 7h14M5 17h14'/%3E%3C/svg%3E") !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item[href*="/files"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Cpath stroke-linejoin='round' d='M3 7a2 2 0 0 1 2-2h5l2 2h7a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z'/%3E%3C/svg%3E") !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item[href*="/admin/chat"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath stroke-linecap='round' d='m15.5 15.5 5 5'/%3E%3C/svg%3E") !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item[href*="/admin/mail"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath stroke-linejoin='round' d='m4 7 8 6 8-6'/%3E%3C/svg%3E") !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item[href*="/admin/discord"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M7 15h10a4 4 0 0 0 0-8H7a4 4 0 0 0 0 8Z'/%3E%3Cpath stroke-linecap='round' d='M8 11h4M10 9v4M16 10.5h.01M18 12.5h.01M8 15l-2 4M16 15l2 4'/%3E%3C/svg%3E") !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .nav-item[href="/admin"] {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 14.5 21 16l-2 3.5-2.4-1a8 8 0 0 1-2.1 1.2L14 22h-4l-.5-2.3a8 8 0 0 1-2.1-1.2l-2.4 1L3 16l2-1.5a8 8 0 0 1 0-2.5L3 10.5 5 7l2.4 1a8 8 0 0 1 2.1-1.2L10 4h4l.5 2.8A8 8 0 0 1 16.6 8L19 7l2 3.5-2 1.5a8 8 0 0 1 0 2.5Z'/%3E%3C/svg%3E") !important;
}

body:is(
  .page-index,
  .page-channels,
  .page-streamer,
  .page-vod,
  .page-live,
  .page-admin,
  .page-mail,
  .page-files,
  .page-search,
  .page-discord-tool,
  .page-mplus,
  .page-twitch-live,
  .page-twitch-watch
) .logout-button {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10 4H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5M14 8l4 4-4 4M18 12H8'/%3E%3C/svg%3E") !important;
}

/* Back-to-library / back-to-live chevron (watch + VOD) */
body:is(.page-vod, .page-twitch-watch) .nav-item.vod-library-nav {
  --tube-nav-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='black' stroke-width='1.9'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='m10 6-6 6 6 6M4 12h16'/%3E%3C/svg%3E") !important;
}

/* Android / Chromium PWA install prompt */
.ns-pwa-install {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 12000;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(11, 16, 24, 0.96);
  color: #f5f7fb;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: none;
}
.ns-pwa-install__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.ns-pwa-install__copy strong {
  font-size: 0.92rem;
  font-weight: 650;
}
.ns-pwa-install__copy span {
  font-size: 0.78rem;
  line-height: 1.35;
  color: #aeb8c8;
}
.ns-pwa-install__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ns-pwa-install__btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #0ea5e9, #2bb3ff);
  color: #041018;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.ns-pwa-install__btn:focus-visible,
.ns-pwa-install__dismiss:focus-visible {
  outline: 2px solid #2bb3ff;
  outline-offset: 2px;
}
.ns-pwa-install__dismiss {
  appearance: none;
  border: 0;
  background: transparent;
  color: #aeb8c8;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.ns-pwa-install__dismiss:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f5f7fb;
}
@media (min-width: 720px) {
  .ns-pwa-install {
    left: auto;
    right: 20px;
    bottom: 20px;
    width: min(420px, calc(100vw - 40px));
  }
}

/* Compact watch info under the player — keep readable stacking, never crush
   into an overlapping single line. Player aspect (100cqw * 9 / 16) stays the
   size budget reference for adjacent chat layouts. */
@media (min-width: 961px) {
  body.page-vod .main-col {
    container-type: inline-size;
  }

  body.page-vod .vod-details {
    min-height: 0 !important;
    max-height: none !important;
    padding: 12px 16px !important;
    gap: 12px 20px !important;
    overflow: visible !important;
    align-items: flex-start !important;
  }

  body.page-vod .vod-details-main {
    min-width: 280px !important;
    flex: 1 1 360px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
  }

  body.page-vod .vod-kicker {
    display: inline-flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    gap: 6px !important;
    margin: 0 0 2px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  body.page-vod .vod-display-title {
    margin: 0 0 2px !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
    display: block !important;
    overflow: visible !important;
  }

  body.page-vod .vod-channel-link,
  body.page-vod .vod-filename-meta,
  body.page-twitch-watch .twitch-watch-stream-title {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.page-vod .vod-filename-meta {
    display: none !important;
  }

  body.page-vod .vod-details-side {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  body.page-vod .vod-facts {
    gap: 10px 16px !important;
  }

  body.page-twitch-watch.page-vod .vod-details {
    align-self: start !important;
    height: auto !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    row-gap: 8px !important;
    column-gap: 16px !important;
    align-items: flex-start !important;
  }

  body.page-twitch-watch .twitch-switcher {
    padding-top: 4px !important;
  }

  body.page-twitch-watch .twitch-switcher-item {
    min-height: 28px !important;
    padding: 4px 8px !important;
  }
}

/* Cast / AirPlay sender control — mobile player surfaces only */
body:not(.page-mobile-player):not(.page-twitch-watch-mobile) .ns-cast-btn,
body:not(.page-mobile-player):not(.page-twitch-watch-mobile) .ns-cast-trigger {
  display: none !important;
}

.ns-cast-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  border: 0;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #f3f3f3;
  background: rgba(20, 20, 22, 0.82);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  cursor: pointer;
}
.ns-cast-btn:hover,
.ns-cast-btn:focus-visible {
  outline: 2px solid #7dd3fc;
  outline-offset: 2px;
  background: rgba(32, 32, 36, 0.92);
}
.ns-cast-btn[hidden] {
  display: none !important;
}
.video-container .ns-cast-btn,
.twitch-mobile-player-frame .ns-cast-btn {
  top: 52px;
}

.visibility-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: 13px;
}
.visibility-form select {
  background: var(--surface, #18181b);
  color: inherit;
  border: 1px solid var(--border, #27272a);
  border-radius: 8px;
  padding: 6px 8px;
}

/* NachtSilo Tube — photo viewer lightbox */
html.ns-photo-viewer-open,
html.ns-photo-viewer-open body {
  overflow: hidden;
}
.ns-photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  color: var(--tube-text, #f7f7f7);
}
.ns-photo-viewer[hidden] {
  display: none !important;
}
.ns-photo-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.92);
  cursor: zoom-out;
}
.ns-photo-viewer__chrome {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  pointer-events: none;
}
.ns-photo-viewer__toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 14px;
  padding-top: max(12px, env(safe-area-inset-top));
  pointer-events: auto;
}
.ns-photo-viewer__btn {
  appearance: none;
  border: 1px solid var(--tube-line, #292929);
  background: rgba(17, 17, 17, 0.92);
  color: var(--tube-text, #f7f7f7);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.ns-photo-viewer__btn:hover,
.ns-photo-viewer__btn:focus-visible {
  background: var(--tube-surface-2, #171717);
  border-color: var(--tube-accent, #f2e58d);
  color: var(--tube-accent, #f2e58d);
  outline: none;
}
.ns-photo-viewer__btn--close {
  margin-left: 4px;
}
.ns-photo-viewer__zoom-label {
  min-width: 52px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--tube-muted, #858585);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.ns-photo-viewer__stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  overflow: hidden;
  cursor: default;
  pointer-events: auto;
  touch-action: none;
}
.ns-photo-viewer__stage.is-zoomed {
  cursor: grab;
}
.ns-photo-viewer__stage.is-zoomed.is-dragging {
  cursor: grabbing;
}
.ns-photo-viewer__img {
  max-width: min(96vw, 1400px);
  max-height: calc(100vh - 96px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: transform 80ms ease-out;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  border-radius: 4px;
}
.ns-photo-viewer__stage.is-dragging .ns-photo-viewer__img {
  transition: none;
}

/* === NachtSilo UI polish (2026-09-05) — see also static/css/ui-polish.css === */
/* NachtSilo Tube — safe visual polish (tokens + grid + action tools).
 * Loaded last via style.css append. No JS/ID/route changes.
 */

:root {
  --tube-bg: #050505;
  --tube-surface: #121212;
  --tube-surface-2: #1a1a1a;
  --tube-surface-3: #242424;
  --tube-line: #2e2e2e;
  --tube-line-soft: #222222;
  --tube-text: #f5f5f5;
  --tube-text-2: #cfcfcf;
  --tube-muted: #8f8f8f;
  --tube-accent: #f2e58d;
  --tube-accent-hover: #fff3a9;
  --tube-live: #ff5c66;
  --tube-success: #6ed9a2;
  --tube-radius: 10px;
  --tube-focus: 0 0 0 3px rgba(242, 229, 141, 0.28);
  --radius: var(--tube-radius);
  --text-muted: var(--tube-muted);
  --muted: var(--tube-muted);
  --border: var(--tube-line);
  --primary: var(--tube-accent);
  --accent: var(--tube-accent);
}

/* --- Video grid / cards (streamer + search + index-like grids) --- */
body.page-streamer .video-grid,
body.page-search .video-grid,
body.page-index .video-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
  gap: 16px 12px !important;
}

body.page-streamer .video-card,
body.page-search .video-card {
  border-radius: var(--tube-radius) !important;
  transition: background-color 0.15s ease, transform 0.15s ease !important;
}

body.page-streamer .video-card:hover,
body.page-search .video-card:hover {
  background: var(--tube-surface) !important;
}

body.page-streamer .thumb-wrap,
body.page-search .thumb-wrap,
.video-card .thumb-wrap,
.vod-card .thumb-wrap {
  aspect-ratio: 16 / 9 !important;
  border-radius: 10px !important;
  border: 1px solid var(--tube-line-soft) !important;
  background: #0a0a0a !important;
  overflow: hidden !important;
}

body.page-streamer .thumb-img,
body.page-search .thumb-img,
.video-card .thumb-img {
  transition: transform 0.2s ease !important;
}

@media (hover: hover) and (pointer: fine) {
  body.page-streamer .video-card:hover .thumb-img,
  body.page-search .video-card:hover .thumb-img {
    transform: scale(1.02) !important;
  }
}

body.page-streamer .video-title,
body.page-search .video-title {
  color: var(--tube-text) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
}

body.page-streamer .card-body,
body.page-search .card-body {
  padding: 10px 2px 2px !important;
}

body.page-streamer .video-meta,
body.page-search .video-meta,
body.page-streamer .meta,
body.page-search .meta {
  color: var(--tube-muted) !important;
  font-size: 12px !important;
}

/* --- Action tool strip (Clip / Zuschneiden / …) --- */
body:is(.page-vod, .page-live, .page-twitch-watch) .vod-file-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
}

body:is(.page-vod, .page-live, .page-twitch-watch) .vod-inline-tool {
  min-height: 34px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border: 1px solid var(--tube-line) !important;
  border-radius: 8px !important;
  color: var(--tube-text-2) !important;
  background: var(--tube-surface-2) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: none !important;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease !important;
}

body:is(.page-vod, .page-live, .page-twitch-watch) .vod-inline-tool::after {
  display: none !important;
}

body:is(.page-vod, .page-live, .page-twitch-watch) .vod-inline-tool:hover {
  color: var(--tube-text) !important;
  border-color: #3f3f3f !important;
  background: var(--tube-surface-3) !important;
  transform: none !important;
}

body:is(.page-vod, .page-live, .page-twitch-watch) .vod-inline-tool:focus-visible {
  outline: none !important;
  box-shadow: var(--tube-focus) !important;
}

/* Primary clip actions stand out slightly */
body:is(.page-vod, .page-live, .page-twitch-watch) #btnInstantClip,
body:is(.page-vod, .page-live, .page-twitch-watch) #btnOpenEditor {
  color: #161616 !important;
  border-color: rgba(242, 229, 141, 0.55) !important;
  background: var(--tube-accent) !important;
}

body:is(.page-vod, .page-live, .page-twitch-watch) #btnInstantClip:hover,
body:is(.page-vod, .page-live, .page-twitch-watch) #btnOpenEditor:hover {
  color: #111 !important;
  border-color: rgba(255, 243, 169, 0.75) !important;
  background: var(--tube-accent-hover) !important;
}

body:is(.page-vod, .page-live, .page-twitch-watch) .vod-inline-tool-warning {
  color: #ffe082 !important;
  border-color: rgba(255, 224, 130, 0.28) !important;
  background: rgba(255, 224, 130, 0.08) !important;
}

/* --- Mobile streamer cards: align radius/contrast --- */
body.page-mobile-streamer .video-card {
  border-radius: 10px !important;
  border-color: var(--tube-line) !important;
  background: var(--tube-surface) !important;
}

body.page-mobile-streamer .thumb-area {
  aspect-ratio: 16 / 9 !important;
}

@media (prefers-reduced-motion: reduce) {
  body.page-streamer .video-card,
  body.page-search .video-card,
  body.page-streamer .thumb-img,
  body.page-search .thumb-img,
  body:is(.page-vod, .page-live, .page-twitch-watch) .vod-inline-tool {
    transition: none !important;
  }

  body.page-streamer .video-card:hover .thumb-img,
  body.page-search .video-card:hover .thumb-img {
    transform: none !important;
  }
}

/* Never show cast sender chrome on desktop VOD/live shells */
body:is(.page-vod, .page-live, .page-twitch-watch, .page-clip-editor, .page-hls) .ns-cast-btn,
body:is(.page-vod, .page-live, .page-twitch-watch, .page-clip-editor, .page-hls) .ns-cast-trigger {
  display: none !important;
}

/* Login brand mark + Discord register callout (match Tube app icon / rail) */
body.page-login .login-brand {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 8px !important;
}

body.page-login .login-brand-mark {
  width: 48px !important;
  height: 48px !important;
  flex: 0 0 48px !important;
  border-radius: 10px !important;
  border: 1px solid var(--tube-line, #292929) !important;
  background: #0b0b0b !important;
  object-fit: cover !important;
  box-shadow: none !important;
}

body.page-login .login-brand .eyebrow {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.page-login .login-register {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  padding: 14px 14px 13px;
  border: 1px solid var(--tube-line, #292929);
  border-radius: 8px;
  background: #0b0b0b;
}

body.page-login .login-register-kicker {
  margin: 0 0 6px;
  color: var(--tube-accent, #f2e58d);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.page-login .login-register p {
  margin: 0;
  color: var(--tube-muted, #858585);
  font-size: 13px;
  line-height: 1.55;
}

body.page-login .login-register strong {
  color: var(--tube-text-2, #c7c7c7);
  font-weight: 700;
}

body.page-login .login-register code {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--tube-line, #292929);
  border-radius: 4px;
  color: var(--tube-accent, #f2e58d);
  background: rgba(242, 229, 141, 0.06);
  font-size: 12px;
  font-weight: 700;
}

body.page-login .login-panel-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--tube-text, #f7f7f7);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

body.page-login .login-panel-brand .login-brand-mark {
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px !important;
  border-radius: 8px !important;
}

@media (max-width: 920px) {
  body.page-login .login-panel-brand {
    display: flex !important;
  }
}

/* Admin Discord pending queue — Tube surface, not orange promo card */
body.page-admin .pending-users {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--tube-line, #292929);
  border-radius: 10px;
  background: var(--tube-surface, #111);
}

body.page-admin .pending-users-title {
  margin: 0 0 12px;
  color: var(--tube-accent, #f2e58d);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.page-admin .pending-users-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

body.page-admin .pending-users .btn-approve,
body.page-admin .pending-users .btn-deny {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

body.page-admin .pending-users .btn-deny {
  border: 1px solid var(--tube-line, #292929);
  color: var(--tube-text-2, #c7c7c7);
  background: transparent;
}

body.page-admin .user-discord-meta {
  font-size: 12px;
  color: var(--tube-muted, #858585);
}

body.page-admin .user-via-discord {
  margin-top: 4px;
  font-size: 11px;
  color: var(--tube-muted, #858585);
}


/* Tube chat tabs (Beatek live watch) */
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-tab-row {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-tab {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: var(--tube-muted, #9a9a9a);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-tab.is-active {
  color: #0b0b0b;
  background: var(--accent, #f0c24b);
  border-color: transparent;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-tab-pane {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-tab-pane[hidden] {
  display: none !important;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-panel-tabs .chat-list,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-container.chat-panel-tabs .chat-list {
  flex: 1;
  min-height: 0;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-chat-compose {
  display: flex;
  gap: 8px;
  padding: 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--tube-surface);
  border-top: 1px solid var(--tube-line);
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-chat-compose input[type="text"] {
  flex: 1;
  min-width: 0;
  margin: 0;
  background: #141416;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #f5f5f5;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-chat-send {
  appearance: none;
  border: none;
  border-radius: 8px;
  background: var(--accent, #f0c24b);
  color: #0b0b0b;
  font-weight: 700;
  padding: 0 12px;
  cursor: pointer;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-chat-error {
  padding: 0 12px 10px;
  color: #ff8b8b;
  font-size: 12px;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-badge-admin,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-badge[data-badge="admin"] {
  --badge-bg-a: #f0c24b;
  --badge-bg-b: #b8860b;
  --badge-fg: #1a1200;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-split-tube .chat-line,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-tab-pane[data-chat-pane="tube"] .chat-line,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-chat-line {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  margin-bottom: 2px;
  padding: 1px 6px;
  line-height: 1.35;
  font-size: 13px;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-split-tube .chat-time,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-tab-pane[data-chat-pane="tube"] .chat-time {
  color: #6a6a72;
  font-size: 11px;
  white-space: nowrap;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-split-tube .chat-text,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-tab-pane[data-chat-pane="tube"] .chat-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-split-tube .chat-user,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-tab-pane[data-chat-pane="tube"] .chat-user {
  font-weight: 700;
  margin-right: 4px;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-split-tube .chat-msg,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-tab-pane[data-chat-pane="tube"] .chat-msg {
  color: #efeff1;
}

body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-panel.chat-panel-tabs,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-container.chat-panel-tabs {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-panel.chat-panel-tabs .chat-header,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-container.chat-panel-tabs .twitch-mobile-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
body.page-twitch-watch-mobile .chat-container.chat-panel-tabs .chat-tabs-head {
  justify-content: flex-start;
  padding: 8px 10px;
  border-bottom: 1px solid #333;
}
body.page-twitch-watch-mobile .chat-container.chat-panel-tabs .chat-pane-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 0;
  flex-shrink: 0;
}
body.page-twitch-watch-mobile .chat-container.chat-panel-tabs .chat-tab-pane {
  flex: 1;
  min-height: 0;
}
body.page-twitch-watch-mobile .chat-container.chat-panel-tabs .chat-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
body.page-twitch-watch-mobile .chat-container.chat-panel-tabs .tube-chat-compose {
  flex-shrink: 0;
}


/* Dual chat: Twitch + Tube side by side */
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-panel.chat-panel-split,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-container.chat-panel-split {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
  gap: 0;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-split-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 50%;
  min-width: 0;
  min-height: 0;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-split-twitch {
  border-right: 1px solid rgba(255,255,255,0.08);
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-split-col .chat-header,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-split-col .twitch-mobile-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .chat-split-col .chat-list {
  flex: 1;
  min-height: 0;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-chat-mod-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-mod-btn {
  color: #ffb4b4;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-mod-tools {
  display: none;
  gap: 3px;
  margin-left: 6px;
  vertical-align: middle;
  white-space: nowrap;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-chat-line:hover .tube-mod-tools,
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-chat-line:focus-within .tube-mod-tools {
  display: inline-flex;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-mod-icon {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(20,20,24,0.85);
  color: #c8c8d0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 4px;
  cursor: pointer;
  vertical-align: middle;
}
body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-mod-icon:hover {
  border-color: #ff8b8b;
  color: #ff8b8b;
}
@media (hover: none) {
  body:is(.page-twitch-watch, .page-twitch-watch-mobile) .tube-mod-tools {
    display: inline-flex;
    opacity: 0.55;
  }
}
@media (max-width: 1100px) {
  body.page-twitch-watch .chat-panel.chat-panel-split {
    flex-direction: column;
  }
  body.page-twitch-watch .chat-split-twitch {
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    max-height: 50%;
  }
}
body.page-twitch-watch-mobile .chat-container.chat-panel-split {
  flex-direction: column;
}
body.page-twitch-watch-mobile .chat-split-twitch {
  border-right: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex: 1 1 45%;
}
body.page-twitch-watch-mobile .chat-split-tube {
  flex: 1 1 55%;
}

/* NachtSilo Regeln */
body.page-regeln {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 500px at 20% -10%, rgba(240,194,75,0.12), transparent 55%),
    radial-gradient(800px 400px at 90% 10%, rgba(56,189,248,0.08), transparent 50%),
    #0b0b0d;
  color: #ececf1;
  font-family: Inter, system-ui, sans-serif;
}
body.page-regeln .regeln-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}
body.page-regeln .regeln-brand {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: #f0c24b;
  margin-bottom: 10px;
}
body.page-regeln .regeln-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.25;
}
body.page-regeln .regeln-sub {
  color: rgba(236,236,241,0.72);
  margin: 0 0 10px;
}
body.page-regeln .regeln-meta {
  font-size: 12px;
  color: rgba(236,236,241,0.55);
  margin-bottom: 18px;
}
body.page-regeln .regeln-card {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(18,18,22,0.92);
  padding: 18px 18px 8px;
}
body.page-regeln .regeln-list {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 10px;
  line-height: 1.45;
  font-size: 14px;
}
body.page-regeln .regeln-footer {
  margin-top: 16px;
  color: rgba(236,236,241,0.62);
  font-size: 13px;
}
body.page-regeln .regeln-accept-form {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}
body.page-regeln .regeln-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4;
}
body.page-regeln .regeln-check input {
  margin-top: 3px;
}
body.page-regeln .regeln-alert {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(239,68,68,0.15);
  color: #ffb4b4;
}
body.page-regeln .regeln-alert.ok {
  background: rgba(34,197,94,0.15);
  color: #86efac;
}
body.page-regeln .regeln-done {
  margin-top: 16px;
  color: rgba(236,236,241,0.75);
}

body.page-agb {
  min-height: 100vh;
  background:
    radial-gradient(1000px 500px at 20% -10%, rgba(240,194,75,0.12), transparent 55%),
    radial-gradient(800px 400px at 90% 10%, rgba(56,189,248,0.08), transparent 50%),
    #0b0b0d;
  color: #ececf1;
  font-family: Inter, system-ui, sans-serif;
}
body.page-agb .agb-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}
body.page-agb .agb-brand {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  color: #f0c24b;
  margin-bottom: 10px;
}
body.page-agb .agb-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.25;
}
body.page-agb .agb-sub {
  color: rgba(236,236,241,0.72);
  margin: 0 0 10px;
}
body.page-agb .agb-meta {
  font-size: 12px;
  color: rgba(236,236,241,0.55);
  margin-bottom: 18px;
}
body.page-agb .agb-card {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: rgba(18,18,22,0.92);
}
body.page-agb .agb-scroll {
  max-height: min(62vh, 560px);
  overflow: auto;
  padding: 18px 18px 12px;
  scrollbar-gutter: stable;
}
body.page-agb .agb-prose h2,
body.page-agb .agb-anlage h2 {
  font-size: 1.05rem;
  margin: 1.2em 0 0.45em;
}
body.page-agb .agb-prose h2:first-child {
  margin-top: 0;
}
body.page-agb .agb-prose p,
body.page-agb .agb-anlage-lead,
body.page-agb .agb-footer {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(236,236,241,0.88);
  margin: 0 0 0.7em;
}
body.page-agb .agb-prose ul {
  margin: 0 0 0.8em;
  padding-left: 1.2em;
  display: grid;
  gap: 6px;
  font-size: 14px;
  line-height: 1.45;
}
body.page-agb .agb-prose code,
body.page-agb .agb-meta code {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.92em;
}
body.page-agb .agb-anlage {
  margin-top: 22px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
body.page-agb .agb-rules-list {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 10px;
  line-height: 1.45;
  font-size: 14px;
}
body.page-agb .agb-footer {
  margin-top: 16px;
  color: rgba(236,236,241,0.62);
}
body.page-agb .agb-accept-form {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}
body.page-agb .agb-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4;
}
body.page-agb .agb-check input {
  margin-top: 3px;
}
body.page-agb .agb-scroll-hint {
  margin: 0;
  font-size: 13px;
  color: rgba(236,236,241,0.55);
}
body.page-agb .agb-alert {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(239,68,68,0.15);
  color: #ffb4b4;
}
body.page-agb .agb-alert.ok {
  background: rgba(34,197,94,0.15);
  color: #86efac;
}
body.page-agb .agb-done {
  margin-top: 16px;
  color: rgba(236,236,241,0.75);
}
@media (max-width: 640px) {
  body.page-agb .agb-scroll {
    max-height: min(58vh, 480px);
  }
}

/* ------------------------------------------------------------------
   Responsive player shell (2026-09-08)
   Native Play/Pause controls were clipped by overflow:hidden + absolute
   video positioning. Keep 16:9 fluid scaling across viewports/DPI/zoom.
   ------------------------------------------------------------------ */
html:is(.page-vod, .page-live),
body:is(.page-vod, .page-live) {
  height: auto !important;
  min-height: 100% !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

body:is(.page-vod, .page-live) .main {
  overflow: visible !important;
  overflow-x: hidden !important;
  min-width: 0 !important;
}

body:is(.page-vod, .page-live) .content {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

body:is(.page-vod, .page-live) .main-col {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

body:is(.page-vod, .page-live) .player-wrapper {
  position: relative !important;
  display: block !important;
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
  width: min(100%, calc(min(78dvh, 78vh, 900px) * 16 / 9)) !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 16 / 9 !important;
  margin-inline: 0 !important;
  overflow: visible !important;
  contain: none !important;
  isolation: isolate !important;
  background: #000 !important;
  border-radius: 10px !important;
}

body:is(.page-vod, .page-live) .player-wrapper video,
body:is(.page-vod, .page-live) .player-wrapper > video {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: inherit !important;
  object-fit: contain !important;
  background: #000 !important;
  /* Keep browser control bar hittable and readable on HiDPI / zoom */
  min-height: clamp(180px, 42vw, 100%) !important;
}

/* Ensure native media controls stay above adjacent panels */
body:is(.page-vod, .page-live) .player-wrapper video::-webkit-media-controls {
  z-index: 3 !important;
}

body:is(.page-vod, .page-live) .player-wrapper video::-webkit-media-controls-enclosure {
  overflow: visible !important;
  width: 100% !important;
  max-width: 100% !important;
}

body:is(.page-vod, .page-live) .player-wrapper video::-webkit-media-controls-panel {
  display: flex !important;
  opacity: 1 !important;
}

body:is(.page-vod, .page-live) .player-wrapper video::-webkit-media-controls-play-button,
body:is(.page-vod, .page-live) .player-wrapper video::-webkit-media-controls-mute-button,
body:is(.page-vod, .page-live) .player-wrapper video::-webkit-media-controls-fullscreen-button,
body:is(.page-vod, .page-live) .player-wrapper video::-webkit-media-controls-current-time-display,
body:is(.page-vod, .page-live) .player-wrapper video::-webkit-media-controls-time-remaining-display {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Custom seekbar owns scrubbing — always hide native timeline to prevent double bars */
body:is(.page-vod, .page-live) .player-wrapper video::-webkit-media-controls-timeline,
body.page-mobile-player .video-container video::-webkit-media-controls-timeline {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Clip overlay preview play/pause — fluid size */
body:is(.page-vod, .page-live) .vod-clip-preview-toggle {
  width: clamp(44px, 12vw, 64px) !important;
  height: clamp(44px, 12vw, 64px) !important;
  min-width: 44px !important;
  min-height: 44px !important;
}

body:is(.page-vod, .page-live) .vod-clip-preview-toggle svg {
  width: 48% !important;
  height: 48% !important;
}

/* Mobile player: keep controls reachable, scale with viewport */
body.page-mobile-player .video-container {
  overflow: visible !important;
}

body.page-mobile-player video {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

body.page-mobile-player video::-webkit-media-controls-enclosure {
  overflow: visible !important;
}

/* Twitch watch / HLS shells */
body.page-twitch-watch .player-wrapper,
body.page-hls .player-shell {
  width: min(100%, calc(min(78dvh, 78vh, 900px) * 16 / 9)) !important;
  max-width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  overflow: visible !important;
  contain: none !important;
}

body.page-twitch-watch .player-wrapper video,
body.page-twitch-watch .twitch-proxy-video,
body.page-hls .player-shell video {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

@media (max-width: 920px) {
  body:is(.page-vod, .page-live) .player-wrapper,
  body.page-twitch-watch .player-wrapper,
  body.page-hls .player-shell {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
  }

  body:is(.page-vod, .page-live) .player-wrapper video {
    min-height: clamp(200px, 56vw, 100%) !important;
    border-radius: 0 !important;
  }
}

@media (max-height: 720px) {
  body:is(.page-vod, .page-live) .player-wrapper,
  body.page-twitch-watch .player-wrapper,
  body.page-hls .player-shell {
    width: min(100%, calc(min(68dvh, 68vh) * 16 / 9)) !important;
  }
}

@media (max-height: 560px) {
  body:is(.page-vod, .page-live) .player-wrapper,
  body.page-twitch-watch .player-wrapper,
  body.page-hls .player-shell {
    width: min(100%, calc(min(62dvh, 62vh) * 16 / 9)) !important;
  }
}

/* Prefer page scroll over clipping the player on short / zoomed windows */
@media (max-width: 1180px) {
  body:is(.page-vod, .page-live) .content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body:is(.page-vod, .page-live) .chat-panel {
    position: static !important;
    width: 100% !important;
    height: min(42dvh, 420px) !important;
    min-height: 260px !important;
    max-height: none !important;
  }
}

/* Admin traffic overview */
body.page-admin-traffic .header.traffic-header {
  margin-bottom: 20px;
}
body.page-admin-traffic .traffic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
body.page-admin-traffic .traffic-lead {
  margin: 8px 0 0;
  max-width: 72ch;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.45;
}
body.page-admin-traffic .traffic-back {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
body.page-admin-traffic .traffic-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 18px;
}
body.page-admin-traffic .traffic-legend,
body.page-admin-traffic .traffic-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}
body.page-admin-traffic .swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
}
body.page-admin-traffic .swatch.logins { background: #f5b942; }
body.page-admin-traffic .swatch.pages { background: #7eb8ff; }
body.page-admin-traffic .swatch.media { background: #6ee7a8; }
body.page-admin-traffic .swatch.chats { background: #c4b5fd; }
body.page-admin-traffic .traffic-heat-legend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 4px;
}
body.page-admin-traffic .heat-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
body.page-admin-traffic .heat-swatch.l1 { background: rgba(110, 231, 168, 0.28); }
body.page-admin-traffic .heat-swatch.l2 { background: rgba(110, 231, 168, 0.48); }
body.page-admin-traffic .heat-swatch.l3 { background: rgba(110, 231, 168, 0.72); }
body.page-admin-traffic .heat-swatch.l4 { background: #6ee7a8; }
body.page-admin-traffic .chip {
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}
body.page-admin-traffic .chip.is-on {
  color: #fff;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.16);
}
body.page-admin-traffic .traffic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  align-items: stretch;
}
body.page-admin-traffic .traffic-card {
  padding: 14px !important;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
body.page-admin-traffic .traffic-card.is-inactive {
  border-color: rgba(251, 191, 36, 0.35);
}
body.page-admin-traffic .traffic-card.is-disabled {
  opacity: 0.72;
}
body.page-admin-traffic .traffic-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
body.page-admin-traffic .traffic-card h3 {
  margin: 0 0 4px !important;
  font-size: 15px;
}
body.page-admin-traffic .traffic-meta {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}
body.page-admin-traffic .traffic-pill {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
body.page-admin-traffic .traffic-pill.warn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.4);
}
body.page-admin-traffic .traffic-total {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
body.page-admin-traffic .traffic-eval {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}
body.page-admin-traffic .traffic-eval div {
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
body.page-admin-traffic .traffic-eval span {
  display: block;
  color: var(--text-muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
body.page-admin-traffic .traffic-eval strong {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
body.page-admin-traffic .traffic-heat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7px, 1fr));
  gap: 2px;
  margin: 0 0 8px;
  padding: 5px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}
body.page-admin-traffic .heat-cell {
  display: block;
  aspect-ratio: 1;
  min-height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
}
body.page-admin-traffic .heat-cell.l1 { background: rgba(110, 231, 168, 0.28); }
body.page-admin-traffic .heat-cell.l2 { background: rgba(110, 231, 168, 0.48); }
body.page-admin-traffic .heat-cell.l3 { background: rgba(110, 231, 168, 0.72); }
body.page-admin-traffic .heat-cell.l4 { background: #6ee7a8; }
body.page-admin-traffic .traffic-chart-wrap {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 4px;
  align-items: stretch;
}
body.page-admin-traffic .traffic-chart-wrap.no-scale {
  grid-template-columns: minmax(0, 1fr);
}
body.page-admin-traffic .traffic-chart-scale {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0;
  color: var(--text-muted);
  font-size: 9px;
  text-align: right;
  line-height: 1;
}
body.page-admin-traffic .traffic-chart {
  display: block;
  width: 100%;
  height: 88px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 8px;
  overflow: hidden;
}
body.page-admin-traffic .chart-axis {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
}
body.page-admin-traffic .bar-logins { fill: #f5b942; }
body.page-admin-traffic .bar-pages { fill: #7eb8ff; }
body.page-admin-traffic .bar-media { fill: #6ee7a8; }
body.page-admin-traffic .bar-chats { fill: #c4b5fd; }
body.page-admin-traffic .bar-empty { fill: rgba(255, 255, 255, 0.12); }
body.page-admin-traffic .traffic-mix {
  display: flex;
  width: 100%;
  height: 6px;
  margin: 8px 0 0;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}
body.page-admin-traffic .traffic-mix span {
  display: block;
  height: 100%;
}
body.page-admin-traffic .mix-logins { background: #f5b942; }
body.page-admin-traffic .mix-pages { background: #7eb8ff; }
body.page-admin-traffic .mix-media { background: #6ee7a8; }
body.page-admin-traffic .mix-chats { background: #c4b5fd; }
body.page-admin-traffic .traffic-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0 0;
}
body.page-admin-traffic .traffic-stats div {
  margin: 0;
}
body.page-admin-traffic .traffic-stats dt {
  color: var(--text-muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
body.page-admin-traffic .traffic-stats dd {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
@media (max-width: 768px) {
  body.page-admin-traffic .traffic-grid {
    grid-template-columns: 1fr;
  }
}

.vod-slot-busy {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 8, 10, 0.82);
  z-index: 4;
  border-radius: 10px;
}
.player-wrapper,
.video-container {
  position: relative;
}
.vod-slot-busy[hidden] {
  display: none !important;
}
.vod-slot-busy-card {
  max-width: 28rem;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--border, #2a2a2a);
  background: var(--tube-surface, #121212);
  color: #f3f3f3;
}
.vod-slot-busy-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}
.vod-slot-busy-card p {
  margin: 0;
  color: var(--text-muted, #b3b3b3);
  font-size: 13px;
  line-height: 1.45;
}


/* Custom VOD control bar (vod_seek_hover.js → .vod-controlbar).
   Must sit absolutely inside .player-wrapper / .video-container — never in
   normal flow, or it overflows onto .vod-details and stacks over metadata. */
body:is(.page-vod, .page-live) .player-wrapper.has-vod-seekbar,
body.page-mobile-player .video-container.has-vod-seekbar,
.has-vod-seekbar {
  position: relative !important;
  overflow: hidden !important;
}

.vod-controlbar {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 5 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-sizing: border-box !important;
  min-height: 44px !important;
  padding: 8px 10px 10px !important;
  margin: 0 !important;
  color: #f5f5f5 !important;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.72) 55%, rgba(0, 0, 0, 0.92) 100%) !important;
  pointer-events: auto !important;
  transition: opacity 0.18s ease, transform 0.18s ease !important;
}

.vod-controlbar--hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(6px) !important;
}

.vod-cb-btn {
  flex: 0 0 auto !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: inherit !important;
  background: rgba(255, 255, 255, 0.08) !important;
  cursor: pointer !important;
}

.vod-cb-btn:hover,
.vod-cb-btn:focus-visible {
  background: rgba(255, 255, 255, 0.16) !important;
  outline: none !important;
}

.vod-cb-btn svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

.vod-cb-time {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 2px !important;
  min-width: 7.5em !important;
  font-family: "IBM Plex Mono", "Consolas", monospace !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0.01em !important;
  white-space: nowrap !important;
  color: #f4f4f5 !important;
}

.vod-cb-sep {
  opacity: 0.55 !important;
}

.vod-cb-vol {
  flex: 0 0 72px !important;
  width: 72px !important;
  height: 4px !important;
  margin: 0 !important;
  accent-color: #7dd3fc !important;
  cursor: pointer !important;
}

.vod-seekbar {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  flex: 1 1 auto !important;
  min-width: 48px !important;
  height: 22px !important;
  z-index: auto !important;
  display: flex !important;
  align-items: center !important;
  cursor: pointer !important;
  touch-action: none !important;
  pointer-events: auto !important;
}

.vod-seekbar__track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: height 0.12s ease;
}

.vod-seekbar:hover .vod-seekbar__track,
.vod-seekbar.is-dragging .vod-seekbar__track {
  height: 6px;
}

.vod-seekbar__buffered,
.vod-seekbar__played {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  pointer-events: none;
}

.vod-seekbar__buffered {
  background: rgba(255, 255, 255, 0.28);
  width: 0%;
}

.vod-seekbar__played {
  background: #f1f1f1;
  width: 0%;
}

.vod-seekbar__thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.vod-seekbar:hover .vod-seekbar__thumb,
.vod-seekbar.is-dragging .vod-seekbar__thumb {
  opacity: 1;
}

.vod-seekbar__tip {
  position: absolute;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 12, 14, 0.92);
  color: #f4f4f5;
  font-family: "IBM Plex Mono", "Consolas", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.vod-seekbar__tip[hidden] {
  display: none !important;
}

body.page-mobile-player .vod-controlbar {
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  min-height: 48px !important;
}

body.page-mobile-player .vod-cb-vol {
  flex-basis: 56px !important;
  width: 56px !important;
}

.vod-seek-rail,
.vod-seek-rail__track,
.vod-seek-tip {
  display: none !important;
}

/* ========================================================================= */

/* ========================================================================= */





































/* VOD action icons: readable labeled buttons (share / download) — 2026-09-13 */
body:is(.page-vod, .page-live) .vod-file-action {
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  overflow: visible !important;
  border: 1px solid var(--tube-line, #2e2e2e) !important;
  border-radius: 8px !important;
  color: #f0f0f0 !important;
  background: var(--tube-surface-2, #1a1a1a) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  line-height: 1 !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

body:is(.page-vod, .page-live) .vod-file-action:hover,
body:is(.page-vod, .page-live) .vod-file-action:focus-visible {
  color: #fff !important;
  border-color: #4a4a4a !important;
  background: var(--tube-surface-3, #242424) !important;
  outline: none !important;
  box-shadow: var(--tube-focus, 0 0 0 3px rgba(242, 229, 141, 0.28)) !important;
}

body:is(.page-vod, .page-live) .vod-file-action svg {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 auto !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body:is(.page-vod, .page-live) .vod-file-action svg path {
  fill: none !important;
  stroke: currentColor !important;
}

body:is(.page-vod, .page-live) .vod-file-action span {
  display: inline !important;
  color: inherit !important;
}

/* Player control icons: higher contrast */
body:is(.page-vod, .page-live, .page-mobile-player) .vod-cb-btn {
  width: 36px !important;
  height: 36px !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
}

body:is(.page-vod, .page-live, .page-mobile-player) .vod-cb-btn:hover,
body:is(.page-vod, .page-live, .page-mobile-player) .vod-cb-btn:focus-visible {
  background: rgba(255, 255, 255, 0.24) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
}

body:is(.page-vod, .page-live, .page-mobile-player) .vod-cb-btn svg {
  width: 18px !important;
  height: 18px !important;
  fill: currentColor !important;
}


/* ===== Twitch-1:1 chat: USERNOTICE (Subs, Gifts, Raids, Ankündigungen), Bits, Antworten ===== */
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice {
  padding: 6px 8px !important;
  margin: 4px 0 !important;
  border-left: 4px solid #9147ff !important;
  border-radius: 6px !important;
  background: rgba(145, 71, 255, 0.12) !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice-raid {
  border-left-color: #bf94ff !important;
  background: rgba(191, 148, 255, 0.14) !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice-bits {
  border-left-color: #00c8af !important;
  background: rgba(0, 200, 175, 0.1) !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice-announcement {
  border-left: 4px solid transparent !important;
  border-image: linear-gradient(#9146ff, #9146ff) 1 !important;
  border-radius: 0 !important;
  background: rgba(145, 70, 255, 0.1) !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-announce-blue { border-image: linear-gradient(#00d6d6, #9146ff) 1 !important; }
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-announce-green { border-image: linear-gradient(#00db84, #57bee6) 1 !important; }
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-announce-orange { border-image: linear-gradient(#ffb31a, #e0e000) 1 !important; }
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-announce-purple { border-image: linear-gradient(#9146ff, #ff75e6) 1 !important; }

body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-notice-head {
  display: flex !important;
  align-items: flex-start !important;
  gap: 6px !important;
  font-weight: 700 !important;
  color: var(--tube-text, #efeff1) !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-notice-icon {
  flex: 0 0 auto !important;
  width: 14px !important;
  height: 14px !important;
  margin-top: 2px !important;
  fill: #bf94ff !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice-bits .chat-notice-icon { fill: #00c8af !important; }
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-notice-body {
  display: block !important;
  margin-top: 3px !important;
  font-weight: 400 !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-notice-user {
  font-weight: 700 !important;
}

/* Kontextzeile über normalen Nachrichten (Antwort / Erste Nachricht) */
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-context {
  display: block !important;
  margin-bottom: 2px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  font-size: 0.85em !important;
  color: var(--tube-muted, #adadb8) !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-context-first {
  display: inline-block !important;
  margin-right: 6px !important;
  padding: 0 6px !important;
  border-radius: 999px !important;
  background: #9147ff !important;
  color: #fff !important;
  font-weight: 700 !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-first {
  border-left: 3px solid #9147ff !important;
  padding-left: 6px !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-highlight {
  padding: 6px 8px !important;
  margin: 4px 0 !important;
  border-left: 4px solid #755ebc !important;
  border-radius: 6px !important;
  background: rgba(117, 94, 188, 0.35) !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-power-animated {
  padding: 6px 8px !important;
  margin: 4px 0 !important;
  border-radius: 6px !important;
  background: linear-gradient(90deg, rgba(145, 71, 255, 0.28), rgba(0, 200, 175, 0.2)) !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-power-gigantified .chat-emote {
  height: 4.2em !important;
}

/* Bits / Cheermotes (Tier-Farben wie bei Twitch) */
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-cheer {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  font-weight: 800 !important;
  color: #979797 !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-cheer-icon {
  width: 1.15em !important;
  height: 1.15em !important;
  fill: currentColor !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-cheer-100 { color: #9c3ee8 !important; }
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-cheer-1000 { color: #1db2a5 !important; }
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-cheer-5000 { color: #0099fe !important; }
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-cheer-10000 { color: #f43021 !important; }

/* VOD watch state (static/vod_resume.js): progress bar + badge on every VOD card */
[data-watch-thumb] {
  position: relative;
}
.ns-watch-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  height: 4px;
  background: rgba(255, 255, 255, 0.22);
  pointer-events: none;
}
.ns-watch-progress > span {
  display: block;
  height: 100%;
  background: #9147ff;
}
.ns-watch-badge {
  position: absolute;
  left: 8px;
  bottom: 10px;
  z-index: 4;
  max-width: calc(100% - 16px);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.9);
  color: #F3F6FF;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
[data-watch-card].is-watched .ns-watch-progress > span {
  background: #48D6A2;
}
[data-watch-card].is-watched .ns-watch-badge {
  color: #48D6A2;
}
[data-watch-card].is-watched [data-watch-thumb] img {
  opacity: 0.6;
}

/* Pagination bar: re-assert design system over legacy sidebar nav rules */
/* Old sidebar rules style every <nav> on index/files/admin/... pages
   (min-height: calc(100vh - 90px), column, centered). The sidebar is no <nav>
   anymore, so they only hit pagination bars and stretch them to screen height. */
html body nav.ns-pagination {
  min-height: 0 !important;
  height: auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px 16px !important;
  padding: 14px 18px !important;
  overflow: visible !important;
}
html body nav.ns-pagination.ns-pagination-top {
  padding: 10px 16px !important;
}
@media (max-width: 768px) {
  html body nav.ns-pagination {
    flex-direction: column !important;
    align-items: center !important;
    padding: 12px !important;
    gap: 10px !important;
  }
}

/* Icon-only buttons: the global page button rule (padding 8px 13px, min-height
   38px, specificity 0,2,1) squeezes their SVGs inside fixed 34-40px boxes. */
html body button.ns-rail-item.ns-rail-item,
html body .vod-cb-btn.vod-cb-btn {
  padding: 0 !important;
}
html body .vod-cb-btn.vod-cb-btn {
  min-height: 0 !important;
}
/* Icons inside flex buttons/links keep their size instead of shrinking. */
html body :is(button, a.ns-btn, .ns-btn, .rbac-tab-btn) > svg {
  flex-shrink: 0 !important;
}

/* LIVE pill (hero + preview): had no padding, text ran into the pill edge. */
html body .nebula-live-badge {
  padding: 4px 12px 4px 10px !important;
  font-size: 12px !important;
  line-height: 1.2 !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap !important;
}
html body .nebula-live-badge .nebula-live-dot {
  flex-shrink: 0;
}

/* Touch targets on phones: at least 44px (WCAG 2.5.5, Apple HIG). */
@media (max-width: 768px) {
  html body .mobile-back {
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
  }
  html body.mobile-body .ns-btn {
    min-height: 44px !important;
  }
  html body .chat-tab-row .chat-tab {
    min-height: 44px !important;
  }
}

/* Context menus + Twitch profile card (static/ns_context_menu.js) */
.chat-user,
.chat-notice-user,
.chat-line > .u {
  cursor: pointer;
  -webkit-touch-callout: none;
}
@media (hover: none) {
  .chat-user,
  .chat-notice-user,
  .chat-line > .u {
    -webkit-user-select: none;
    user-select: none;
  }
}
.ns-ctx-menu {
  position: fixed;
  z-index: 100050; /* above .ns-command-rail (99999) */
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
  padding: 6px;
  border: 1px solid rgba(59, 78, 115, 0.9);
  border-radius: 12px;
  background: #111A2B;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  color: #F3F6FF;
  font-size: 13px;
}
.ns-ctx-head {
  padding: 6px 10px 8px;
  color: #A2AEC8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* ID selectors: page-wide button rules (body:is(.page-*) button {... !important}) must not restyle menu items */
#nsCtxMenu .ns-ctx-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 34px !important;
  padding: 7px 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #F3F6FF !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-align: left !important;
  cursor: pointer;
}
#nsCtxMenu .ns-ctx-item:hover:not([disabled]),
#nsCtxMenu .ns-ctx-item:focus-visible {
  background: rgba(145, 71, 255, 0.22) !important;
  outline: none;
}
#nsCtxMenu .ns-ctx-item[disabled] {
  opacity: 0.45 !important;
  cursor: default;
}
.ns-ctx-hint {
  color: #75839D;
  font-size: 11px;
}
.ns-ctx-sep {
  height: 1px;
  margin: 5px 4px;
  background: rgba(59, 78, 115, 0.7);
}
.ns-ctx-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100060;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: #1B2740;
  color: #F3F6FF;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.ns-profile-card {
  position: fixed;
  z-index: 100040;
  width: 320px;
  max-width: calc(100vw - 16px);
  padding: 16px;
  border: 1px solid rgba(59, 78, 115, 0.9);
  border-radius: 14px;
  background: #111A2B;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  color: #F3F6FF;
}
.ns-profile-card.is-sheet {
  left: 8px !important;
  right: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  top: auto !important;
  width: auto;
  max-width: none;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
#nsProfileCard .ns-profile-close {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #A2AEC8 !important;
  font-size: 20px !important;
  line-height: 1 !important;
}
.ns-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 28px;
}
.ns-profile-avatar {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1B2740;
  border: 2px solid #9147ff;
  font-size: 22px;
  font-weight: 800;
}
.ns-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ns-profile-names {
  min-width: 0;
}
.ns-profile-name {
  font-size: 17px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ns-profile-login {
  color: #A2AEC8;
  font-size: 12px;
}
.ns-profile-tags {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.ns-profile-tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(145, 71, 255, 0.2);
  color: #BF94FF;
  font-size: 11px;
  font-weight: 700;
}
.ns-profile-tag.is-live {
  background: rgba(240, 68, 88, 0.2);
  color: #F04458;
}
.ns-profile-facts {
  display: grid;
  gap: 4px;
  margin-top: 14px;
  color: #C7D0E2;
  font-size: 13px;
}
.ns-profile-bio {
  margin: 10px 0 0;
  color: #A2AEC8;
  font-size: 13px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ns-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
/* primary action gets its own row; the rest share rows and stretch to fill */
#nsProfileCard .ns-profile-actions .ns-btn {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 36px !important;
  padding: 8px 10px !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  border-radius: 10px !important;
  border: 1px solid rgba(59, 78, 115, 0.9) !important;
  background: #1B2740 !important;
  color: #F3F6FF !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  cursor: pointer;
}
#nsProfileCard .ns-profile-actions .ns-btn-primary {
  flex-basis: 100% !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, #6366F1, #9147FF) !important;
  color: #FFFFFF !important;
}
#nsProfileCard .ns-profile-actions .ns-btn:hover {
  filter: brightness(1.12);
}
#nsProfileCard .ns-profile-actions .ns-btn:focus-visible,
#nsProfileCard .ns-profile-close:focus-visible {
  outline: 2px solid #BF94FF !important;
  outline-offset: 2px;
}
@media (pointer: coarse) {
  #nsCtxMenu .ns-ctx-item {
    min-height: 44px !important;
  }
  #nsProfileCard .ns-profile-actions .ns-btn {
    min-height: 44px !important;
  }
}

/* === cc-audit-fixes-20261112 === */
/* Legal pages (/agb, /datenschutz, legacy regeln.html): design-system buttons,
   44px touch targets, visible inline links. */
body:is(.page-agb,.page-regeln) .ns-btn {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14px;
  line-height: 1.2;
  box-sizing: border-box;
}
body:is(.page-agb,.page-regeln) .ns-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none !important;
}
body:is(.page-agb,.page-regeln) .agb-accept-form .ns-btn,
body:is(.page-agb,.page-regeln) .regeln-accept-form .ns-btn {
  justify-self: start;
}
body:is(.page-agb,.page-regeln) .agb-actions {
  margin: 16px 0 0;
}
body.page-agb .agb-meta a {
  display: inline-block;
  padding: 12px 6px;
  margin: -12px -2px;
  color: #f0c24b;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 768px) {
  body:is(.page-agb,.page-regeln) .ns-btn {
    width: 100%;
  }
  body:is(.page-agb,.page-regeln) .agb-accept-form .ns-btn,
  body:is(.page-agb,.page-regeln) .regeln-accept-form .ns-btn {
    justify-self: stretch;
  }
}

/* /channels header actions: one row, identical box, centred (the SVG in
   "Optionen" shifted the inline baseline by ~4px; at 1024/800 they stacked) */
body.page-channels_view .ns-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  flex-shrink: 0;
  gap: 8px;
}
.ns-btn.ns-header-action {
  box-sizing: border-box;
  height: 44px;
  min-height: 44px;
  padding: 0 16px;
  font-size: 13px;
  line-height: 1;
  vertical-align: middle;
  margin: 0;
}
.ns-btn.ns-header-action svg {
  flex: 0 0 auto;
  display: block;
}

/* Streamer admin box: visibility select wraps instead of overflowing */
.nebula-admin-box .ns-admin-visibility,
.nebula-admin-box .ns-admin-visibility-form {
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}
.nebula-admin-box .ns-admin-visibility-form select {
  min-width: 0;
  max-width: 100%;
}
@media (max-width: 600px) {
  .nebula-admin-box .ns-admin-visibility,
  .nebula-admin-box .ns-admin-visibility-form {
    width: 100%;
  }
  .nebula-admin-box .ns-admin-visibility-form select {
    flex: 1 1 140px;
  }
}
/* === end cc-audit-fixes-20261112 === */

/* ===== NOTICE-COMPACT-20261112: USERNOTICE kompakt, Name fett in Chatfarbe, Rest 400 ===== */
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice {
  padding: 4px 8px 4px 6px !important;
  margin: 3px 0 !important;
  align-items: start !important;
  line-height: 1.4 !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice > .chat-text > .chat-badges:empty,
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice > .chat-text > .chat-user:empty,
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice .chat-notice-body > .chat-badges:empty {
  display: none !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice .chat-notice-head {
  display: inline !important;
  font-weight: 400 !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice .chat-notice-icon {
  display: inline-block !important;
  width: 14px !important;
  height: 14px !important;
  margin: 0 5px 0 0 !important;
  vertical-align: -2px !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice .chat-notice-text {
  font-weight: 400 !important;
  color: var(--tube-text, #efeff1) !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice-announcement .chat-notice-text {
  font-weight: 600 !important;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice .chat-notice-name {
  font-weight: 700 !important;
  color: #bf94ff;
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice .chat-notice-recipient,
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice .chat-notice-anon {
  color: var(--tube-text, #efeff1);
}
body:is(.page-vod, .page-live, .page-mobile-player, .page-twitch-live,
  .page-twitch-watch, .page-twitch-watch-mobile) .chat-line-notice .chat-notice-body {
  margin-top: 2px !important;
}

/* Live-Player (Server-Stream): Dauer ist Infinity, Chrome zeigt sonst "7:18 / 0:00".
   Die Zeit seit Seitenaufruf ist keine Stream-Laufzeit (die steht unter ONLINE). */
html body:is(.page-twitch-watch, .page-twitch-watch-mobile) video.twitch-proxy-video::-webkit-media-controls-current-time-display,
html body:is(.page-twitch-watch, .page-twitch-watch-mobile) video.twitch-proxy-video::-webkit-media-controls-time-remaining-display {
  display: none !important;
}
