/* ==========================================================================
   CFB 中国足球小将 - 全平台直播矩阵弹窗组件 (Live Streaming Platform Matrix Modal)
   ========================================================================== */

/* ==========================================================================
   直播平台降级弹窗组件 (官方品牌 Icon · 无英文 · 微信视频号优先)
   ========================================================================== */
.cfb-live-modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000; /* 高于详情页与杯赛页 (1500)，确保顶层遮罩 */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: auto;
}

.cfb-live-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 18, 30, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cfb-live-modal.is-open .cfb-live-modal__backdrop {
  opacity: 1;
}

.cfb-live-modal__dialog {
  position: relative;
  z-index: 2;
  background: #FFFFFF;
  border-radius: 20px 20px 0 0;
  padding: 12px 18px 28px 18px;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.18);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}

.cfb-live-modal.is-open .cfb-live-modal__dialog {
  transform: translateY(0);
}

.cfb-live-modal__handle {
  width: 36px;
  height: 4px;
  background: #E2E8F0;
  border-radius: 2px;
  margin: 0 auto 12px auto;
}

.cfb-live-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid #F1F5F9;
}

.cfb-live-modal__header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cfb-live-modal__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cfb-live-modal__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(239, 68, 68, 0.12);
  color: #DC2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.cfb-live-modal__badge.is-pre {
  background: rgba(0, 77, 160, 0.08);
  color: #004DA0;
  border-color: rgba(0, 77, 160, 0.2);
}

.cfb-live-modal__badge.is-ft {
  background: rgba(241, 193, 54, 0.15);
  color: #B48206;
  border-color: rgba(241, 193, 54, 0.35);
}

.cfb-live-modal__title {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: 0.3px;
}

.cfb-live-modal__sub {
  font-size: 12px;
  color: #64748B;
  line-height: 1.4;
}

.cfb-live-modal__close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #F1F5F9;
  color: #64748B;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
  flex-shrink: 0;
}

.cfb-live-modal__close:active {
  background: #E2E8F0;
}

.cfb-live-modal__body {
  margin-top: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

/* 各平台条目卡片 */
.cfb-channel-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  transition: all 0.18s ease;
}

.cfb-channel-item--featured {
  background: linear-gradient(135deg, rgba(250, 157, 59, 0.06) 0%, rgba(7, 193, 96, 0.08) 100%);
  border: 1.5px solid rgba(7, 193, 96, 0.35);
  box-shadow: 0 2px 10px rgba(7, 193, 96, 0.08);
}

.cfb-channel-item__main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.cfb-channel-item__icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #FFFFFF;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cfb-channel-item__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.cfb-channel-item__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cfb-channel-item__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cfb-channel-item__title {
  font-size: 14px;
  font-weight: 700;
  color: #1E293B;
  white-space: nowrap;
}

.cfb-channel-item__tag {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.3;
}

.cfb-channel-item__tag--preferred {
  background: #07C160;
  color: #FFFFFF;
}

.cfb-channel-item__tag--rec {
  background: rgba(230, 22, 45, 0.1);
  color: #E6162D;
}

.cfb-channel-item__account-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 1px;
}

.cfb-channel-item__account {
  font-size: 12px;
  color: #64748B;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 账号后的微型轻量复制按钮 */
.cfb-channel-item__copy-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  line-height: 1.3;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.cfb-channel-item__copy-pill:active {
  background: #E2E8F0;
  color: #0F172A;
  transform: scale(0.95);
}

.cfb-channel-item__action {
  flex-shrink: 0;
  margin-left: 10px;
}

.cfb-channel-btn {
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cfb-channel-btn--primary {
  background: #07C160;
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(7, 193, 96, 0.3);
}

.cfb-channel-btn--primary:active {
  background: #06AD56;
  transform: scale(0.97);
}

.cfb-channel-btn--watch {
  background: #FFFFFF;
  color: var(--cfb-royal-blue, #005BB5);
  border: 1px solid rgba(0, 91, 181, 0.35);
  box-shadow: 0 1px 3px rgba(0, 91, 181, 0.08);
}

.cfb-channel-btn--watch:active {
  background: #EFF6FF;
  transform: scale(0.97);
}

.cfb-channel-btn--copy {
  background: #FFFFFF;
  color: #334155;
  border: 1px solid #CBD5E1;
}

.cfb-channel-btn--copy:active {
  background: #F1F5F9;
  transform: scale(0.97);
}

/* 全局 Toast 提示 */
.cfb-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  animation: cfbToastFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cfbToastFade {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
