/* Video Playlist Board Style - 비즈니스 레슨 사이트 스타일 */

/* Plyr.js CSS 임포트 (CDN) */
@import url('https://cdn.plyr.io/3.7.8/plyr.css');

/* 전체 컨테이너 - 기본적으로 PC는 가로 배치 */
.video-board-container {
  display: flex !important;
  flex-direction: row !important; /* PC 기본값 */
  padding: 2rem;
  max-width: 1400px;
  margin: auto;
  gap: 2rem;
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
}

/* 비디오 섹션 (메인 컨텐츠) - PC에서 기본적으로 왼쪽 */
.video-section {
  flex: 2 !important;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  order: 1 !important; /* 왼쪽에 배치 */
  min-width: 0; /* flexbox overflow 방지 */
  overflow: hidden; /* 내부 요소가 벗어나지 않도록 */
}

/* 데스크톱 aside - PC에서 기본적으로 오른쪽 */
.playlist.desktop-only {
  flex: 0 0 350px !important; /* 너비 고정 */
  order: 2 !important; /* 오른쪽에 배치 */
  display: flex !important;
  flex-direction: column !important;
}

.video-board-container .playlist.mobile-only {
  display: none !important; /* PC에서 숨김 */
}

/* 비디오 래퍼 */
.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid #e5e5e5;
  overflow: hidden;
}

.video-wrapper video {
  width: 100%;
  height: 100%;
}

/* 비디오 썸네일 갤러리 */
.video-thumbnails-container {
  margin-top: 1rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
}

.video-thumbnails-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem;
}

.video-thumbnails-scroll::-webkit-scrollbar {
  height: 8px;
}

.video-thumbnails-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.video-thumbnails-scroll::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.video-thumbnails-scroll::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.video-thumbnail-item {
  flex: 0 0 auto;
  width: 160px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.video-thumbnail-item:hover {
  transform: scale(1.05);
}

.video-thumbnail-item.active {
  border: 2px solid #007bff;
  border-radius: 4px;
}

.thumbnail-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
}

.thumbnail-image,
.thumbnail-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* 컨트롤 비활성화 */
}

.thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-thumbnail-item:hover .thumbnail-overlay {
  opacity: 1;
}

