:root {
  --bg: #060b13;
  --panel: #0c1420;
  --panel-strong: #111d2b;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f8fb;
  --muted: #91a0b4;
  --muted-strong: #bec8d4;
  --mint: #70f0c1;
  --mint-deep: #26c995;
  --amber: #ffd166;
  --danger: #ff7f83;
  --focus: #f5ff7a;
  --radius: 24px;
  --font: "Vazirmatn", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  overflow: hidden;
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 15% 0%, rgba(55, 113, 129, 0.16), transparent 32%),
    linear-gradient(145deg, #060b13 0%, #08101a 48%, #060b13 100%);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button,
input,
select,
a,
[tabindex] {
  -webkit-tap-highlight-color: transparent;
}

button:focus,
input:focus,
select:focus,
.player-shell:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgba(245, 255, 122, 0.12);
}

button:disabled,
select:disabled {
  cursor: default;
  opacity: 0.45;
}

.ambient {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(10px);
}

.ambient-one {
  width: 340px;
  height: 340px;
  top: -190px;
  left: 18%;
  background: rgba(112, 240, 193, 0.08);
}

.ambient-two {
  width: 420px;
  height: 420px;
  right: -260px;
  bottom: -240px;
  background: rgba(80, 113, 255, 0.08);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100vh;
  min-height: 640px;
  padding: 22px 34px 14px;
  display: grid;
  grid-template-rows: 70px minmax(0, 1fr) 34px;
  grid-row-gap: 14px;
}

.topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  grid-column-gap: 28px;
  direction: ltr;
}

.brand {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-self: end;
  direction: rtl;
}

.brand-mark {
  width: 52px;
  height: 52px;
  margin-left: 13px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  direction: ltr;
  overflow: hidden;
  background: linear-gradient(145deg, var(--mint), #a5ffd9);
  box-shadow: 0 12px 34px rgba(57, 221, 169, 0.23);
}

.brand-mark span {
  display: block;
  width: 5px;
  margin: 0 2px;
  border-radius: 5px;
  background: #07130f;
}

.brand-mark span:nth-child(1) {
  height: 16px;
}

.brand-mark span:nth-child(2) {
  height: 28px;
}

.brand-mark span:nth-child(3) {
  height: 21px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-copy strong {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-copy small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.4px;
}

.date-clock {
  grid-column: 1;
  grid-row: 1;
  min-height: 58px;
  padding: 5px 8px 5px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-self: start;
  direction: rtl;
  white-space: nowrap;
  background: rgba(12, 20, 32, 0.72);
}

.calendar-tile {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--mint), #a5ffd9);
  color: #07130f;
  line-height: 1;
}

.calendar-tile small {
  font-size: 8px;
  font-weight: 700;
}

.calendar-tile strong {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 800;
}

.date-copy {
  min-width: 118px;
  margin-right: 11px;
  display: flex;
  flex-direction: column;
}

.date-copy small {
  margin-top: 2px;
  color: #6f7d8e;
  font-size: 8px;
}

.clock {
  min-width: 72px;
  margin-right: 14px;
  padding-right: 14px;
  border-right: 1px solid var(--line);
  color: var(--mint);
  font-size: 25px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

.date {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.header-actions {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-self: end;
  direction: rtl;
}

.header-actions > * + * {
  margin-right: 10px;
}

.network-pill,
.soft-button,
.icon-button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: rgba(14, 24, 36, 0.86);
  color: var(--muted-strong);
}

.network-pill {
  padding: 0 15px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  font-size: 13px;
}

.network-pill i,
.live-pill i,
.tiny-dot {
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(112, 240, 193, 0.12);
}

.network-pill.is-offline i {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 127, 131, 0.12);
}

.soft-button,
.icon-button {
  border-radius: 14px;
}

.soft-button {
  padding: 0 15px;
}

.soft-button span:first-child {
  margin-left: 7px;
  color: var(--mint);
  font-size: 20px;
}

.icon-button {
  width: 44px;
  padding: 0;
  font-size: 20px;
  font-weight: 700;
}

.main-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  grid-column-gap: 18px;
  direction: ltr;
}

