/* ============================
   전체 영역
============================ */
.video-layout {
  display: grid;
  margin-top: 24px;
}

/* ============================
   유튜브 16:9 비율
============================ */
.video-main-iframe {
  width: 100%;
  aspect-ratio: 16 / 9;   /* ⭐ 자동 비율 유지 */
  border-radius: 12px;
  border: none;
}

#mainVideoTitle {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 600;
}

/* ============================
   가로 스크롤 추천영상
============================ */
.video-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
}

.video-scroll::-webkit-scrollbar {
  height: 8px;
}
.video-scroll::-webkit-scrollbar-thumb {
  background: #c0c4cc;
  border-radius: 4px;
}

.video-scroll::-webkit-scrollbar-track {
  background: #f0f0f0;
}

/* ============================
   추천영상 카드 스타일
============================ */
.video-item {
flex: 0 0 calc((100% - 48px) / 4);
min-width: 0;
flex-shrink: 0;

border-radius: 12px;
background: #fff;
padding: 10px;
cursor: pointer;
transition: box-shadow 0.25s ease, transform 0.25s ease;
position: relative;
box-sizing: border-box;
}

/* hover 시 그림자 */
.video-item:hover {
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  transform: translateY(-4px);
}

/* ============================
   썸네일 박스
============================ */
.video-thumb-box {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.video-thumb-box img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* hover 시 확대 */
.video-thumb-box:hover img {
  transform: scale(1.08);
}

/* ============================
   재생 아이콘
============================ */
.video-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.25s ease;
  z-index: 3;
}

.video-play-icon::before {
  content: "";
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent white;
  margin-left: 3px;
}

.video-thumb-box:hover .video-play-icon {
  transform: translate(-50%, -50%) scale(1.15);
}

/* ============================
   duration / category
============================ */
.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 4px;
  z-index: 2;
}

.video-category {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  z-index: 2;
}

/* ============================
   텍스트 영역
============================ */
.video-info-title {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
}

.video-info-meta {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}

/* ============================
   로딩 스피너
============================ */
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e7eb;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 12px auto;
}

/* 탭버튼 아래 추천영상소개 타이틀 여백 */
.video-section {
  margin-top: 40px; /* 기존 60px → 40px 또는 원하는 값 */
}

/* 메인영상 박스 */
.main-video-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
}

/* 메인 영상 iframe */
.video-main-iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
  object-fit: cover;
}

/* 메인 영상 재생 아이콘 */
.main-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.25s ease;
  z-index: 3;
}

.main-play-icon::before {
  content: "";
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent white;
  margin-left: 4px;
}

/* hover 시 확대 */
.main-video-box:hover .main-play-icon {
  transform: translate(-50%, -50%) scale(1.15);
}
/* 추천영상소개 타이틀 아래 여백 */
.board-title {
  margin-bottom: 16px;
}
/* 메인 영상 메타 정보 */
.main-video-meta {
  font-size: 14px;
  color: #6b7280;
  margin-top: 6px;
}
/* 메인영상 카테고리 + duration */
.main-video-meta-box {
  margin-top: 10px;
  display: flex;
  gap: 12px;
}

/* 메인영상 카테고리 */
.main-video-category {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;
  z-index: 2;
}

/* 메인영상 duration */
.main-video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 4px;
  z-index: 2;
}

/* 관련영상 타이틀 여백 */
.related-title {
  margin-top: 28px;   /* 메인영상 메타 아래 여백 */
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 600;
}

/* ============================
   관련영상 전체 여백
   ============================ */
.related-video-section-margin {
  margin-top: 16px;
  padding-top: 16px;
}

.related-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.related-header-border {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 20px;

  border-bottom: 2px solid #4aa8ff;
}

.related-header .related-title {
margin: 0;
}

.related-title {
  margin-bottom: 20px;
}

.video-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.4;

  white-space: normal;
  overflow: visible;
  text-overflow: unset;

  margin-bottom: 12px;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 10px;

  padding-bottom: 16px;
  margin-bottom: 20px;

  border-bottom: 1px solid #e5e7eb;

  font-size: 14px;
  color: #6b7280;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
