/* 강의실 페이지 스타일 - ClassroomPage.tsx 기반 */

/* =========================================
   1. 기본 컨테이너
   ========================================= */
.classroom-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-color: #ffffff;
}

/* =========================================
   2. 헤더
   ========================================= */
.classroom-header {
  height: 64px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background-color: #ffffff;
  flex-shrink: 0;
  z-index: 10;
}

@media (min-width: 1024px) {
  .classroom-header {
    padding: 0 24px;
  }
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: #3b82f6;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.back-button:hover {
  background-color: #2563eb;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-label {
  display: none;
  font-size: 14px;
  color: #6b7280;
}

@media (min-width: 768px) {
  .header-label {
    display: block;
  }
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #e5e7eb;
  border: 1px solid #d1d5db;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

/* =========================================
   3. 메인 콘텐츠 영역
   ========================================= */
.classroom-main {
  display: flex;
  flex: 1;
  overflow: hidden;
  flex-direction: column;
}

@media (min-width: 768px) {
  .classroom-main {
    flex-direction: row;
  }
}

/* =========================================
   4. 비디오 섹션 (왼쪽)
   ========================================= */
.video-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: #ffffff;
  position: relative;
}

.video-player {
  width: 100%;
  background-color: #000000;
  /* 16:9 비율 유지, 최대 560px, 화면 높이 제한 */
  aspect-ratio: 16 / 9;
  max-height: min(560px, calc(100vh - 165px));
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

/* placeholder만 flex 중앙 정렬 */
.video-player .video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.video-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  text-align: left;
  color: #ffffff;
  padding: 32px;
  box-sizing: border-box;
}

.placeholder-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}

.placeholder-icon svg {
  color: #ffffff;
}

.placeholder-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  font-family: Georgia, serif;
}

.placeholder-text {
  font-size: 18px;
  font-weight: 300;
  opacity: 0.8;
}

/* =========================================
   5. 비디오 아래 정보 영역
   ========================================= */
.video-info-section {
  padding: 12px 16px;
  width: 100%;
}

@media (min-width: 768px) {
  .video-info-section {
    padding: 16px 32px;
  }
}

/* 버퍼링 안내는 기본 숨김, 스크롤 시 표시 */
.buffering-notice {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #2563eb;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.buffering-notice:hover {
  background-color: #dbeafe;
}

.current-lesson-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .current-lesson-title {
    font-size: 24px;
    margin-bottom: 16px;
  }
}

/* =========================================
   6. 이전/다음 네비게이션
   ========================================= */
