:root {
  --ink: #f5f7f2;
  --muted: #90978e;
  --faint: #686e67;
  --canvas: #080a09;
  --panel: #0e110f;
  --panel-2: #141814;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.15);
  --lime: #e5b64f;
  --lime-2: #b98529;
  --red: #ff5e6c;
  --sidebar: 310px;
}

/* Standalone VPS player bindings */
.hidden { display: none !important; }
.login-art { background-image: url("login-illustration.png"); }
.field-icon { width: 18px; flex: 0 0 auto; color: currentColor; text-align: center; }
.content { min-height: 100vh; margin-left: var(--sidebar); }
.player-page { max-width: 1420px; margin: 0 auto; padding: 26px 31px 35px; }
.topbar > div:first-child { display: grid; gap: 4px; }
.topbar > div:first-child strong { font-size: 13px; }
.secure-pill, .quality-badge { display: inline-flex; align-items: center; padding: 5px 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; color: #c4cbc0; background: rgba(0,0,0,.32); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.viewer-session { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid rgba(229,182,79,.2); border-radius: 11px; color: var(--lime); background: rgba(229,182,79,.05); }
.viewer-session span:last-child { display: grid; gap: 3px; color: #777f75; font-size: 8px; }
.viewer-session b { max-width: 190px; overflow: hidden; color: #c8cec5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.viewer-shield { color: var(--lime); }
.library-heading b { color: var(--muted); font-size: 11px; }
.channel-search { height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #111511; }
.channel-search:focus-within { border-color: rgba(229,182,79,.5); }
.channel-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.category-tabs { display: flex; gap: 6px; margin: 13px -2px 10px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.category-tabs button { flex: 0 0 auto; padding: 7px 11px; border: 0; border-radius: 8px; color: #737b72; background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; }
.category-tabs button.active { color: #f0f5ed; background: #1b201b; }
.channel-card { position: relative; width: 100%; display: flex; align-items: center; gap: 11px; margin-bottom: 3px; padding: 9px; border: 0; border-radius: 11px; text-align: left; background: transparent; cursor: pointer; }
.channel-card:hover { background: rgba(255,255,255,.04); }
.channel-card.active { background: #1a2018; }
.channel-card.active::before { content: ""; position: absolute; left: 0; width: 3px; height: 25px; border-radius: 0 3px 3px 0; background: var(--lime); }
.channel-logo-placeholder { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: #c4cbc1; background: linear-gradient(145deg,#222822,#111411); font-size: 10px; font-weight: 850; }
.sidebar-logout { height: 38px; margin-top: 10px; border: 1px solid var(--line); border-radius: 9px; color: #858d83; background: #111411; cursor: pointer; font-size: 10px; font-weight: 700; }
.sidebar-logout:hover { color: #ff8f9a; }
.player-top { position: absolute; inset: 0 0 auto; z-index: 3; display: flex; align-items: center; gap: 9px; padding: 20px 22px 50px; background: linear-gradient(to bottom,rgba(0,0,0,.7),transparent); pointer-events: none; }
.player-top .quality-badge { margin-left: auto; }
.loading-state, .player-error { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; place-items: center; gap: 10px; padding: 20px; color: #aeb6aa; background: rgba(2,3,2,.62); text-align: center; font-size: 11px; }
.loading-state .spinner { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,.16); border-top-color: var(--lime); border-radius: 50%; }
.player-error { background: rgba(4,6,4,.9); }
.player-error strong { color: #edf1ea; font-size: 16px; }
.player-error span { max-width: 410px; color: #889087; line-height: 1.5; }
.backup-retry-button { height: 38px; margin-top: 5px; padding: 0 16px; border: 1px solid rgba(229,182,79,.44); border-radius: 9px; color: #11150d; background: var(--lime); cursor: pointer; font-size: 10px; font-weight: 850; }
.backup-retry-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.engine-badge { color: #e6bd5d; border-color: rgba(229,182,79,.32); }
.player-frame:hover .player-controls, .player-frame:focus-within .player-controls { opacity: 1; transform: none; pointer-events: auto; }
.player-frame .player-controls { opacity: 1; transform: none; pointer-events: auto; }
.seek-bar { width: 100%; height: 3px; margin: 0 0 12px; cursor: pointer; }
.volume-range { width: 64px; }
.time-display { margin-left: 5px; color: rgba(255,255,255,.58); font-size: 8px; font-variant-numeric: tabular-nums; }
.admin-login-form .login-submit { width: 100%; }
.success-message { border-color: rgba(110,220,140,.25); color: #9be4ac; background: rgba(110,220,140,.06); }
.admin-flash { margin-bottom: 18px; padding: 11px 13px; border: 1px solid rgba(110,220,140,.2); border-radius: 9px; color: #9be4ac; background: rgba(110,220,140,.05); font-size: 10px; }
.admin-flash.error { border-color: rgba(255,94,108,.25); color: #ff929d; background: rgba(255,94,108,.06); }
.dns-row form { display: contents; }
.dns-row .status-toggle { min-width: 74px; justify-content: center; }
.dns-row .delete-dns { font-size: 18px; }

@media (max-width: 900px) {
  .content { margin-left: 0; }
  .library { position: relative; width: 100%; height: auto; max-height: 48vh; }
  .app-shell { display: block; }
  .player-page { padding: 18px 0 30px; }
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--canvas); }

body {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button { color: inherit; }
button, a, select, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, .player-frame:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.app-shell { min-height: 100vh; background: var(--canvas); }

.library {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar);
  display: flex;
  flex-direction: column;
  padding: 24px 18px 18px;
  background: #0b0e0c;
  border-right: 1px solid var(--line);
}

.brand-row, .topbar, .panel-heading, .modal-head, .below-player, .control-row,
.appearance-row, .library-heading, .topbar-left, .topbar-actions {
  display: flex;
  align-items: center;
}

.brand-row { justify-content: space-between; padding: 0 5px 24px; }
.brand {
  display: flex;
  align-items: center;
  gap: 2px;
  color: #fff;
  text-decoration: none;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: 0.05em;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.brand b { color: var(--lime); }
.brand-mark {
  width: 31px;
  height: 31px;
  margin-right: 8px;
  display: grid;
  place-items: center;
  color: #10150b;
  border-radius: 9px;
  background: var(--lime);
  transform: rotate(-5deg);
  box-shadow: 0 8px 24px rgba(201, 255, 99, .16);
}
.brand-mark svg { width: 15px; height: 15px; transform: rotate(5deg); }
.brand-logo-img { display: block; width: auto; object-fit: contain; }
.logo-button { height: 55px; }
.player-brand-logo { height: 54px; }
.login-brand-logo { height: 78px; justify-self: center; }
.admin-brand-logo { height: 58px; justify-self: center; }

.icon-button {
  width: 37px;
  height: 37px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  cursor: pointer;
}
.icon-button:hover { background: rgba(255,255,255,.08); }
.icon-button svg { width: 18px; height: 18px; }
.mobile-close, .menu-button { display: none; }

.add-source {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid rgba(201,255,99,.28);
  border-radius: 12px;
  color: var(--lime);
  background: rgba(201,255,99,.07);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}
.add-source:hover { background: rgba(201,255,99,.12); border-color: rgba(201,255,99,.5); }
.add-source svg { width: 18px; }
.add-source kbd { margin-left: auto; color: #89927d; font-size: 17px; font-weight: 400; }

.library-heading {
  justify-content: space-between;
  padding: 28px 4px 12px;
  color: #d9ded8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.channel-total { color: var(--muted); font-size: 11px; font-weight: 600; }

.search-box {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #111511;
}
.search-box:focus-within { border-color: rgba(201,255,99,.5); }
.search-box svg { width: 16px; color: #717970; }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-box input::placeholder { color: #697168; }
.search-box kbd { color: #676e67; font-size: 11px; }

.group-tabs {
  display: flex;
  gap: 6px;
  margin: 13px -2px 10px;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.group-tabs::-webkit-scrollbar { display: none; }
.group-tabs button {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 0;
  border-radius: 8px;
  color: #737b72;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.group-tabs button:hover { color: #c5cbc3; }
.group-tabs button.active { color: #f0f5ed; background: #1b201b; }

.channel-list {
  min-height: 0;
  margin: 0 -7px;
  padding: 1px 7px 12px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a302a transparent;
}
.channel-row {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 3px;
  padding: 9px 9px;
  border: 0;
  border-radius: 11px;
  text-align: left;
  background: transparent;
  cursor: pointer;
}
.channel-row:hover { background: rgba(255,255,255,.04); }
.channel-row.selected { background: #1a2018; }
.channel-row.selected::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 25px;
  border-radius: 0 3px 3px 0;
  background: var(--lime);
  box-shadow: 0 0 13px rgba(201,255,99,.45);
}
.channel-avatar {
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #c4cbc1;
  background: linear-gradient(145deg, #222822, #111411);
  font-size: 10px;
  font-weight: 850;
}
.channel-row:nth-child(3n + 2) .channel-avatar { background: linear-gradient(145deg, #25221c, #15130f); }
.channel-row:nth-child(3n + 3) .channel-avatar { background: linear-gradient(145deg, #1d2426, #101416); }
.channel-avatar img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.channel-copy { min-width: 0; display: grid; gap: 5px; }
.channel-copy strong { overflow: hidden; color: #e3e7e0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.channel-copy small { display: flex; align-items: center; gap: 5px; color: #727a72; font-size: 9px; }
.channel-copy i, .live-pill i { width: 5px; height: 5px; border-radius: 50%; background: #fe6170; box-shadow: 0 0 7px rgba(254,97,112,.7); }
.channel-number { margin-left: auto; color: #4b524b; font-size: 9px; font-variant-numeric: tabular-nums; }
.channel-row.selected .channel-number { color: var(--lime); }
.empty-list { display: grid; place-items: center; gap: 9px; padding: 40px 20px; color: #687067; text-align: center; font-size: 12px; }
.empty-list svg { width: 20px; }
.load-more { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 9px; color: #98a096; background: #121512; cursor: pointer; font-size: 11px; }

.privacy-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #101410;
}
.privacy-note svg { width: 17px; color: var(--lime); }
.privacy-note span { display: grid; gap: 3px; color: #687068; font-size: 9px; line-height: 1.35; }
.privacy-note b { color: #aeb5ac; font-size: 10px; }

.watch-area { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 72px;
  justify-content: space-between;
  padding: 0 31px;
  border-bottom: 1px solid var(--line);
  background: rgba(8,10,9,.86);
  backdrop-filter: blur(16px);
}
.topbar-left { gap: 12px; }
.topbar-left > div { display: grid; gap: 4px; }
.topbar-left strong { font-size: 13px; font-weight: 700; }
.eyebrow { color: #737b72; font-size: 8px; font-weight: 850; letter-spacing: .18em; }
.topbar-actions { gap: 9px; }
.speed-badge { display: flex; align-items: center; gap: 6px; margin-right: 9px; color: #737b72; font-size: 10px; }
.speed-badge svg { width: 14px; color: var(--lime); }
.secondary-action, .primary-action {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
}
.secondary-action { border: 1px solid var(--line); background: #111411; }
.secondary-action:hover { border-color: var(--line-strong); background: #171b17; }
.primary-action { border: 0; color: #10130d; background: var(--lime); }
.primary-action:hover { background: #d4ff84; }
.secondary-action svg, .primary-action svg { width: 15px; }

.content-wrap { max-width: 1420px; margin: 0 auto; padding: 26px 31px 35px; }
.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 176px);
  min-height: 350px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 42%, rgba(76,92,65,.25), transparent 38%),
    #020302;
  box-shadow: 0 28px 80px rgba(0,0,0,.38);
  isolation: isolate;
}
.player-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}
.player-frame video { width: 100%; height: 100%; display: block; object-fit: contain; background: #020302; cursor: pointer; }
.subtitle-overlay {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 86px;
  z-index: 4;
  pointer-events: none;
  text-align: center;
  color: #fff;
  font-size: clamp(18px, 2.1vw, 34px);
  font-weight: 700;
  line-height: 1.35;
  text-shadow: 0 2px 3px #000, 0 0 10px #000;
}
.player-frame[data-subtitle-size="small"] .subtitle-overlay { font-size: clamp(14px, 1.5vw, 24px); }
.player-frame[data-subtitle-size="medium"] .subtitle-overlay { font-size: clamp(18px, 2.1vw, 34px); }
.player-frame[data-subtitle-size="large"] .subtitle-overlay { font-size: clamp(24px, 2.8vw, 46px); }
.player-frame[data-subtitle-size="xlarge"] .subtitle-overlay { font-size: clamp(30px, 3.6vw, 60px); }
video[data-subtitle-size="small"]::cue { font-size: 75%; }
video[data-subtitle-size="medium"]::cue { font-size: 100%; }
video[data-subtitle-size="large"]::cue { font-size: 135%; }
video[data-subtitle-size="xlarge"]::cue { font-size: 175%; }
.subtitle-overlay:not(.hidden) span {
  display: inline;
  padding: 2px 4px;
  background: transparent;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
video::cue {
  color: #fff;
  background: transparent;
  text-shadow: 0 2px 3px #000, 0 0 10px #000;
}
.player-frame:fullscreen { max-height: none; border: 0; border-radius: 0; }
.pseudo-fullscreen-active { overflow: hidden; }
.player-frame.pseudo-fullscreen { position: fixed; inset: 0; z-index: 9999; width: 100vw; height: 100vh; max-height: none; min-height: 0; aspect-ratio: auto; border: 0; border-radius: 0; }
.player-frame:fullscreen.controls-hidden,
.player-frame.pseudo-fullscreen.controls-hidden { cursor: none; }
.player-frame:fullscreen.controls-hidden video,
.player-frame.pseudo-fullscreen.controls-hidden video { cursor: none; }
.player-frame:fullscreen.controls-hidden .player-controls,
.player-frame:fullscreen.controls-hidden .player-top,
.player-frame.pseudo-fullscreen.controls-hidden .player-controls,
.player-frame.pseudo-fullscreen.controls-hidden .player-top {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

.player-topline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 20px 22px 50px;
  opacity: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.7), transparent);
  transition: opacity .22s ease;
  pointer-events: none;
}
.controls-visible .player-topline { opacity: 1; }
.live-pill, .hd-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 6px; font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.live-pill { color: #fff; background: rgba(255,65,83,.82); }
.live-pill i { background: #fff; box-shadow: none; }
.hd-pill { margin-left: auto; color: #c4cbc0; border: 1px solid rgba(255,255,255,.16); background: rgba(0,0,0,.32); }
.player-channel { color: rgba(255,255,255,.82); font-size: 11px; font-weight: 650; }

.player-state {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-content: center;
  place-items: center;
  gap: 10px;
  color: #aeb6aa;
  background: rgba(2,3,2,.28);
  font-size: 11px;
}
.spinner { animation: spin 1s linear infinite; }
.player-state .spinner { width: 28px; color: var(--lime); }
.error-state { padding: 20px; text-align: center; background: rgba(4,6,4,.88); }
.error-state > svg { width: 32px; height: 32px; color: var(--lime); }
.error-state strong { color: #edf1ea; font-size: 16px; }
.error-state span { max-width: 410px; color: #889087; font-size: 11px; line-height: 1.5; }
.error-state button { margin-top: 5px; padding: 9px 16px; border: 0; border-radius: 8px; color: #12150e; background: var(--lime); cursor: pointer; font-size: 10px; font-weight: 800; }
@keyframes spin { to { transform: rotate(360deg); } }

.center-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: #14190f;
  background: var(--lime);
  box-shadow: 0 16px 45px rgba(0,0,0,.5), 0 0 0 8px rgba(201,255,99,.08);
  cursor: pointer;
}
.center-play:hover { transform: translate(-50%, -50%) scale(1.05); }
.center-play svg { width: 23px; height: 23px; margin-left: 3px; }

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  padding: 72px 20px 16px;
  opacity: 0;
  transform: translateY(5px);
  background: linear-gradient(to top, rgba(0,0,0,.94), rgba(0,0,0,.62) 45%, transparent);
  transition: opacity .22s ease, transform .22s ease;
  pointer-events: none;
}
.controls-visible .player-controls, .player-frame:focus-within .player-controls { opacity: 1; transform: none; pointer-events: auto; }
.timeline-row { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 8px; margin-bottom: 10px; color: rgba(255,255,255,.62); font-size: 8px; font-variant-numeric: tabular-nums; }
input[type="range"] { accent-color: var(--lime); }
.timeline {
  --progress: 0%;
  width: 100%;
  height: 3px;
  margin: 0;
  appearance: none;
  border-radius: 4px;
  background: linear-gradient(to right, var(--lime) 0 var(--progress), rgba(255,255,255,.26) var(--progress) 100%);
  cursor: pointer;
}
.timeline::-webkit-slider-thumb { width: 10px; height: 10px; appearance: none; border: 0; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(201,255,99,.2); }
.timeline::-moz-range-thumb { width: 10px; height: 10px; border: 0; border-radius: 50%; background: var(--lime); }
.control-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 15px; }
.control-cluster { min-width: 0; display: flex; align-items: center; gap: 5px; }
.right-controls { margin-left: auto; }
.control-button {
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: rgba(255,255,255,.86);
  background: transparent;
  cursor: pointer;
}
.control-button:hover, .control-button.active { color: var(--lime); background: rgba(255,255,255,.08); }
.skip-control { gap: 1px; font-size: 9px; font-weight: 850; }
.skip-control span { font-size: 8px; }
.control-button svg { width: 17px; height: 17px; }
.volume-control { display: flex; align-items: center; }
.volume-control input { width: 64px; height: 3px; }
.control-title { min-width: 0; display: grid; gap: 2px; margin-left: 9px; color: rgba(255,255,255,.83); font-size: 10px; font-weight: 700; }
.control-title small { color: rgba(255,255,255,.38); font-size: 8px; font-weight: 500; }
.text-control { max-width: 135px; }
.text-control span { overflow: hidden; max-width: 86px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.rate-select { position: relative; display: flex; align-items: center; }
.rate-select select { height: 32px; appearance: none; padding: 0 25px 0 9px; border: 0; outline: 0; border-radius: 7px; color: #e3e7df; background: transparent; cursor: pointer; font-size: 9px; font-weight: 700; }
.rate-select select:hover { background: rgba(255,255,255,.08); }
.rate-select option { color: #fff; background: #111; }
.rate-select svg { position: absolute; right: 7px; width: 11px; pointer-events: none; }
.quality-select { position: relative; height: 32px; display: flex; align-items: center; gap: 5px; padding-left: 8px; border-radius: 7px; color: var(--lime); background: rgba(201,255,99,.06); }
.quality-select:hover { background: rgba(201,255,99,.1); }
.quality-select > svg:first-child { width: 14px; flex: 0 0 auto; }
.quality-select > svg:last-child { position: absolute; right: 6px; width: 11px; pointer-events: none; }
.quality-select select { width: 122px; height: 32px; appearance: auto; padding: 0 5px 0 0; border: 0; outline: 0; color: #dcff9a; background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; }
.quality-select select:disabled { cursor: default; opacity: .75; }
.quality-select option { color: #fff; background: #111; }

.subtitle-panel {
  position: absolute;
  top: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 10;
  width: min(340px, calc(100% - 28px));
  padding: 18px;
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  background: rgba(13,16,13,.96);
  box-shadow: 0 24px 75px rgba(0,0,0,.58);
  backdrop-filter: blur(18px);
}
.panel-heading { justify-content: space-between; margin-bottom: 17px; }
.panel-heading > div { display: grid; gap: 5px; }
.panel-heading span { color: #717970; font-size: 8px; font-weight: 850; letter-spacing: .15em; }
.panel-heading strong { font-size: 17px; }
.panel-section { padding: 14px 0; border-top: 1px solid var(--line); }
.panel-section > label, .section-label { display: block; margin-bottom: 8px; color: #737a72; font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.track-option { width: 100%; display: flex; align-items: center; justify-content: space-between; margin: 2px 0; padding: 9px 10px; border: 0; border-radius: 8px; color: #aab1a7; background: transparent; text-align: left; cursor: pointer; font-size: 11px; }
.track-option:hover { background: rgba(255,255,255,.05); }
.track-option.active { color: #11150d; background: var(--lime); font-weight: 750; }
.track-option span { display: grid; gap: 3px; }
.track-option small { color: inherit; opacity: .58; font-size: 8px; font-weight: 500; }
.track-option svg { width: 15px; }
.subtitle-size-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.subtitle-size-options button { min-width: 0; height: 55px; display: grid; place-items: center; align-content: center; gap: 3px; padding: 5px 2px; border: 1px solid var(--line); border-radius: 8px; color: #9fa79c; background: #111511; cursor: pointer; }
.subtitle-size-options button:hover { border-color: rgba(201,255,99,.35); background: rgba(201,255,99,.05); }
.subtitle-size-options button.active { border-color: var(--lime); color: #11150d; background: var(--lime); box-shadow: 0 0 0 1px rgba(201,255,99,.18); }
.subtitle-size-options button b { line-height: 1; font-size: 12px; }
.subtitle-size-options button:nth-child(2) b { font-size: 15px; }
.subtitle-size-options button:nth-child(3) b { font-size: 18px; }
.subtitle-size-options button:nth-child(4) b { font-size: 21px; }
.subtitle-size-options button span { overflow: hidden; width: 100%; font-size: 7px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.no-tracks { color: #70786f; font-size: 10px; line-height: 1.5; }
.upload-row { padding-bottom: 8px; }
.upload-button { width: 100%; height: 36px; display: flex !important; align-items: center; justify-content: center; gap: 7px; margin: 0 !important; border: 1px dashed rgba(201,255,99,.3); border-radius: 8px; color: var(--lime) !important; background: rgba(201,255,99,.04); cursor: pointer; font-size: 9px !important; letter-spacing: 0 !important; }
.upload-button:hover { background: rgba(201,255,99,.08); }
.upload-button svg { width: 14px; }
.upload-button input { display: none; }
.subtitle-url-form { display: grid; grid-template-columns: .75fr 1.25fr; gap: 6px; padding-bottom: 14px; }
.subtitle-url-form input { min-width: 0; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; outline: 0; color: #e0e5dc; background: #0a0d0b; font-size: 9px; }
.subtitle-url-form input:focus { border-color: rgba(201,255,99,.5); }
.subtitle-url-form button { grid-column: 1 / -1; height: 33px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 7px; color: #11150d; background: var(--lime); cursor: pointer; font-size: 9px; font-weight: 800; }
.subtitle-url-form button svg { width: 13px; }
.appearance-section { padding-bottom: 0; }
.appearance-row { min-height: 35px; justify-content: space-between; color: #a8afa5; font-size: 10px; }
.color-options { display: flex; gap: 8px; }
.color-options button { width: 18px; height: 18px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; }
.color-options button.active { border-color: #141814; box-shadow: 0 0 0 1px var(--lime); }
.size-row > div { display: flex; align-items: center; gap: 9px; }
.size-row button { width: 27px; height: 25px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: #181c18; cursor: pointer; font-size: 9px; }
.size-row b { min-width: 30px; color: #d2d8cf; text-align: center; font-size: 9px; }

.below-player { justify-content: space-between; gap: 24px; padding: 22px 3px 0; }
.program-info { min-width: 0; display: flex; align-items: center; gap: 14px; }
.on-air-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(201,255,99,.18); border-radius: 12px; color: var(--lime); background: rgba(201,255,99,.06); }
.on-air-icon svg { width: 20px; }
.program-info h1 { margin: 4px 0 3px; overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.program-info p { margin: 0; color: #717971; font-size: 10px; }
.player-features { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.player-features span { height: 31px; display: flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; color: #7d857b; font-size: 9px; }
.player-features svg { width: 13px; color: var(--lime); }

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(7px);
}
.source-modal {
  width: min(590px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #101310;
  box-shadow: 0 35px 110px rgba(0,0,0,.65);
}
.modal-head { align-items: flex-start; justify-content: space-between; padding: 24px 25px 20px; }
.modal-head h2 { margin: 5px 0 7px; font-size: 22px; letter-spacing: -.02em; }
.modal-head p { margin: 0; color: #7a8278; font-size: 10px; }
.source-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 25px 20px; border-bottom: 1px solid var(--line); }
.source-tabs button { height: 42px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px; color: #838b81; background: #141814; cursor: pointer; font-size: 10px; font-weight: 700; }
.source-tabs button.active { border-color: rgba(201,255,99,.42); color: var(--lime); background: rgba(201,255,99,.06); }
.source-tabs svg { width: 14px; }
.source-form { display: grid; gap: 15px; padding: 22px 25px; }
.source-form > label, .split-fields label { display: grid; gap: 7px; }
.source-form label > span, .split-fields label > span { display: flex; justify-content: space-between; color: #a8b0a5; font-size: 10px; font-weight: 650; }
.source-form label small { color: #687067; font-size: 8px; font-weight: 500; }
.source-form input, .inline-url-form input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: #eef1eb; background: #0a0d0b; font-size: 11px; }
.source-form input:focus, .inline-url-form input:focus { border-color: rgba(201,255,99,.55); box-shadow: 0 0 0 3px rgba(201,255,99,.05); }
.source-form input::placeholder, .inline-url-form input::placeholder { color: #555d54; }
.split-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-submit { height: 45px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 3px; border: 0; border-radius: 9px; color: #11150d; background: var(--lime); cursor: pointer; font-size: 11px; font-weight: 850; }
.form-submit:hover { background: #d4ff82; }
.form-submit:disabled { opacity: .6; cursor: wait; }
.form-submit svg { width: 16px; }
.file-drop { height: 125px; display: flex !important; align-items: center; justify-content: center; gap: 6px !important; border: 1px dashed rgba(201,255,99,.28); border-radius: 11px; color: #aeb5aa; background: rgba(201,255,99,.035); cursor: pointer; text-align: center; }
.file-drop:hover { border-color: rgba(201,255,99,.5); background: rgba(201,255,99,.06); }
.file-drop > svg { width: 25px; color: var(--lime); }
.file-drop strong { font-size: 11px; }
.file-drop > span { display: block !important; color: #697167 !important; font-size: 9px !important; font-weight: 500 !important; }
.file-drop input { display: none; }
.divider { display: flex; align-items: center; gap: 10px; color: #5d655c; font-size: 8px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.inline-url-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.inline-url-form button { min-width: 82px; display: flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 9px; color: #11150d; background: var(--lime); cursor: pointer; font-size: 10px; font-weight: 800; }
.inline-url-form svg { width: 14px; }
.portal-note { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid rgba(201,255,99,.15); border-radius: 8px; color: #8d9589; background: rgba(201,255,99,.035); font-size: 9px; line-height: 1.5; }
.portal-note svg { width: 14px; flex: 0 0 auto; color: var(--lime); }
.form-error { margin: -7px 25px 18px; padding: 10px 12px; border: 1px solid rgba(255,94,108,.25); border-radius: 8px; color: #ff929d; background: rgba(255,94,108,.06); font-size: 9px; line-height: 1.45; }
.modal-foot { display: flex; align-items: center; gap: 7px; padding: 14px 25px 17px; border-top: 1px solid var(--line); color: #5f675e; font-size: 8px; }
.modal-foot svg { width: 13px; }
.mobile-scrim { display: none; }

/* Login */
.login-shell {
  min-height: 100vh;
  padding: 0 38px 38px;
  background:
    radial-gradient(circle at 24% 12%, rgba(201,255,99,.065), transparent 28%),
    #080a09;
}
.login-header {
  max-width: 1450px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.login-brand { pointer-events: none; }
.admin-link {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #9ca49a;
  background: rgba(255,255,255,.025);
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
}
.viewer-session { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid rgba(229,182,79,.2); border-radius: 11px; color: var(--lime); background: rgba(229,182,79,.05); }
.viewer-session > svg { width: 16px; flex: 0 0 auto; }
.viewer-session span { display: grid; gap: 3px; color: #777f75; font-size: 8px; }
.viewer-session b { max-width: 190px; overflow: hidden; color: #c8cec5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-link:hover { color: var(--lime); border-color: rgba(201,255,99,.25); }
.admin-link svg { width: 14px; }
.login-stage {
  max-width: 1450px;
  min-height: min(780px, calc(100vh - 130px));
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(430px, .85fr);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #0d100e;
  box-shadow: 0 35px 110px rgba(0,0,0,.36);
}
.login-story { position: relative; min-height: 650px; overflow: hidden; background: #0d100e; }
.login-art {
  position: absolute;
  inset: 0;
  background-image: url("/login-illustration.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.015);
}
.story-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(5,7,5,.98) 3%, rgba(5,7,5,.7) 34%, transparent 66%),
    linear-gradient(to right, transparent 72%, rgba(5,7,5,.36));
}
.story-copy { position: absolute; left: 54px; right: 50px; bottom: 47px; z-index: 2; }
.story-copy .live-pill { width: fit-content; margin-bottom: 17px; color: #12160e; background: var(--lime); }
.story-copy .live-pill i { background: #12160e; }
.story-copy h1 { margin: 0; max-width: 680px; font-size: clamp(36px, 4.4vw, 65px); line-height: .98; letter-spacing: -.055em; }
.story-copy h1 em { color: var(--lime); font-style: normal; }
.story-copy p { max-width: 555px; margin: 18px 0 22px; color: rgba(237,242,233,.62); font-size: 12px; line-height: 1.6; }
.story-features { display: flex; gap: 8px; flex-wrap: wrap; }
.story-features span { height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; color: rgba(255,255,255,.74); background: rgba(10,13,10,.5); backdrop-filter: blur(10px); font-size: 9px; font-weight: 650; }
.story-features svg { width: 13px; color: var(--lime); }
.login-panel { display: grid; place-items: center; padding: 52px clamp(34px, 4.5vw, 70px); border-left: 1px solid var(--line); background: #101310; }
.login-panel-inner { width: 100%; max-width: 475px; }
.login-heading { margin-bottom: 29px; }
.login-heading h2 { margin: 8px 0 8px; font-size: clamp(29px, 3vw, 40px); line-height: 1.05; letter-spacing: -.04em; }
.login-heading p { max-width: 430px; margin: 0; color: #747c73; font-size: 10px; line-height: 1.6; }
.viewer-login-form { display: grid; gap: 12px; }
.login-field {
  position: relative;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #687067;
  background: #0a0d0b;
}
.login-field:focus-within { border-color: rgba(201,255,99,.52); box-shadow: 0 0 0 3px rgba(201,255,99,.045); color: var(--lime); }
.login-field > svg { width: 18px; flex: 0 0 auto; }
.login-field input, .login-field select { min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: 0; color: #edf2e9; background: transparent; font-size: 12px; }
.login-field input::placeholder { color: #626960; }
.login-field select { appearance: none; cursor: pointer; }
.login-field select:disabled { cursor: default; color: #5c635b; }
.login-field option { color: #fff; background: #111511; }
.show-password { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; color: #646b63; background: transparent; cursor: pointer; }
.show-password:hover { color: var(--lime); background: rgba(255,255,255,.05); }
.show-password svg { width: 16px; }
.dns-field > svg:last-child { width: 14px; pointer-events: none; }
.login-error { padding: 10px 12px; border: 1px solid rgba(255,94,108,.24); border-radius: 8px; color: #ff929d; background: rgba(255,94,108,.055); font-size: 9px; line-height: 1.45; }
.setup-callout { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid rgba(201,255,99,.18); border-radius: 9px; color: #737b71; background: rgba(201,255,99,.035); }
.setup-callout > svg { width: 16px; color: var(--lime); }
.setup-callout span { display: grid; gap: 2px; font-size: 8px; line-height: 1.35; }
.setup-callout b { color: #abb2a8; font-size: 9px; }
.setup-callout a { color: var(--lime); font-size: 9px; font-weight: 800; text-decoration: none; }
.login-submit { height: 52px; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 3px; border: 0; border-radius: 10px; color: #11150d; background: var(--lime); box-shadow: 0 13px 35px rgba(201,255,99,.1); cursor: pointer; font-size: 11px; font-weight: 850; }
.login-submit:hover { background: #d5ff86; transform: translateY(-1px); }
.login-submit:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.login-submit svg { width: 17px; }
.login-relay-button { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border: 1px solid rgba(229,182,79,.22); border-radius: 10px; color: #8f968c; background: rgba(229,182,79,.035); cursor: pointer; font-size: 10px; }
.login-relay-button:hover { color: #efca73; border-color: rgba(229,182,79,.48); background: rgba(229,182,79,.08); }
.login-relay-button b { color: #e8c367; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.login-legal { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 0; color: #5e665d; font-size: 8px; }
.login-legal svg { width: 12px; color: #788275; }

/* Admin authentication */
.admin-login-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; background: radial-gradient(circle at 50% 15%, rgba(201,255,99,.08), transparent 30%), #080a09; }
.admin-login-card { width: min(100%, 440px); padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: #101310; box-shadow: 0 30px 100px rgba(0,0,0,.4); text-align: center; }
.admin-login-card > a { display: inline-block; }
.admin-login-logo { height: 86px; margin-bottom: 22px; }
.admin-login-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 17px; border: 1px solid rgba(201,255,99,.2); border-radius: 14px; color: var(--lime); background: rgba(201,255,99,.055); }
.admin-login-icon svg { width: 22px; }
.admin-login-card h1 { margin: 8px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.admin-login-card > p { margin: 0 auto 24px; max-width: 340px; color: #747c73; font-size: 10px; line-height: 1.6; }
.admin-login-form { display: grid; gap: 12px; text-align: left; }
.admin-security-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 18px; color: #626a61; font-size: 8px; }
.admin-security-note svg { width: 12px; color: #7f897c; }

/* Admin */
.admin-shell { min-height: 100vh; background: #080a09; }
.admin-topbar { height: 72px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 32px; border-bottom: 1px solid var(--line); background: #0c0f0d; }
.admin-back { width: fit-content; display: flex; align-items: center; gap: 7px; color: #858d83; text-decoration: none; font-size: 10px; font-weight: 700; }
.admin-back:hover { color: var(--lime); }
.admin-back svg { width: 15px; }
.admin-brand { justify-self: center; pointer-events: none; }
.admin-user { justify-self: end; display: flex; align-items: center; gap: 9px; color: #a5ada2; font-size: 10px; }
.admin-user > svg { width: 16px; color: var(--lime); }
.admin-user span { display: grid; gap: 2px; }
.admin-user small { color: #626a61; font-size: 7px; letter-spacing: .13em; }
.admin-user button { width: 32px; height: 32px; display: grid; place-items: center; margin-left: 5px; border: 1px solid var(--line); border-radius: 8px; color: #747c73; background: rgba(255,255,255,.025); cursor: pointer; }
.admin-user button:hover { color: #ff8f9a; border-color: rgba(255,143,154,.25); }
.admin-user button svg { width: 14px; }
.admin-content { max-width: 1240px; margin: 0 auto; padding: 48px 30px 70px; }
.admin-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.admin-intro h1 { margin: 7px 0 7px; font-size: 36px; letter-spacing: -.045em; }
.admin-intro p { margin: 0; color: #737b72; font-size: 10px; }
.server-count { height: 36px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid rgba(201,255,99,.18); border-radius: 9px; color: #aab2a6; background: rgba(201,255,99,.04); font-size: 9px; font-weight: 700; }
.server-count svg { width: 14px; color: var(--lime); }
.admin-grid { display: grid; grid-template-columns: minmax(310px, .72fr) minmax(0, 1.28fr); gap: 18px; align-items: start; }
.admin-card { border: 1px solid var(--line); border-radius: 15px; background: #101310; box-shadow: 0 18px 60px rgba(0,0,0,.16); }
.admin-card-title { display: flex; align-items: center; gap: 11px; padding: 20px; border-bottom: 1px solid var(--line); }
.admin-card-title > svg { width: 18px; color: var(--lime); }
.admin-card-title h2 { margin: 0 0 3px; font-size: 13px; }
.admin-card-title p { margin: 0; color: #687067; font-size: 8px; }
.add-dns-card form { display: grid; gap: 14px; padding: 20px; }
.add-dns-card label { display: grid; gap: 7px; }
.add-dns-card label span { color: #9ba398; font-size: 9px; font-weight: 700; }
.add-dns-card input { height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; outline: 0; color: #edf1e9; background: #0a0d0b; font-size: 10px; }
.add-dns-card input:focus { border-color: rgba(201,255,99,.52); }
.admin-error { margin: -4px 0 0; color: #ff8f9a; font-size: 9px; }
.security-note { display: flex; gap: 9px; margin: 0 20px 20px; padding: 11px; border: 1px solid rgba(201,255,99,.12); border-radius: 8px; background: rgba(201,255,99,.025); }
.security-note > svg { width: 15px; flex: 0 0 auto; color: var(--lime); }
.security-note span { display: grid; gap: 3px; color: #666e65; font-size: 8px; line-height: 1.45; }
.security-note b { color: #9ea69b; font-size: 9px; }
.dns-list { padding: 8px; }
.dns-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 12px; border-radius: 10px; }
.dns-row:hover { background: rgba(255,255,255,.025); }
.dns-row.inactive { opacity: .52; }
.dns-icon { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--lime); background: #151915; }
.dns-icon svg { width: 16px; }
.dns-copy { min-width: 0; display: grid; gap: 4px; }
.dns-copy strong { font-size: 10px; }
.dns-copy span { overflow: hidden; color: #687067; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.status-toggle { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; color: #697168; background: transparent; cursor: pointer; font-size: 8px; font-weight: 700; }
.status-toggle i { width: 24px; height: 14px; display: flex; align-items: center; justify-content: flex-start; padding: 2px; border-radius: 12px; background: #303630; }
.status-toggle i::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #80877f; }
.status-toggle i svg { display: none; }
.status-toggle.active { color: #9faa98; }
.status-toggle.active i { justify-content: flex-end; background: rgba(201,255,99,.22); }
.status-toggle.active i::before { background: var(--lime); }
.delete-dns { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; color: #5f665f; background: transparent; cursor: pointer; }
.delete-dns:hover { color: #ff7b88; background: rgba(255,94,108,.07); }
.delete-dns svg { width: 14px; }
.dns-empty { display: grid; place-items: center; gap: 7px; padding: 55px 20px; color: #60685f; text-align: center; }
.dns-empty svg { width: 24px; color: #737b71; }
.dns-empty strong { color: #a2aaa0; font-size: 11px; }
.dns-empty span { font-size: 8px; }
.admin-denied { display: grid; place-content: center; place-items: center; gap: 9px; padding: 30px; text-align: center; }
.admin-denied > svg { width: 38px; height: 38px; color: #ff7e8a; }
.admin-denied h1 { margin: 7px 0 0; }
.admin-denied p { color: #7a8279; font-size: 10px; }
.admin-denied a { margin-top: 7px; padding: 9px 14px; border-radius: 8px; color: #11150d; background: var(--lime); text-decoration: none; font-size: 9px; font-weight: 800; }

@media (max-width: 1080px) {
  :root { --sidebar: 274px; }
  .speed-badge { display: none; }
  .optional-control { display: none; }
  .control-title { max-width: 130px; }
  .login-stage { grid-template-columns: 1fr 460px; }
  .story-copy { left: 35px; right: 32px; bottom: 37px; }
}

@media (max-width: 860px) {
  .library { transform: translateX(-102%); box-shadow: 20px 0 60px rgba(0,0,0,.5); transition: transform .25s ease; }
  .library.library-open { transform: translateX(0); }
  .mobile-close, .menu-button { display: inline-grid; }
  .mobile-scrim { position: fixed; inset: 0; z-index: 25; display: block; border: 0; background: rgba(0,0,0,.63); }
  .watch-area { margin-left: 0; }
  .topbar { padding: 0 20px; }
  .content-wrap { padding: 20px; }
  .player-frame { min-height: 0; max-height: none; }
  .login-shell { padding: 0 20px 28px; }
  .login-header { height: 76px; }
  .login-stage { grid-template-columns: 1fr; }
  .login-story { min-height: 390px; }
  .login-art { background-position: center 48%; }
  .story-copy h1 { font-size: 41px; }
  .login-panel { padding: 46px 28px; border-top: 1px solid var(--line); border-left: 0; }
  .admin-grid { grid-template-columns: 1fr; }
  .control-row { align-items: stretch; }
  .control-row > .control-cluster { width: 100%; }
  .right-controls { margin-left: 0; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  .right-controls::-webkit-scrollbar { display: none; }
}

@media (max-width: 620px) {
  .topbar { height: 64px; padding: 0 14px; }
  .topbar-left > div { display: none; }
  .secondary-action { width: 38px; padding: 0; justify-content: center; }
  .secondary-action { font-size: 0; }
  .primary-action { height: 36px; padding: 0 10px; }
  .content-wrap { padding: 12px 0 24px; }
  .player-frame { border-width: 1px 0; border-radius: 0; }
  .player-topline { padding: 12px 14px 40px; }
  .player-controls { padding: 60px 10px 10px; }
  .timeline-row { grid-template-columns: 34px 1fr 34px; gap: 5px; }
  .volume-control input, .control-title, #backupPlayerToggle span, .rate-select { display: none; }
  #audioToggle, #captionsToggle { flex: 0 0 auto; padding: 0 9px; border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.34); }
  #audioToggle span, #captionsToggle span { display: inline; max-width: 72px; }
  .quality-select { padding-left: 6px; }
  .quality-select > svg:first-child { display: none; }
  .quality-select select { width: 70px; }
  .control-button { min-width: 31px; padding: 0 6px; }
  .below-player { display: grid; padding: 18px 16px 0; }
  .player-features { justify-content: flex-start; }
  .player-features span:last-child { display: none; }
  .subtitle-panel { top: 7px; right: 7px; bottom: 7px; width: min(330px, calc(100% - 14px)); }
  .source-modal { border-radius: 15px; }
  .modal-head { padding: 20px 18px 16px; }
  .modal-head h2 { font-size: 18px; }
  .source-tabs { padding: 0 18px 16px; }
  .source-tabs button { font-size: 0; }
  .source-tabs button svg { width: 17px; }
  .source-form { padding: 19px 18px; }
  .split-fields { grid-template-columns: 1fr; }
  .form-error { margin-left: 18px; margin-right: 18px; }
  .modal-foot { padding-left: 18px; padding-right: 18px; }
  .login-shell { padding: 0; }
  .login-header { height: 68px; padding: 0 15px; }
  .admin-link { width: 38px; padding: 0; justify-content: center; font-size: 0; }
  .login-stage { border-width: 1px 0; border-radius: 0; }
  .login-story { min-height: 330px; }
  .story-copy { left: 20px; right: 20px; bottom: 25px; }
  .story-copy h1 { font-size: 34px; }
  .story-copy p { margin: 12px 0 0; font-size: 10px; }
  .story-features, .story-copy .live-pill { display: none; }
  .login-panel { padding: 37px 19px 42px; }
  .login-heading h2 { font-size: 30px; }
  .admin-topbar { grid-template-columns: 1fr auto; padding: 0 17px; }
  .admin-brand { display: none; }
  .admin-user { font-size: 0; }
  .admin-user small { display: none; }
  .admin-content { padding: 34px 15px 50px; }
  .admin-intro { align-items: flex-start; }
  .admin-intro h1 { font-size: 31px; }
  .server-count { flex: 0 0 auto; }
  .dns-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .status-toggle { grid-column: 2; justify-self: start; }
  .delete-dns { grid-column: 3; grid-row: 1; }
}

@media (max-width: 400px) {
  .library { width: 288px; }
  .primary-action { font-size: 0; }
  .primary-action svg { width: 18px; }
  .player-features { display: none; }
}

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

.login-art { background-image: url("login-illustration.png"); }

@media (max-width: 860px) {
  .app-shell { display: flex; flex-direction: column; }
  .library { position: relative; inset: auto; width: 100%; height: min(48vh, 430px); transform: none; }
  .content { margin-left: 0; }
  .player-page { padding: 18px 0 30px; }
  .topbar { position: relative; }
}

/* Catalog home */
.catalog-shell {
  min-height: 100vh;
  padding: 0 5vw 36px;
  color: #f4f1e8;
  background:
    radial-gradient(circle at 18% 12%, rgba(229,182,79,.14), transparent 30%),
    radial-gradient(circle at 88% 90%, rgba(92,74,198,.14), transparent 32%),
    #070908;
}
.catalog-topbar {
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.catalog-logo { width: auto; height: 86px; object-fit: contain; }
.catalog-account { display: flex; align-items: center; gap: 12px; color: #aab0a7; font-size: 11px; }
.catalog-account span:first-child { display: grid; gap: 3px; }
.catalog-account b { color: #f0f2ed; }
.catalog-account small { color: #717970; font-size: 9px; }
.catalog-account button {
  height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 9px;
  color: #c1c7bd;
  background: rgba(255,255,255,.035);
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}
.catalog-account select {
  min-height: 34px;
  max-width: 180px;
  color: #f0f2ed;
  background: #111510;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  padding: 0 30px 0 10px;
  font: inherit;
}
.catalog-account button:hover { color: #f2c861; border-color: rgba(229,182,79,.42); background: rgba(229,182,79,.06); }
.catalog-account button:disabled { opacity: .5; cursor: wait; }
.catalog-account .relay-status-button.connected { color: #10150d; border-color: #e5b64f; background: #e5b64f; }
.catalog-hero { max-width: 780px; padding: 58px 0 33px; }
.catalog-hero h1 { margin: 9px 0 10px; font-size: clamp(36px, 5vw, 70px); line-height: .96; letter-spacing: -.055em; }
.catalog-hero p { margin: 0; color: #858d83; font-size: 12px; line-height: 1.65; }
.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.catalog-tile {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  display: grid;
  align-content: end;
  justify-items: start;
  gap: 21px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 28px 75px rgba(0,0,0,.26);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.catalog-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,.34)); pointer-events: none; }
.catalog-tile:hover { transform: translateY(-7px); border-color: rgba(255,255,255,.32); box-shadow: 0 35px 90px rgba(0,0,0,.36); }
.catalog-live { background: linear-gradient(145deg, #66d39c 0%, #2e52d8 100%); }
.catalog-movies { background: linear-gradient(145deg, #c83f62 0%, #ed9a3f 100%); }
.catalog-series { background: linear-gradient(145deg, #9b3daf 0%, #5c8ee1 100%); }
.catalog-icon { position: relative; z-index: 1; width: 78px; height: 78px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.32); border-radius: 22px; background: rgba(0,0,0,.12); backdrop-filter: blur(8px); font-size: 38px; }
.catalog-tile-copy { position: relative; z-index: 1; display: grid; gap: 5px; }
.catalog-tile-copy small { font-size: 9px; font-style: normal; font-weight: 850; letter-spacing: .18em; opacity: .75; }
.catalog-tile-copy strong { font-size: clamp(32px, 4vw, 52px); line-height: .95; letter-spacing: -.045em; }
.catalog-tile-copy em { margin-top: 6px; font-size: 11px; font-style: normal; opacity: .77; }
.catalog-arrow { position: absolute; right: 25px; bottom: 28px; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.18); font-size: 20px; }
.catalog-loading { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; place-items: center; gap: 13px; color: #e6e8e2; background: rgba(3,4,3,.86); backdrop-filter: blur(8px); font-size: 11px; }
.catalog-loading .spinner, .spinner { width: 30px; height: 30px; border: 3px solid rgba(255,255,255,.15); border-top-color: #e5b64f; border-radius: 50%; animation: catalogSpin .8s linear infinite; }
.catalog-error { max-width: 720px; margin: 18px auto 0; padding: 13px 15px; border: 1px solid rgba(255,94,108,.25); border-radius: 10px; color: #ff9ba4; background: rgba(255,94,108,.06); text-align: center; font-size: 10px; }
.catalog-footer { padding: 30px 0 0; color: #5f665f; text-align: center; font-size: 9px; }
.catalog-home-button { width: 100%; height: 38px; margin: 14px 0 0; border: 1px solid rgba(229,182,79,.2); border-radius: 9px; color: #e5b64f; background: rgba(229,182,79,.055); cursor: pointer; font-size: 10px; font-weight: 800; }
.refresh-catalog-button { margin-top: 7px; color: #929a90; border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.025); }
.back-one-button { color: #11150d; background: #e5b64f; }
.back-one-button:hover { background: #f1c965; }
.player-back-button { height: 34px; padding: 0 12px; border: 1px solid rgba(229,182,79,.3); border-radius: 8px; color: #e5b64f; background: rgba(229,182,79,.07); cursor: pointer; font-size: 9px; font-weight: 800; }
.player-back-button:hover { color: #11150d; background: #e5b64f; }
.library-empty { padding: 35px 12px; color: #6f776e; text-align: center; font-size: 10px; }
@keyframes catalogSpin { to { transform: rotate(360deg); } }

@media (max-width: 980px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-tile { min-height: 240px; }
}
@media (max-width: 680px) {
  .catalog-shell { padding: 0 16px 28px; }
  .catalog-topbar { min-height: 90px; align-items: flex-start; padding: 12px 0; }
  .catalog-logo { height: 64px; }
  .catalog-account { max-width: 220px; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
  .catalog-account > span, .catalog-account > small { width: 100%; text-align: right; }
  .catalog-hero { padding: 43px 0 26px; }
  .catalog-hero h1 { font-size: 42px; }
  .catalog-tile { min-height: 215px; padding: 23px; border-radius: 18px; }
  .catalog-icon { width: 60px; height: 60px; border-radius: 17px; font-size: 29px; }
  .catalog-arrow { right: 20px; bottom: 22px; }
}

/* Poster catalog */
.browse-shell { min-height: 100vh; color: #f4f5f1; background: #050706; }
.browse-topbar { min-height: 92px; display: grid; grid-template-columns: auto auto minmax(180px,1fr) minmax(180px,320px) auto; align-items: center; gap: 18px; padding: 0 26px; border-bottom: 1px solid rgba(255,255,255,.09); background: linear-gradient(90deg,#070908,#182238 55%,#080b0a); }
.browse-logo { width: 92px; height: 62px; object-fit: contain; }
.browse-topbar h1 { margin: 0; overflow: hidden; font-size: clamp(17px,2vw,27px); text-align: center; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.02em; }
.browse-icon-button { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; color: #fff; background: rgba(0,0,0,.24); cursor: pointer; font-size: 25px; }
.browse-icon-button:hover { color: #f1c65f; border-color: rgba(229,182,79,.4); }
.browse-search { height: 44px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: rgba(0,0,0,.25); }
.browse-search input { min-width: 0; width: 100%; border: 0; outline: 0; color: #fff; background: transparent; font-size: 11px; }
.browse-search input::placeholder { color: #878d88; }
.browse-layout { min-height: calc(100vh - 92px); display: grid; grid-template-columns: 300px minmax(0,1fr); }
.browse-categories { border-right: 1px solid rgba(255,255,255,.09); background: #080a09; }
.browse-category-heading { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.08); color: #adb3ab; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.browse-category-heading span { min-width: 30px; padding: 4px 7px; border-radius: 12px; color: #111; background: #e5b64f; text-align: center; font-size: 8px; }
.category-search-box { height: 55px; display: flex; align-items: center; gap: 10px; padding: 0 17px; border-bottom: 1px solid rgba(255,255,255,.08); color: #e4e7e1; background: #242725; }
.category-search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: #fff; background: transparent; font-size: 11px; }
.category-search-box input::placeholder { color: #b5bab3; }
.browse-category-list { max-height: calc(100vh - 211px); overflow-y: auto; padding: 7px 0 25px; }
.browse-category-list button { width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 21px; border: 0; border-bottom: 1px solid rgba(255,255,255,.055); color: #b8bdb6; background: transparent; text-align: left; cursor: pointer; font-size: 11px; }
.browse-category-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browse-category-list button b { color: #5e655e; font-size: 18px; }
.browse-category-list button:hover, .browse-category-list button.active { color: #fff; background: linear-gradient(90deg,rgba(58,106,119,.88),rgba(58,106,119,.42)); }
.browse-category-list button.active b { color: #fff; }
.browse-results { position: relative; min-width: 0; padding: 24px; }
.browse-results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.browse-results-heading h2 { margin: 5px 0 0; font-size: clamp(20px,2.4vw,34px); letter-spacing: -.035em; }
.browse-results-heading > b { color: #747b74; font-size: 10px; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(155px,1fr)); gap: 24px 16px; }
.poster-card { min-width: 0; padding: 0; border: 0; color: #fff; background: transparent; text-align: left; cursor: pointer; }
.poster-art { position: relative; aspect-ratio: 2/3; overflow: hidden; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; background: linear-gradient(145deg,#1a221d,#090b0a); box-shadow: 0 13px 35px rgba(0,0,0,.3); transition: transform .2s ease,border-color .2s ease; }
.poster-card:hover .poster-art { transform: translateY(-5px) scale(1.015); border-color: rgba(229,182,79,.52); }
.poster-art img { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.poster-fallback { position: relative; z-index: 1; color: #657066; font-size: 24px; font-weight: 900; letter-spacing: -.05em; }
.poster-rating { position: absolute; top: 7px; left: 7px; z-index: 3; padding: 5px 7px; border-radius: 5px; color: #fff; background: #285caf; box-shadow: 0 3px 10px rgba(0,0,0,.3); font-size: 9px; }
.poster-copy { display: grid; gap: 5px; padding: 10px 3px 0; }
.poster-copy strong { overflow: hidden; color: #e8ebe5; font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.poster-copy small { overflow: hidden; color: #697169; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.browse-loading { position: absolute; inset: 0; z-index: 8; display: grid; place-content: center; place-items: center; gap: 11px; color: #c8cdc6; background: rgba(5,7,6,.82); backdrop-filter: blur(5px); font-size: 10px; }
.browse-empty { grid-column: 1/-1; min-height: 260px; display: grid; place-items: center; color: #697069; text-align: center; font-size: 11px; }

@media (min-width: 1500px) { .poster-grid { grid-template-columns: repeat(auto-fill,minmax(185px,1fr)); } }
@media (max-width: 900px) {
  .browse-topbar { grid-template-columns: auto auto 1fr auto; padding: 0 14px; gap: 10px; }
  .browse-search { grid-column: 1/-1; grid-row: 2; margin: 0 0 12px; }
  .browse-topbar { padding-top: 10px; }
  .browse-layout { grid-template-columns: 220px minmax(0,1fr); }
  .browse-logo { width: 72px; }
  .browse-results { padding: 18px; }
  .poster-grid { grid-template-columns: repeat(auto-fill,minmax(125px,1fr)); gap: 18px 12px; }
}
@media (max-width: 620px) {
  .browse-topbar { min-height: 126px; }
  .browse-topbar h1 { text-align: left; }
  .browse-layout { display: block; }
  .browse-categories { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.09); }
  .browse-category-heading { height: 46px; }
  .browse-category-list { max-height: none; display: flex; overflow-x: auto; padding: 6px 8px; }
  .category-search-box { height: 48px; }
  .browse-category-list button { width: auto; min-width: 150px; min-height: 42px; border: 1px solid rgba(255,255,255,.07); border-radius: 8px; }
  .browse-results { padding: 16px 10px 28px; }
  .poster-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px 8px; }
  .poster-copy strong { font-size: 9px; }
}

/* Saved IPTV users */
.manage-users-button { width: 100%; min-height: 45px; display: flex; align-items: center; justify-content: space-between; margin-top: 11px; padding: 0 15px; border: 1px solid rgba(229,182,79,.28); border-radius: 10px; color: #e9c66f; background: rgba(229,182,79,.06); cursor: pointer; font-size: 10px; font-weight: 800; }
.manage-users-button:hover { border-color: rgba(229,182,79,.58); background: rgba(229,182,79,.1); }
.manage-users-button b { min-width: 24px; padding: 4px 7px; border-radius: 20px; color: #15130c; background: #e5b64f; font-size: 9px; }
.profiles-screen { min-height: 100vh; padding: 0 clamp(24px,6vw,92px) 48px; color: #f4f5f1; background: radial-gradient(circle at 18% 5%,rgba(229,182,79,.11),transparent 28%),linear-gradient(140deg,#0d1014,#060807 60%,#12100a); }
.profiles-header { min-height: 190px; display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 32px; border-bottom: 1px solid rgba(255,255,255,.09); }
.profiles-logo { width: 140px; height: 100px; object-fit: contain; }
.profiles-header h1 { margin: 7px 0 6px; font-size: clamp(34px,4vw,62px); letter-spacing: -.055em; }
.profiles-header p { margin: 0; color: #7e857d; font-size: 12px; }
.profiles-add-user { display: flex; align-items: center; gap: 13px; padding: 8px 17px 8px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; color: #ecefe8; background: rgba(255,255,255,.035); cursor: pointer; font-size: 11px; font-weight: 800; }
.profiles-add-user b { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; color: #15130c; background: #e5b64f; font-size: 27px; font-weight: 400; }
.profiles-add-user:hover { border-color: rgba(229,182,79,.48); }
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 18px; padding: 46px 0; }
.profile-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.09); border-radius: 17px; background: linear-gradient(145deg,rgba(255,255,255,.065),rgba(255,255,255,.018)); box-shadow: 0 18px 50px rgba(0,0,0,.2); }
.profile-card:hover { border-color: rgba(229,182,79,.5); transform: translateY(-2px); }
.profile-card.current { box-shadow: inset 0 0 0 1px rgba(229,182,79,.42),0 18px 50px rgba(0,0,0,.2); }
.profile-card-open { width: 100%; min-height: 112px; display: grid; grid-template-columns: 66px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 19px 48px 19px 19px; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.profile-avatar { width: 66px; height: 66px; display: grid; place-items: center; border-radius: 18px; color: #1c160b; background: linear-gradient(145deg,#f0c75f,#aa7420); box-shadow: 0 12px 30px rgba(229,182,79,.14); font-size: 25px; font-weight: 950; }
.profile-card-copy { min-width: 0; display: grid; gap: 6px; }
.profile-card-copy strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.profile-card-copy small { color: #7f877e; font-size: 9px; letter-spacing: .06em; }
.profile-card-open > b { color: #e5b64f; font-size: 22px; }
.profile-remove { position: absolute; top: 9px; right: 9px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #70776f; background: rgba(0,0,0,.3); cursor: pointer; font-size: 18px; }
.profile-remove:hover { color: #fff; background: #c74653; }
.profiles-footer { padding-top: 22px; border-top: 1px solid rgba(255,255,255,.07); color: #5f665f; text-align: center; font-size: 9px; }
@media (max-width: 720px) {
  .profiles-screen { padding: 0 17px 35px; }
  .profiles-header { min-height: 160px; grid-template-columns: 82px 1fr; gap: 14px; }
  .profiles-logo { width: 80px; height: 68px; }
  .profiles-header p { display: none; }
  .profiles-add-user { grid-column: 1/-1; justify-self: stretch; justify-content: center; margin-bottom: 18px; }
  .profiles-grid { grid-template-columns: 1fr; padding: 30px 0; }
}

/* Universal Android and TV first-launch experience */
.device-screen {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: clamp(28px, 5vh, 54px);
  padding: clamp(28px, 5vw, 76px);
  color: #f7f5ee;
  background:
    radial-gradient(circle at 50% -10%, rgba(229,182,79,.23), transparent 34%),
    radial-gradient(circle at 7% 90%, rgba(57,93,188,.17), transparent 28%),
    linear-gradient(145deg,#0c0f0d,#050605 58%,#131008);
}
.device-header { display: grid; justify-items: center; text-align: center; }
.device-header img { width: auto; height: clamp(78px, 12vh, 132px); object-fit: contain; margin-bottom: 9px; }
.device-kicker { color: #e5b64f; font-size: 10px; font-weight: 900; letter-spacing: .24em; }
.device-header h1 { margin: 12px 0 8px; font-size: clamp(36px, 5vw, 68px); line-height: 1; letter-spacing: -.055em; }
.device-header p { margin: 0; color: #8d958b; font-size: clamp(11px, 1.2vw, 15px); }
.device-options { width: min(100%, 1050px); margin: 0 auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(15px,2vw,24px); }
.device-option {
  position: relative;
  min-height: 310px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: start;
  gap: 20px;
  padding: clamp(24px,3vw,38px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 25px;
  color: #f5f5ef;
  background: linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.018));
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease,border-color .2s ease,background .2s ease;
}
.device-option:hover, .device-option:focus-visible { transform: translateY(-5px); border-color: rgba(229,182,79,.7); background: linear-gradient(145deg,rgba(229,182,79,.14),rgba(255,255,255,.025)); }
.device-recommended { position: absolute; top: 20px; right: 20px; padding: 7px 10px; border-radius: 99px; color: #17130b; background: #e5b64f; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.device-option-icon { width: 84px; height: 70px; display: grid; place-items: center; color: #e9c66d; }
.device-tv-icon { position: relative; width: 93px; height: 62px; margin: 6px 0 8px; border: 4px solid currentColor; border-radius: 10px; }
.device-tv-icon::after { content: ""; position: absolute; left: 29px; right: 29px; bottom: -13px; height: 4px; border-radius: 4px; background: currentColor; box-shadow: 0 8px 0 3px currentColor; }
.device-tv-icon i { width: 0; height: 0; margin-left: 6px; border-top: 13px solid transparent; border-bottom: 13px solid transparent; border-left: 20px solid currentColor; }
.device-phone-icon { width: 53px; height: 82px; margin-left: 16px; border: 4px solid currentColor; border-radius: 12px; }
.device-phone-icon i { align-self: end; width: 15px; height: 4px; margin-bottom: 6px; border-radius: 4px; background: currentColor; }
.device-option-copy { display: grid; align-content: end; gap: 8px; }
.device-option-copy small { color: #a67e2c; font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.device-option-copy strong { font-size: clamp(26px,3vw,40px); letter-spacing: -.04em; }
.device-option-copy em { max-width: 390px; color: #858d83; font-size: 11px; font-style: normal; line-height: 1.55; }
.device-option > b { color: #e5b64f; font-size: 10px; letter-spacing: .04em; }
.device-option > b span { margin-left: 6px; font-size: 16px; }
.device-screen > footer { color: #5e655d; text-align: center; font-size: 9px; }
.device-mode-button { min-height: 36px; padding: 0 13px; border: 1px solid rgba(229,182,79,.28); border-radius: 9px; color: #dbb85d; background: rgba(229,182,79,.055); cursor: pointer; font-size: 9px; font-weight: 800; }
.device-mode-button:hover { border-color: rgba(229,182,79,.6); background: rgba(229,182,79,.1); }
[data-change-device] { display: none !important; }
body.native-app [data-change-device] { display: inline-flex !important; }
.login-header { position: relative; }
.login-header .device-mode-button { position: absolute; right: 0; }
.profiles-actions { display: flex; align-items: center; gap: 10px; }

html[data-device-mode="tv"] { font-size: 18px; }
body[data-device-mode="tv"] { --sidebar: 360px; }
body[data-device-mode="tv"] button:focus-visible,
body[data-device-mode="tv"] input:focus-visible,
body[data-device-mode="tv"] select:focus-visible,
body[data-device-mode="tv"] [tabindex]:focus-visible {
  outline: 4px solid #f1c65f;
  outline-offset: 4px;
  box-shadow: 0 0 0 8px rgba(229,182,79,.18);
}
body[data-device-mode="tv"] .catalog-account button,
body[data-device-mode="tv"] .catalog-account select { min-height: 48px; font-size: 11px; }
body[data-device-mode="tv"] .catalog-tile { min-height: 370px; }
body[data-device-mode="tv"] .browse-layout { grid-template-columns: 340px minmax(0,1fr); }
body[data-device-mode="tv"] .browse-category-list button { min-height: 68px; font-size: 14px; }
body[data-device-mode="tv"] .poster-grid { grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 29px 20px; }
body[data-device-mode="tv"] .poster-copy strong { font-size: 14px; }
body[data-device-mode="tv"] .channel-card { min-height: 62px; }
body[data-device-mode="tv"] .control-button { min-width: 48px; min-height: 45px; }
body[data-device-mode="tv"] .player-controls { padding-bottom: 24px; }

@media (max-width: 680px) {
  .device-screen { align-content: start; padding: 22px 16px 35px; }
  .device-header img { height: 76px; }
  .device-header h1 { font-size: 38px; }
  .device-options { grid-template-columns: 1fr; }
  .device-option { min-height: 245px; padding: 24px; border-radius: 19px; }
  .device-option-icon { transform: scale(.8); transform-origin: left top; }
  .device-option-copy strong { font-size: 28px; }
  .login-header .device-mode-button { right: 12px; }
  .profiles-actions { grid-column: 1/-1; display: grid; grid-template-columns: 1fr; margin-bottom: 18px; }
  .profiles-actions .profiles-add-user { margin: 0; }
}

/* Continue watching prompt */
.resume-dialog { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.78); backdrop-filter: blur(10px); }
.resume-card { width: min(440px,100%); display: grid; justify-items: center; padding: 36px; border: 1px solid rgba(229,182,79,.35); border-radius: 22px; color: #f5f7f2; background: radial-gradient(circle at 50% 0,rgba(229,182,79,.13),transparent 42%),#10130f; box-shadow: 0 30px 90px rgba(0,0,0,.6); text-align: center; }
.resume-icon { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 19px; padding-left: 4px; border-radius: 50%; color: #15120b; background: #e5b64f; box-shadow: 0 12px 32px rgba(229,182,79,.2); font-size: 22px; }
.resume-card h2 { margin: 8px 0; font-size: 27px; letter-spacing: -.035em; }
.resume-card p { margin: 0 0 25px; color: #858c83; font-size: 11px; }
.resume-actions { width: 100%; display: grid; gap: 9px; }
.resume-actions button { min-height: 46px; border-radius: 10px; cursor: pointer; font-size: 10px; font-weight: 850; }
.resume-primary { border: 0; color: #15120b; background: #e5b64f; }
.resume-primary:hover { background: #f2c862; }
.resume-secondary { border: 1px solid rgba(255,255,255,.12); color: #c6cbc3; background: rgba(255,255,255,.035); }
.resume-secondary:hover { border-color: rgba(255,255,255,.25); }

/* Website player preferences */
.settings-dialog { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; color: #f5f6f1; background: rgba(0,0,0,.8); backdrop-filter: blur(13px); }
.settings-card { width: min(680px,100%); max-height: min(850px,calc(100vh - 32px)); overflow: auto; border: 1px solid rgba(229,182,79,.32); border-radius: 24px; background: radial-gradient(circle at 92% 0,rgba(229,182,79,.13),transparent 34%),linear-gradient(145deg,#141812,#090b09); box-shadow: 0 36px 100px rgba(0,0,0,.7); }
.settings-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 30px 32px 25px; border-bottom: 1px solid rgba(255,255,255,.08); }
.settings-head h2 { margin: 7px 0 5px; font-size: 30px; letter-spacing: -.04em; }
.settings-head p { margin: 0; color: #7d857b; font-size: 10px; }
.settings-head > button { flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; color: #e7eae3; background: rgba(255,255,255,.035); cursor: pointer; font-size: 25px; }
.settings-head > button:hover { border-color: rgba(229,182,79,.5); color: #edc762; }
.settings-list { display: grid; padding: 8px 32px 2px; }
.settings-row { min-height: 82px; display: grid; grid-template-columns: minmax(0,1fr) minmax(155px,220px); align-items: center; gap: 24px; border-bottom: 1px solid rgba(255,255,255,.07); }
.settings-row > span { min-width: 0; display: grid; gap: 5px; }
.settings-row strong { color: #eaede7; font-size: 12px; }
.settings-row small { color: #737b72; font-size: 9px; line-height: 1.45; }
.settings-row select { width: 100%; min-height: 42px; padding: 0 36px 0 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; color: #e6e9e2; background: #10130f; font: inherit; font-size: 10px; cursor: pointer; }
.settings-switch { justify-self: end; width: 48px; height: 26px; appearance: none; border: 1px solid rgba(255,255,255,.16); border-radius: 30px; background: #242924; cursor: pointer; transition: background .18s ease,border-color .18s ease; }
.settings-switch::before { content: ''; display: block; width: 20px; height: 20px; margin: 2px; border-radius: 50%; background: #8d958b; transition: transform .18s ease,background .18s ease; }
.settings-switch:checked { border-color: #e5b64f; background: #e5b64f; }
.settings-switch:checked::before { transform: translateX(22px); background: #17140c; }
.settings-preview { min-height: 84px; display: grid; place-items: center; margin: 22px 32px 0; padding: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; color: white; background: linear-gradient(145deg,#202820,#0d110e); text-align: center; text-shadow: 0 2px 5px #000,0 0 3px #000; }
.settings-preview[data-size="small"] { font-size: 15px; }
.settings-preview[data-size="medium"] { font-size: 20px; }
.settings-preview[data-size="large"] { font-size: 27px; }
.settings-preview[data-size="xlarge"] { font-size: 35px; }
.settings-footer { display: flex; justify-content: flex-end; padding: 22px 32px 30px; }
.settings-footer button { min-width: 170px; min-height: 46px; border: 0; border-radius: 11px; color: #17130b; background: #e5b64f; cursor: pointer; font-size: 10px; font-weight: 900; }
.settings-footer button:hover { background: #f2c862; }
@media (max-width: 620px) {
  .settings-dialog { padding: 10px; }
  .settings-card { border-radius: 18px; }
  .settings-head { padding: 22px 19px 19px; }
  .settings-list { padding: 4px 19px; }
  .settings-row { min-height: 94px; grid-template-columns: 1fr; gap: 9px; padding: 15px 0; }
  .settings-switch { justify-self: start; }
  .settings-preview { margin: 18px 19px 0; }
  .settings-footer { padding: 18px 19px 23px; }
  .settings-footer button { width: 100%; }
}
