/* 스포츠 스트리밍 섹션 전용 스타일 — 민트톤(#48CFAD) 다크 UI */

/* ── 섹션 래퍼 ────────────────────────────────────────────────── */
.ss-section {
  background: #0e1117;
  border: 1px solid #1e2535;
  border-radius: 8px;
  padding: 16px;
}

/* ── 카테고리 아이콘 행 ─────────────────────────────────────── */
.ss-cats {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.ss-cats::-webkit-scrollbar { display: none; }

.ss-cat {
  align-items: center;
  background: #1a2130;
  border: 1px solid #2a3548;
  border-radius: 8px;
  color: #8899aa;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  min-width: 64px;
  padding: 8px 12px;
  transition: all 0.15s;
}

.ss-cat:hover {
  background: #1e2d40;
  color: #cdd6e0;
}

.ss-cat.active {
  background: rgba(72, 207, 173, 0.15);
  border-color: #48CFAD;
  color: #48CFAD;
}

.ss-cat-icon {
  font-size: 22px;
  line-height: 1;
}

.ss-cat-label {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── 플레이어 영역 (전체폭) ─────────────────────────────────── */
.ss-player-wrap {
  background: #0a0f17;
  border: 1px solid #1e2535;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.ss-placeholder {
  align-items: center;
  aspect-ratio: 16 / 9;
  color: #4a5568;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.ss-placeholder-icon {
  font-size: 48px;
  opacity: 0.3;
}

.ss-placeholder p {
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.ss-player-header {
  background: #111827;
  border-bottom: 1px solid #1e2535;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
}

#ss-video {
  background: #000;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.ss-player-error {
  background: #1a0505;
  color: #fc8181;
  font-size: 13px;
  padding: 16px;
  text-align: center;
}

/* ── 배너 광고 (플레이어 위 하단 오버레이) ───────────────────── */
.ss-ad-banner {
  background: rgba(10, 15, 23, 0.88);
  bottom: 0;
  left: 0;
  overflow: hidden;
  position: absolute;
  right: 0;
  z-index: 10;
}

.ss-ad-link {
  display: block;
}

.ss-ad-banner img {
  display: block;
  max-height: 90px;
  object-fit: contain;
  width: 100%;
}

.ss-ad-banner:hover { opacity: 0.9; }

.ss-ad-close {
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 3px;
  color: #ccc;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 6px;
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 2;
}

.ss-ad-close:hover { background: rgba(0, 0, 0, 0.85); color: #fff; }

/* ── 스트림 목록 (전체폭, 10개 노출 후 스크롤) ───────────────── */
.ss-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 560px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2a3548 transparent;
}

.ss-list::-webkit-scrollbar       { width: 4px; }
.ss-list::-webkit-scrollbar-track { background: transparent; }
.ss-list::-webkit-scrollbar-thumb { background: #2a3548; border-radius: 2px; }

/* ── 스트림 카드 ──────────────────────────────────────────────── */
.ss-card {
  background: #141923;
  border: 1px solid #1e2a38;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  transition: border-color 0.15s, background 0.15s;
  cursor: pointer;
}

.ss-card:hover {
  background: #192030;
  border-color: #2a3d52;
}

.ss-card.active {
  background: rgba(72, 207, 173, 0.08);
  border-color: #48CFAD;
}

.ss-card-sport {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.ss-card-info {
  flex: 1;
  min-width: 0;
}

.ss-card-teams {
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-card-meta {
  color: #6b7f94;
  font-size: 11px;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.ss-badge {
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  text-transform: uppercase;
}

.ss-badge-live {
  background: rgba(72, 207, 173, 0.2);
  color: #48CFAD;
  border: 1px solid rgba(72, 207, 173, 0.4);
}

.ss-badge-upcoming {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.ss-card-time {
  color: #6b7f94;
  font-size: 11px;
}

.ss-play-btn {
  background: #48CFAD;
  border: none;
  border-radius: 4px;
  color: #0a0f17;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  transition: background 0.15s;
}

.ss-play-btn:hover    { background: #37BC9B; }
.ss-play-btn:disabled {
  background: #2a3548;
  color: #4a5568;
  cursor: not-allowed;
}

/* ── 로딩 / 빈 목록 / 오류 ──────────────────────────────────── */
.ss-loading,
.ss-empty {
  align-items: center;
  color: #6b7f94;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 12px;
  justify-content: center;
  min-height: 120px;
}

.ss-spinner {
  border: 2px solid #2a3548;
  border-top-color: #48CFAD;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: ss-spin 0.7s linear infinite;
}

@keyframes ss-spin { to { transform: rotate(360deg); } }

.ss-section-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  color: #fca5a5;
  font-size: 13px;
  margin-top: 8px;
  padding: 12px 16px;
  text-align: center;
}

/* ── 반응형 ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .ss-list {
    max-height: 320px;
  }

  #ss-video {
    aspect-ratio: 4 / 3;
  }
}
