* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: 'AlimamaShuHeiTi';
  src: url('font/AlimamaShuHeiTi-Bold.ttf') format('truetype'),
       url('font/AlimamaShuHeiTi-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

body {
  font-family: 'AlimamaShuHeiTi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  background-color: #bd2a1e;
}

.all-rank {
  width: 30vw;
  height: 15vw;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 9;

}
.back-img { 
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 0;
  display: flex;
  flex-direction: column;
}
/* 顶部图片 */
.top1 {
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.top-bg3 {
  margin-top: 4vw;
  width: 90% !important;
  position: relative;
}
.top-bg3 .bg3 {
  width: 100% !important;
}

/* top3-wrap-inner 容器 */
.top3-wrap-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.top3-top {
  width: 100%;
  height: auto;
  display: block;
}

.top3-center {
  background-image: url('img/center.png');
  background-repeat: repeat-y;
  background-position: center top;
  background-size: 100% auto;
  min-height: 100vw;
  width: 100%;
  position: relative;
  margin-top: -1px;
  margin-bottom: -1px;
  /* 移除max-height和overflow限制，让内容自然撑开 */
  padding: 2vw 0 20px 0;
  box-sizing: border-box;
}

/* 日期选择tab样式 */
.date-tab-container {
  position: relative;
  width: 91%;
  padding: 0 4vw;
  top: 4vw;
  left: 49%;
  transform: translateX(-50%);
  z-index: 6;
  border-bottom: 1px solid #b3a29e;
}

.date-tab-scroll {
  display: flex;
  gap: 6vw;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2vw 0;
  padding-bottom: 1vw;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.date-tab-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.date-tab-item {
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #AA9490;
  font-weight: normal;
  font-size: 4vw;
  white-space: nowrap;
  padding: 1vw 0;
}


.date-tab-item.active {
  color: #C13713;
  font-weight: bold;
}

/* 节目切换tab样式 */
.program-toggle-container {
  position: relative;
  width: 45vw;
  margin: 0 auto 4vw auto;
  z-index: 6;
  margin-bottom: 22vw;
  margin-top: 10vw;
}

.program-toggle-tabs {
  display: flex;
  background: #fef0ce;
  border-radius: 3.75vw;
  padding: 0.5vw;
  gap: 0.5vw;
  overflow: hidden;
}

.program-toggle-item {
  flex: 1;
  width: 21vw;
  height: 7.5vw;
  line-height: 7.5vw;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 3.5vw;
  font-weight: bold;
  color: #8b7355;
  
  border: none;
  position: relative;
  z-index: 2;
}
.program-toggle-item span {
  position: relative;
  z-index: 2;
}
.program-toggle-item .tab-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  border-radius: 3.25vw;
  display: none;
}

.program-toggle-item.active .tab-bg {
  display: block;
}

.program-toggle-item.active {
  background: transparent;
  color: #ffffff;
  z-index: 3;
}

.program-toggle-item:not(.active):hover {
  background: rgba(255, 255, 255, 0.1);
  color: #C13713;
}

.top3-bottom {
  width: 100%;
  height: auto;
  display: block;
}
/* 排名前三 */
.top3-center .top3-wrap {
  position: relative;
  top: 0;
  left: 0;
  transform: none;
  z-index: 4;
  width: 86%;
  margin: 0 auto;
}

/* 当使用top3-wrap-inner时，调整top3-wrap的定位 */
.top3-center .top3-wrap {
  position: relative;
  top: 0;
  left: 0;
  transform: none;
  z-index: 4;
  width: 86%;
  margin: 0 auto;
}
.top3 {
  display: flex;
  gap: 4vw;
  justify-content: flex-start;
}
.top3 .item {
  width: 32%;
  height: 30%;
  border-radius: 5px;
  border: 2px solid #D73A00;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.top3 .item:nth-child(1) {
  border-color: #D73A00;
}
.top3 .item:nth-child(2) {
  border-color: #FFAF31;
}
.top3 .item:nth-child(3) {
  border-color: #D26E0D;
}
/* 头像+皇冠+编号徽章 */
.top3 .avatar-wrap {
  position: relative;
  width: 22vw;
  max-width: 130px;
  aspect-ratio: 1 / 1;
  margin-top: -11vw;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.top3 .avatar {
  width: 16vw;
  height: 16vw;
  flex-shrink: 0;
  background: radial-gradient(circle at 50% 30%, #ffd39b, #f7aa57);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 12px rgba(0,0,0,.15) inset;
  object-fit: cover;
}
.top3 .avatar img { width: 100%; height: 100%; border-radius: 50%; display: block; }

.top3 .crown {
  position: absolute;
  top: -28%;
  width: 60%;
  pointer-events: none;
  z-index: 5;
}

.top3 .badge {
  position: absolute;
  bottom: -6%;
  padding: .14em .3em;
  background: #ffdf6e;
  border: 2px solid #9b6b00;
  color: #ffffff;
  -webkit-text-stroke: 1px #0f0a06;
  
  font-weight: 900;
  border-radius: 10px;
  letter-spacing: .5px;
}
.top3 .item:nth-child(1) .badge {
  background: #ff8843;
  border-color: #D73A00;
}
.top3 .item:nth-child(2) .badge {
  background: #fede33;
  border-color: #FFB031;
}
.top3 .item:nth-child(3) .badge {
  background: #e3a15e;
  border-color: #D26E0D;
}

.top3 .title {
  margin: 0 4px;
  margin-top: 3vw;
  font-weight: 700;
  color: #562922;
  font-size: 3.6vw;
}

.top3 .num {
  margin-top: 0.5vw;
  color: #BD2A1E;
  font-weight: 900;
  font-size: 18px;
}

.top3 .vote-btn {
  background: none;
  border: none;
  width: 18vw;
  height: 6vw;
  max-width: 80px;
  max-height: 30px;
  cursor: pointer;
  font-size: 0; /* 隐藏文字，只显示图片 */
  margin-top: 1vw;
  margin-bottom: 1vw;
  padding: 0;
}

.top3 .vote-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top3 .vote-btn.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

/* 第一名置顶、头像和边框颜色同步 */
.item-first {
  transform: translateY(-2.5vw);
  border-color: #FFAF31;
}
.item-second { border-color: #D26E0D; }
.item-third { border-color: #C9753B; }

/* 让头像边框颜色与容器同步 */
.item-first .avatar { border-color: #FFAF31; }
.item-second .avatar { border-color: #D73A00; }
.item-third .avatar { border-color: #D26E0D; }

.top1 .top2 {
  width: 50% !important;
  position: absolute;
  left: 50%;
  top: 6vw;
  transform: translateX(-50%);
  z-index: 3;
  margin-bottom: 5vw;
}
.top1 .top1-img {
  width: 100%;
  height: auto;
  display: block;
}

/* 顶部背景 */
.top-bg {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: -2;
  pointer-events: none;
}

.top-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 中间内容区域 */
.content-area {
  background-color: #bd2a1e;
  flex: 1;
  padding: 20px;
  position: relative;
  z-index: 1;
  flex: 1;
}

/* 列表区域 */
.list {
  width: 100%;
  margin-top: 4vw;
  display: flex;
  flex-direction: column;
  gap: 2vw;
}

/* 当使用top3-wrap-inner时，调整列表的定位 */
.top3-center .list {
  position: relative;
  top: 0;
  left: 0;
  transform: none;
  width: 100%;
  margin: 0 auto;
  z-index: 4;
}

.list-item {
  background: #fff;
  border: 2px solid #562922;
  border-radius: 16px;
  padding: 1.5vw 2.5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.list-left {
  display: flex;
  align-items: center;
  gap: 2vw;
}
.list-time {
  font-size: 14px;
}
.list-avatar {
  width: 12vw;
  height: 12vw;
  max-width: 88px;
  max-height: 88px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #ffd39b, #f7aa57);
  border: 2px solid #562922;
  flex-shrink: 0;
}
.list-avatar img { width: 100%; height: 100%; border-radius: 50%; display: block;object-fit: cover }

.list-info { display: flex; flex-direction: column; }
.list-title { font-size: 3.6vw; font-weight: 800; color: #5a3a2e; }
.list-num { font-size: 5vw; font-weight: 900; color: #d73a00;  }

.list-vote {
  background: none;
  border: none;
  width: 20vw;
  height: 8vw;
  max-width: 100px;
  max-height: 40px;
  cursor: pointer;
  font-size: 0; /* 隐藏文字，只显示图片 */
  padding: 0;
}

.list-vote img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.list-vote.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.bottom1 {
  width: 90%;
  position: absolute;
  bottom: 5.6vw;
  left: 50%;
  transform: translateX(-50%);
}

/* 当使用top3-wrap-inner时，调整bottom1的定位 */
.top3-wrap-inner .bottom1 {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
}

/* 切换按钮 */
.toggle-btn {
  position: absolute;
  left: 50%;
  bottom: 28.6vw;
  transform: translateX(-50%);
  width: 50vw;
  height: auto;
  cursor: pointer;
  z-index: 5;
  display: block;
}
.list-time { 
  font-size: 3vw; 
  font-weight: 600; 
  color: #805f59; 
}
/* 悬浮分享按钮 */
.share-btn {
  position: absolute;
  right: 3vw;
  bottom: 14.6vw;
  width: 13vw;
  height: 13vw;
  max-width: 64px;
  max-height: 64px;
  background: url('img/share.png') no-repeat center center;
  background-size: contain;
  border: none;
  cursor: pointer;
  font-size: 0; /* 隐藏文字，只显示图片 */
  z-index: 5;
}

/* 当使用top3-wrap-inner时，调整切换按钮的定位 */
.top3-center .toggle-btn {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 5;
}

/* 当使用top3-wrap-inner时，调整分享按钮的定位 */
.top3-wrap-inner .share-btn {
  position: absolute;
  right: 3vw;
  bottom: 20px;
  z-index: 5;
}

@media (min-width: 768px) {
  .list { margin-top: 32vw; }
  .list-title { font-size: 18px; }
  .list-num { font-size: 20px; }
  .list-vote { font-size: 16px; padding: 8px 18px; }
  .date-tab-item { font-size: 18px; }
  .program-toggle-item { 
    width: 21vw; 
    height: 7.5vw; 
    line-height: 7.5vw; 
    font-size: 3.5vw; 
  }
  .program-toggle-container { width: 45vw; }
}

/* 投票内容容器 */
.voting-container {
  background: white;
  border-radius: 15px;
  padding: 30px 20px;
  margin: 0 auto;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 标题区域 */
.title-section {
  text-align: center;
  margin-bottom: 30px;
}

.title-section h1 {
  color: #333;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
}

.title-section p {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

/* 投票选项区域 */
.voting-options {
  margin-bottom: 30px;
}

.option-item {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.option-item:hover {
  border-color: #bd2a1e;
  background: #fff5f5;
}

.option-item.selected {
  border-color: #bd2a1e;
  background: #fff5f5;
}

.option-item input[type="radio"] {
  margin-right: 10px;
  transform: scale(1.2);
}

.option-item label {
  font-size: 16px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* 投票按钮 */
.vote-button {
  width: 100%;
  background: linear-gradient(135deg, #bd2a1e, #d63384);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.vote-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(189, 42, 30, 0.3);
}

.vote-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 底部背景 */
.bottom-bg {
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: -1;
  pointer-events: none;
}

.bottom-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bottom2 {
  width: 100%;
  height: 15vw;
  line-height: 15vw;
  text-align: center;
  font-weight: normal;
  font-size: 4vw;
  color: #FFFFFF;
  letter-spacing: 2px;
  font-style: normal;
  text-transform: none;
  -webkit-text-stroke: 1px #71150D;
}

/* 响应式设计 */
@media (max-width: 768px) {
  
  .voting-container {
    margin: 0 10px;
    padding: 20px 15px;
  }
  
  .title-section h1 {
    font-size: 20px;
  }
  
  .option-item {
    padding: 12px;
  }
  
  .option-item label {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .content-area {
    padding: 15px;
  }
  
  .voting-container {
    padding: 15px 10px;
  }
  
  .title-section h1 {
    font-size: 18px;
  }
}

/* 可播放视频的头像鼠标样式 */
.avatar.can-play, .list-avatar.can-play { cursor: pointer; position: relative; }
.avatar.can-play::after, .list-avatar.can-play::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  border-left: 12px solid rgba(255,255,255,0.95);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  opacity: 0.9;
  pointer-events: none;
}

/* 视频遮罩与容器（真机兼容） */
.video-mask {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  -webkit-overflow-scrolling: touch;
}
.video-box {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}
.video-frame {
  position: relative;
  width: 100vw;
  height: calc(100vw * 9 / 16);
  max-height: 100vh;
  background: #000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.video-player {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.video-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  border: none;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 24px;
  line-height: 36px;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

/* Loading 遮罩（真机兼容） */
.loading-mask {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: flex; /* 保持为flex以便jQuery fadeIn后仍可居中 */
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  z-index: 10001;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.loading-mask.show {
  opacity: 1;
  pointer-events: auto;
}
.loading-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
  -webkit-animation: spin 0.9s linear infinite;
}
.loading-text {
  margin-top: 10px;
  color: #fff;
  font-size: 14px;
  letter-spacing: 1px;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 自定义确认弹窗（真机兼容） */
.confirm-mask {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  z-index: 10002;
  -webkit-overflow-scrolling: touch;
  /* iOS 微信兼容性增强 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.confirm-box {
  width: 88vw;
  max-width: 420px;
  background: #1d1d1f;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  overflow: hidden;
  /* 移除margin，让flex自动居中 */
  /* 确保在iOS中正确居中 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
}
.confirm-message {
  padding: 18px 16px 12px;
  text-align: center;
  line-height: 1.5;
  font-size: 16px;
  word-break: break-all;
}
.confirm-actions {
  display: flex;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.confirm-btn {
  flex: 1;
  padding: 12px 0;
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}
.confirm-cancel {
  border-right: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
}
.confirm-ok {
  color: #00e0a4;
}