.thumbnail-overlay .play-icon {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.thumbnail-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 비디오가 없을 경우 컨텐츠 래퍼 */
.content-wrapper {
  width: 100%;
  height: 100%;
  background: #f8f9fa;
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e5e5;
}

.content-wrapper form {
  text-align: center;
}

/* 비디오 임베드 영역 */
.video-embed {
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-embed video {
  width: 100%;
  height: 100%;
}

/* 비디오 컨텐츠 영역 */
.video-content {
  width: 100%;
  height: 100%;
  background: #f8f9fa;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e5e5;
  text-align: center;
}

.video-content p {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #495057;
}

.video-content small {
  color: #6c757d;
  font-size: 0.9rem;
}

/* 비디오 정보 영역 */
.video-info {
  background: #ffffff;
  padding: 2rem;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.video-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  line-height: 1.3;
  color: #1a1a1a;
}

.video-title .category {
  display: inline-block;
  background: #6c757d;
  color: white;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  margin-right: 0.75rem;
  vertical-align: middle;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 메타 정보 */
.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e5e5;
}

.meta-left, .meta-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.meta-left .author {
  font-weight: 500;
  color: #495057;
  font-size: 0.95rem;
}

.meta-left .author a {
  text-decoration: none;
  color: #495057;
}

.meta-left .author a:hover {
  color: #343a40;
}

.meta-left .regdate {
  color: #6c757d;
  font-size: 0.9rem;
}

.meta-right span {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
}

/* 태그 영역 */
.video-tags {
  margin-bottom: 0.5rem;
}

.video-tags .tag {
  display: inline-block;
  background: #f1f3f4;
  color: #5f6368;
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  text-decoration: none;
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
}

.video-tags .tag:hover {
  background: #e8eaed;
  color: #3c4043;
}

/* 비디오 설명 */
.video-description {
  line-height: 1.7;
  color: #495057;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

/* 첨부파일 목록 */
.file-list {
  margin-bottom: 1.5rem;
}

.toggle-files {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: #495057;
  transition: all 0.2s ease;
}

.toggle-files:hover {
  background: #e9ecef;
  color: #343a40;
}

.files {
  margin-top: 0.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-top: none;
}

.file-item {
  display: block;
  padding: 0.75rem;
  text-decoration: none;
  color: #495057;
  border-bottom: 1px solid #dee2e6;
  transition: background-color 0.2s ease;
}

.file-item:last-child {
  border-bottom: none;
}

.file-item:hover {
  background: #e9ecef;
}

.filename {
  font-weight: 500;
  margin-right: 1rem;
  color: #343a40;
}

.filesize, .download-count {
  font-size: 0.85rem;
  color: #6c757d;
  margin-right: 1rem;
}

/* 액션 버튼들 */
.video-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-btn, .edit-btn, .delete-btn {
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
  color: #495057;
  transition: all 0.2s ease;
}

.action-btn:hover, .edit-btn:hover {
  background: #343a40;
  color: white;
  border-color: #343a40;
}

.delete-btn:hover {
  background: #dc3545;
  color: white;
  border-color: #dc3545;
}

/* 플레이리스트 섹션 */
.playlist {
  width: 350px;
  max-height: calc((100vw - 350px - 4rem) * 9 / 16 + 900px);
  overflow: hidden; /* 기본 스크롤 비활성화 */
  background: #ffffff;
  border: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  padding: 1.5rem;
  border: 1px solid #e5e5e5;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.playlist h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.1rem;
  color: #1a1a1a;
  font-weight: 600;
  border-bottom: 2px solid #343a40;
  padding-bottom: 0.75rem;
}

.playlist-container {
  margin-bottom: 1.5rem;
}

.playlist-items {
  list-style: none;
  padding: 0;
  margin: 0;
  transition: opacity 0.15s ease;
}

.playlist-item {
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
  border: 1px solid #e5e5e5;
  border-radius:10px;
  position: relative;
}

.playlist-checkbox {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 18px;
  height: 18px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid #343a40;
}

.playlist-checkbox:checked {
  background: #343a40;
}

.playlist-item .playlist-link {
  padding: 1rem;
}

/* 브라우저 호환성을 위한 대체 스타일 - 제거 */

.playlist-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  border-color: #dee2e6;
}

.playlist-item.current {
  background: #f8f9fa;
  border: 2px solid #495057;
}

.playlist-item.current .playlist-title {
  color: #343a40;
  font-weight: 600;
}

.playlist-link {
  display: block;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease;
}

.playlist-link:hover {
  background: #f8f9fa;
  /* transform 제거 */
}

.playlist-info {
  width: 100%;
}

.playlist-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
  line-height: 1.4;
  color: #495057;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-playlist {
  text-align: center;
  color: #6c757d;
  font-style: italic;
  padding: 2rem;
}

/* 플레이리스트 목록보기 */
.playlist-back {
  padding-bottom: 1rem;
}

.list-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background: #343a40;
  color: white;
  text-decoration: none;
  text-align: center;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.list-btn:hover {
  background: #23272b;
}

/* 작성자 서명 */
.author-signature {
  background: #ffffff;
  padding: 1.5rem;
  border: 1px solid #e5e5e5;
  margin-top: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.profile-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
}

.signature-text {
  flex: 1;
  line-height: 1.5;
  color: #6c757d;
}

/* 반응형 디자인 - 모바일에서만 사용 */
/* 삭제됨: 기본 레이아웃은 위에서 설정 */

@media (max-width: 640px) {
  .video-board-container {
    padding: 0.75rem;
  }
  
  .video-info {
    padding: 1.5rem;
  }
  
  .video-title {
    font-size: 1.4rem;
  }
  
  .playlist {
    padding: 1rem;
  }
  
  .playlist-link {
    padding: 0.75rem;
  }
}

/* 사용자 지정 비디오 게시판 전용 폼 스타일 */

/* 게시글 작성/수정/삭제 폼 공통 스타일 */
.bean-form-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.bean-form-header {
  border-bottom: 2px solid #343a40;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.bean-form-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #343a40;
  margin: 0;
}

/* 입력 필드 공통 스타일 */
.bean-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  background: #ffffff;
  font-size: 0.95rem;
  color: #495057;
  transition: all 0.2s ease;
  margin-bottom: 1rem;
}

