/**
 * 掲示板モーダル - スタイル
 * 既存のゲーム UI に合わせたダークテーマ
 */

/* モーダル基本スタイル */
#board-modal {
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#board-modal.hidden {
  display: none !important;
}

#board-modal.flex {
  display: flex !important;
}

/* モーダルコンテナ */
#board-modal > div {
  animation: slideUp 0.3s ease-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ヘッダー */
#board-modal .border-b {
  background: linear-gradient(180deg, rgba(30, 35, 50, 0.8), rgba(24, 28, 40, 0.8));
}

#board-back-btn,
#board-close-btn {
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

#board-back-btn:hover,
#board-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

#board-back-btn:active,
#board-close-btn:active {
  transform: scale(0.95);
}

/* コンテンツエリア */
#board-content {
  background: linear-gradient(180deg, rgba(24, 28, 40, 0.5), rgba(20, 24, 36, 0.5));
}

/* ボタン共通スタイル */
#board-modal button[type="submit"],
#board-modal button.w-full {
  transition: all 0.2s ease;
  font-weight: 600;
  letter-spacing: 0.02em;
}

#board-modal button[type="submit"]:active,
#board-modal button.w-full:active {
  transform: scale(0.98);
}

/* 入力フィールド */
#board-modal input[type="text"],
#board-modal textarea {
  background-color: rgba(24, 28, 40, 0.8);
  border-color: rgba(100, 116, 139, 0.3);
  transition: all 0.2s ease;
}

#board-modal input[type="text"]:focus,
#board-modal textarea:focus {
  background-color: rgba(24, 28, 40, 0.95);
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* テキストエリア */
#board-modal textarea {
  font-family: inherit;
  line-height: 1.5;
}

/* リスト項目 */
#board-modal .bg-ink-700 {
  background-color: rgba(32, 37, 58, 0.8);
  border-color: rgba(100, 116, 139, 0.2);
  transition: all 0.2s ease;
}

#board-modal .bg-ink-700:hover {
  background-color: rgba(32, 37, 58, 1);
  border-color: rgba(100, 116, 139, 0.4);
}

#board-modal .bg-ink-600 {
  background-color: rgba(40, 45, 68, 0.9);
  border-color: rgba(100, 116, 139, 0.3);
}

/* ページネーション */
#board-modal .flex.justify-center.gap-2 {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
}

#board-modal .flex.justify-center.gap-2 button {
  transition: all 0.2s ease;
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(100, 116, 139, 0.2);
}

#board-modal .flex.justify-center.gap-2 button:hover {
  border-color: rgba(100, 116, 139, 0.4);
}

/* テキストカウンター */
#board-modal .text-xs.text-slate-500 {
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.7);
}

/* 完了メッセージ */
#board-modal .bg-rose-900\/30 {
  background-color: rgba(127, 29, 29, 0.2);
  border-color: rgba(220, 38, 38, 0.3);
  color: rgba(248, 113, 113, 0.9);
}

/* ユーザー名リンク */
#board-modal .author-link {
  cursor: pointer;
  color: rgba(148, 163, 184, 0.8);
  transition: color 0.2s ease;
  text-decoration: none;
  border-bottom: 1px dotted rgba(148, 163, 184, 0.3);
}

#board-modal .author-link:hover {
  color: rgba(226, 232, 240, 0.9);
  border-bottom-color: rgba(148, 163, 184, 0.6);
}

/* レスポンシブ対応 */
@media (max-width: 640px) {
  #board-modal {
    padding: 0 !important;
  }

  #board-modal > div {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  #board-modal .border-b {
    padding: 1rem !important;
  }

  #board-modal #board-content {
    padding: 1rem !important;
  }
}

/* スクロールバー */
#board-content::-webkit-scrollbar {
  width: 6px;
}

#board-content::-webkit-scrollbar-track {
  background: rgba(30, 35, 50, 0.3);
  border-radius: 3px;
}

#board-content::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 3px;
}

#board-content::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.6);
}

/* Firefox */
#board-content {
  scrollbar-color: rgba(100, 116, 139, 0.4) rgba(30, 35, 50, 0.3);
  scrollbar-width: thin;
}

/* アニメーション */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

#board-content > p.text-slate-500 {
  animation: pulse 1.5s ease-in-out infinite;
}