.player-column,
.browser-panel {
  min-width: 0;
  direction: rtl;
}

.player-column {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.player-shell {
  position: relative;
  width: 100%;
  height: auto;
  padding-top: 0;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #020406;
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  flex: 0 0 auto;
}

.player-stage {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%;
  flex: 0 0 auto;
  overflow: hidden;
}

.player-stage video,
.player-shade,
.player-placeholder {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.player-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020406;
}

.player-placeholder {
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(112, 240, 193, 0.09), transparent 25%),
    linear-gradient(145deg, #08111c, #03070d);
}

.player-placeholder strong {
  margin-top: 18px;
  font-size: 24px;
}

.player-placeholder > span:last-child {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.placeholder-orbit {
  width: 96px;
  height: 96px;
  border: 1px solid rgba(112, 240, 193, 0.28);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 16px rgba(112, 240, 193, 0.035),
    0 0 0 34px rgba(112, 240, 193, 0.02);
}

.placeholder-play {
  position: relative;
  width: 42px;
  height: 42px;
  display: block;
  color: var(--mint);
}

.placeholder-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 25px solid currentColor;
  transform: translate(-34%, -50%);
}

.player-shade {
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.34) 0%,
    transparent 27%,
    transparent 100%
  );
}

.player-topline {
  position: absolute;
  z-index: 4;
  top: 20px;
  right: 22px;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.live-pill,
.quality-badge {
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  background: rgba(4, 8, 13, 0.68);
  font-size: 12px;
  font-weight: 600;
}

.live-pill i {
  width: 7px;
  height: 7px;
  margin-left: 7px;
  background: #ff5d67;
  box-shadow: 0 0 0 4px rgba(255, 93, 103, 0.14);
}

.quality-badge {
  color: var(--mint);
}

.player-status {
  position: absolute;
  z-index: 6;
  top: 50%;
  left: 50%;
  width: 330px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translate(-50%, -50%);
  background: rgba(7, 13, 21, 0.93);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.player-status strong {
  margin-top: 12px;
  font-size: 18px;
}

.player-status small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.status-spinner,
.list-loader {
  display: block;
  border: 3px solid rgba(112, 240, 193, 0.15);
  border-top-color: var(--mint);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.status-spinner {
  width: 28px;
  height: 28px;
}

.status-action {
  margin-top: 16px;
  padding: 9px 15px;
  border: 0;
  border-radius: 11px;
  background: var(--mint);
  color: #052016;
  font-weight: 700;
}

.channel-osd {
  position: absolute;
  z-index: 7;
  right: 28px;
  bottom: 24px;
  max-width: 420px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  display: flex;
  align-items: center;
  background: rgba(6, 11, 18, 0.9);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
}

.osd-logo {
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: 11px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f3f6f7;
  color: #15212e;
  font-weight: 800;
}

.osd-logo img {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
}

.channel-osd > span:last-child {
  display: flex;
  flex-direction: column;
}

.channel-osd strong {
  font-size: 17px;
}

.channel-osd small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.controls {
  position: relative;
  z-index: 5;
  width: 100%;
  min-height: 62px;
  padding: 8px 10px;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 0;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  direction: rtl;
  background: #08111b;
}

.controls > * + * {
  margin-right: 8px;
}

.control-button {
  height: 42px;
  min-width: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
}

#playButton {
  width: 42px;
  padding: 0;
}

.fullscreen-channel-button {
  min-width: 108px;
  border: 1px solid rgba(112, 240, 193, 0.18);
  color: var(--mint);
}

.fullscreen-channel-button span {
  margin-right: 7px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.control-icon {
  width: 18px;
  height: 18px;
  display: block;
  filter: invert(96%) sepia(8%) saturate(287%) hue-rotate(169deg) brightness(101%);
}

.volume-control {
  min-width: 230px;
  height: 42px;
  padding: 0 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  direction: rtl;
  background: rgba(255, 255, 255, 0.055);
}

.volume-control > * + * {
  margin-right: 6px;
}

.volume-step {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.volume-step:focus,
.volume-step:hover {
  background: rgba(112, 240, 193, 0.16);
}

.volume-range {
  width: 108px;
  height: 18px;
  margin: 0;
  padding: 0;
  direction: ltr;
  -webkit-appearance: none;
  background: transparent;
  accent-color: var(--mint);
  cursor: pointer;
}

.volume-control > .volume-range {
  margin-right: 8px;
}

.volume-range:focus {
  outline: 0;
  box-shadow: none;
}

.volume-range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.18);
}

.volume-range::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -6px;
  border: 3px solid #0b1722;
  border-radius: 50%;
  -webkit-appearance: none;
  background: var(--mint);
  box-shadow: none;
}

.volume-range:focus::-webkit-slider-thumb {
  border-color: var(--focus);
}

.volume-value {
  min-width: 38px;
  color: var(--mint);
  text-align: left;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.play-icon {
  position: relative;
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 18px;
}

.play-icon.is-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid currentColor;
  transform: translate(-34%, -50%);
}

.play-icon.is-pause::before,
.play-icon.is-pause::after {
  content: "";
  position: absolute;
  top: 2px;
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: currentColor;
}

.play-icon.is-pause::before {
  right: 3px;
}

.play-icon.is-pause::after {
  left: 3px;
}

.control-button:hover,
.control-button:focus {
  background: rgba(112, 240, 193, 0.16);
}

.control-separator {
  width: 1px;
  height: 25px;
  background: var(--line-strong);
}

.quality-control {
  height: 42px;
  padding-right: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 12px;
}

.quality-control select {
  height: 100%;
  min-width: 156px;
  margin-right: 6px;
  padding: 0 8px 0 24px;
  border: 0;
  outline-offset: -2px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
}

.quality-control option,
.source-picker option {
  background: #101a27;
  color: var(--text);
}

.control-note {
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(112, 240, 193, 0.1);
  color: var(--mint);
  font-size: 11px;
  white-space: nowrap;
}

.fullscreen-button {
  margin-right: auto !important;
  padding: 0 14px;
  display: flex;
  align-items: center;
}

.fullscreen-button b {
  margin-right: 7px;
  font-size: 12px;
}

.now-playing {
  min-height: 94px;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(12, 20, 32, 0.75);
}

.now-identity,
.now-actions {
  display: flex;
  align-items: center;
}

.now-logo {
  position: relative;
  width: 62px;
  height: 62px;
  margin-left: 14px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #edf2f3;
  color: #172432;
  font-size: 21px;
  font-weight: 800;
}

.now-logo img {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
}

.eyebrow {
  display: flex;
  align-items: center;
  color: var(--mint);
  font-size: 11px;
  font-weight: 600;
}

.tiny-dot {
  width: 6px;
  height: 6px;
  margin-left: 7px;
}

.now-copy h1 {
  max-width: 590px;
  margin: 3px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 21px;
  font-weight: 700;
}

.now-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.now-actions > * + * {
  margin-right: 8px;
}

.meta-button {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted-strong);
  font-size: 12px;
}