.bean-input:focus {
  outline: none;
  border-color: #343a40;
  box-shadow: 0 0 0 2px rgba(52, 58, 64, 0.1);
}

.bean-input:hover {
  border-color: #adb5bd;
}

/* 셀렉트 박스 */
.bean-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  background: #ffffff;
  font-size: 0.95rem;
  color: #495057;
  transition: all 0.2s ease;
  margin-bottom: 1rem;
  cursor: pointer;
}

.bean-select:focus {
  outline: none;
  border-color: #343a40;
  box-shadow: 0 0 0 2px rgba(52, 58, 64, 0.1);
}

/* 체크박스 */
.bean-checkbox {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  cursor: pointer;
}

.bean-checkbox-label {
  font-size: 0.95rem;
  color: #495057;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

/* 버튼 */
.bean-btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.bean-btn-primary {
  background: #343a40;
  color: white;
}

.bean-btn-primary:hover {
  background: #23272b;
  color: white;
}

.bean-btn-secondary {
  background: #6c757d;
  color: white;
}

.bean-btn-secondary:hover {
  background: #5a6268;
  color: white;
}

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

.bean-btn-danger:hover {
  background: #c82333;
  color: white;
}

.bean-btn-outline {
  background: transparent;
  color: #343a40;
  border: 1px solid #343a40;
}

.bean-btn-outline:hover {
  background: #343a40;
  color: white;
}

/* 폼 그룹 */
.bean-form-group {
  margin-bottom: 1.5rem;
}

.bean-form-label {
  display: block;
  font-weight: 500;
  color: #343a40;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.bean-form-help {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* 버튼 그룹 */
.bean-btn-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
  justify-content: flex-end;
}

/* 테이블 스타일 */
.bean-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.bean-table th {
  background: #f8f9fa;
  padding: 1rem;
  text-align: left;
  font-weight: 500;
  color: #343a40;
  border: 1px solid #dee2e6;
  width: 150px;
  vertical-align: top;
}

.bean-table td {
  padding: 1rem;
  border: 1px solid #dee2e6;
  vertical-align: top;
}

.bean-table .required {
  color: #dc3545;
  font-weight: bold;
}

/* 태그 입력 */
.bean-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.bean-tag {
  background: #e9ecef;
  color: #495057;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  border: 1px solid #dee2e6;
}

/* 비밀번호 폼 */
.bean-password-form {
  background: #f8f9fa;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.bean-password-form .bean-form-title {
  margin-bottom: 1rem;
}

.bean-password-form .bean-input {
  max-width: 300px;
  margin: 0 auto 1rem auto;
}

/* 모바일 적응 */
@media (max-width: 768px) {
  .bean-form-container {
    margin: 1rem;
    padding: 1rem;
  }
  
  .bean-btn-group {
    flex-direction: column;
  }
  
  .bean-btn {
    width: 100%;
  }
  
  .bean-table th {
    width: auto;
    display: block;
    border-bottom: none;
  }
  
  .bean-table td {
    display: block;
    border-top: none;
  }
}

/* 플레이리스트 헤더 */
.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

.playlist-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #343a40;
}

.playlist-sort {
  display: flex;
  gap: 0.5rem;
}

.bean-sort-btn {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
}

.bean-sort-btn svg {
  width: 12px;
  height: 12px;
}

.bean-sort-btn.active {
  background: #343a40;
  color: white;
  border-color: #343a40;
}

/* 강의 헤더 */
.playlist-info-section {
  flex-shrink: 0; /* 스크롤 영역에서 제외 */
  margin-bottom: 1rem;
  border-bottom:1px solid #dedede;
}

.course-header {
  margin-bottom: 0.5rem;
}

.course-count {
  font-size: 1rem;
  color: #6c757d;
  display: block;
  margin-bottom: 0.2rem;
}

.course-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #343a40;
  margin: 0;
  margin-bottom: 0.5rem;
}

