/* ===============================
   スコア表示（統合済み）
   =============================== */
.score-box {
  font-size: var(--font-xxl);
  font-weight: bold;
  font-family: "Arial Black", sans-serif;
  padding: 10px 0;
  width: 100%;
  display: flex;
  justify-content: center;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* スマホ向けサイズ調整 */
@media (max-width: 600px) {
  .score-box {
    font-size: 2em;
    letter-spacing: -2px;
  }
}
/* ===============================
   チーム情報セクション：フォント統一
   =============================== */
.team-info-block,
.team-info-block .team-text h1,
.team-info-block .team-text p {
  font-family: var(--font-family-base);
  color: var(--color-text);
}


/* ===============================
   試合情報パネル
   =============================== */
.match-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px;
  background-color: white;
}

.match-info {
  background-color: transparent;
  color: #002f6c;
  border: 1px solid #002f6c;
  border-radius: 10px;
  padding: 5px;
  font-size: var(--font-sm);
  text-align: center;
  white-space: normal;
  text-decoration: none;
  pointer-events: none;
}

.team-name {
  display: block;
  padding: 10px;
  font-size: var(--font-xl);
  font-weight: bold;
  width: 100%;
}

.team-name.blue {
  background-color: #002f6c;
  color: white;
  float: left;
}

.team-name.red {
  background-color: red;
  color: white;
  float: right;
}

.match-result::after {
  content: "";
  display: block;
  clear: both;
}

/* ===============================
   試合詳細（moreボタン）
   =============================== */
.more-button {
  display: flex;
  justify-content: center;
  margin-top: 5px;
}

/* ===============================
   詳細表示エリア
   =============================== */
.match-details {
  display: none;
  margin-top: 10px;
  background: white;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: var(--font-sm);
}

.match-details table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-sm);
}

.match-details table th,
.match-details table td {
  border: 1px solid #ddd;
  padding: 5px;
  text-align: center;
}

/* 得点・警告の分割表示 */
.scoring-info {
  display: flex;
  justify-content: space-between;
  padding: 5px;
}

.team-column {
  width: 50%;
  vertical-align: top;
}

.yellow-card-icon,
.red-card-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
}

.yellow-card-icon {
  background-color: yellow;
}

.red-card-icon {
  background-color: red;
}

/* ===============================
   タブ表示スタイル
   =============================== */
.tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.tab-btn {
  background-color: #002f6c;
  color: white;
  padding: 12px 20px;
  border: none;
  cursor: pointer;
  margin: 0 5px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  font-size: var(--font-md);
}

.tab-btn.active {
  background-color: red;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ===============================
   テーブル汎用スタイル
   =============================== */
.summary-table-wrapper {
  overflow-x: auto;
  margin: 10px 0;
  padding: 0 10px;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-sm);
  background-color: #fff;
  table-layout: auto;
}

.summary-table th,
.summary-table td {
  border: 1px solid #ddd;
  padding: 6px 4px;
  text-align: center;
  font-family: 'Futura', Arial, sans-serif;
  white-space: normal;
}

.summary-table thead th {
  background-color: #002f6c;
  color: white;
  font-weight: bold;
  font-size: var(--font-md);
}

.summary-table tbody th {
  background-color: #f0f0f0;
  font-weight: bold;
  min-width: 70px;
}

.summary-table td:nth-child(2),
.summary-table td:nth-child(3),
.summary-table td:nth-child(4) {
  min-width: 90px;
}

/* ===============================
   ランキングテーブル
   =============================== */
.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-sm);
  margin-top: 10px;
  background-color: white;
  font-family: 'Futura', Arial, sans-serif;
  table-layout: fixed;
}

.ranking-table th,
.ranking-table td {
  border: 1px solid #ccc;
  padding: 6px 4px;
  text-align: center;
  white-space: nowrap;
}

.ranking-table th:nth-child(1),
.ranking-table td:nth-child(1) {
  width: 30px;
}
.ranking-table th:nth-child(2),
.ranking-table td:nth-child(2) {
  width: 120px;
}
.ranking-table th:nth-child(3),
.ranking-table td:nth-child(3) {
  width: 60px;
}

/* ===============================
   試合結果テーブル（Match Results）
   =============================== */
.table-container {
  overflow-x: auto;
  margin: 20px 0;
  display: block;
  max-width: 100%;
  padding: 0 10px;
}

.match-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-sm);
  background-color: white;
  font-family: 'Futura', Arial, sans-serif;
  table-layout: auto;
}

.match-table th,
.match-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
  white-space: nowrap;
  word-break: break-word;
}

.match-table th:nth-child(1),
.match-table td:nth-child(1) { min-width: 50px; }
.match-table th:nth-child(2),
.match-table td:nth-child(2) { min-width: 100px; }
.match-table th:nth-child(3),
.match-table td:nth-child(3) { min-width: 180px; }
.match-table th:nth-child(4),
.match-table td:nth-child(4) { min-width: 80px; }
.match-table th:nth-child(5),
.match-table td:nth-child(5) { min-width: 120px; }
.match-table th:nth-child(6),
.match-table td:nth-child(6) { min-width: 120px; }
.match-table th:nth-child(7),
.match-table td:nth-child(7) { min-width: 200px; }
.match-table th:nth-child(8),
.match-table td:nth-child(8) { min-width: 120px; }

/* ===============================
   Show More / Less ボタン
   =============================== */
