/* =====================================
   共通設定
===================================== */
.article table * {
  background: unset !important;
  color: #fff;
  border-left: none !important;
  border-right: none !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* レアリティフィルタボタンの基本スタイル */
.rarity-filter-btn {
  /* クリック可能な最小サイズを確保 */
  padding: 8px 15px;
  margin: 3px;
  border: 1px solid #555; /* 枠線 */
  border-radius: 4px; /* 角の丸み */

  /* 背景と文字色 */
  background-color: #333;
  color: #ccc;
  cursor: pointer; /* マウスオーバーでカーソルを変更 */
  font-size: 14px;
  font-weight: bold;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;

  /* インライン要素として横に並べる */
  display: inline-block;

  /* 選択不可なテキストを防止 (オプション) */
  user-select: none;
}

/* マウスオーバー時のスタイル */
.rarity-filter-btn:hover {
  background-color: #444;
  border-color: #777;
  color: #fff;
}

/* 選択されたボタン (activeクラス) のスタイル */
.rarity-filter-btn.active {
  background-color: #ff9900; /* 目立つアクティブカラー */
  color: #111;
  border-color: #ff9900;
  box-shadow: 0 0 5px rgba(255, 153, 0, 0.5); /* 視覚的な強調 */
}

/* レアリティごとの色付け (オプション) */
/* .rarity-filter-tabs 内に配置することを想定 */
.rarity-filter-tabs #filter-Common.active {
  background-color: #666; /* Common */
  color: #fff;
}
.rarity-filter-tabs #filter-Uncommon.active {
  background-color: #38761d; /* Uncommon: 緑系 */
  color: #fff;
}
.rarity-filter-tabs #filter-Rare.active {
  background-color: #0b5394; /* Rare: 青系 */
  color: #fff;
}
.rarity-filter-tabs #filter-Epic.active {
  background-color: #674ea7; /* Epic: 紫系 */
  color: #fff;
}
.rarity-filter-tabs #filter-Legendary.active {
  background-color: #e69138; /* Legendary: オレンジ系 */
  color: #fff;
}
.rarity-filter-tabs #filter-All.active {
  /* 'すべて' ボタンは初期の #ff9900 を維持しても良い */
  background-color: #ff9900;
  color: #111;
}

/* フィルタボタンコンテナのスタイル (ボタンを綺麗に並べるため) */
#rarity-filter-tabs {
  display: flex;
  flex-wrap: wrap; /* ボタンが多すぎるときに折り返す */
  gap: 10px; /* ボタン間のスペース */
  margin: 15px 0;
  padding: 10px 0;
  justify-content: center; /* 中央寄せ */
}

/* 武器リストグリッド */
.weapon-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .weapon-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .weapon-list {
    grid-template-columns: repeat(1, 1fr);
  }
}

.wp-block-heading {
  background: linear-gradient(to right, #252525, #1a2a3a);
  color: #fff;
  border-radius: 3px;
}

/* =====================================
   カードデザイン
===================================== */
.weapon-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 4px;
  padding: 18px 16px;
  transition: all 0.25s ease;
  min-height: 260px;
  background: linear-gradient(to right, #252525, #1a2a3a);
}

.weapon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.weapon-card.selected {
  border-color: #9df2a0;
}

/* タイトル */
.weapon-card h3 {
  font-size: 1.25em;
  margin-bottom: 12px;
  text-align: center;
  font-weight: 700;
  color: #fff;
}

/* =====================================
   カード内ステータス（情報リスト風）
===================================== */
.weapon-stats {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border: none;
  flex-grow: 1;
}

/* 各行の下線を1本だけ表示（左右なし） */
.weapon-stats tr {
  display: flex;
  justify-content: space-between;
  margin-top: -1px;
}

/* セルのテキスト調整 */
.weapon-stats td:first-child {
  font-size: 0.875em;
  flex: 1;
}

.weapon-stats td:last-child {
  font-weight: 600;
  text-align: right;
  font-size: 0.9em;
  flex: 1;
}

.weapon-stats tr {
  background: unset !important;
}

/* カード内詳細情報アコーディオン */
.weapon-card .details-toggle {
  display: block;
  margin-top: 10px;
  font-size: 0.875em;
  font-weight: bold;
  cursor: pointer;
  color: #ff9900;
  text-align: center;
  user-select: none;
}

.weapon-card .details-content {
  display: none; /* 初期は非表示 */
  margin-top: 8px;
  font-size: 0.85em;
  line-height: 1.4;
  /* border-top: 1px solid rgba(255, 255, 255, 0.15); */
  padding-top: 8px;
}

.weapon-card .details-content table {
  width: 100%;
}

.weapon-card .details-content td:first-child {
  font-weight: 600;
  padding-right: 6px;
}

.weapon-card .details-content tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* =====================================
   比較ボタン
===================================== */
.select-btn {
  margin-top: 12px;
  padding: 8px 12px;
  font-size: 0.875em;
  border: none;
  border-radius: 6px;
  background: #0e3967;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  align-self: center;
  width: 100%;
}

.select-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.select-btn:disabled {
  background: #ccc;
  /* cursor: not-allowed; */
  color: #0056b3;
}

.selected .select-btn {
  background-color: #ff9900; /* 目立つオレンジ */
  color: #111;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(255, 153, 0, 0.7);
  transform: translateY(-2px); /* 押されている感を軽減 */
  border: 1px solid #ff9900;
}

.selected .select-btn:hover {
  background-color: #ffb84d;
  color: #111;
  box-shadow: 0 0 12px rgba(255, 180, 80, 0.8);
  transform: translateY(-2px);
}

/* =====================================
   比較テーブル＋グラフ
===================================== */
.vs-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
}
.vs-table {
  background: transparent;
}

.vs-table-wrap {
  flex: 1 1 450px;
}

.vs-chart-wrap {
  flex: 1 1 250px;
  text-align: center;
}

.vs-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 4px;
  overflow: hidden;
}

.vs-table th,
.vs-table td {
  border: 1px solid #ddd;
  padding: 8px 10px;
  text-align: center;
}

.vs-table th {
  font-weight: 600;
  background: rgba(255, 255, 255, 0.07) !important;
}

.vs-table td.better {
  font-weight: bold;
  text-decoration: underline;
}

.vs-table td.worse {
  background: #fff;
}

.vs-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  color: #fff;
  text-align: center;
}

/* =====================================
   リセットボタン
===================================== */
#reset-vs {
  display: inline-block;
  padding: 8px 16px;
  background: #343434;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

#reset-vs:hover {
  opacity: 0.8;
}

.vs-card {
  background: linear-gradient(to right, #252525, #1a2a3a);
  padding: 20px;
  border-radius: 10px;
  margin-top: 30px;
}

.vs-title {
  font-size: 1.3em;
  margin-bottom: 16px;
  text-align: center;
  color: #fff;
}

.vs-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.vs-table-area {
  width: 100%;
}

.vs-chart-area {
  width: 100%;
  max-width: 500px;
}
