* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Alibaba PuHuiTi 3.0', 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #252a33 0, #111318 48%, #08090d 100%);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0;
}

button {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

img {
  display: block;
}

.phone {
  position: relative;
  width: 393px;
  max-width: 100vw;
  height: 852px;
  overflow: hidden;
  background: #181a20;
}

/* 手机状态栏 */
.status-bar {
  position: absolute;
  left: 50%;
  top: 0;
  width: 393px;
  height: 62px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 154px;
  padding: 21px 16px 19px;
}

.status-bar__time,
.status-bar__levels {
  flex: 1;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-bar__time {
  padding-top: 2px;
  font-family: 'SF Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  font-weight: 590;
  line-height: 22px;
}

.status-bar__levels {
  gap: 7px;
  padding-top: 1px;
}

.status-bar__levels img:nth-child(1) {
  width: 19.2px;
  height: 12.226px;
}

.status-bar__levels img:nth-child(2) {
  width: 17.142px;
  height: 12.328px;
}

.status-bar__levels img:nth-child(3) {
  width: 27.328px;
  height: 13px;
}

/* 直播间顶部栏 */
.room-header {
  position: absolute;
  top: 62px;
  left: 0;
  width: 393px;
  height: 44px;
}

.room-header__back,
.room-header__share {
  position: absolute;
  top: 8px;
  width: 28px;
  height: 28px;
}

.room-header__back,
.room-header__share {
  position: absolute;
  top: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-header__back svg,
.room-header__share svg {
  width: 28px;
  height: 28px;
  display: block;
}

.room-header__back {
  left: 24px;
}

.room-header__share {
  left: 341px;
}

.points-pill {
  position: absolute;
  right: 54px;
  top: 7px;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.45);
  font-size: 12px;
}

.points-pill button {
  padding: 3px 8px;
  border-radius: 12px;
  background: #2885f8;
  color: #fff;
  font-size: 12px;
}

.room-header__room {
  position: absolute;
  left: 58px;
  top: 8px;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 28px;
}

.room-header__avatar {
  width: 28px;
  height: 28px;
}

.room-header__name {
  font-size: 14px;
  line-height: normal;
  white-space: nowrap;
}

/* 直播画面 */
.live-cover {
  position: absolute;
  left: 0;
  top: 106px;
  width: 393px;
  height: 220px;
  overflow: hidden;
}

.live-cover img,
.live-cover video {
  width: 393px;
  height: 220px;
  object-fit: cover;
}

.live-cover video {
  display: block;
  background: #000;
  object-fit: contain;
}

/* Global img/video display rules would otherwise override the hidden attribute. */
.live-cover [hidden] {
  display: none;
}

.live-cover__status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 13px;
  white-space: nowrap;
  pointer-events: none;
}

.live-cover__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  padding: 10px 20px;
  border-radius: 22px;
  background: rgba(40, 133, 248, 0.9);
  color: #fff;
  font-size: 15px;
}

.live-cover__unmute {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 13px;
}

.live-cover__badge {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 46px;
  height: 21px;
  background: #28659f;
}

/* 聊天面板背景 */
.chat-panel {
  position: absolute;
  left: 0;
  top: 326px;
  width: 393px;
  height: 526px;
  background: #27292f;
}

/* 聊天/公告切换 */
.chat-tabs {
  position: absolute;
  left: 0;
  top: 326px;
  width: 393px;
  height: 59px;
}

