/* ===== Hot / Fire 배지 ===== */
.badge-hot, .badge-fire {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: bold;
  color: #fff;
  margin-right: 5px;
  vertical-align: middle;
  line-height: 16px;
}
.badge-hot {
  background: linear-gradient(135deg, #ff9800, #f57c00);
}
.badge-hot i, .badge-fire i {
  font-size: 9px;
  margin-right: 1px;
}
.badge-fire {
  background: linear-gradient(135deg, #f44336, #c62828);
}
/* 추천수 인라인 표시 */
.like-num {
  color: #2196f3;
  font-size: 11px;
  font-weight: bold;
  margin-left: 4px;
}

/* ===== 게시판 공통 ===== */
.board-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 15px 40px;
}

/* ===== 게시판 헤더 ===== */
.board-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.board-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--font-black);
  margin: 0;
}
.board-desc {
  font-size: 12px;
  color: var(--font-gray);
  margin-top: 2px;
}
.btn-write {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn-write:hover { background: var(--accent-dark); color: #fff; }

/* ===== 게시글 목록 테이블 ===== */
.board-table {
  width: 100%;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}
.board-table-header {
  display: flex;
  background: var(--nav-bg);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  padding: 8px 0;
}
.board-table-header .col-no     { width: 60px;  text-align: center; }
.board-table-header .col-title  { flex: 1;      padding-left: 12px; }
.board-table-header .col-author { width: 100px; text-align: center; }
.board-table-header .col-date   { width: 80px;  text-align: center; }
.board-table-header .col-view   { width: 50px;  text-align: center; }
.board-table-header .col-like   { width: 50px;  text-align: center; }

.board-row {
  display: flex;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 13px;
  transition: background 0.1s;
}
.board-row:last-child { border-bottom: none; }
.board-row:hover { background: var(--bg); }
.board-row.notice-row { background: rgba(255,107,53,0.05); }
.board-row .col-no     { width: 60px;  text-align: center; color: var(--font-gray); font-size: 12px; }
.board-row .col-title  { flex: 1;      padding: 0 12px; overflow: hidden; }
.board-row .col-author { width: 100px; text-align: center; font-size: 12px; color: var(--font-gray); }
.board-row .col-date   { width: 80px;  text-align: center; font-size: 11px; color: var(--font-gray); }
.board-row .col-view   { width: 50px;  text-align: center; font-size: 11px; color: var(--font-gray); }
.board-row .col-like   { width: 50px;  text-align: center; font-size: 11px; color: var(--font-gray); }

.board-row .col-title a {
  color: var(--font-black);
  text-decoration: none;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-row .col-title a:hover { color: var(--accent); }
.board-row .col-title .comment-count { color: var(--accent); font-size: 11px; margin-left: 4px; }
.board-row .col-title .notice-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 6px;
  font-weight: bold;
}
.board-row .col-title .board-tag {
  display: inline-block;
  color: var(--font-gray);
  font-size: 11px;
  margin-right: 4px;
}

/* 모바일 목록 */
.board-row-mobile {
  display: none;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
}
.board-row-mobile:last-child { border-bottom: none; }
.board-row-mobile .row-m-title {
  font-size: 14px;
  color: var(--font-black);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-row-mobile .row-m-title a { color: var(--font-black); }
.board-row-mobile .row-m-title a:hover { color: var(--accent); }
.board-row-mobile .row-m-meta {
  font-size: 11px;
  color: var(--font-gray);
  display: flex;
  gap: 8px;
}

/* ===== 페이지네이션 ===== */
.board-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
}
.board-pagination a,
.board-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 12px;
  color: var(--font-black);
  background: var(--bg-white);
  text-decoration: none;
  cursor: pointer;
}
.board-pagination a:hover { border-color: var(--accent); color: var(--accent); }
.board-pagination .active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: default;
}
.board-pagination .disabled { color: var(--font-light); cursor: default; }