.meta-icon {
  width: 19px;
  height: 19px;
  margin-left: 6px;
  object-fit: contain;
  filter: invert(85%) sepia(15%) saturate(616%) hue-rotate(174deg) brightness(92%);
}

.meta-button.is-favorite {
  border-color: rgba(255, 209, 102, 0.3);
  color: var(--amber);
}

.meta-button.is-favorite .meta-icon {
  filter: invert(86%) sepia(71%) saturate(575%) hue-rotate(337deg) brightness(105%);
}

.browser-panel {
  min-height: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  background: rgba(11, 19, 30, 0.9);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}

.browser-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.section-kicker {
  display: block;
  color: var(--mint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.browser-heading h2,
.modal-card h2 {
  margin: 4px 0 0;
  font-size: 21px;
}

.count-badge {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  font-size: 11px;
}

.source-picker {
  width: 100%;
  min-height: 64px;
  margin-top: 0;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 28px;
  align-items: center;
  grid-column-gap: 10px;
  background: linear-gradient(100deg, rgba(112, 240, 193, 0.09), rgba(255, 255, 255, 0.025));
  color: var(--text);
  text-align: right;
}

.source-picker-mark,
.source-option-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(112, 240, 193, 0.14);
  color: var(--mint);
  font-weight: 800;
  direction: ltr;
}

.source-picker-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 12px;
}

