/* 消息中心 / IM 未读红点 */

.nav-mobile-header .account-btn {
  position: relative;
}

.nav-mobile-header .account-btn .unread-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff2d2d;
  border: 1.5px solid #181818;
  pointer-events: none;
  z-index: 2;
}

.nav-mobile-header .account-btn .unread-dot.hidden {
  display: none;
}

.message-center-item {
  position: relative;
}

.message-center-item .unreadcount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #ff2d2d;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  box-sizing: border-box;
}

.message-center-item .unreadcount.hidden {
  display: none;
}

.message-announcement-item {
  display: block;
}

.message-announcement-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.message-announcement-item-header h3 {
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 500;
  margin: 0;
  min-width: 0;
}

.message-announcement-item-title {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.message-announcement-item-header > span {
  font-size: 0.875rem;
  line-height: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.message-announcemen-item-body {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 1rem;
  line-height: 1.5rem;
  margin: 0.5rem 0 0;
  color: rgba(255, 255, 255, 0.75);
}

.message-ad-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.message-ad-item-poster {
  width: 20%;
  min-width: 8rem;
  border-radius: 0.3rem;
}

.message-ad-item-poster > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.message-ad-item-badge {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  line-height: 1.2;
}

.message-ad-item .message-ad-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 400;
  flex: 1;
  min-width: 0;
}

.message-ad-item .unread-dot {
  position: absolute;
  top: 6px;
  right: 6px;
}

.message-list-item {
  position: relative;
  display: block;
  padding: 1rem;
  background-color: #303030;
  border-radius: 0;
  color: #fff;
  margin-bottom: 1rem;
  text-decoration: none;
}

.message-list-item.message-ad-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.message-list-item.is-read .unread-dot {
  display: none;
}

.message-list-item .unread-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff2d2d;
}

.message-empty {
  padding: 2rem 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
}

/* 消息详情 */
.message-detail-container .message-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  margin-block: 1rem;
  gap: 0.75rem;
  color: #fff;
}

.message-detail-container .message-detail-header h3 {
  margin: 0;
  font-weight: 500;
}

.message-detail-container .message-detail-header > span {
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.message-detail-container .message-detail-content img {
  width: 100%;
  display: block;
  border-radius: 0;
}

.message-detail-container .message-detail-content p {
  margin-bottom: 1rem;
}

.message-banner-swiper {
  position: relative;
  width: 100%;
  aspect-ratio: 644 / 127;
  overflow: hidden;
  border-radius: 0;
  background: #727272;
}

.message-banner-swiper.is-empty {
  display: none;
}

.message-banner-swiper .swiper-pagination {
  position: absolute;
  right: 10px;
  bottom: 8px;
  left: auto;
  width: auto;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 4px;
}

.message-banner-swiper .swiper-wrapper,
.message-banner-swiper .swiper-slide {
  height: 100%;
}

.message-banner-swiper .swiper-slide a {
  display: block;
  height: 100%;
}

.message-banner-swiper .swiper-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-banner-swiper .swiper-pagination-bullet {
  width: 10px;
  height: 10px;
  margin: 0 !important;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.35);
  opacity: 1;
}

.message-banner-swiper .swiper-pagination-bullet-active {
  width: 30px;
  height: 10px;
  border-radius: 5px;
  background-color: #f7931d;
}
