/* ===================================================
   쇠구컵 지통실 스타일 (do7 스타일)
   =================================================== */

/* 지통실 컨테이너 */
.jitong-container {
  padding: 20px 0;
}

/* 헤더 */
.jitong-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(79, 209, 197, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-radius: 12px;
  border: 1px solid rgba(79, 209, 197, 0.2);
}

.jitong-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jitong-header h3 {
  margin: 0;
  font-size: 18px;
  color: #4fd1c5;
}

#jitongStats {
  font-size: 14px;
  color: var(--text-secondary);
}

#jitongStats strong {
  color: var(--text-primary);
}

#jitongStats .live-count {
  color: #ef4444;
}

.jitong-update-info {
  font-size: 12px;
  color: var(--text-muted);
}

/* 필터 버튼 그룹 */
.jitong-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.jitong-filter-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.jitong-filter-btn:hover {
  color: var(--btn-color, #4fd1c5);
  background: rgba(79, 209, 197, 0.1);
  border-color: var(--btn-color, #4fd1c5);
}

.jitong-filter-btn.active {
  color: white;
  background: var(--btn-color, #4fd1c5);
  border-color: var(--btn-color, #4fd1c5);
}

/* 새로고침 컨트롤 */
.jitong-refresh-control {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

.jitong-refresh-label {
  font-size: 13px;
  color: var(--text-muted);
}

.jitong-rate-options {
  display: flex;
  gap: 12px;
}

.jitong-rate-option {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.jitong-rate-option input {
  accent-color: #4fd1c5;
}

.jitong-rate-option span {
  font-size: 13px;
  color: var(--text-secondary);
}

#jitongRefreshBtn {
  margin-left: auto;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  background: linear-gradient(135deg, #4fd1c5 0%, #38b2ac 100%);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#jitongRefreshBtn:hover {
  background: linear-gradient(135deg, #38b2ac 0%, #319795 100%);
  transform: scale(1.05);
}

#jitongRefreshBtn:disabled {
  background: #4a5568;
  cursor: not-allowed;
  transform: none;
}

/* 그리드 (do7 스타일 - 4열) */
.jitong-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* 카드 (do7 스타일) */
.jitong-card {
  display: flex;
  flex-direction: column;
  background: #1a1a25;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  border: 3px solid transparent;
}

.jitong-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* 라이브 카드 - 초록 테두리 */
.jitong-card.is-live {
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.2);
}

.jitong-card.is-live:hover {
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.3);
}

/* 오프라인 카드 */
.jitong-card.is-offline {
  opacity: 0.6;
}

.jitong-card.is-offline:hover {
  opacity: 0.9;
}

/* 썸네일 영역 */
.jitong-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 비율 */
  background: #0a0a0f;
  overflow: hidden;
}

.jitong-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jitong-thumbnail.offline {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a1a25 0%, #2d2d3a 100%);
}

.jitong-thumbnail.offline img {
  width: 60%;
  height: 60%;
  object-fit: cover;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.jitong-avatar-fallback {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: 700;
  color: var(--gold-primary);
  z-index: 0;
}

.jitong-thumbnail img + .jitong-avatar-fallback {
  display: none;
}

/* 시청자 뱃지 (do7 스타일 - 좌상단 빨간 뱃지) */
.jitong-viewer-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  color: white;
  background: #ef4444;
  border-radius: 6px;
  z-index: 10;
}

.jitong-viewer-badge .live-dot {
  width: 8px;
  height: 8px;
  background: white;
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* 오프라인 뱃지 */
.jitong-offline-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 6px;
  z-index: 10;
}

/* 카드 바디 */
.jitong-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* 이름 */
.jitong-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

/* 방송 제목 */
.jitong-title {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

/* 팀 정보 */
.jitong-meta {
  margin-top: 4px;
}

.jitong-team {
  font-size: 13px;
  font-weight: 500;
}

/* 푸터 (시청자수, 시작시간) */
.jitong-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: var(--text-muted);
}

.jitong-viewers {
  color: var(--text-secondary);
}

.jitong-start {
  color: var(--text-muted);
}

/* 오프라인 버튼 */
.jitong-btn {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.jitong-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.2);
}

/* 로딩 */
.jitong-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.jitong-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(79, 209, 197, 0.2);
  border-top-color: #4fd1c5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

/* 반응형 */
@media (max-width: 1200px) {
  .jitong-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .jitong-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .jitong-grid {
    grid-template-columns: 1fr;
  }
  
  .jitong-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .jitong-filter-group {
    justify-content: center;
  }

  .jitong-refresh-control {
    flex-wrap: wrap;
  }

  .jitong-rate-options {
    flex-wrap: wrap;
  }

  #jitongRefreshBtn {
    margin-left: 0;
    width: 100%;
    margin-top: 10px;
  }
}
