/* ==================== Board Layout ==================== */
.board-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: start;
}

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

.board-title {
  font-size: 22px;
  font-weight: 700;
  color: #333;
}

/* ==================== Category Filter Tabs ==================== */
.category-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid #e0e0e0;
  background: white;
  color: #666;
  transition: all 0.2s ease;
}

.category-tab:hover {
  border-color: #667eea;
  color: #667eea;
}

.category-tab.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
}

.category-tab .tab-count {
  font-size: 11px;
  opacity: 0.7;
  margin-left: 4px;
}

/* ==================== Post Table ==================== */
.post-table {
  width: 100%;
}

.post-table-header {
  display: grid;
  grid-template-columns: 80px 1fr 100px 80px 60px 60px;
  gap: 8px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #999;
  border-bottom: 2px solid #f0f0f0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-row {
  display: grid;
  grid-template-columns: 80px 1fr 100px 80px 60px 60px;
  gap: 8px;
  padding: 14px 16px;
  align-items: center;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.15s ease;
  cursor: pointer;
}

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

.post-row-category {
  text-align: center;
}

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

.post-row-title .reply-count {
  color: #667eea;
  font-weight: 600;
  font-size: 12px;
  margin-left: 6px;
}

.post-row-title .edited-mark {
  color: #999;
  font-size: 11px;
  font-style: italic;
}

.post-row-author {
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.post-row-views,
.post-row-likes {
  font-size: 12px;
  color: #999;
  text-align: center;
}

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

.page-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: white;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.page-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: transparent;
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

/* ==================== Sidebar ==================== */
.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.sidebar-category-list {
  list-style: none;
}

.sidebar-category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-category-item:hover {
  background: #f8f8ff;
}

.sidebar-category-item.active {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
  font-weight: 600;
}

.sidebar-category-count {
  font-size: 12px;
  color: #999;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ==================== Stats Bar ==================== */
.stats-bar {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 10px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
}

.stat-value {
  font-weight: 700;
  color: white;
}

/* ==================== Mobile FAB ==================== */
.fab-write {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 24px;
  border: none;
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  cursor: pointer;
  z-index: 100;
  transition: transform 0.2s;
}

.fab-write:hover {
  transform: scale(1.1);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .board-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .board-header .btn {
    display: none;
  }

  .fab-write {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .post-table-header {
    display: none;
  }

  .post-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 12px;
    align-items: flex-start;
  }

  .post-row-category {
    text-align: left;
  }

  .post-row-title {
    font-size: 15px;
    white-space: normal;
    line-height: 1.4;
  }

  .post-row-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
  }

  .post-row-author,
  .post-row-date,
  .post-row-views,
  .post-row-likes {
    font-size: 12px;
  }

  .category-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .category-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .stats-bar {
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .board-title {
    font-size: 18px;
  }
}
