/* 主题色与基础样式 */
:root {
  --brand-primary: #0d6efd;
  --brand-danger: #dc3545;
}

html, body { height: 100%; }

.live-dot .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #adb5bd;
}

.card .badge { font-weight: 600; }

/* 链接悬停优化 */
a { transition: color .15s ease-in-out, background-color .15s ease-in-out; }

/* 表格行间距与对齐优化 */
.table td, .table th { vertical-align: middle; }

/* 小屏幕导航折叠时的留白优化 */
.navbar .nav-link { padding: .5rem .75rem; }

/* 页脚样式微调 */
footer a { opacity: .85; }
footer a:hover { opacity: 1; }

/* 广告横幅样式 */
.ad-banner-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ad-banner {
  max-width: 800px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.ad-label {
  font-size: 0.75rem;
  border-radius: 0 0 0 0.25rem;
}

/* 直播卡片横向滚动优化 */
.live-scroller {
  scrollbar-width: thin;
  scrollbar-color: #0d6efd transparent;
}

.live-scroller::-webkit-scrollbar {
  height: 8px;
}

.live-scroller::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

.live-scroller::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 4px;
}

.live-scroller::-webkit-scrollbar-thumb:hover {
  background: #0b5ed7;
}

.live-card {
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .ad-banner {
    margin: 0 -15px;
    border-radius: 0 !important;
  }
  
  .ad-banner img {
    max-height: 100px !important;
  }
  
  .live-card {
    min-width: 250px;
    max-width: 280px;
  }
}

/* 性能优化：减少重排重绘 */
.card, .btn {
  will-change: transform;
}

/* 提升视觉层次 */
.navbar-brand {
  font-weight: 600;
}

.live-dot .dot.bg-danger {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* 横向滚动直播列表 */
.live-scroller {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: .25rem;
}
.live-scroller::-webkit-scrollbar { height: 8px; }
.live-scroller::-webkit-scrollbar-thumb { background: rgba(0,0,0,.2); border-radius: 4px; }
.live-scroller .live-card {
  min-width: 280px;
  scroll-snap-align: start;
}
@media (min-width: 576px) {
  .live-scroller .live-card { min-width: 320px; }
}