.lesson-navigation {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #ffffff;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.nav-btn:hover:not(:disabled) {
  background-color: #f9fafb;
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* =========================================
   7. 탭 콘텐츠 영역
   ========================================= */
.lesson-content-area {
  border-top: 1px solid #e5e7eb;
  padding-top: 32px;
}

.content-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.content-tab {
  padding: 12px 0;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.content-tab:hover {
  color: #3b82f6;
}

.content-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.notes-placeholder,
.qa-placeholder {
  padding: 24px;
  background-color: #f9fafb;
  border-radius: 8px;
  border: 1px solid #f3f4f6;
  color: #6b7280;
  font-size: 14px;
}

/* 강의 노트 영역 */
.notes-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.notes-textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  background-color: #ffffff;
}

.notes-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-save-notes {
  padding: 10px 20px;
  background-color: #3b82f6;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-save-notes:hover {
  background-color: #2563eb;
}

/* Q&A 영역 */
.qa-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.qa-form {
  background-color: #ffffff;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.qa-form-title {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

.qa-input {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
  margin-bottom: 12px;
}

.qa-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.btn-submit-qa {
  padding: 10px 20px;
  background-color: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-submit-qa:hover {
  background-color: #059669;
}

.qa-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qa-item {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.qa-question {
  padding: 16px;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.qa-question-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.qa-author {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.qa-date {
  font-size: 12px;
  color: #9ca3af;
  flex: 1;
}

.qa-delete-btn {
  padding: 4px;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.qa-delete-btn:hover {
  background-color: #fee2e2;
  color: #ef4444;
}

.qa-question-text {
  font-size: 14px;
  color: #1f2937;
  line-height: 1.5;
}

.qa-answer {
  padding: 16px;
  padding-left: 32px;
  background-color: #f0fdf4;
  border-left: 3px solid #10b981;
}

.qa-answer-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  margin-bottom: 8px;
}

.qa-answer-text {
  font-size: 14px;
  color: #1f2937;
  line-height: 1.5;
}

.qa-empty {
  text-align: left;
  padding: 40px;
  color: #9ca3af;
}

/* 노트 타임스탬프 및 자동저장 */
.notes-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.btn-insert-timestamp {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-insert-timestamp:hover {
  background-color: #e5e7eb;
  border-color: #d1d5db;
}

.notes-save-status {
  font-size: 12px;
  color: #9ca3af;
  margin-left: auto;
}

.notes-save-status.status-saving {
  color: #f59e0b;
}

.notes-save-status.status-saved {
  color: #10b981;
}

.notes-save-status.status-error {
  color: #ef4444;
}

/* Q&A 상태 배지 */
.qa-status-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 4px;
}

.qa-status-badge.waiting {
  background-color: #fef3c7;
  color: #d97706;
}

.qa-status-badge.replied {
  background-color: #dbeafe;
  color: #2563eb;
}

.qa-status-badge.accepted {
  background-color: #dcfce7;
  color: #16a34a;
}

/* 답변 목록 스타일 */
.qa-replies {
  padding: 0;
}

.qa-reply {
  padding: 14px 16px;
  border-top: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.qa-reply.instructor {
  background-color: #f0fdf4;
}

.qa-reply.accepted {
  background-color: #fef9c3;
  border-left: 3px solid #eab308;
}

.qa-reply-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.qa-reply-author {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.reply-author-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
}

.reply-author-badge.instructor {
  background-color: #3b82f6;
  color: white;
}

.reply-accepted-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  background-color: #fef08a;
  color: #a16207;
}

.qa-reply-date {
  font-size: 11px;
  color: #9ca3af;
  margin-left: auto;
}

.qa-reply-text {
  font-size: 14px;
  color: #1f2937;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* 답변 있는 질문 스타일 */
.qa-item.has-accepted {
  border-color: #fde047;
}

/* =========================================
   8. 커리큘럼 사이드바 (오른쪽)
   ========================================= */
.curriculum-sidebar {
  width: 100%;
  background-color: #ffffff;
  border-left: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  height: auto;
  overflow-y: auto;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .curriculum-sidebar {
    width: 320px;
    height: 100%;
  }
}

@media (min-width: 1024px) {
  .curriculum-sidebar {
    width: 384px;
  }
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 5;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 12px;
}

.overall-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.progress-label {
  color: #6b7280;
  font-weight: 600;
}

.progress-numbers {
  color: #2563eb;
  font-weight: 700;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 4px;
  transition: width 0.5s ease-out;
}

.progress-info {
  font-size: 14px;
  color: #6b7280;
}

.curriculum-list {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 40px;
}

.loading-curriculum {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  color: #6b7280;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e7eb;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

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

/* =========================================
   9. 섹션 아코디언
   ========================================= */
.curriculum-section {
  border-bottom: 1px solid #f3f4f6;
}

.curriculum-section:last-child {
  border-bottom: none;
}

.section-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: left;
}

.section-header:hover {
  background-color: #f9fafb;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.5;
  padding-right: 8px;
}

.section-header svg {
  color: #9ca3af;
  flex-shrink: 0;
}

.section-items {
  background-color: #ffffff;
  display: none;
}

.section-items.expanded {
  display: block;
}

/* =========================================
   10. 커리큘럼 아이템
   ========================================= */
.curriculum-item {
  padding: 16px;
  padding-left: 24px;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: all 0.2s;
}

.curriculum-item:hover {
  background-color: #f9fafb;
}

.curriculum-item.active {
  background-color: #eff6ff;
  border-left-color: #3b82f6;
}

.curriculum-item.completed {
  opacity: 0.7;
}

.item-title {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.curriculum-item.active .item-title {
  color: #2563eb;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #9ca3af;
}

.item-type,
.item-duration {
  display: flex;
  align-items: center;
  gap: 4px;
}

.item-type svg,
.item-duration svg {
  width: 12px;
  height: 12px;
}

.item-completed-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background-color: #dcfce7;
  color: #16a34a;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 500;
}

/* =========================================
   11. 반응형 조정
   ========================================= */
@media (max-width: 767px) {
  .classroom-container {
    height: auto;
    min-height: 100vh;
  }

  .classroom-main {
    flex-direction: column;
  }

  .video-section {
    overflow: visible;
  }

  .curriculum-sidebar {
    border-left: none;
    border-top: 1px solid #e5e7eb;
    max-height: 400px;
  }
}

/* =========================================
   13. 모바일 사이드바 토글 버튼
   ========================================= */
.mobile-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #3b82f6;
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  cursor: pointer;
  z-index: 100;
  align-items: center;
  justify-content: center;
}

@media (max-width: 767px) {
  .mobile-sidebar-toggle {
    display: flex;
  }

  /* 모바일에서 강의목록 숨김 */
  .curriculum-sidebar {
    display: none;
  }
}

/* =========================================
   14. 완료 체크 마크
   ========================================= */
.check-icon {
  width: 16px;
  height: 16px;
  color: #16a34a;
}

/* =========================================
   15. 자료 다운로드 아이템
   ========================================= */
.material-item {
  background-color: #fefce8;
}

.material-item .item-title {
  color: #854d0e;
}

.material-item.active {
  background-color: #fef9c3;
  border-left-color: #ca8a04;
}

/* =========================================
   16. 섹션 토글 버튼
   ========================================= */
.section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background-color: #f9fafb;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: left;
}

.section-toggle:hover {
  background-color: #f3f4f6;
}

.section-toggle .section-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  flex: 1;
}

.section-toggle .section-meta {
  font-size: 12px;
  color: #6b7280;
  margin-right: 8px;
}

.toggle-icon {
  color: #9ca3af;
  transition: transform 0.2s;
}

.section-toggle[aria-expanded="false"] .toggle-icon,
.section-items:not(.expanded) ~ .section-toggle .toggle-icon {
  transform: rotate(-90deg);
}

.section-items:not(.expanded) {
  display: none;
}

/* =========================================
   17. 커리큘럼 아이템 (서버 렌더링)
   ========================================= */
.curriculum-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: all 0.2s;
}

.curriculum-item:hover {
  background-color: #f9fafb;
}

.curriculum-item.active {
  background-color: #eff6ff;
  border-left-color: #3b82f6;
}

.curriculum-item.completed {
  /* 완료된 항목도 동일하게 표시 */
}

.item-status {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-status .check-icon {
  color: #10b981;
}

.item-status .material-icon {
  color: #d97706;
}

.play-circle {
  width: 16px;
  height: 16px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
}

.curriculum-item.active .play-circle {
  border-color: #3b82f6;
  background-color: #3b82f6;
}

.item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.item-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  width: fit-content;
}

.item-badge.badge-vod {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.item-badge.badge-live {
  background-color: #fee2e2;
  color: #dc2626;
}

.item-badge.badge-material {
  background-color: #fef3c7;
  color: #d97706;
}

.item-badge.badge-notice {
  background-color: #fef3c7;
  color: #f59e0b;
}

.item-info .item-title {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.curriculum-item.active .item-info .item-title {
  color: #2563eb;
  font-weight: 600;
}

.item-duration {
  font-size: 12px;
  color: #9ca3af;
  flex-shrink: 0;
}

/* =========================================
   잠금 상태 (공개일 전) 스타일
   ========================================= */
.curriculum-item.locked {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #f9fafb;
}

.curriculum-item.locked:hover {
  background-color: #f3f4f6;
}

.curriculum-item.locked .item-title {
  color: #9ca3af;
}

.curriculum-item.locked .lock-icon {
  color: #9ca3af;
}

.item-release-date {
  font-size: 11px;
  color: #f59e0b;
  font-weight: 600;
  background-color: #fef3c7;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 섹션 헤더 공개일 배지 */
.section-release-badge {
  display: inline-block;
  font-size: 10px;
  color: #f59e0b;
  font-weight: 600;
  background-color: #fef3c7;
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 8px;
  white-space: nowrap;
}

/* 잠금된 섹션 */
.curriculum-section.section-locked .section-toggle {
  opacity: 0.85;
}

.curriculum-section.section-locked .section-title {
  color: #6b7280;
}

/* =========================================
   공지사항 본문 영역 스타일
   ========================================= */
.notice-content-area {
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.notice-content-area .notice-body {
  background: #ffffff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  line-height: 1.8;
  color: #374151;
  text-align: left;
}


/* =========================================
   공지사항 전체 페이지 스타일 (블로그 스타일)
   ========================================= */
.notice-content-area.notice-fullpage {
  background: #ffffff;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
  width: 100%;
}

.notice-content-area.notice-fullpage .notice-body {
  background: transparent;
  padding: 32px 16px;
  border-radius: 0;
  box-shadow: none;
  font-size: 16px;
  line-height: 1.9;
  color: #1f2937;
  max-width: none;
  text-align: left;
}

@media (min-width: 768px) {
  .notice-content-area.notice-fullpage .notice-body {
    padding: 40px 32px;
  }
}

@media (min-width: 1024px) {
  .notice-content-area.notice-fullpage .notice-body {
    padding: 48px 48px;
  }
}

/* 블로그 스타일 본문 내용 */
.notice-content-area.notice-fullpage .notice-body p {
  margin: 0 0 16px 0;
}

.notice-content-area.notice-fullpage .notice-body img {
  width: auto !important;      /* 인라인 style="width: 100%" 덮어쓰기 */
  max-width: 100% !important;  /* 컨테이너 초과 방지 */
  height: auto !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 24px;
  margin-bottom: 24px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notice-content-area.notice-fullpage .notice-body strong {
  color: #111827;
  font-weight: 700;
}

.notice-content-area.notice-fullpage .notice-body a {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 600;
}

.notice-content-area.notice-fullpage .notice-body a:hover {
  color: #1d4ed8;
}

.notice-content-area.notice-fullpage .notice-body ul,
.notice-content-area.notice-fullpage .notice-body ol {
  margin: 16px 0;
  padding-left: 24px;
}

.notice-content-area.notice-fullpage .notice-body li {
  margin-bottom: 8px;
}

.notice-content-area.notice-fullpage .notice-body h1,
.notice-content-area.notice-fullpage .notice-body h2,
.notice-content-area.notice-fullpage .notice-body h3 {
  margin-top: 32px;
  margin-bottom: 16px;
  color: #111827;
  font-weight: 700;
}

.notice-content-area.notice-fullpage .notice-body h1 {
  font-size: 28px;
}

.notice-content-area.notice-fullpage .notice-body h2 {
  font-size: 24px;
}

.notice-content-area.notice-fullpage .notice-body h3 {
  font-size: 20px;
}

/* =========================================
   공지사항 콘텐츠 스타일 (레거시)
   ========================================= */
.notice-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  padding: 40px;
  background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
  border-radius: 8px;
  overflow-y: auto;
}

.notice-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.notice-title {
  font-size: 20px;
  font-weight: 700;
  color: #92400e;
  text-align: left;
}

/* 레거시 .notice-content 내부의 .notice-body만 적용 */
.notice-content .notice-body {
  max-width: 600px;
  background: #ffffff;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  line-height: 1.8;
  color: #374151;
  text-align: left;
}

/* 인라인 스타일 덮어쓰기 - 레거시 */
.notice-content .notice-body p,
.notice-content .notice-body div,
.notice-content .notice-body td,
.notice-content .notice-body th,
.notice-content .notice-body li,
.notice-content .notice-body span {
  font-size: inherit !important;
}

.notice-body p {
  margin: 0 0 8px 0;
}

.notice-body ul {
  margin: 12px 0;
  padding-left: 20px;
}

.notice-body li {
  margin-bottom: 8px;
}

.notice-body strong {
  color: #1f2937;
}

/* 모바일 */
@media (max-width: 768px) {
  .notice-content {
    padding: 20px;
  }

  .notice-body {
    padding: 20px;
    font-size: 13px;
  }
}

/* =========================================
   반응형 폰트 크기 (150% → 100% 점진적 감소)
   ========================================= */

/* 1024px~1199px: 140% */
@media (max-width: 1199px) and (min-width: 1024px) {
  .notice-content-area .notice-body {
    font-size: 20px !important;  /* 14px의 140% = 19.6px ≈ 20px */
  }

  .notice-content-area.notice-fullpage .notice-body {
    font-size: 22px !important;  /* 16px의 140% = 22.4px ≈ 22px */
  }

  .notice-content .notice-body {
    font-size: 20px !important;
  }
}

/* 768px~1023px: 130% */
@media (max-width: 1023px) and (min-width: 768px) {
  .notice-content-area .notice-body {
    font-size: 18px !important;  /* 14px의 130% = 18.2px ≈ 18px */
  }

  .notice-content-area.notice-fullpage .notice-body {
    font-size: 21px !important;  /* 16px의 130% = 20.8px ≈ 21px */
  }

  .notice-content .notice-body {
    font-size: 18px !important;
  }
}

/* 640px~767px: 120% */
@media (max-width: 767px) and (min-width: 640px) {
  .notice-content-area .notice-body {
    font-size: 17px !important;  /* 14px의 120% = 16.8px ≈ 17px */
  }

  .notice-content-area.notice-fullpage .notice-body {
    font-size: 19px !important;  /* 16px의 120% = 19.2px ≈ 19px */
  }

  .notice-content .notice-body {
    font-size: 17px !important;
  }
}

/* 480px~639px: 110% */
@media (max-width: 639px) and (min-width: 480px) {
  .notice-content-area .notice-body {
    font-size: 15px !important;  /* 14px의 110% = 15.4px ≈ 15px */
  }

  .notice-content-area.notice-fullpage .notice-body {
    font-size: 18px !important;  /* 16px의 110% = 17.6px ≈ 18px */
  }

  .notice-content .notice-body {
    font-size: 15px !important;
  }
}

/* 480px 미만: 100% (원본) */
@media (max-width: 479px) {
  .notice-content-area .notice-body {
    font-size: 14px !important;  /* 14px의 100% */
  }

  .notice-content-area.notice-fullpage .notice-body {
    font-size: 16px !important;  /* 16px의 100% */
  }

  .notice-content .notice-body {
    font-size: 14px !important;
  }
}

/* =========================================
   자동 재생 모달 애니메이션
   ========================================= */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-20px) scale(1.1);
  }
  50% {
    transform: translateY(0) scale(1);
  }
  75% {
    transform: translateY(-10px) scale(1.05);
  }
}

@keyframes confettiFall {
  0% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translateY(300px) rotate(360deg);
  }
}

#autoplayNext:hover {
  background: #1d4ed8 !important;
}

#autoplayCancel:hover {
  background: #d1d5db !important;
}

/* 완료 모달 버튼 호버 */
#completionNext:hover {
  background: #1d4ed8 !important;
}

