.board-container {
  display: flex;
  gap: 30px;
  width: 1260px;
  margin: 30px auto 120px auto;
  font-family: 'Pretendard', sans-serif;
}

.board-content {
  width: 1010px;
  padding: 0 20px;
  box-sizing: border-box; /* 이걸로 padding이 포함된 전체 너비가 1010이 됨 */
  margin: 0 auto;
}



/* 게시글 제목 + 메타 정보 */
.post-header h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #333;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}


.post-meta {
  font-size: 14px;
  color: #777;
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

/* 본문 내용 */
.post-body {
  font-size: 16px;
  line-height: 1.6;
  color: #222;
  padding: 10px 0 20px 0;
  border-top: 1px solid #eee;
  white-space: pre-line;
  word-break: break-word;
}


/* 추천 버튼 */
.recommend-buttons {
justify-content: center;
  margin-top: 20px;
  display: flex;
  gap: 10px;
}

.recommend-buttons button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  background-color: #ff6f61;
  color: white;
  cursor: pointer;
  transition: 0.2s ease;
}

.recommend-buttons .admin-button {
  background-color: #333;
}

/* 이전/다음 글 */
.post-navigation {
   display: block;
   text-align: left;
  justify-content: space-between;
  margin: 5px 0;
  font-size: 14px;
  color: #555;
  padding: 10px 0;
}

.post-navigation a {
  text-decoration: none;
  color: #377dff;
}

/* 댓글 영역 */

/* ===== 댓글 리뉴얼 ===== */
.comment-section { margin-top: 40px; }
.comment-title { font-size: 18px; margin-bottom: 16px; color: #222; font-weight: 600; }
.comment-empty { color: #888; background: #fafafa; border: 1px dashed #ddd; padding: 16px; border-radius: 8px; }

.comment-item {
  border: 1px solid #e9e9e9;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.c-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.c-author-wrap { display: flex; gap: 12px; align-items: center; }
.c-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #f1f4ff; color: #335bff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  border: 1px solid #e2e7ff;
}
.c-name-meta { display: flex; flex-direction: column; gap: 2px; }
.c-author { display: flex; align-items: center; gap: 8px; color: #111; }
.c-badge {
  font-size: 12px; color: #555; background: #f2f2f2;
  border-radius: 999px; padding: 2px 8px; line-height: 1.4;
}
.c-meta { font-size: 12px; color: #777; display: flex; gap: 8px; }

.c-actions { display: inline-flex; }
.c-action-btn {
  border: none; background: transparent; color: #999; cursor: pointer;
  font-size: 16px; padding: 2px 4px; line-height: 1;
  transition: color .15s ease;
}
.c-action-btn:hover { color: #ff4d4f; }

.c-body { margin-top: 6px; }
.c-text { margin: 0; color: #333; font-size: 15px; line-height: 1.6; white-space: pre-wrap; white-space: pre-line;  /* \n → 줄바꿈으로 렌더 */
    word-break: break-word; }

/* 작성 폼 */
.card-like {
  border: 1px solid #e9e9e9; border-radius: 12px; background: #fff;
  padding: 14px; margin-top: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.c-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.c-input, .c-textarea {
  width: 100%; border: 1px solid #ddd; border-radius: 8px;
  padding: 10px 12px; font-size: 14px; box-sizing: border-box;
}
.c-input:focus, .c-textarea:focus { outline: none; border-color: #377dff; box-shadow: 0 0 0 3px rgba(55,125,255,.12); }
.c-textarea { resize: none; min-height: 90px; }
.c-form-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.c-submit {
  padding: 8px 14px; background-color: #377dff; border: none; color: #fff;
  border-radius: 8px; cursor: pointer; transition: background-color .15s ease;
}
.c-submit:hover { background-color: #2f6ee8; }

/* 기존 댓글 스타일 무력화(충돌 방지) */
.comment-box, .comment-meta, .comment-content { all: unset; display: contents; }
	

.comment-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
}


.comment-delete-form {
  position: absolute;
  top: 8px;
  right: 10px;
}

.comment-delete-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s ease;
}

.comment-delete-btn:hover {
  color: #ff4444;
}


/* 댓글 작성 */
.comment-form textarea {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: none;
  margin-bottom: 10px;
}

.comment-form button {
  padding: 8px 14px;
  background-color: #377dff;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.comment-login-notice {
  font-size: 14px;
  color: #777;
}
.comment-login-notice a {
  color: #377dff;
  text-decoration: underline;
}

.divider {
  border: none;
  border-top: 1px solid #ddd; /* 실선 */
  margin: 10px 0;
}

.post-actions {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.post-actions form {
  margin: 0;
  display: inline;
}


.post-actions button {
  cursor: pointer;
  padding: 6px 14px;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  margin-bottom: 5px;
}

.post-actions button:hover {
  background-color: #ddd;
}
.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  background-color: #f5f5f5;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 16px;
}

.icon-button:hover {
  background-color: #2979ff;
  color: #fff;
}

.tooltip-text {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tooltip:hover .tooltip-text {
  opacity: 1;
}


/* 툴팁 */
.tooltip {
  position: relative;
}

.popover {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  padding: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 9999;
  border-radius: 6px;
  width: 200px;
}
.popover-buttons {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
}
.popover.hidden {
  display: none !important;
}






/* 비회원 게시글 삭제 모달 */
.guest-delete-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.guest-delete-modal.hidden {
  display: none;
}

.guest-delete-modal .modal-content {
  position: relative; /* 닫기 버튼 배치용 */
  background: #fff;
  padding: 24px 28px;
  border-radius: 10px;
  width: 360px;
  max-width: 90%;
  max-height: 90vh; /* 화면이 작을 때 스크롤 가능 */
  overflow-y: auto;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  animation: fadeInScale 0.18s ease-out;
}

.guest-delete-modal h3 {
  font-size: 18px;
  margin-bottom: 14px;
  color: #333;
}

.guest-delete-modal input[type="password"] {
  width: 100%;
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 16px;
}

.guest-delete-modal .modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.guest-delete-modal button {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.guest-delete-modal .guest-delete-confirm {
  background-color: #ff6f61;
  color: white;
}
.guest-delete-modal .guest-delete-confirm:hover {
  background-color: #e55a4d;
}

.guest-delete-modal .guest-delete-cancel {
  background-color: #ddd;
  color: #333;
}
.guest-delete-modal .guest-delete-cancel:hover {
  background-color: #ccc;
}

.guest-delete-close {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  transition: color 0.2s ease;
}
.guest-delete-close:hover {
  color: #ff6f61;
}

/* 모달 등장 애니메이션 */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}


