/* 영상 선택 섹션 (인강 검색 화면과 동일한 스타일) */
.video-selection {
  margin: 12px 0;
  padding: 0.75rem 1rem;
  background: rgb(44 47 72 / 50%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 20%);
}

.video-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.video-header h4 {
  margin: 0;
  color: #e0e0e0;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, #8b9cf7 0, #9d7bf0 50%, #f5a5fc 100%);
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.video-count {
  background: rgb(139 156 247 / 30%);
  color: #8b9cf7;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgb(139 156 247 / 30%);
}

.video-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.video-item {
  /* 더 이상 사용하지 않음 - video-result-card 사용 */
  display: none;
}

.video-item.recommended {
  display: none;
}

.video-header-item {
  display: none;
}

.video-type {
  display: none;
}

.video-level {
  display: none;
}

.video-title {
  display: none;
}

.video-topic {
  display: none;
}

.video-reason {
  display: none;
}

.video-meta {
  display: none;
}

/* video-score는 video-result-card 내부에서 사용되므로 표시해야 함 */

/* .video-score 스타일은 chat-modular.css에서 정의됨 */

.video-duration {
  display: none;
}

.video-actions {
  display: none;
}

.btn-embed,
.btn-youtube {
  display: none;
}

/* 임베드 플레이어 */
.video-embedded {
  margin: 20px 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
  overflow: hidden;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.player-title {
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  flex: 1;
  margin-right: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-controls {
  display: flex;
  gap: 8px;
}

.btn-fullscreen,
.btn-close {
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-fullscreen {
  background: #007bff;
  color: white;
}

.btn-fullscreen:hover {
  background: #0056b3;
}

.btn-close {
  background: #dc3545;
  color: white;
}

.btn-close:hover {
  background: #c82333;
}

.player-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 비율 */
  height: 0;
  overflow: hidden;
  background: #000;
}

.player-container #youtube-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* 커스텀 컨트롤 */
.custom-controls {
  padding: 12px 16px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

.btn-play-pause {
  width: 100%;
  padding: 10px;
  margin-bottom: 12px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-play-pause:hover {
  background: #0056b3;
}

.timeline-control {
  margin: 12px 0;
}

.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6c757d;
  margin-bottom: 8px;
}

.timeline-bar {
  position: relative;
  height: 6px;
  background: #dee2e6;
  border-radius: 3px;
  cursor: pointer;
  margin: 8px 0;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #007bff;
  border-radius: 3px;
  transition: width 0.1s;
}

#timeline-slider {
  width: 100%;
  height: 6px;
  appearance: none;
  background: transparent;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

#timeline-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: #007bff;
  border-radius: 50%;
  cursor: pointer;
}

#timeline-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #007bff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.playback-rate-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.rate-label {
  font-size: 12px;
  font-weight: 500;
  color: #495057;
}

.rate-btn {
  padding: 6px 12px;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.rate-btn:hover {
  background: #f8f9fa;
}

.rate-btn.active {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.quick-jump {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

.quick-jump button {
  flex: 1;
  min-width: 80px;
  padding: 6px 12px;
  border: 1px solid #dee2e6;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}

.quick-jump button:hover {
  background: #f8f9fa;
  border-color: #007bff;
}

.player-footer {
  padding: 12px 16px;
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  text-align: center;
}

.btn-youtube-link {
  padding: 8px 16px;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-youtube-link:hover {
  background: #c82333;
  transform: translateY(-1px);
}

/* 전체 화면 모드 */
.player-container:fullscreen {
  padding-bottom: 0;
  height: 100vh;
  width: 100vw;
}

/* 모바일 반응형 */
@media (width <= 768px) {
  .video-selection {
    margin: 16px 0;
    padding: 12px;
  }

  .player-container {
    padding-bottom: 56.25%; /* 모바일에서도 16:9 유지 */
  }

  .player-header {
    padding: 10px 12px;
    font-size: 14px;
  }

  .player-controls button {
    padding: 4px 8px;
    font-size: 11px;
  }

  .playback-rate-control {
    gap: 4px;
  }

  .rate-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .quick-jump {
    gap: 4px;
  }

  .quick-jump button {
    padding: 4px 8px;
    font-size: 11px;
    min-width: 60px;
  }
}
