* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  background: #f0f2f5;
  color: #333;
}

/* 헤더 */
header {
  background: #2c3e50;
  color: white;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

header .logo {
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  color: white;
  letter-spacing: 1px;
}

header nav a {
  color: #ccc;
  text-decoration: none;
  margin-left: 24px;
  font-size: 14px;
  transition: color 0.2s;
}

header nav a:hover,
header nav a.active {
  color: white;
}

/* 레이아웃 */
.container {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

/* 페이지 타이틀 */
.page-title {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #2c3e50;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-title h1 {
  font-size: 22px;
  color: #2c3e50;
}

.page-title .badge {
  font-size: 12px;
  background: #2c3e50;
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
}

/* 게시판 테이블 */
.board-table {
  width: 100%;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-collapse: collapse;
}

.board-table thead {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.board-table thead th {
  padding: 12px 16px;
  font-size: 13px;
  color: #666;
  font-weight: 600;
  text-align: center;
}

.board-table thead th:nth-child(2) {
  text-align: left;
}

.board-table tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
  cursor: pointer;
}

.board-table tbody tr:last-child {
  border-bottom: none;
}

.board-table tbody tr:hover {
  background: #f8f9fa;
}

.board-table tbody td {
  padding: 14px 16px;
  font-size: 14px;
  text-align: center;
  color: #555;
}

.board-table tbody td.title {
  text-align: left;
  color: #222;
}

.board-table tbody td.title a {
  text-decoration: none;
  color: inherit;
}

.board-table tbody td.title a:hover {
  color: #2c7be5;
  text-decoration: underline;
}

/* 공지 뱃지 */
.tag-notice {
  display: inline-block;
  background: #e74c3c;
  color: white;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  margin-right: 6px;
  font-weight: bold;
}

.tag-new {
  display: inline-block;
  background: #27ae60;
  color: white;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 6px;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
}

.pagination a,
.pagination span {
  display: inline-block;
  width: 34px;
  height: 34px;
  line-height: 34px;
  text-align: center;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  color: #555;
  background: white;
  border: 1px solid #ddd;
  transition: all 0.15s;
}

.pagination a:hover {
  background: #2c3e50;
  color: white;
  border-color: #2c3e50;
}

.pagination span.current {
  background: #2c3e50;
  color: white;
  border-color: #2c3e50;
}

/* 쓰기 버튼 */
.btn-write {
  display: inline-block;
  background: #2c7be5;
  color: white;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-write:hover {
  background: #1a5fbf;
}

/* 글 보기 */
.post-view {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow: hidden;
}

.post-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid #eee;
}

.post-header h2 {
  font-size: 20px;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.post-meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #888;
}

.post-body {
  padding: 28px;
  font-size: 15px;
  line-height: 1.8;
  color: #444;
  min-height: 200px;
  border-bottom: 1px solid #eee;
}

.post-footer {
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-footer .views {
  font-size: 13px;
  color: #999;
}

.btn-back {
  display: inline-block;
  border: 1px solid #ddd;
  color: #555;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-back:hover {
  background: #f0f0f0;
}

/* 댓글 */
.comments {
  margin-top: 24px;
}

.comments h3 {
  font-size: 15px;
  color: #444;
  margin-bottom: 14px;
}

.comment-item {
  background: white;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.comment-date {
  font-size: 12px;
  color: #aaa;
  margin-left: 8px;
  font-weight: normal;
}

.comment-body {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

/* 메인 히어로 */
.hero {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  color: white;
  padding: 60px 40px;
  text-align: center;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 16px;
  opacity: 0.8;
}

/* 메인 카드 */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: white;
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.card-head h2 {
  font-size: 16px;
  color: #2c3e50;
}

.card-head a {
  font-size: 12px;
  color: #888;
  text-decoration: none;
}

.card-head a:hover {
  color: #2c7be5;
}

.card-list {
  list-style: none;
}

.card-list li {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
}

.card-list li:last-child {
  border-bottom: none;
}

.card-list li a {
  color: #333;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.card-list li a:hover {
  color: #2c7be5;
}

.card-list li .date {
  color: #bbb;
  font-size: 12px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* 푸터 */
footer {
  text-align: center;
  padding: 30px;
  font-size: 13px;
  color: #aaa;
  margin-top: 60px;
  border-top: 1px solid #e0e0e0;
}