.source-picker-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.source-picker-copy small {
  color: var(--muted);
  font-size: 9px;
}

.source-picker-overline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.source-count {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted-strong);
}

.source-picker-copy strong {
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.source-picker-copy em {
  margin-top: 1px;
  overflow: hidden;
  color: #738297;
  font-size: 9px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-picker-arrow {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font-size: 18px;
}

.search-wrap {
  position: relative;
  height: 48px;
  margin-top: 10px;
}

.search-wrap input {
  width: 100%;
  height: 100%;
  padding: 0 43px 0 42px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 13px;
}

.search-wrap input::placeholder {
  color: #738297;
}

.search-icon {
  position: absolute;
  z-index: 1;
  top: 15px;
  right: 16px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 2px;
  right: -5px;
  bottom: -3px;
  background: var(--muted);
  transform: rotate(45deg);
}

.clear-search {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  font-size: 21px;
}

.list-message {
  flex: 1;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  line-height: 1.9;
}

.list-loader {
  width: 24px;
  height: 24px;
  margin-bottom: 12px;
}

.channel-list {
  flex: 1;
  min-height: 0;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  grid-gap: 8px;
  overflow: hidden;
}

.channel-list.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.channel-list.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
}

.channel-list.grid-compact {
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.channel-list.grid-tall {
  grid-template-rows: repeat(5, minmax(0, 1fr));
}

.channel-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 15px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  grid-column-gap: 9px;
  text-align: right;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  transition: border-color 130ms ease, background 130ms ease, transform 130ms ease;
}

.channel-card:hover,
.channel-card:focus {
  border-color: rgba(112, 240, 193, 0.45);
  background: rgba(112, 240, 193, 0.09);
  transform: scale(1.015);
  z-index: 2;
}

.channel-card.is-playing {
  border-color: rgba(112, 240, 193, 0.32);
  background: linear-gradient(100deg, rgba(112, 240, 193, 0.12), rgba(112, 240, 193, 0.035));
}

.channel-card.is-health-confirmed,
.channel-card.is-health-reachable {
  border-color: rgba(112, 240, 193, 0.18);
}

.channel-card.is-health-unknown {
  border-color: rgba(255, 255, 255, 0.035);
  background: rgba(255, 255, 255, 0.022);
  color: rgba(244, 248, 251, 0.68);
}

.channel-card.is-health-failed,
.channel-card.is-health-blocked {
  border-color: rgba(255, 255, 255, 0.025);
  background: rgba(255, 255, 255, 0.015);
  color: rgba(244, 248, 251, 0.43);
}

.channel-card.is-health-unknown .channel-logo,
.channel-card.is-health-unknown .channel-trailing {
  opacity: 0.58;
}

.channel-card.is-health-failed .channel-logo,
.channel-card.is-health-failed .channel-trailing,
.channel-card.is-health-blocked .channel-logo,
.channel-card.is-health-blocked .channel-trailing {
  opacity: 0.34;
}

.channel-card.is-health-unknown:focus,
.channel-card.is-health-failed:focus,
.channel-card.is-health-blocked:focus,
.channel-card.is-health-unknown.is-playing,
.channel-card.is-health-failed.is-playing,
.channel-card.is-health-blocked.is-playing {
  border-color: rgba(112, 240, 193, 0.45);
  background: rgba(112, 240, 193, 0.09);
  color: var(--text);
}

.channel-card.is-health-unknown:focus .channel-logo,
.channel-card.is-health-unknown:focus .channel-trailing,
.channel-card.is-health-failed:focus .channel-logo,
.channel-card.is-health-failed:focus .channel-trailing,
.channel-card.is-health-blocked:focus .channel-logo,
.channel-card.is-health-blocked:focus .channel-trailing,
.channel-card.is-playing .channel-logo,
.channel-card.is-playing .channel-trailing {
  opacity: 1;
}

.channel-logo {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #eff3f4;
  color: #162433;
  font-size: 16px;
  font-weight: 800;
}

.channel-logo img {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}

.channel-copy {
  min-width: 0;
  padding-left: 30px;
  display: flex;
  flex-direction: column;
}

.channel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.channel-meta {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 9px;
}

.channel-card.is-health-confirmed .channel-meta,
.channel-card.is-health-reachable .channel-meta {
  color: var(--mint);
}

.channel-card.is-health-checking .channel-meta {
  color: var(--amber);
}

.channel-card.is-health-failed .channel-meta,
.channel-card.is-health-blocked .channel-meta {
  color: #747f8d;
}

.channel-card.is-health-confirmed .channel-meta::before,
.channel-card.is-health-reachable .channel-meta::before,
.channel-card.is-health-checking .channel-meta::before,
.channel-card.is-health-unknown .channel-meta::before,
.channel-card.is-health-failed .channel-meta::before,
.channel-card.is-health-blocked .channel-meta::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 5px;
  border-radius: 50%;
  display: inline-block;
  background: #657183;
}

