<style>
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-color: #000;
}

.bg-image img {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
}
.ranking-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  color: #333;
  font-family: 'Noto Sans JP', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  background-color: rgba(26, 26, 26, 0.3);
}
.ranking-title {
  font-size: 1.6rem;
  font-weight: bold;
  color: #fff;
  border-left: 4px solid #C9A941;
  padding-left: 10px;
  margin-bottom: 0rem;
  margin-top: 0rem;
}
.ranking-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 3px;  /* ← この値で行間の幅を調整 */
  margin-bottom: 0rem;
  border: none;
}
.ranking-table th {
  background-color: rgba(26, 26, 26, 0.7);
  color: #fff;
  padding: 10px;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  border-radius: 0;
}
.ranking-table td {
  background-color: #f8f8f8;
  padding: 3px 3px;
  text-align: center;
  font-size: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.ranking-table td a {
  font-weight: bold;
  text-decoration: none;
  color: #007acc;
}
.ranking-table td a:hover {
  text-decoration: underline;
}

.ranking-table th,
.ranking-table td {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;

}

/* ヘッダーの「選手名」だけ中央揃え */
.ranking-table th:nth-child(2) {
  text-align: center;
}
/* データ行の「選手名」だけ左揃え */
.ranking-table td:nth-child(2) {
  text-align: left;
}
.ranking-table td:nth-child(3),
.ranking-table td:nth-child(4) {
  font-weight: 600;
}

/* 1〜3位の画像アイコン（順位セル内） */
.rank-cell-1 img,
.rank-cell-2 img,
.rank-cell-3 img {
  width: 40px;
  height: auto;
  max-width: 100%;
  display: inline-block;
  vertical-align: middle;
}


/* ホバー時 */
.ranking-table tbody tr:hover td {
  background-color:#FFD700;
  transition: background-color 0.2s ease;
}


.ranking-table.fixed {
  table-layout: fixed;
  width: 100%;
}

/* 列幅調整（試合数以外） */
.ranking-table.fixed th:nth-child(1), .ranking-table.fixed td:nth-child(1) { width: 10%; }
.ranking-table.fixed th:nth-child(2), .ranking-table.fixed td:nth-child(2) { width: 45%; }
.ranking-table.fixed th:nth-child(3), .ranking-table.fixed td:nth-child(3) { width: 25%; }
.ranking-table.fixed th:nth-child(4), .ranking-table.fixed td:nth-child(4) { width: 20%; }

.table-note {
  font-size: 0.9rem;
  color: #fff;
  margin: 0rem 0 0rem 0;
}
.button-group {
  text-align: center;
  margin-top: 0rem;
  margin-bottom: 2rem;
}
.show-more-button, .show-less-button {
  margin: 1rem auto;
  padding: 12px 20px;
  background: linear-gradient(to bottom, #f1e08a, #c9a941, #8c6d1f);
  color: #1A1A1A;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.show-more-button:hover, .show-less-button:hover {
  background-color: #b39338;  /* 濃いゴールド */
  color: #ffffff;
}

.name-wrapper {
  display: flex;
  align-items: center;
}

.name-wrapper img {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

.name-wrapper .fighter-name {
  display: inline-block;
  word-break: break-word;
  line-height: 1.3;
}

@media screen and (max-width: 768px) {
  .ranking-table th,
  .ranking-table td {
    font-size: 0.85rem;
    padding: 3px 3px;
	white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .ranking-title {
    font-size: 1.2rem;
  }

  .show-more-button,
  .show-less-button {
    font-size: 0.9rem;
    padding: 0.4rem 1.2rem;
  }
}

@media screen and (max-width: 480px) {
  .ranking-wrapper {
    padding-left: 5px;
    padding-right: 5px;
  }
  
  .ranking-table.fixed {
    table-layout: auto; /* ← 固定を解除して柔軟にする */
  }

  /* 最小幅を明示して、切れるのを防止 */
  .ranking-table th:nth-child(1),
  .ranking-table td:nth-child(1) {
    min-width: 50px;
  }

  .ranking-table th:nth-child(2),
  .ranking-table td:nth-child(2) {
    min-width: 100px;
  }

  .ranking-table th:nth-child(3),
  .ranking-table td:nth-child(3),
  .ranking-table th:nth-child(4),
  .ranking-table td:nth-child(4) {
    min-width: 70px;
  }

  /* 「…」で切れるのをやめる（必要なら） */
  .ranking-table th,
  .ranking-table td {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}

</style>