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

body {
  font-family: 'Malgun Gothic', '맑은 고딕', sans-serif;
  background: #f4f6f8;
  color: #333;
  min-height: 100vh;
}

/* Header */
header {
  background: #2c3e50;
  color: white;
  padding: 0 20px;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 22px;
  font-weight: bold;
  text-decoration: none;
  color: white;
  letter-spacing: -0.5px;
}

.logo span {
  color: #3498db;
}

nav {
  display: flex;
  gap: 4px;
}

nav a {
  color: #ccc;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}

nav a:hover,
nav a.active {
  background: #3498db;
  color: white;
}

/* Hero / Page title */
.page-hero {
  background: linear-gradient(135deg, #2c3e50, #3498db);
  color: white;
  padding: 36px 20px;
  text-align: center;
}

.page-hero h1 {
  font-size: 28px;
  margin-bottom: 6px;
}

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

/* Main layout */
main {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 20px;
}

/* Index cards */
.board-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.board-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
}

.board-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.13);
}

.card-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.icon-notice { background: #fff3cd; }
.icon-free   { background: #d4edda; }

.card-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.card-header p {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}

.card-posts {
  padding: 12px 24px 16px;
}

.card-post-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
  gap: 8px;
}

.card-post-item:last-child { border-bottom: none; }

.card-post-item .title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #333;
}

.card-post-item .date {
  color: #aaa;
  font-size: 12px;
  flex-shrink: 0;
}

.card-footer {
  padding: 12px 24px;
  background: #fafafa;
  text-align: right;
  font-size: 13px;
  color: #3498db;
  font-weight: 600;
  border-top: 1px solid #f0f0f0;
}

/* Board table */
.board-section {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid #eee;
}

.board-toolbar h2 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-count {
  font-size: 13px;
  color: #888;
  font-weight: normal;
}

.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 14px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover { background: #2980b9; }

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: #f8f9fa;
  padding: 12px 16px;
  text-align: center;
  font-size: 13px;
  color: #666;
  border-bottom: 2px solid #e9ecef;
  font-weight: 600;
}

tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}

tbody tr:hover { background: #f8fbff; }

tbody tr.notice-row { background: #fffde7; }
tbody tr.notice-row:hover { background: #fff9c4; }

td {
  padding: 13px 16px;
  font-size: 14px;
}

td.num   { text-align: center; color: #aaa; width: 60px; }
td.title { min-width: 0; }
td.author { text-align: center; width: 90px; color: #555; }
td.date  { text-align: center; width: 100px; color: #aaa; font-size: 13px; }
td.views { text-align: center; width: 70px; color: #aaa; font-size: 13px; }

.notice-badge {
  display: inline-block;
  background: #e74c3c;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

.free-badge {
  display: inline-block;
  background: #27ae60;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

.title a {
  text-decoration: none;
  color: #222;
}

.title a:hover { color: #3498db; text-decoration: underline; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 20px;
}

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

.pagination a:hover { background: #3498db; color: white; border-color: #3498db; }
.pagination .current { background: #3498db; color: white; border-color: #3498db; font-weight: 700; }

/* Post detail */
.post-detail {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}

.post-detail-header {
  padding: 28px 30px 20px;
  border-bottom: 2px solid #eee;
}

.post-detail-header h2 {
  font-size: 22px;
  margin-bottom: 12px;
  line-height: 1.4;
}

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

.post-meta span { display: flex; align-items: center; gap: 4px; }

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

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

.btn-secondary {
  background: #ecf0f1;
  color: #555;
}

.btn-secondary:hover { background: #dde1e4; }

/* Footer */
footer {
  text-align: center;
  padding: 28px 20px;
  color: #aaa;
  font-size: 13px;
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 640px) {
  .board-cards { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; height: auto; padding: 12px 0; gap: 8px; }
  td.views, td.author { display: none; }
}
