html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-bottom: 0;
}

main {
  flex: 1;
}

/* Footer 위치 수정 - sticky footer 패턴 */
.footer {
  position: relative !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* 카드 호버 효과 */
.card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* 폼/에디터 내부 카드는 호버 효과 제외 */
form .card:hover,
.note-editor .card:hover,
.note-modal .card:hover {
  transform: none;
  box-shadow: none !important;
}

/* Summernote 모달 흔들림 방지 */
body.modal-open {
  padding-right: 0 !important;
  overflow: auto !important;
}

.note-modal-backdrop {
  display: none !important;
}

.note-modal.open {
  background: rgba(0, 0, 0, 0.5);
}

.note-modal .modal-dialog {
  animation: none !important;
}

.note-modal.open .modal-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

/* 진행 바 애니메이션 */
.progress-bar {
  transition: width 0.5s ease-in-out;
}

/* 텍스트 말줄임 */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 비디오 플레이어 */
video {
  background: #000;
}

/* 네비게이션 활성화 표시 */
.nav-link.active {
  font-weight: bold;
}

/* navbar-dark에서 href 링크 스타일 */
.navbar-dark .navbar-nav .nav-link[href] {
  color: rgba(255, 255, 255, 0.55);
}
.navbar-dark .navbar-nav .nav-link[href]:hover,
.navbar-dark .navbar-nav .nav-link[href]:focus {
  color: rgba(255, 255, 255, 0.75);
}

/* 모바일 최적화 */
@media (max-width: 576px) {
  .card-title {
    font-size: 1rem;
  }

  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .display-4 {
    font-size: 2rem;
  }
}

/* 로딩 스피너 */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* 알림 토스트 */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1050;
}

/* 썸네일 이미지 */
.img-thumbnail-cover {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

/* 배지 스타일 */
.badge {
  font-weight: 500;
}

/* 폼 검증 스타일 */
.was-validated .form-control:invalid,
.form-control.is-invalid {
  border-color: #dc3545;
  background-image: none;
}

.was-validated .form-control:valid,
.form-control.is-valid {
  border-color: #198754;
  background-image: none;
}