.course-title .category {
  background: #e9ecef;
  color: #495057;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 12px;
  margin-right: 0.5rem;
  font-weight: 500;
}

/* 플레이리스트 스크롤 영역 */
.playlist-scroll-area {
  flex: 1;
  padding-right:5px;
  overflow-y: auto;
  max-height: 100%; /* 또는 원하는 최대 높이 */
}

/* 데스크톱 aside 전체 레이아웃 */
.playlist.desktop-only {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 모바일 aside 전체 레이아웃 */
.playlist.mobile-only {
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .playlist.mobile-only {
    max-height: none; /* 모바일에서는 높이 제한 없음 */
  }

}

/* 강의 구매 섹션 */
.course-purchase-section {
  background: #ffffff;
  margin-bottom: 1.5rem;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.discount-rate {
  font-size: 1rem;
  font-weight: bold;
  color: #e53e3e;
}

.original-price {
  font-size: 1rem;
  font-weight: bold;
  color: #999;
  text-decoration: line-through;
}

.monthly-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
}

.installment-info {
  font-size: 1rem;
  font-weight: bold;
  color: #666;
}

.special-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: #e53e3e;
}

.benefit-text {
  font-size: 1rem;
  font-weight: bold;
  color: #e53e3e;
}

.purchase-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1rem;
  height: 50px;
}

.purchase-btn-main {
  flex: 1;
  height: 100%;
  background: #ff6b35;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.purchase-btn-main:hover {
  background: #e5562a;
  color: white;
}

.share-btn-icon {
  width: 50px;
  height: 50px;
  background: transparent;
  border: 1px solid #ddd;
  color: #666;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.share-btn-icon:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  color: #495057;
}

.share-btn-icon svg {
  width: 18px;
  height: 18px;
}



/* 모달 스타일 */
.bean-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bean-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.bean-modal-content {
  position: relative;
  background: white;
  min-width: 400px;
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bean-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
}

.bean-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #343a40;
}

.bean-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  color: #6c757d;
  transition: color 0.2s ease;
}

.bean-modal-close:hover {
  color: #343a40;
}

.bean-modal-body {
  padding: 1.5rem;
}

.bean-search-form .bean-form-group {
  margin-bottom: 1.5rem;
}

.bean-search-form .bean-btn-group {
  margin-top: 2rem;
  justify-content: center;
}

/* 모바일 적응 */
@media (max-width: 768px) {
  .bean-modal-content {
    min-width: 320px;
    margin: 1rem;
  }
  
  .bean-modal-header,
  .bean-modal-body {
    padding: 1rem;
  }
}

/* 헤더 설정 버튼 */
.bean-setup-btn {
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: absolute;
  top: 1rem;
  right: 0rem;
  margin-bottom:1em;
}

.bean-setup-btn svg {
  width: 14px;
  height: 14px;
}

.board_header {
  position: relative;
  min-height: 60px;
}

