/* ==========================================================================
   뽐뿌 스타일 (Light Mode) 리뉴얼 CSS
   ========================================================================== */
:root {
  --bg-color: #ffffff;
  --surface-color: #ffffff;
  --text-primary: #333333;
  --text-secondary: #777777;
  --primary-color: #2e6db4; /* 전형적인 게시판 파란색 */
  --border-color: #dddddd;
  --table-border-top: #555555; /* 표 상단 두꺼운 선 */
  --font-family: 'Malgun Gothic', 'Dotum', 'Apple SD Gothic Neo', sans-serif; /* 한국 전통 커뮤니티 폰트 느낌 */
  --transition: none; /* 플랫 디자인을 위해 애니메이션 최소화 */
}

/* ==========================================================================
   초기화 및 기본 설정
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-size: 13px; /* 뽐뿌 스타일은 글씨가 약간 작음 */
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
a:hover { text-decoration: underline; color: var(--primary-color); }
ul { list-style: none; }

.hidden { display: none !important; }

/* ==========================================================================
   내비게이션 바 (최상단)
   ========================================================================== */
.navbar {
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--primary-color); /* 하단 굵은 파란 선 */
  padding: 0 15px;
  background-color: #f8f9fa;
  margin-bottom: 20px;
}

.nav-brand a {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none !important;
}

.nav-auth {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ==========================================================================
   메인 레이아웃 및 탭 메뉴
   ========================================================================== */
.container {
  width: 1000px; /* 고정 넓이 */
  margin: 0 auto;
  padding: 0;
}

/* 탭 메뉴 (전체, 일반, 말머리 등) */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 10px;
}

.nav-menu {
  display: flex;
}

.nav-link {
  display: block;
  padding: 6px 16px;
  border: 1px solid var(--border-color);
  background: #f8f9fa;
  color: #555;
  font-size: 12px;
  font-weight: bold;
  margin-right: -1px; /* 테두리 겹치기 */
}

.nav-link:hover { text-decoration: none; background: #f1f1f1; }
.nav-link.active {
  background: #ffffff;
  border-bottom: 1px solid #ffffff; /* 아래 선 가리기 */
  color: #d1180b; /* 빨간색 포인트 (핫/인기 느낌) */
  position: relative;
  z-index: 1;
}

/* 글쓰기 버튼 */
.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border: 1px solid #235894;
  padding: 6px 15px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 2px;
  cursor: pointer;
}
.btn-primary:hover { text-decoration: none; background-color: #235894; }

.btn-outline {
  background-color: white;
  color: #333;
  border: 1px solid var(--border-color);
  padding: 6px 15px;
  font-size: 12px;
  border-radius: 2px;
  cursor: pointer;
}
.btn-outline:hover { text-decoration: none; background: #f8f8f8; }

/* ==========================================================================
   게시판 테이블 리스트 (핵심)
   ========================================================================== */
.board-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--table-border-top);
  margin-bottom: 30px;
}

.board-table th {
  background-color: #fcfcfc;
  border-bottom: 1px solid var(--border-color);
  padding: 10px 5px;
  font-size: 12px;
  color: #555;
  font-weight: normal;
  text-align: center;
}

/* 제목 칸은 크기를 키움 */
.board-table th.col-title {
  width: auto;
}
.board-table th.col-id { width: 70px; }
.board-table th.col-author { width: 120px; }
.board-table th.col-date { width: 80px; }
.board-table th.col-likes { width: 60px; }
.board-table th.col-views { width: 60px; }

.board-table td {
  padding: 8px 5px;
  border-bottom: 1px solid #eeeeee;
  text-align: center;
  color: #444;
}

.board-table td.td-title {
  text-align: left;
  padding-left: 10px;
}

.board-table td.td-title a {
  color: #333;
  font-size: 13px;
}
.board-table td.td-title a:hover {
  text-decoration: underline;
}

.post-category-label {
  display: inline-block;
  font-size: 11px;
  color: #777;
  border: 1px solid #ccc;
  padding: 1px 4px;
  margin-right: 5px;
  border-radius: 2px;
}

.post-author { font-size: 12px; color: #555; }
.post-date { font-size: 11px; color: #888; }
.post-count { font-size: 11px; color: #888; }

/* 로더 */
.loader {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 3rem auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ==========================================================================
   글쓰기 / 폼 공통 스타일
   ========================================================================== */
.form-container {
  border: 1px solid var(--border-color);
  padding: 30px;
  background: white;
}
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: bold; margin-bottom: 5px; color:#333; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 2px;
}
.form-group textarea { height: 300px; resize: vertical; }

/* 로그인/회원가입 */
.auth-container {
  width: 400px;
  margin: 50px auto;
  border: 1px solid var(--border-color);
  padding: 30px;
  background: white;
}
.auth-title { text-align: center; margin-bottom: 20px; font-size: 18px; color: var(--primary-color); border-bottom: 2px solid var(--primary-color); padding-bottom:10px;}
.auth-btn { width: 100%; padding: 10px; margin-top: 10px; font-size: 14px;}
.auth-links { margin-top: 15px; text-align: center; font-size: 12px; }

/* ==========================================================================
   상세 보기 및 댓글
   ========================================================================== */
.detail-container {
  border-top: 2px solid var(--table-border-top);
  border-bottom: 1px solid var(--border-color);
  padding: 0;
}
.detail-header {
  background: #f8f9fa;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
}
.detail-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}
.detail-meta {
  font-size: 12px;
  color: #666;
}
.detail-meta span { margin-right: 15px; }
.detail-content {
  padding: 30px 15px;
  font-size: 14px;
  line-height: 1.6;
  min-height: 200px;
}
.comments-section {
  border-top: 2px solid #ddd;
  padding: 20px 0;
  margin-top: 30px;
}
.comments-title { font-size: 14px; font-weight: bold; margin-bottom: 10px; color: var(--primary-color);}
.comment-form { display: flex; gap: 10px; margin-bottom: 20px; }
.comment-input { flex: 1; padding: 10px; border: 1px solid #ccc; height: 60px; resize: none; font-size:12px; }
.comment-list { border-top: 1px solid #eee; }
.comment-item { padding: 10px; border-bottom: 1px solid #eee; }
.comment-header { font-size: 12px; color: #555; margin-bottom: 5px; }
.comment-content { font-size: 13px; color: #333; }
.delete-btn { color: #888; background:none; border:none; cursor:pointer; font-size:11px; text-decoration:underline; float:right;}

/* ==========================================================================
   페이징 및 검색
   ========================================================================== */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin: 20px 0 30px;
}

.page-btn {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid #ddd;
  background: #fff;
  color: #555;
  font-size: 13px;
  cursor: pointer;
}

.page-btn:hover {
  background: #f8f8f8;
  border-color: #ccc;
  text-decoration: none;
}

.page-btn.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  font-weight: bold;
}

.search-container {
  display: flex;
  justify-content: center;
  padding: 15px;
  background: #f8f9fa;
  border: 1px solid #eee;
  margin-bottom: 20px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 5px;
}

.search-select {
  padding: 5px;
  border: 1px solid #ccc;
  font-size: 13px;
  outline: none;
}

.search-input {
  padding: 5px;
  width: 250px;
  border: 1px solid #ccc;
  font-size: 13px;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-color);
}

.btn-search {
  padding: 5px 15px;
  background: var(--text-primary);
  color: #fff;
  border: 1px solid var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}

.btn-search:hover {
  background: #555;
}