#loadMoreBtn,
#loadLessBtn,
.common-button {
  background-color: #002f6c;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  font-size: var(--font-md);
  cursor: pointer;
  margin: 10px auto;
  display: block;
  width: fit-content;
}

#loadMoreBtn:hover,
#loadLessBtn:hover,
.common-button:hover {
  background-color: #001a40;
}

/* ===============================
   See More リンク
   =============================== */
.see-more-link {
  display: block;
  text-align: right;
  padding: 10px 20px;
  color: #002f6c;
  font-weight: bold;
  text-decoration: underline;
  font-size: var(--font-sm);
}

/* ===============================
   テーブル配色調整
   =============================== */
.ranking-table thead th,
.match-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #002f6c;
  color: white;
  font-weight: bold;
  font-size: var(--font-md);
}

.ranking-table tbody th,
.match-table tbody th {
  background-color: #f0f0f0;
  font-weight: bold;
}

/* ===============================
   表示制御（汎用）
   =============================== */
.hidden {
  display: none !important;
}

/* ===============================
   グラフ配置ラッパー調整（3段構成＋横並び調整）
   =============================== */

/* 共通：全体ラッパー */
.dual-graph-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 1段目：Goal Timing */
.top-graph-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 2段目：First Goal Impact */
.middle-graph-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 3段目：Scoring Efficiency */
.bottom-graph-wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

/* ===============================
   PC表示時のレイアウト調整
   =============================== */
@media (min-width: 768px) {
  /* 1段目：Goal Timing 横並び */
  .top-graph-wrapper {
    flex-direction: row;
    justify-content: space-between;
  }

  .top-graph-wrapper > div {
    flex: 1;
    max-width: 48%;
  }

  /* 2段目：First Goal Impact 横並び */
  .middle-graph-wrapper {
    flex-direction: row;
    justify-content: space-between;
  }

  .middle-graph-wrapper > div {
    flex: 1;
    max-width: 48%;
  }

  /* 3段目：Efficiency中央寄せ */
  .bottom-graph-wrapper {
    align-items: center;
  }

  .efficiency-graph-wrapper {
    max-width: 60%;
    width: 100%;
  }
}}

/* ===============================
  順位表示（RANK）
   =============================== */
.team-rank-label {
  font-size: var(--font-md);
  font-weight: bold;
  color: #002f6c;
  margin-bottom: 10px;
}
/* ===============================
   選手スタッツテーブル表示用
   =============================== */
.table-scroll-wrapper {
  overflow-x: auto;
  width: 100%;
}
.stats-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 600px;
}
.stats-table th,
.stats-table td {
  border: 1px solid #ccc;
  padding: 8px;
  font-size: var(--font-sm);
  text-align: center;
}
.stats-table th.sticky {
  position: sticky;
  left: 0;
  background: #f4f4f4;
  text-align: left;
  z-index: 1;
}
/* ===============================
   選手プロフィール画像調整
   =============================== */
.player-photo {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
/* ===============================
AI解説セクション（選手ページ用）
=============================== */
.ai-comment-section {
  background-color: #f5f8fc;
  border: 1px solid #d0d8e8;
  border-radius: 10px;
  padding: 1rem 1.25rem; /* ← 上下・左右とも少しだけ狭くしたよ♪ */
  margin: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ai-comment-header {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  border-bottom: 2px solid #d0d8e8;
  padding-bottom: 0.3rem;
}

.ai-comment-text {
  font-size: var(--font-md);
  line-height: 1.6;
  color: var(--color-text);
}
/* ===============================
調整追記：match-table 列幅最適化
=============================== */

./* ===============================
修正追記：選手テーブル列幅最適化
=============================== */

.table-scroll-wrapper {
  overflow-x: auto;
}

.match-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  min-width: 1100px; /* 横スクロール基準になる最小幅 */
}

.match-table th,
.match-table td {
  padding: 8px 12px;
  text-align: center;
  white-space: nowrap;
  font-size: var(--font-sm, 14px);
  border-bottom: 1px solid #ddd;
}

.match-table th.sticky,
.match-table td.sticky {
  text-align: left;
  padding-left: 16px;
  min-width: 140px;
}

/* 最小幅を列ごとに明示（順序：#、名前、出場数…） */
.match-table th:nth-child(1),
.match-table td:nth-child(1) { min-width: 40px; }  /* # */
.match-table th:nth-child(2),
.match-table td:nth-child(2) { min-width: 120px; } /* Name */
.match-table th:nth-child(3),
.match-table td:nth-child(3) { min-width: 60px; }  /* Apps */
.match-table th:nth-child(4),
.match-table td:nth-child(4) { min-width: 60px; }  /* Starts */
.match-table th:nth-child(5),
.match-table td:nth-child(5) { min-width: 60px; }  /* Sub */
.match-table th:nth-child(6),
.match-table td:nth-child(6) { min-width: 80px; }  /* Minutes */
.match-table th:nth-child(7),
.match-table td:nth-child(7) { min-width: 60px; }  /* Rating */
.match-table th:nth-child(8),
.match-table td:nth-child(8) { min-width: 60px; }  /* Goals */
.match-table th:nth-child(9),
.match-table td:nth-child(9) { min-width: 60px; }  /* Assists */
.match-table th:nth-child(10),
.match-table td:nth-child(10) { min-width: 60px; } /* Yellow */
.match-table th:nth-child(11),
.match-table td:nth-child(11) { min-width: 60px; } /* Red */

#playerStatsTab .match-table thead th {
  text-align: center;