.channel-card.is-health-confirmed .channel-meta::before,
.channel-card.is-health-reachable .channel-meta::before {
  background: var(--mint);
  box-shadow: 0 0 8px rgba(112, 240, 193, 0.45);
}

.channel-card.is-health-checking .channel-meta::before {
  background: var(--amber);
}

.channel-trailing {
  position: absolute;
  top: 7px;
  left: 7px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.channel-quality {
  padding: 3px 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.065);
  color: var(--muted-strong);
  direction: ltr;
  font-size: 9px;
  font-weight: 700;
}

.channel-heart {
  height: 16px;
  margin-top: 4px;
  color: var(--amber);
  font-size: 14px;
}

.pagination {
  min-height: 52px;
  margin-top: 9px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-column-gap: 8px;
}

.page-button {
  min-width: 0;
  padding: 0 12px;
  border: 1px solid rgba(112, 240, 193, 0.19);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(112, 240, 193, 0.075);
  color: var(--mint);
}

.page-button span {
  margin: 0 7px;
  font-size: 25px;
  line-height: 1;
}

.page-button b {
  font-size: 11px;
}

.page-button:disabled {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: #586678;
}

.page-summary {
  min-width: 72px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.035);
}

.page-summary small {
  color: var(--muted);
  font-size: 8px;
}

.page-summary strong {
  margin-top: 1px;
  color: var(--text);
  font-size: 11px;
}

.list-footer {
  min-height: 42px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #6f7d8e;
  font-size: 9px;
}

.list-footer-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.health-summary {
  margin-top: 2px;
  overflow: hidden;
  color: #8795a6;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-footer-actions {
  margin-right: 8px;
  display: flex;
  align-items: center;
}

.health-button {
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid rgba(112, 240, 193, 0.16);
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  background: rgba(112, 240, 193, 0.07);
  color: var(--mint);
  font-size: 9px;
}

.health-status-dot {
  width: 7px;
  height: 7px;
  margin-left: 5px;
  border-radius: 50%;
  display: inline-block;
  background: #778396;
}

.health-status-dot.is-scanning {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255, 209, 102, 0.45);
}

.health-status-dot.is-ready {
  background: var(--mint);
  box-shadow: 0 0 8px rgba(112, 240, 193, 0.45);
}

.text-button {
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: var(--mint);
  font-size: 10px;
}

.remote-guide {
  display: flex;
  align-items: center;
  color: #758396;
  font-size: 10px;
}

.remote-guide > * + * {
  margin-right: 20px;
}

