:root {
  color: #f4f4f7;
  background: #090a0f;
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui,
    sans-serif;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  margin: 0;
  min-width: 320px;
  background: #090a0f;
}
button,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
.watch-app {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 25vw, 350px);
  width: 100vw;
  height: 100dvh;
  background: #0b0c12;
}
.player-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 50px;
  min-width: 0;
  min-height: 0;
  background: radial-gradient(
    ellipse 80% 55% at 45% 0,
    #17142a 0%,
    #0b0c12 70%
  );
}
.player-topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 62px;
  padding: 0 26px;
  border-bottom: 1px solid #232330;
  background: #101019c9;
  backdrop-filter: blur(16px);
}
.app-brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  color: #fbfaff;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.03em;
}
.brand-dot {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #9d8af1, #6553cc);
  font-size: 14px;
  box-shadow: 0 3px 12px #7565df60;
}
.now-playing {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #8e8c9e;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.refresh-button {
  margin-left: auto;
  border: 1px solid #373545;
  border-radius: 8px;
  padding: 6px 9px;
  color: #bfbccc;
  background: #1b1a25;
  font-size: 11px;
}
.refresh-button:hover {
  border-color: #8e7de2;
  color: #f3efff;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}
.topbar-actions .refresh-button {
  margin-left: 0;
}
.original-room-link {
  text-decoration: none;
  white-space: nowrap;
}
.player-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  background: #06070a;
}
.player-stage:has(video:not([src])) {
  background: radial-gradient(circle at 50% 40%, #1b1830 0, #08090d 63%);
}
#main-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #06070a;
}
#main-bilibili-player {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  transform: translate(-50%, -50%);
}
.player-empty {
  position: absolute;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #b8b5c7;
  text-align: center;
}
.player-empty strong {
  color: #ebeaf2;
  font-size: 15px;
}
.player-empty small {
  color: #777587;
  font-size: 11px;
}
.empty-play {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #6858ad;
  border-radius: 50%;
  padding-left: 2px;
  color: #d8d0ff;
  background: #28223e;
  font-size: 17px;
  box-shadow: 0 0 0 8px #8c7be015;
}
.player-loading {
  position: absolute;
  top: 14px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #3a374a;
  border-radius: 99px;
  padding: 6px 10px;
  color: #d7d4e2;
  background: #11111bdb;
  font-size: 11px;
  backdrop-filter: blur(8px);
}
.player-loading span {
  width: 8px;
  height: 8px;
  border: 2px solid #9986ed;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.player-footer {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 8px 18px;
  border-top: 1px solid #252431;
  background: #101018;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.16s ease,
    transform 0.16s ease;
}
.player-panel:hover .player-footer,
.player-panel:focus-within .player-footer {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.player-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #aaa8b7;
  font-size: 11px;
}
.player-status i,
.member-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #747282;
}
.player-status[data-state="live"] i,
.member[data-state="live"] .member-state i {
  background: #42dc88;
  box-shadow: 0 0 9px #42dc88;
}
.player-status[data-state="error"] i {
  background: #fb7185;
}
.player-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}
.player-actions select,
.icon-button {
  height: 27px;
  border: 1px solid #383646;
  border-radius: 7px;
  color: #dddbe6;
  background: #1e1d29;
  font-size: 10px;
}
.player-actions select {
  width: 77px;
  padding: 0 4px;
}
.volume-control {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 7px;
  border: 1px solid #383646;
  border-radius: 7px;
  color: #d8d5e5;
  background: #1e1d29;
  font-size: 10px;
}
.volume-control:has(input:disabled) {
  opacity: 0.45;
}
.volume-control input {
  width: 58px;
  accent-color: #9986ed;
}
.player-actions select:disabled,
.icon-button:disabled {
  opacity: 0.45;
}
.icon-button {
  width: 28px;
}
.icon-button:not(:disabled):hover {
  border-color: #9787df;
  background: #29253a;
}
.stream-list {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  border-left: 1px solid #292735;
  background: #111119;
}
.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 18px;
  border-bottom: 1px solid #292735;
}
.list-header h1 {
  margin: 0;
  color: #f4f3f8;
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0.02em;
}
.list-header p {
  margin: 5px 0 0;
  color: #858394;
  font-size: 11px;
}
.list-header p span {
  color: #8f7de1;
  font-weight: 700;
}
.list-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px #4ade8017;
}
.member-list {
  min-height: 0;
  overflow-y: auto;
  padding: 7px;
}
.stream-group + .stream-group {
  margin-top: 10px;
  border-top: 1px solid #292735;
  padding-top: 7px;
}
.group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 9px 7px;
  color: #dad5ed;
  background: transparent;
  text-align: left;
  font-size: 12px;
}
.group-toggle:hover {
  background: #24202f;
}
.group-toggle > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-count {
  flex-shrink: 0;
  color: #858393;
  font-size: 9px;
}
.group-empty {
  padding: 6px;
  color: #858393;
  font-size: 10px;
}
.member-list::-webkit-scrollbar {
  width: 5px;
}
.member-list::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: #363442;
}
.member-row {
  position: relative;
}
.member-room-link {
  position: absolute;
  top: 50%;
  right: 5px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 30px;
  border-radius: 6px;
  color: #b7b3c6;
  text-decoration: none;
  transform: translateY(-50%);
}
.member-room-link:hover,
.member-room-link:focus-visible {
  color: #f3efff;
  background: #38305d;
}
.member {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 59px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 34px 8px 8px;
  color: inherit;
  background: transparent;
  text-align: left;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.member:hover {
  background: #1a1925;
}
.member.active {
  border-color: #6657a6;
  background: linear-gradient(100deg, #27213d, #1b1928);
}
.member-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #e6e0ff;
  background: #38305d;
  font-size: 11px;
  font-weight: 750;
}
.member-copy {
  min-width: 0;
}
.member-name {
  display: block;
  overflow: hidden;
  color: #e8e6ef;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-title {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #858393;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-duration {
  display: block;
  margin-top: 3px;
  color: #5ce79a;
  font-size: 9px;
}
.platform {
  border-radius: 4px;
  padding: 2px 4px;
  color: #b7b3c6;
  background: #24232e;
  font-size: 9px;
  line-height: 1;
}
.platform[data-platform="bilibili"] {
  color: #ffb0cc;
  background: #3b2433;
}
.platform[data-platform="douyu"] {
  color: #ffcb8d;
  background: #392b20;
}
.platform[data-platform="huya"] {
  color: #ffe18a;
  background: #3b3420;
}
.member-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.member-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #747282;
}
.member-state em {
  color: #777586;
  font-size: 9px;
  font-style: normal;
  text-transform: uppercase;
}
.member[data-state="live"] .member-state em {
  color: #5ce79a;
}
.member[data-state="embed"] .member-state i {
  background: #a78bfa;
  box-shadow: 0 0 8px #a78bfa;
}
.member[data-state="embed"] .member-state em {
  color: #c4b5fd;
}
.member[data-state="offline"] {
  opacity: 0.72;
}
.member[data-state="offline"] .member-avatar {
  background: #2c2b35;
  color: #a09daa;
}
#manage-list {
  font-size: 11px;
  white-space: nowrap;
}
#list-manager {
  width: min(560px, calc(100vw - 24px));
  max-height: 90dvh;
  overflow-y: auto;
  border: 1px solid #504361;
  border-radius: 14px;
  padding: 22px;
  color: #f4f4f7;
  background: #15141f;
  box-shadow: 0 20px 90px #0009;
}
#list-manager::backdrop {
  background: #0009;
}
.manager-heading,
.manager-group-controls,
.manager-stream-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.manager-heading {
  justify-content: space-between;
}
.manager-heading h2 {
  margin: 0;
  font-size: 18px;
}
.manager-note {
  color: #a39eb5;
  font-size: 12px;
}
#list-manager h3 {
  margin: 22px 0 10px;
  font-size: 13px;
}
#list-manager input,
#list-manager select,
#list-manager button:not(.icon-button) {
  min-width: 0;
  min-height: 36px;
  border: 1px solid #494253;
  border-radius: 7px;
  padding: 7px 10px;
  color: #e8e4f3;
  background: #25212f;
  font: inherit;
  font-size: 12px;
}
#list-manager input:focus,
#list-manager select:focus {
  outline: 2px solid #9986ed;
  outline-offset: 1px;
}
#list-manager button:disabled {
  opacity: 0.4;
  cursor: default;
}
.manager-group-controls {
  margin-bottom: 10px;
}
.manager-group-controls input,
.manager-group-controls select {
  flex: 1;
}
.manager-group-controls button {
  flex-shrink: 0;
}
.manager-label,
.manager-fields label {
  display: grid;
  gap: 7px;
  margin-bottom: 9px;
  color: #aaa4bd;
  font-size: 12px;
}
.manager-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 10px;
}
#list-manager .manager-primary {
  width: 100%;
  background: #54447f;
}
#manager-message {
  min-height: 18px;
  margin: 12px 0;
  color: #77ddad;
  font-size: 12px;
}
#manager-message.error {
  color: #ff9caf;
}
#manager-streams {
  color: #a39eb5;
  font-size: 12px;
}
.manager-stream-row {
  justify-content: space-between;
  border-top: 1px solid #302a3d;
  padding: 8px 0;
}
.manager-stream-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manager-stream-row button {
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .topbar-actions {
    gap: 4px;
  }
  .topbar-actions .refresh-button {
    padding-inline: 7px;
  }
  .watch-app {
    grid-template-columns: minmax(0, 1fr) 198px;
  }
  .player-topbar {
    min-height: 52px;
    padding: 0 12px;
    gap: 10px;
  }
  .now-playing {
    display: none;
  }
  .stream-list {
    border-left: 1px solid #292735;
  }
  .list-header {
    min-height: 60px;
    padding: 0 12px;
  }
  .member-list {
    padding: 4px;
  }
  .member {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 6px;
    min-height: 54px;
    padding: 7px 30px 7px 5px;
  }
  .member-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .platform {
    display: none;
  }
  .member-title {
    max-width: 85px;
  }
  .player-footer {
    padding: 7px 9px;
  }
  .player-actions select {
    width: 58px;
  }
  .volume-control input {
    width: 42px;
  }
  .player-status {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 480px) {
  .group-toggle {
    gap: 4px;
    padding-inline: 3px;
    font-size: 10px;
  }
  .group-count {
    font-size: 8px;
  }
  .watch-app {
    grid-template-columns: minmax(0, 1fr) 155px;
  }
  .app-brand {
    font-size: 12px;
  }
  .brand-dot {
    width: 22px;
    height: 22px;
  }
  .refresh-button {
    padding: 5px 6px;
    font-size: 0;
  }
  .refresh-button:first-letter {
    font-size: 13px;
  }
  .list-header h1 {
    font-size: 12px;
  }
  .list-header p {
    font-size: 9px;
  }
  .member-name {
    font-size: 11px;
  }
  .member-title {
    max-width: 65px;
  }
  .player-actions select {
    display: none;
  }
  .volume-control {
    display: none;
  }
  .player-status {
    font-size: 10px;
  }
}
@media (hover: none) {
  .player-footer {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}
.watch-app.focus-mode {
  grid-template-columns: minmax(0, 1fr);
}
.watch-app.focus-mode .stream-list {
  display: none;
}
.watch-app.focus-mode .player-topbar {
  padding-inline: clamp(16px, 4vw, 54px);
}
