/* ============================================
   board.css — 掲示板ページ専用スタイル
   ============================================ */

/* ===== ページヘッダー ===== */
.board-hero {
  padding: 140px 24px 60px;
  text-align: center;
}

.board-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
}

.board-hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ===== レイアウト ===== */
.board-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

/* ===== 投稿フォーム ===== */
.post-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 40px;
}

.post-form h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 500px) {
  .form-row { flex-direction: column; }
}

.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }

textarea.form-input {
  resize: vertical;
  min-height: 100px;
  margin-bottom: 12px;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ===== 投稿一覧ヘッダー ===== */
.posts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.posts-header h2 { font-size: 1.1rem; font-weight: 600; }

.posts-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

/* ===== 投稿カード ===== */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color 0.2s;
  animation: slideIn 0.3s ease;
}

.post-item:hover { border-color: rgba(124, 106, 247, 0.4); }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.post-item__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.post-item__author {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}

.post-item__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-item__date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.post-item__delete {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.post-item__delete:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.post-item__content {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== 検索ボックス ===== */
.board-search {
  margin-bottom: 20px;
}

.board-search__input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.board-search__input:focus { border-color: var(--accent); }
.board-search__input::placeholder { color: var(--text-muted); }

/* ===== ページング ===== */
.board-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 24px 0 8px;
}

.board-pager__btn {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.board-pager__btn:hover:not(:disabled) {
  border-color: var(--accent);
  background: rgba(148,128,255,.12);
  color: var(--accent);
}

.board-pager__btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 14px rgba(148,128,255,.4);
}

.board-pager__btn:disabled { opacity: .3; cursor: default; }

.board-pager__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 40px;
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* ===== 状態表示（ローディング・空） ===== */
.state-box {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.state-box .icon { font-size: 2.5rem; margin-bottom: 12px; }
.state-box p { font-size: 0.95rem; }

.loading-dots span {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin: 0 3px;
  animation: bounce 1.2s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1; }
}

/* ===== トースト通知 ===== */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 999;
}

.toast.show    { transform: translateY(0); opacity: 1; }
.toast.success { border-color: #4ade80; color: #4ade80; }
.toast.error   { border-color: #f87171; color: #f87171; }