/* ===== 검색 바 ===== */
.board-search-bar {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.board-search-bar input {
  width: 240px;
  padding: 7px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg);
  color: var(--font-black);
  font-size: 13px;
}
.board-search-bar button {
  padding: 7px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

/* ===== 게시글 상세 ===== */
.post-container {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}
.post-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-color);
}
.post-board-name {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 6px;
}
.post-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--font-black);
  margin: 0 0 12px;
  line-height: 1.4;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--font-gray);
}
.post-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.post-author-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  overflow: hidden;
}
.post-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.post-author-name { font-weight: bold; color: var(--font-black); }
.post-author-grade { font-size: 11px; }
.post-meta-right {
  margin-left: auto;
  display: flex;
  gap: 12px;
  font-size: 11px;
}

/* 본문 */
.post-content {
  padding: 24px;
  min-height: 200px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--font-black);
  word-break: break-word;
}
.post-content img {
  max-width: 100%; height: auto;
  border-radius: 4px;
  display: inline-block;  /* 글자처럼 취급 - p태그 text-align 따름 */
  vertical-align: bottom;
}
.post-content p { margin-bottom: 12px; }

/* 좋아요/액션 바 */
.post-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  border-top: 1px solid var(--border-color);
}
.btn-like {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 28px;
  border: 2px solid var(--border-color);
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  color: var(--font-gray);
  background: var(--bg-white);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.btn-like i { font-size: 18px; transition: all 0.2s; }
.btn-like:hover {
  border-color: #2196f3;
  color: #2196f3;
  background: rgba(33,150,243,0.05);
}
.btn-like:hover i { color: #2196f3; }
.btn-like.liked {
  border-color: #2196f3;
  color: #fff;
  background: #2196f3;
}
.btn-like.liked i { color: #fff; }
.btn-like:active { transform: scale(0.95); }

/* 하단 버튼 */
.post-bottom-btns {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
}
.post-btn-group { display: flex; gap: 6px; align-items: center; }
.post-btn-group #post-owner-btns { display: none; gap: 6px; }
.post-btn-group #post-owner-btns[style*="block"], .post-btn-group #post-owner-btns.show { display: flex !important; gap: 6px; }
.btn-board {
  padding: 7px 14px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 12px;
  color: var(--font-black);
  background: var(--bg-white);
  cursor: pointer;
  text-decoration: none;
}
.btn-board:hover { border-color: var(--accent); color: var(--accent); }
.btn-board.danger { color: #f44336; border-color: #f44336; }
.btn-board.danger:hover { background: #f44336; color: #fff; }

/* ===== 댓글 ===== */
.comment-section {
  margin-top: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}
.comment-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: bold;
  color: var(--font-black);
}
.comment-item {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}
.comment-item:last-child { border-bottom: none; }
.comment-item.reply {
  padding-left: 46px;
  background: var(--bg);
}
.comment-item.reply::before {
  content: '↳';
  color: var(--font-light);
  font-size: 14px;
  margin-right: -4px;
  margin-top: 2px;
}

/* 프로필 아바타 */
.comment-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
}
.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 12px;
  flex-wrap: wrap;
}
.comment-author {
  font-weight: bold;
  color: var(--font-black);
}
.comment-userid {
  color: var(--font-gray);
  font-size: 11px;
}
.comment-grade {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  font-size: 10px;
  line-height: 18px;
  font-weight: 600;
}
.comment-date {
  color: var(--font-gray);
  margin-left: auto;
  font-size: 11px;
  white-space: nowrap;
}

/* @멘션 */
.comment-mention {
  color: #1976d2;
  font-weight: 600;
  font-size: 12px;
}
.comment-mention-id {
  color: var(--font-gray);
  font-weight: normal;
  font-size: 11px;
}

.comment-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--font-black);
  word-break: break-word;
  margin-bottom: 6px;
}
.comment-text.deleted {
  color: var(--font-gray);
  font-style: italic;
  padding: 8px 0;
}

.comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.comment-actions button {
  font-size: 12px;
  color: var(--font-gray);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
}
.comment-actions button:hover { color: var(--accent); }
.comment-actions-right {
  margin-left: auto;
}

