:root {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  background: #000000;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button {
  font: inherit;
}

.live-shell {
  position: relative;
  width: 100%;
  height: clamp(280px, 38.15vw, 557px);
  background: #000000;
  color: #ffffff;
  overflow: hidden;
}

.live-shell video,
.live-frame,
.ali-player-host {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #000000;
}

.ali-player-host {
  display: none;
  overflow: hidden;
}

.live-shell.is-artc .ali-player-host {
  display: block;
}

.live-shell.is-artc video {
  display: none;
}

.live-shell.is-artc .ali-player-host .prism-player,
.live-shell.is-artc .ali-player-host video {
  width: 100% !important;
  height: 100% !important;
}

.live-frame {
  display: none;
}

.live-shell.is-frame video {
  display: none;
}

.live-shell.is-frame .live-frame {
  display: block;
}

.live-shell.is-live .shade,
.live-shell.is-live .ad-layer,
.live-shell.is-live .center-actions {
  display: none;
}

.live-shell.is-window-open .ad-layer {
  display: none;
}

.shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

.ad-layer {
  position: absolute;
  inset: 13% 16px auto;
  display: grid;
  justify-items: center;
  gap: 16px;
  pointer-events: none;
  text-align: center;
}

.ad-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  max-width: min(760px, calc(100% - 24px));
  color: #f8fafc;
  font-size: 30px;
  line-height: 1.35;
  font-weight: 800;
  text-wrap: balance;
  flex-wrap: wrap;
}

.ad-line:nth-child(2) {
  color: #fff400;
}

.ad-line:nth-child(2) .ad-text {
  color: #fff400;
}

.ad-line:nth-child(2) .ad-text::first-letter {
  color: #fff400;
}

.ad-line:nth-child(3) {
  color: #dce6f2;
  font-size: 25px;
  max-width: min(760px, calc(100% - 24px));
}

.ad-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 0 18px;
  border-radius: 19px;
  color: #ffff00;
  background: #ff2d12;
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.ad-badge.yellow {
  background: #fff200;
  color: #ff2d12;
}

.ad-badge.plain {
  min-height: auto;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.center-actions {
  position: absolute;
  left: 50%;
  top: 78%;
  transform: translate(-50%, -50%);
}

.center-actions button,
.sound-button {
  border: 0;
  border-radius: 8px;
  color: #050505;
  background: #dce4eb;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.22) inset;
}

.center-actions button {
  min-width: 236px;
  min-height: 72px;
  padding: 0 22px;
  font-size: 29px;
}

.sound-button {
  position: absolute;
  right: 14px;
  bottom: 0;
  min-width: 136px;
  min-height: 46px;
  font-size: 26px;
}

.status-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: #c51f09;
  color: #ffffff;
  font-size: 25px;
  font-weight: 800;
  white-space: nowrap;
}

.error-layer {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 16px;
  min-height: 28px;
  color: #ffd1ca;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

@media (max-width: 900px) {
  .ad-layer {
    top: 10%;
    gap: 12px;
  }

  .ad-line {
    font-size: 24px;
  }

  .ad-line:nth-child(3) {
    font-size: 20px;
  }

  .ad-badge {
    min-height: 56px;
    border-radius: 14px;
    font-size: 27px;
  }

  .center-actions button {
    min-width: 190px;
    min-height: 58px;
    font-size: 23px;
  }

  .status-bar {
    font-size: 19px;
  }

  .sound-button {
    min-width: 110px;
    min-height: 38px;
    font-size: 20px;
  }
}

@media (max-width: 560px) {
  .ad-layer {
    inset: 26px 8px auto;
    gap: 10px;
  }

  .ad-line {
    gap: 8px;
    font-size: 20px;
    max-width: 100%;
  }

  .ad-line:nth-child(3) {
    font-size: 16px;
  }

  .ad-badge {
    min-height: 42px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 21px;
  }

  .center-actions {
    top: 82%;
  }

  .center-actions button {
    min-width: 138px;
    min-height: 38px;
    font-size: 17px;
  }

  .status-bar {
    max-width: calc(100% - 100px);
    min-height: 30px;
    padding: 0 8px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sound-button {
    right: 8px;
    min-width: 88px;
    min-height: 30px;
    font-size: 15px;
  }
}