kbd {
  min-width: 25px;
  min-height: 21px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-color: rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted-strong);
  font-family: var(--font);
  font-size: 9px;
}

.remote-guide kbd {
  margin-left: 5px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 50%;
  bottom: 34px;
  max-width: 560px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  transform: translateX(50%);
  background: rgba(15, 25, 38, 0.96);
  color: var(--text);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
  text-align: center;
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  z-index: 60;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 5, 9, 0.83);
}

.modal-card {
  position: relative;
  width: 650px;
  max-width: 100%;
  max-height: calc(100vh - 40px);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 25px;
  background: #0d1724;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.48);
  overflow-y: auto;
}

.source-modal-card {
  width: 760px;
}

.source-modal-lead {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.source-default-note {
  margin: 15px 0 0;
  padding: 11px 13px;
  border: 1px solid rgba(112, 240, 193, 0.14);
  border-radius: 13px;
  background: rgba(112, 240, 193, 0.055);
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.9;
}

.source-options {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 9px;
}

.source-option {
  position: relative;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 22px;
  align-items: center;
  grid-column-gap: 11px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  text-align: right;
}

.source-option.is-selected {
  border-color: rgba(112, 240, 193, 0.34);
  background: rgba(112, 240, 193, 0.09);
}

.source-option-mark {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  font-size: 10px;
}

.source-option > span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.source-option strong {
  font-size: 13px;
}

.source-option small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-option i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--mint);
  color: #052016;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.source-option.is-selected i {
  display: flex;
}

.initial-scan-card {
  width: 620px;
  text-align: center;
}

.initial-scan-card h2 {
  margin: 15px 0 0;
  font-size: 25px;
}

.initial-scan-card > p {
  max-width: 510px;
  margin: 8px auto 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 2;
}

.scan-orbit {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 20px auto 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(112, 240, 193, 0.2), transparent 62%);
}

.scan-orbit i {
  position: absolute;
  border: 1px solid rgba(112, 240, 193, 0.2);
  border-radius: 50%;
  animation: scan-pulse 1.8s ease-out infinite;
}

.scan-orbit i:nth-child(1) {
  width: 38px;
  height: 38px;
}

.scan-orbit i:nth-child(2) {
  width: 66px;
  height: 66px;
  animation-delay: 0.25s;
}

.scan-orbit i:nth-child(3) {
  width: 94px;
  height: 94px;
  animation-delay: 0.5s;
}

.scan-orbit span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 18px rgba(112, 240, 193, 0.9);
  animation: scan-dot 1.6s ease-in-out infinite;
}

.initial-scan-card.is-complete .scan-orbit i {
  border-color: rgba(112, 240, 193, 0.42);
  animation: none;
}

.initial-scan-card.is-complete .scan-orbit span {
  width: 32px;
  height: 32px;
  animation: none;
}

.initial-scan-card.is-complete .scan-orbit span::before,
.initial-scan-card.is-complete .scan-orbit span::after {
  content: "";
  position: absolute;
  border-radius: 3px;
  background: #052016;
}

.initial-scan-card.is-complete .scan-orbit span::before {
  width: 7px;
  height: 3px;
  top: 17px;
  right: 17px;
  transform: rotate(45deg);
}

.initial-scan-card.is-complete .scan-orbit span::after {
  width: 15px;
  height: 3px;
  top: 14px;
  right: 8px;
  transform: rotate(-47deg);
}

.scan-progress {
  position: relative;
  height: 10px;
  margin-top: 22px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.scan-progress > span {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-deep), var(--mint), #b2ffe2);
  box-shadow: 0 0 18px rgba(112, 240, 193, 0.35);
  transition: width 240ms ease;
}

.scan-progress > span::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 70px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
  animation: scan-shimmer 1.15s linear infinite;
}

.scan-progress-meta {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.scan-progress-meta strong {
  color: var(--mint);
  font-size: 14px;
}

.initial-scan-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.primary-action,
.secondary-action {
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 13px;
  font-weight: 700;
}

.primary-action {
  border: 0;
  background: var(--mint);
  color: #052016;
}

.secondary-action {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted-strong);
}