/* 댓글 추천 버튼 */
.btn-comment-like {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  padding: 2px 8px !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px;
  font-size: 11px !important;
  color: var(--font-gray) !important;
  background: var(--bg-white) !important;
  transition: all 0.15s;
}
.btn-comment-like:hover {
  border-color: #2196f3 !important;
  color: #2196f3 !important;
}
.btn-comment-like.liked {
  border-color: #2196f3 !important;
  color: #fff !important;
  background: #2196f3 !important;
}
.btn-comment-like i { font-size: 11px; }

/* 댓글 작성 폼 */
.comment-form {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
}
.comment-form textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg);
  color: var(--font-black);
  font-size: 13px;
  resize: vertical;
  outline: none;
}
.comment-form textarea:focus { border-color: var(--accent); }
.comment-form-btns {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.btn-comment-submit {
  padding: 7px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}
.btn-comment-submit:hover { background: var(--accent-dark); }

/* ===== 글쓰기 ===== */
.write-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 28px;
}
.write-title { font-size: 20px; font-weight: 900; margin-bottom: 20px; color: var(--font-black); }
.write-field { margin-bottom: 16px; }
.write-field label { display: block; font-size: 13px; color: var(--font-gray); margin-bottom: 6px; }
.write-field select,
.write-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg);
  color: var(--font-black);
  font-size: 14px;
  outline: none;
}
.write-field select:focus,
.write-field input:focus { border-color: var(--accent); }
.write-field textarea {
  width: 100%;
  min-height: 300px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--bg);
  color: var(--font-black);
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}
.write-field textarea:focus { border-color: var(--accent); }
.write-btns {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}
.write-btns .btn-auth-outline {
  width: auto; padding: 12px 36px; font-size: 15px; font-weight: 700;
  border: 2px solid #888 !important; border-radius: 8px;
  background: transparent !important; color: #888 !important; cursor: pointer;
  transition: all 0.15s; text-decoration: none;
}
.write-btns .btn-auth-outline:hover { border-color: #fff !important; color: #fff !important; }
body.light-mode .write-btns .btn-auth-outline { border-color: #999 !important; color: #666 !important; }
body.light-mode .write-btns .btn-auth-outline:hover { border-color: #333 !important; color: #333 !important; }
.write-btns .btn-auth-primary {
  width: auto; padding: 12px 36px; font-size: 15px; font-weight: 700;
  border: none !important; border-radius: 8px;
  background: var(--accent) !important; color: #fff !important; cursor: pointer;
  box-shadow: 0 2px 8px rgba(255,107,53,0.3);
  transition: all 0.15s; text-decoration: none;
}
.write-btns .btn-auth-primary:hover { background: var(--accent-dark) !important; box-shadow: 0 4px 12px rgba(255,107,53,0.4); transform: translateY(-1px); }

/* 빈 상태 */
.board-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--font-gray);
  font-size: 14px;
}

/* ===== 갤러리 그리드 ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 12px;
}
.gallery-card {
  display: block;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.gallery-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.gallery-thumb {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 비율 */
  overflow: hidden;
  background: var(--bg);
}
.gallery-thumb img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-no-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--font-light);
  font-size: 32px;
}
.gallery-info {
  padding: 8px 10px;
}
.gallery-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--font-black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.gallery-title .comment-count { color: var(--accent); font-size: 11px; }
.gallery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: var(--font-gray);
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {
  .board-wrap { padding: 8px 10px 30px; }
  .board-table-header { display: none; }
  .board-row { display: none; }
  .board-row-mobile { display: block; }
  .post-header { padding: 14px 16px 12px; }
  .post-title { font-size: 17px; }
  .post-content { padding: 16px; font-size: 13px; }
  .post-meta { flex-wrap: wrap; }
  .post-meta-right { margin-left: 0; }
  .write-container { padding: 18px 14px; }
  .board-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; }
  .gallery-info { padding: 6px 8px; }
  .gallery-title { font-size: 12px; }
}
