/* 全体基本設定（黒背景・白文字・PC向け） */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #000000;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 0 20px 20px 20px;
}

.admin-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* 画面最上部追尾（sticky）ヘッダー＆タブコンテナ */
.sticky-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #000000;
  padding-top: 20px;
  border-bottom: 1px solid #222222;
  margin-bottom: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 2px solid #333333;
  margin-bottom: 15px;
}

.admin-header h1 {
  font-size: 24px;
  letter-spacing: 1px;
}

#refresh-btn {
  background-color: #222222;
  color: #ffffff;
  border: 1px solid #555555;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

#refresh-btn:hover {
  background-color: #333333;
}

/* タブメニュー UI */
.tab-menu {
  display: flex;
  gap: 10px;
}

.tab-btn {
  background-color: #111111;
  color: #888888;
  border: 1px solid #333333;
  border-bottom: none;
  padding: 10px 20px;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background-color: #222222;
  color: #ffffff;
}

.tab-btn.active {
  background-color: #222222;
  color: #ffffff;
  border-color: #555555;
  border-bottom: 2px solid #007acc;
}

/* タブコンテンツ表示制御 */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* パネル & テーブルスタイリング */
.panel {
  background-color: #111111;
  border: 1px solid #222222;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.panel h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #dddddd;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

th, td {
  padding: 12px 10px;
  border-bottom: 1px solid #222222;
}

th {
  background-color: #1a1a1a;
  color: #aaaaaa;
  font-weight: 600;
}

tr:hover {
  background-color: #181818;
}

.loading {
  text-align: center;
  color: #888888;
  padding: 20px 0;
}

/* ボタン・バッジ操作系 */
.btn-action {
  padding: 4px 8px;
  margin-right: 4px;
  border-radius: 4px;
  border: 1px solid #444;
  background-color: #222;
  color: #fff;
  cursor: pointer;
  font-size: 12px;
}

.btn-action:hover {
  background-color: #444;
}

.btn-view {
  background-color: #005691;
  border-color: #007acc;
}

.btn-view:hover {
  background-color: #007acc;
}

.btn-delete {
  background-color: #661111;
  border-color: #882222;
}

.btn-delete:hover {
  background-color: #992222;
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}

.badge-active {
  background-color: #1b4d2e;
  color: #75f0a0;
}

.badge-inactive {
  color: #555555;
}

/* レス閲覧タブ専用スタイリング */
.posts-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid #333333;
  padding-bottom: 10px;
}

.thread-id-label {
  font-size: 12px;
  color: #777777;
}

.posts-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-card {
  background-color: #181818;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 12px 16px;
}

.post-header-info {
  display: flex;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 8px;
  color: #888888;
  border-bottom: 1px solid #222222;
  padding-bottom: 6px;
}

.post-num {
  font-weight: bold;
  color: #007acc;
}

.post-author {
  font-weight: 600;
}

.post-body {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}