.initial-scan-note {
  margin-top: 12px;
  display: block;
  color: #728094;
  font-size: 10px;
}

.modal-close {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 39px;
  height: 39px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
  font-size: 23px;
}

.help-grid {
  margin-top: 23px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 9px;
}

.help-grid > div {
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
}

.help-grid kbd {
  min-width: 51px;
  min-height: 38px;
  margin-left: 12px;
  font-size: 11px;
}

.help-grid span {
  display: flex;
  flex-direction: column;
}

.help-grid strong {
  font-size: 13px;
}

.help-grid small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.notice-box {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(112, 240, 193, 0.16);
  border-radius: 15px;
  background: rgba(112, 240, 193, 0.055);
}

.notice-box strong {
  color: var(--mint);
  font-size: 12px;
}

.notice-box p,
.modal-footnote {
  margin: 5px 0 0;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.9;
}

.modal-footnote {
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

.player-shell.is-fullscreen,
.player-shell:fullscreen,
.player-shell:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  padding-top: 0;
  border: 0;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  background: #000;
}

.player-shell.is-fullscreen:focus,
.player-shell:fullscreen:focus,
.player-shell:-webkit-full-screen:focus {
  outline: 0;
  box-shadow: none;
}

.player-shell.is-fullscreen {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.player-shell.is-fullscreen .controls,
.player-shell:fullscreen .controls,
.player-shell:-webkit-full-screen .controls {
  position: absolute;
  z-index: 9;
  right: 24px;
  bottom: 24px;
  left: 24px;
  width: auto;
  min-height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  flex: none;
  background: rgba(4, 10, 17, 0.93);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.42);
  transition: opacity 180ms ease, transform 180ms ease;
}

.player-shell.is-fullscreen .player-stage,
.player-shell:fullscreen .player-stage,
.player-shell:-webkit-full-screen .player-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding-top: 0;
  flex: 1 1 auto;
}

.player-shell.is-fullscreen .channel-osd,
.player-shell:fullscreen .channel-osd,
.player-shell:-webkit-full-screen .channel-osd {
  bottom: 108px;
}

.player-shell.is-fullscreen .player-shade,
.player-shell:fullscreen .player-shade,
.player-shell:-webkit-full-screen .player-shade {
  display: none;
}

.player-shell.controls-hidden .player-topline {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.player-shell.is-fullscreen.controls-hidden .controls,
.player-shell.controls-hidden:fullscreen .controls,
.player-shell.controls-hidden:-webkit-full-screen .controls {
  opacity: 0;
  transform: translateY(22px);
  pointer-events: none;
}

@keyframes scan-pulse {
  0% {
    opacity: 0.25;
    transform: scale(0.8);
  }
  55% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: scale(1.16);
  }
}

@keyframes scan-dot {
  0%,
  100% {
    transform: scale(0.82);
  }
  50% {
    transform: scale(1.18);
  }
}

@keyframes scan-shimmer {
  from {
    right: -80px;
  }
  to {
    right: calc(100% + 20px);
  }
}

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