.chat-tabs__fade {
  position: absolute;
  left: 0;
  top: 0;
  width: 393px;
  height: 59px;
  background: linear-gradient(180deg, #27292f 64.303%, rgba(39, 41, 47, 0.6) 83.537%, rgba(39, 41, 47, 0) 100%);
}

.chat-tabs__item {
  position: absolute;
  top: 16px;
  width: 66px;
  font-size: 15px;
  line-height: normal;
  text-align: center;
}

.chat-tabs__item--chat {
  left: 110px;
}

.chat-tabs__item--active {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}

.chat-tabs__item--active i {
  width: 20px;
  height: 2px;
  border-radius: 100px;
  background: #2885f8;
}

.chat-tabs__item--notice {
  left: 216px;
}

.chat-tabs__item--service {
  left: 322px;
}

/* 聊天消息列表 */
.message-list {
  position: absolute;
  left: 0;
  top: 0;
  width: 393px;
}

.message {
  position: absolute;
  left: 16px;
  width: 361px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 8px;
  background: #1e2027;
}

.message__row {
  width: 100%;
  display: flex;
  align-items: center;
}

.message__user {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.message__avatar {
  width: 28px;
  height: 28px;
  border-radius: 100px;
  object-fit: cover;
}

.message__name {
  font-size: 15px;
  line-height: normal;
  text-align: center;
  white-space: nowrap;
}

.message__text {
  color: #9a9fa5;
  font-size: 14px;
  line-height: normal;
}

.notice-panel {
  position: absolute;
  left: 16px;
  top: 397px;
  width: 361px;
  min-height: 210px;
  z-index: 2;
}

.notice-card {
  width: 100%;
  min-height: 210px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #20242d 0%, #171a21 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.notice-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #7faeff;
  font-size: 13px;
}

.notice-card__title {
  min-height: 86px;
  margin-top: 18px;
  color: #f5f7fb;
  font-size: 16px;
  line-height: 1.65;
}

.notice-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.notice-card__actions button {
  min-width: 68px;
  height: 30px;
  border-radius: 15px;
  background: rgba(40, 133, 248, 0.18);
  color: #cfe2ff;
  font-size: 13px;
}

.gift-panel {
  position: absolute;
  left: 16px;
  top: 694px;
  width: 361px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gift-btn,
.emoji-btn {
  min-width: 44px;
  height: 30px;
  padding: 0 10px;
  border-radius: 16px;
  background: rgba(40, 133, 248, 0.18);
  color: #fff;
  font-size: 13px;
}

#toastText,
#emojiCooldown {
  color: #f8c14a;
  font-size: 12px;
}

.emoji-panel {
  position: absolute;
  left: 16px;
  top: 734px;
  width: 361px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.robot-panel {
  position: absolute;
  left: 16px;
  top: 606px;
  width: 361px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(18, 21, 28, 0.92);
  z-index: 3;
}

.robot-panel__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.robot-panel__row:last-child {
  margin-bottom: 0;
}

.robot-panel__select,
.robot-panel__quantity {
  min-width: 0;
  flex: 1;
  height: 30px;
  border: 0;
  border-radius: 15px;
  padding: 0 10px;
  background: #27292f;
  color: #fff;
  font-size: 12px;
}

.robot-panel__button {
  flex-shrink: 0;
  min-width: 74px;
  height: 30px;
  border-radius: 15px;
  background: rgba(40, 133, 248, 0.3);
  color: #fff;
  font-size: 12px;
}

/* 底部输入栏 */
.composer {
  position: absolute;
  left: 0;
  top: 776px;
  width: 393px;
  height: 40px;
}

.composer__input {
  position: absolute;
  left: 24px;
  top: 0;
  width: 264px;
  height: 40px;
  border-radius: 20px;
  border: 0;
  outline: none;
  background: #27292f;
  color: #ffffff;
  font-size: 13px;
  line-height: 40px;
  padding-left: 23px;
}

.composer__send {
  position: absolute;
  left: 298px;
  top: 0;
  width: 73px;
  height: 40px;
  border-radius: 20px;
  background: #293b52;
  color: #7889a3;
  font-size: 15px;
  line-height: normal;
}

/* Home Indicator */
.home-indicator {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 393px;
  height: 36px;
  transform: translateX(-50%);
  background: #1e2027;
}

.home-indicator__line {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 135px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 100px;
  background: #000000;
}

@media (min-width: 900px) {
  body {
    align-items: center;
    padding: 32px 0;
  }

  .phone {
    max-width: 393px;
    border-radius: 28px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 10px rgba(255, 255, 255, 0.04);
  }
}

@media (max-width: 430px) {
  body {
    background: #181a20;
  }

  .phone {
    width: 100vw;
    max-width: 393px;
  }
}
