/* 메인 페이지, 비디오 관련 스타일 */

/* 섹션 공통 스타일 */
.news-section {
  margin-bottom: 20px;
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #f1f3f5;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.more-link {
  font-size: 14px;
  color: #868e96;
  text-decoration: none;
}

.more-link:hover {
  color: #4263eb;
}

/* 핫토픽 섹션 */
.hot-topic {
  margin-bottom: 15px;
}

/* 로딩 상태 */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 150px;
  color: #adb5bd;
  font-size: 14px;
}

.loading i {
  margin-right: 8px;
  font-size: 18px;
}

/* 비디오 컨테이너 */
.video-container {
  display: flex;
  flex-direction: column;
}

/* 비디오 썸네일 */
.video-thumbnail {
  position: relative;
  width: 100%;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.thumbnail-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

/* 호버 비디오 */
.hover-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

/* 재생 버튼 오버레이 */
.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 2;
}

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

.play-button {
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.play-button i {
  color: white;
  font-size: 20px;
}

/* 비디오 시간 표시 */
.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 2px;
}

/* HOT 배지 */
.hot-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #ff6b6b;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 3;
}

/* 비디오 정보 */
.video-info {
  padding: 15px;
  cursor: pointer; /* 클릭 가능 표시 */
  transition: background-color 0.2s;
}

.video-info:hover {
  background-color: #f8f9fa; /* 호버 시 배경색 변경 */
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px 0;
  line-height: 1.4;
  color: #222;
}

.video-description {
  font-size: 14px;
  color: #666;
  margin: 0 0 10px 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-meta {
  display: flex;
  font-size: 12px;
  color: #888;
}

.video-date {
  margin-right: 12px;
}

/* 오류 및 콘텐츠 없음 상태 */
.no-content, .error {
  padding: 30px;
  text-align: center;
  color: #868e96;
  font-size: 14px;
}

.error {
  color: #fa5252;
}

/* 자유게시판 영역 */
.news-list {
  padding: 10px 15px;
}

.news-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f3f5;
  cursor: pointer;
}

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

.news-title {
  font-size: 14px;
  color: #333;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-comment {
  color: #adb5bd;
  font-size: 12px;
  margin-left: 10px;
  display: flex;
  align-items: center;
}

.comment-icon {
  margin-right: 3px;
}

/* 투표 공간 */
.poll-section {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 20px;
}

.poll-list {
  padding: 10px 15px;
}

.poll-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f1f3f5;
  cursor: pointer;
}

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

.poll-title {
  font-size: 14px;
  color: #333;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poll-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.poll-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #e9ecef;
  color: #495057;
  font-size: 10px;
  font-weight: bold;
}

.poll-active {
  background-color: #4263eb;
  color: white;
}

/* 반응형 조정 */
@media (max-width: 480px) {
  .video-title {
    font-size: 15px;
  }

  .video-description {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .play-button {
    width: 40px;
    height: 40px;
  }

  .play-button i {
    font-size: 16px;
  }
}