#completionClose:hover {
  background: #d1d5db !important;
}

/* =========================================
   모바일 커리큘럼 바텀시트
   ========================================= */
.mobile-curriculum-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-curriculum-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-curriculum-sheet {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 70vh;
  background: #ffffff;
  border-radius: 16px 16px 0 0;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  flex-direction: column;
}

.mobile-curriculum-sheet.active {
  display: flex;
  transform: translateY(0);
}

.sheet-handle {
  display: flex;
  justify-content: center;
  padding: 12px 0 8px;
  cursor: pointer;
}

.handle-bar {
  width: 40px;
  height: 4px;
  background: #d1d5db;
  border-radius: 2px;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.sheet-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 600;
}

.sheet-progress-bar {
  width: 60px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.sheet-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.sheet-content {
  overflow-y: auto;
  flex: 1;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* 바텀시트 내 커리큘럼 아이템 재사용 */
.sheet-content .curriculum-section {
  border-bottom: 1px solid #f3f4f6;
}

.sheet-content .section-toggle {
  padding: 12px 16px;
  font-size: 13px;
}

.sheet-content .curriculum-item {
  padding: 10px 16px;
}

.sheet-content .item-title {
  font-size: 13px;
}

/* 모바일에서만 표시 */
@media (min-width: 768px) {
  .mobile-sidebar-toggle,
  .mobile-curriculum-overlay,
  .mobile-curriculum-sheet {
    display: none !important;
  }
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
