@charset "utf-8";

/* ========================================================
   color_tier.css
   スマブラSP カラーバリエーション表用スタイル
   rank_creater のデザインに統一
======================================================== */

/* ===== メインテーブル枠 ===== */
.move-tier-table {
  width: 1050px;
  background-color: #2c2a2a;
  padding: 0px 0px 20px 0px;
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 25px;
}

/* ===== タイトルエリア（rank_creater に統一）===== */
.MUTITLE {
  display: flex;
  justify-content: center;
  position: relative;
  align-items: center;
  padding: 30px 0px 20px 0;
  line-height: 1.5;
}

.MUTITLE img {
  width: 180px;
  position: absolute;
  right: 5%;
}

.MUTITLE h2 {
  font-size: 25px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
}

.MUTITLE h2::after {
  content: '';
  display: block;
  width: 200px;
  height: 3px;
  background-color: rgb(255, 255, 255);
  margin-top: 5px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== アクションバー（rank_creater と共通）===== */
.tierlist-action {
  display: flex;
  width: 1050px;
  justify-content: flex-end;
  align-items: center;
  margin: auto;
  margin-top: 16px;
  flex-wrap: wrap;
  gap: 4px;
}

/* ===== ボタン（rank_creater と同スタイル）===== */
.tierlist-action-btn {
  background-color: rgb(73, 73, 73);
  color: rgb(255, 255, 255);
  border: none;
  border-radius: 5px;
  font-size: 14px;
  padding: 8px 16px;
  margin: 0 0px 8px 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tierlist-action-btn:hover {
  background-color: rgb(56, 56, 56);
  color: rgb(255, 255, 255);
}

/* タイトル入力フィールド */
.title-edit-input {
  background-color: #3a3838;
  border: 1px solid #555;
  border-radius: 4px;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  padding: 7px 12px;
  width: 220px;
  outline: none;
  margin: 0 0 8px 8px;
  transition: border-color 0.2s;
}

.title-edit-input:focus {
  border-color: #e7412b;
}

/* ===== セクションタイトルバー ===== */
.section {
  width: 1050px;
  margin-top: 15px;
  margin-left: auto;
  margin-right: auto;
  background-color: #e7412b;
  font-size: 20px;
  text-indent: 20px;
  color: white;
  padding: 8px 0;
  border-radius: 2px;
}

/* ===== カラーバリエーション グリッド (10列×9行) ===== */
.color-grid-inner {
  width: 1010px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  padding: 0 5px 10px;
}

/* ===== ファイター各ボックス ===== */
.color-cell {
  background: linear-gradient(180deg, #333536 0%, #222425 100%);
  border: 1px solid #4a4a4a;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s, filter 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.color-cell:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
  border-color: #e7412b;
}

/* 上部のカラーバッジ枠 */
.color-cell-badge {
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  padding: 2px 3px;
  line-height: 1.2;
  min-height: 14px;
  /* 未選択時は空文字（非表示に見える）*/
}

/* 中央: 画像エリア */
.color-cell-img-area {
  width: 100%;
  flex: 1;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  overflow: hidden;
}

.color-cell-img-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

/* ===== カラー選択モーダル ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.2s;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  background: #2c2a2a;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 24px 20px 20px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.modal-content h3 {
  margin-bottom: 18px;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
}

.modal-close-btn {
  background: rgb(73, 73, 73);
  color: #fff;
  border: none;
  padding: 10px 24px;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 12px;
  font-weight: bold;
  transition: background 0.15s;
}

.modal-close-btn:hover {
  background: rgb(56, 56, 56);
}

/* カラーリスト（4列×2行）*/
.modal-color-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.modal-color-item {
  background: #111;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding-bottom: 4px;
}

.modal-color-item:hover {
  transform: scale(1.05);
  border-color: #e7412b;
}

.modal-color-item.selected {
  border-color: #e7412b;
  box-shadow: 0 0 8px rgba(231, 65, 43, 0.6);
}

.modal-color-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.modal-color-label {
  color: #bbb;
  font-size: 11px;
  font-weight: bold;
  margin-top: 4px;
  text-align: center;
}

/* ===== レスポンシブ（タブレット）===== */
@media (max-width: 1100px) {

  .move-tier-table,
  .section,
  .tierlist-action {
    width: 98%;
    max-width: 98%;
  }

  .color-grid-inner {
    width: 98%;
    max-width: 98%;
  }
}

/* ===== レスポンシブ（スマホ）===== */
@media (max-width: 840px) {
  .move-tier-table {
    max-width: 100%;
    width: 100%;
    padding: 10px 0;
    margin-top: 6px;
    margin-bottom: 10px;
  }

  .MUTITLE {
    padding: 1% 0;
  }

  .MUTITLE img {
    width: 20%;
    right: 5%;
  }

  .MUTITLE h2 {
    font-size: 14px;
  }

  .MUTITLE h2::after {
    max-width: 40%;
    height: 2px;
    margin-top: 6px;
  }

  .color-grid-inner {
    width: 100%;
    max-width: 100%;
    gap: 3px;
    padding: 0 2px 6px;
  }

  .color-cell-badge {
    font-size: 9px;
    min-height: 11px;
    padding: 1px 2px;
  }

  .tierlist-action {
    max-width: 100%;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .title-edit-input {
    width: 140px;
    font-size: 12px;
  }

  .section {
    max-width: 100%;
    width: 100%;
    font-size: 16px;
    text-indent: 12px;
  }

  .modal-color-list {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 500px) {
  .color-cell-badge {
    font-size: 6px;
    min-height: 10px;
  }

  .modal-color-list {
    grid-template-columns: repeat(3, 1fr);
  }
}