@media (min-width: 1700px) {
  .app-shell {
    padding: 28px 48px 16px;
    grid-template-rows: 76px minmax(0, 1fr) 38px;
    grid-row-gap: 18px;
  }

  .main-grid {
    grid-template-columns: minmax(0, 1fr) 600px;
    grid-column-gap: 24px;
  }

  .browser-panel {
    padding: 22px;
  }

  .channel-card {
    padding: 11px;
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .channel-logo {
    width: 54px;
    height: 54px;
  }

  .channel-name {
    font-size: 15px;
  }

  .channel-meta,
  .count-badge,
  .section-kicker,
  .list-footer {
    font-size: 11px;
  }

  .source-picker,
  .search-wrap {
    min-height: 64px;
  }

  .search-wrap {
    min-height: 53px;
  }

  .source-modal-card {
    width: 1100px;
  }

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

  .now-playing {
    min-height: 106px;
  }

  .now-logo {
    width: 70px;
    height: 70px;
  }

  .now-copy h1 {
    font-size: 24px;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    padding: 16px 20px 10px;
    grid-template-rows: 62px minmax(0, 1fr) 28px;
    grid-row-gap: 10px;
  }

  .main-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-column-gap: 12px;
  }

  .date-copy {
    display: none;
  }

  .date-clock {
    padding-left: 10px;
  }

  .clock {
    margin-right: 10px;
    padding-right: 10px;
  }

  .network-pill {
    display: none;
  }

  .browser-panel {
    padding: 13px;
  }

  .channel-card {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 6px;
  }

  .channel-logo {
    width: 40px;
    height: 40px;
  }

  .now-playing {
    min-height: 80px;
    margin-top: 9px;
  }

  .now-logo {
    width: 52px;
    height: 52px;
  }

  .now-copy h1 {
    font-size: 17px;
  }

  .meta-button span:last-child,
  .control-note {
    display: none;
  }

  .controls {
    min-height: 54px;
    padding: 5px 7px;
  }

  .controls > * + * {
    margin-right: 4px;
  }

  .control-button,
  .quality-control {
    height: 40px;
  }

  .volume-control {
    min-width: 198px;
    height: 40px;
    padding: 0 5px;
  }

  .volume-range {
    width: 78px;
  }

  .volume-control > * + * {
    margin-right: 4px;
  }

  .quality-control {
    padding-right: 6px;
  }

  .quality-control > span,
  .fullscreen-button b {
    display: none;
  }

  .quality-control select {
    min-width: 118px;
    margin-right: 0;
  }
}

@media (max-height: 800px) and (min-width: 861px) {
  .app-shell {
    padding: 16px 24px 10px;
    grid-template-rows: 62px minmax(0, 1fr) 28px;
    grid-row-gap: 10px;
  }

  .now-playing {
    min-height: 80px;
    margin-top: 9px;
  }

  .now-logo {
    width: 52px;
    height: 52px;
  }

  .now-copy h1 {
    font-size: 17px;
  }

  .controls {
    min-height: 54px;
  }

  .channel-list {
    grid-gap: 6px;
  }

  .channel-card {
    padding: 5px;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .channel-logo {
    width: 40px;
    height: 40px;
  }
}

@media (max-height: 800px) and (min-width: 1700px) {
  .player-stage {
    height: calc(100vh - 290px);
    padding-top: 0;
  }
}

@media (max-width: 860px), (max-height: 600px) {
  body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    padding: 14px;
    display: block;
  }

  .topbar {
    min-height: 62px;
    grid-template-columns: 1fr auto;
  }

  .brand {
    grid-column: 2;
  }

  .header-actions {
    grid-column: 1;
    justify-self: start;
  }

  .date-clock {
    display: none;
  }

  .header-actions .soft-button {
    display: none;
  }

  .main-grid {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
  }

  .browser-panel {
    height: 680px;
    margin-top: 14px;
  }

  .remote-guide {
    margin-top: 14px;
    flex-wrap: wrap;
  }

  .remote-guide > * {
    margin-top: 7px;
  }

  .player-shell.is-fullscreen .controls,
  .player-shell:fullscreen .controls,
  .player-shell:-webkit-full-screen .controls {
    right: 10px;
    bottom: 10px;
    left: 10px;
  }

  .player-shell.is-fullscreen .channel-osd,
  .player-shell:fullscreen .channel-osd,
  .player-shell:-webkit-full-screen .channel-osd {
    bottom: 80px;
  }

  .fullscreen-channel-button {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .fullscreen-channel-button span {
    display: none;
  }

  .controls {
    padding: 5px;
  }

  .quality-control > span,
  .fullscreen-button b,
  .control-note {
    display: none;
  }

  .quality-control select {
    min-width: 128px;
  }

  .volume-control {
    min-width: 190px;
  }

  .volume-range {
    width: 72px;
  }
}

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