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

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f4f6f9;
  color: #333;
  min-height: 100vh;
}

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

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

header nav {
  display: flex;
  gap: 8px;
}

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

header nav a:hover,
header nav a.active {
  background: #3d5166;
  color: white;
}

/* Layout */
.container {
  max-width: 900px;
  margin: 36px auto;
  padding: 0 20px;
}

/* Board Header */
.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.board-title {
  font-size: 22px;
  font-weight: 700;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-title .badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: #e8f4fd;
  color: #2980b9;
}

.board-title .badge.notice {
  background: #fef9e7;
  color: #d4a017;
}

/* Write Button */
.btn-write {
  background: #2980b9;
  color: white;
  border: none;
  padding: 9px 20px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-write:hover {
  background: #2471a3;
}

/* Post Table */
.post-table {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.post-table-header {
  display: grid;
  grid-template-columns: 70px 1fr 100px 100px;
  padding: 12px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  font-size: 13px;
  font-weight: 600;
  color: #6c757d;
}

.post-row {
  display: grid;
  grid-template-columns: 70px 1fr 100px 100px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  align-items: center;
  transition: background 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

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

.post-row:hover {
  background: #f8fafc;
}

.post-row .num {
  font-size: 13px;
  color: #aaa;
  text-align: center;
}

.post-row .num.notice-pin {
  color: #e74c3c;
  font-weight: 700;
  font-size: 12px;
}

.post-row .title {
  font-size: 14px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 16px;
}

.post-row .title .new-tag {
  display: inline-block;
  background: #e74c3c;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}

.post-row .author {
  font-size: 13px;
  color: #666;
  text-align: center;
}

.post-row .date {
  font-size: 13px;
  color: #999;
  text-align: center;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}

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

.pagination a:hover {
  background: #f0f4f8;
  border-color: #bbb;
}

.pagination a.active {
  background: #2980b9;
  color: white;
  border-color: #2980b9;
  font-weight: 700;
}

/* Search Box */
.search-bar {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.search-bar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 14px;
  background: white;
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus {
  border-color: #2980b9;
}

.search-bar button {
  padding: 10px 20px;
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 7px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-bar button:hover {
  background: #3d5166;
}

/* Hero / Home */
.home-hero {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  border-radius: 14px;
  padding: 48px 40px;
  color: white;
  margin-bottom: 32px;
  text-align: center;
}

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

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

/* Menu Cards */
.menu-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 36px;
}

.menu-card {
  background: white;
  border-radius: 12px;
  padding: 28px 28px 24px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
  display: block;
}

.menu-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.menu-card .icon {
  font-size: 32px;
  margin-bottom: 14px;
}

.menu-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #2c3e50;
}

.menu-card p {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
}

.menu-card .arrow {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: #2980b9;
  font-weight: 600;
}

/* Recent Posts on Home */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e9ecef;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title a {
  margin-left: auto;
  font-size: 13px;
  color: #2980b9;
  text-decoration: none;
  font-weight: 500;
}

.recent-list {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}

.recent-item {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
  gap: 12px;
}

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

.recent-item:hover {
  background: #f8fafc;
}

.recent-item .r-title {
  flex: 1;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.recent-item .r-author {
  font-size: 12px;
  color: #888;
  flex-shrink: 0;
  width: 70px;
  text-align: right;
}

/* Post View */
.post-view {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow: hidden;
}

.post-view-head {
  padding: 28px 30px 20px;
  border-bottom: 1px solid #eee;
}

.post-view-head h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 14px;
  color: #1a1a2e;
  line-height: 1.4;
}

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

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

.post-actions {
  padding: 16px 30px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  padding: 8px 18px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.2s;
}

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

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

.btn-edit {
  background: #27ae60;
  color: white;
}

.btn-edit:hover {
  background: #229954;
}

.btn-delete {
  background: #e74c3c;
  color: white;
}

.btn-delete:hover {
  background: #c0392b;
}

/* Write Form */
.write-form {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  padding: 30px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 7px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #2980b9;
}

.form-group textarea {
  min-height: 240px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn-submit {
  background: #2980b9;
  color: white;
  padding: 10px 26px;
  font-size: 14px;
}

.btn-submit:hover {
  background: #2471a3;
}

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

/* Responsive */
@media (max-width: 600px) {
  header {
    padding: 0 16px;
  }

  .container {
    margin: 20px auto;
    padding: 0 12px;
  }

  .menu-cards {
    grid-template-columns: 1fr;
  }

  .post-table-header,
  .post-row {
    grid-template-columns: 50px 1fr 80px;
  }

  .post-table-header .col-date,
  .post-row .date {
    display: none;
  }

  .home-hero {
    padding: 32px 20px;
  }

  .home-hero h1 {
    font-size: 24px;
  }
}