.bean-form-editor {border:1px solid #dedede}
.xefu-container {border:none!important;margin:0!important;border-top:1px solid #dedede;}

/* 기존 board 스타일과의 호환성 */
.board .video-board-container input[type="password"] {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  background: #ffffff;
  font-size: 0.9rem;
}

.board .video-board-container input[type="submit"] {
  padding: 0.75rem 1.5rem;
  background: #343a40;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.board .video-board-container input[type="submit"]:hover {
  background: #23272b;
}

/* 목록 페이지 전용 스타일 */
.intro-placeholder {
  text-align: center;
  color: #6c757d;
}

.intro-placeholder p {
  margin: 1rem 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.intro-placeholder small {
  font-size: 0.85rem;
  color: #adb5bd;
}

/* 플레이리스트 메타 정보 (목록 페이지용) */
.playlist-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.playlist-date {
  font-size: 0.8rem;
  color: #6c757d;
}

.comment-count {
  font-size: 0.8rem;
  color: #6c757d;
}

/* 검색 영역 */
.playlist-search {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.search-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.search-input {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  background: #ffffff;
  font-size: 0.9rem;
  flex: 1;
}

.search-select {
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  background: #ffffff;
  font-size: 0.9rem;
}

.search-btn {
  padding: 0.75rem 1rem;
  background: #343a40;
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.search-btn:hover {
  background: #23272b;
}

/* 페이지네이션 */
.class-pagination {
  margin: 2rem auto;
  max-width: 1400px;
  padding: 0 2rem;
}

.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.page-btn, .current-page {
  padding: 0.75rem 1rem;
  text-decoration: none;
  border: 1px solid #dee2e6;
  color: #495057;
  font-weight: 500;
  transition: all 0.2s ease;
}

.page-btn:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
}

.current-page {
  background: #343a40;
  color: white;
  border-color: #343a40;
}

.page-btn.first, .page-btn.last {
  font-weight: 600;
}

/* 강의 수 표시 */
.course-count {
  font-weight: 500;
}

/* iframe 반응형 */
.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 모바일 검색 스타일 개선 */
@media (max-width: 640px) {
  .search-group {
    gap: 0.75rem;
  }
  
  .pagination-wrapper {
    gap: 0.25rem;
  }
  
  .page-btn, .current-page {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* 숨김: 기존 게시판 목록 영역 */
.board_list {
  display: none !important;
}

.list_footer {
  display: none !important;
}

/* 구매 완료 섹션 */
.course-purchased-section {
  background: #ffffff;
  margin-bottom: 1.5rem;
}

.purchased-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.check-icon {
  flex-shrink: 0;
}

.purchased-text {
  font-size: 1rem;
  font-weight: bold;
  color: #28a745;
}

/* 자물쇠 아이콘 */
.lock-icon {
  margin-right: 0.25rem;
  flex-shrink: 0;
  display: inline;
  vertical-align: top;
  margin-top: 0.1em;
}

.playlist-title {
  display: flex;
  align-items: flex-start;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* 모바일/데스크톱 표시 제어 - 정리된 버전 */
/* 기본: PC 레이아웃은 위에서 설정됨 */
.playlist.mobile-only {
  display: none !important;
}

.playlist.desktop-only {
  display: flex !important;
  flex-direction: column;
}

/* 중복 제거: PC 레이아웃 규칙은 위에서 처리 */

@media (max-width: 768px) {
  /* 모바일에서만 세로 배치 */
  .video-board-container {
    flex-direction: column !important;
    padding: 1rem;
    gap: 1.5rem;
  }
  
  .video-section {
    order: 1 !important;
  }
  
  .playlist.desktop-only {
    display: none !important;
  }
  
  .playlist.mobile-only {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    order: 2 !important; /* video-section 다응에 배치 */
  }
  
  /* list 페이지에서만: playlist를 video-section 내부로 이동 */
  body.list-page .video-section {
    display: flex;
    flex-direction: column;
  }
  
  body.list-page .video-wrapper {
    order: 1; /* 맨 위 */
  }
  
  body.list-page .playlist.mobile-only {
    order: 2; /* video-wrapper 다음 */
    max-height: 300px; /* 높이 제한 */
    overflow: hidden;
  }
  
  body.list-page .playlist.mobile-only .playlist-container {
    max-height: 200px; /* 스크롤 영역 높이 제한 */
    overflow-y: auto; /* 세로 스크롤 */
  }
  
  body.list-page .video-info {
    order: 3; /* 맨 아래 */
  }
  
  .playlist {
    width: 100%;
  }
  
  .video-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .meta-left, .meta-right {
    width: 100%;
    justify-content: space-between;
  }
  
  .video-actions {
    justify-content: center;
  }
}

/* 권한 없음 팝업 */
.access-popup-content {
  max-width: 400px !important;
  text-align: center;
  padding:2em;
}

.access-popup-header {
  margin-bottom: 1.5rem;
}

.access-popup-header svg {
  display: block;
  margin: 0 auto;
}

.access-popup-body {
  padding: 0;
}

.access-popup-message {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.access-popup-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: #ff6b35;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.access-popup-btn:hover {
  background: #e5562a;
  transform: translateY(-1px);
  color: white;
}

/* PC에서 playlist 표시 제어 */
.playlist-desktop {
  flex: 0 0 350px !important;
  order: 2 !important; 
  display: flex !important;
  flex-direction: column !important;
}

.playlist-mobile {
  display: none !important;
}

/* read 페이지 playlist 스크롤 설정 */
.playlist-desktop .playlist-container {
  overflow-y: auto; /* 세로 스크롤 */
}

.playlist-mobile .playlist-container {
  max-height: 250px;
  overflow-y: auto;
}

/* 이전/다음 회차 네비게이션 스타일 */
.episode-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

/* 상단 네비게이션 */
.episode-navigation-top {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

/* 하단 네비게이션 */
.episode-navigation-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.episode-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.125rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  text-decoration: none;
  color: #4b5563;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all 0.2s;
}

.episode-nav-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  color: #1f2937;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.episode-nav-btn.prev-episode:hover {
  transform: translateX(-3px);
}

.episode-nav-btn.next-episode:hover {
  transform: translateX(3px);
}

.episode-nav-btn span {
  line-height: 1;
}

/* 이전 버튼은 왼쪽에 */
.episode-nav-btn.prev-episode {
  margin-right: auto;
}

/* 다음 버튼은 오른쪽에 */
.episode-nav-btn.next-episode {
  margin-left: auto;
}

@media (max-width: 768px) {
  /* PC용 playlist 숨김 */
  .playlist-desktop {
    display: none !important;
  }
  
  /* 모바일용 playlist 표시 */
  .playlist-mobile {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    max-height: 800px;
  }
  
  /* 모바일에서 playlist-container 스크롤 */
  .playlist-mobile .playlist-container {
    max-height: 250px;
    overflow-y: auto;
  }
  
  /* 모바일에서 이전/다음 회차 버튼 스타일 조정 */
  .episode-navigation {
    gap: 0.5rem;
  }
  
  .episode-navigation-top {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
  }
  
  .episode-navigation-bottom {
    margin-top: 1.5rem;
    padding-top: 1rem;
  }
  
  .episode-nav-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
  }
  
  .episode-nav-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* 구매/구독 버튼 스타일 */
.purchase-btn-half {
  flex: 1;
  height:50px;
  line-height:50px;
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.purchase-btn-half:hover {
  background: #e5562a;
  transform: translateY(-1px);
  color: white;
}

.purchase-btn-subscribe {
  background: #333;
}

.purchase-btn-subscribe:hover {
  background: #5a6268;
}

/* 비디오 썸네일 갤러리 스타일 */
.video-thumbnails-container {
  max-width: 100%;
  box-sizing: border-box;
}

.video-thumbnails-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
  position: relative;
  max-width: 100%;
}

.video-thumbnails-scroll::-webkit-scrollbar {
  height: 8px;
}

.video-thumbnails-scroll::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 4px;
}

.video-thumbnails-scroll::-webkit-scrollbar-thumb {
  background: #adb5bd;
  border-radius: 4px;
}

.video-thumbnails-scroll::-webkit-scrollbar-thumb:hover {
  background: #868e96;
}

.video-thumbnail-item {
  flex: 0 0 160px;
  min-width: 160px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
}

.video-thumbnail-item:hover {
  transform: scale(1.05);
}

.video-thumbnail-item.active {
  border: 2px solid #ff6b35;
  border-radius: 0.375rem;
  box-sizing: border-box;
}

.thumbnail-wrapper {
  position: relative;
  width: 100%;
  border-radius: 0.375rem;
  overflow: hidden;
  background: #000;
}

.thumbnail-video {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}

.thumbnail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  pointer-events: none;
}

.video-thumbnail-item:hover .thumbnail-overlay {
  background: rgba(0, 0, 0, 0.6);
}

.video-thumbnail-item.active .thumbnail-overlay {
  display: none;
}

.play-icon {
  opacity: 0.9;
}

.thumbnail-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.25rem 0.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}


@media (max-width: 768px) {
  .video-thumbnail-item {
    flex: 0 0 120px;
    min-width: 120px;
  }
  
  .thumbnail-video {
    height: 70px;
  }
  
  .video-thumbnails-container {
    border-radius: 0;
    padding: 0.75rem;
  }
  
  .video-thumbnails-scroll {
    gap: 0.5rem;
  }
}
