body {
  margin: 0;
  font-family: sans-serif;
  padding-top: 100px;
  /* ヘッダー高さ分 */

}

header {
  position: fixed;
  /* スクロールしても固定 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: #4cafef;
  /* 初期は不透明 */
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  transition: background 0.3s ease;
  /* 背景色をなめらかに変化 */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

header.scrolled {
  background: rgba(76, 175, 239, 0.8);
  /* 半透明 */
}

.header-left {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo {
  position: absolute;
  top: auto;
  left: 1%;
  width: 60px;
  ;
  padding: 5px;
  top: 10px;
}



#nishikosai {
  /* 中央に配置 */
  font-size: 2.5em;
  font-family: "Zen Antique", serif;
  font-weight: 400;
  font-style: normal;
  margin: 0;

  top: -10px;
  text-align: center;
  height: 80px;


}

@media (max-width: 768px) {
  header {
    height: 70px;
    padding: 10px 0;
  }

  .logo {
    top: 0;
  }

  body {
    padding-top: 70px;
  }

}

.maintext {
  font-size: xx-large;
  font-weight: bolder;
  text-align: center;
  margin-top: 20px;
}

#subtext {
  text-align: center;
}

#contents {
  text-align: center;
}

.index-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* PC: 横12枚 */
  gap: 10px;
  justify-items: center;
}

/* 画像サイズ調整 */
.index-container img {
  width: 100%;
  /* グリッドに合わせて可変 */
  height: auto;
  max-width: 300px;
  /* 最大幅制限 */
}

/* スマホ表示時（幅768px以下） */
@media (max-width: 768px) {
  .index-container {
    grid-template-columns: repeat(5, 1fr);
    /* スマホ: 横6枚 */
  }
}

.googlemap {
  right: 3%;
  size: 60%;
  color: white;
}

#footer {
  background-color: rgb(44, 44, 65);
  color: white;
  font-family: HG正楷書体-PRO;
}

footer {
  background-color: rgb(44, 44, 65);
  /* 背景を濃紺 */
  color: white;
  /* 文字を白に */
  padding: 20px;
  text-align: center;
  border-top: 2px solid white;
  /* 上の境界線を白 */
  margin-top: 0;
  /* 余計な隙間をなくす */
}

#botton-sentence {
  bottom: 0.1%;
  text-align: center;
}

.map {
  text-align: center;
  color: white;
}

.link {
  color: white;
  text-align: center;
}

.about-us {
  text-align: center;
}

h2 {
  display: block;
  font-size: 1.5em;
  margin-block-start: 0.83em;
  margin-block-end: 0.83em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  font-weight: bold;
  unicode-bidi: isolate;
}

/* ========================= */
/* 追加: スケジュールページ用 */
/* ========================= */

/* 管理者フォーム */
#adminPanel {
  max-width: 600px;
  margin: 2em auto;
  padding: 1.5em;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#adminPanel h2 {
  font-size: 1.2em;
  margin-bottom: 1em;
  color: #333;
  text-align: center;
}

#adminPanel input {
  width: 100%;
  padding: 0.6em;
  margin: 0.5em 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#adminPanel button {
  display: block;
  width: 100%;
  padding: 0.8em;
  margin-top: 1em;
  background: #0066cc;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
}

#adminPanel button:hover {
  background: #004999;
}

/* スケジュール表 */
#scheduleTable {
  width: 90%;
  margin: 2em auto;
  border-collapse: collapse;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#scheduleTable th,
#scheduleTable td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

#scheduleTable th {
  background: #f0f0f0;
  font-weight: bold;
}

#scheduleTable tr:nth-child(even) {
  background: #fafafa;
}

/* 操作ボタン */
#scheduleTable button {
  padding: 5px 10px;
  margin: 2px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#scheduleTable .deleteBtn {
  background: #e53935;
  color: white;
}

#scheduleTable .deleteBtn:hover {
  background: #c62828;
}

#scheduleTable .delayBtn {
  background: #ff9800;
  color: white;
}

#scheduleTable .delayBtn:hover {
  background: #ef6c00;
}


.live-section {
  margin: 20px auto;
  width: 90%;
  max-width: 600px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  font-family: sans-serif;
}

.live-header {
  background: #333;
  color: #fff;
  padding: 8px 15px;
  font-size: 0.9em;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-dot {
  width: 10px;
  height: 10px;
  background: #ff4d4d;
  border-radius: 50%;
  animation: blink 1s infinite;
}

@keyframes blink {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }

  100% {
    opacity: 1;
  }
}

.match-card {
  padding: 15px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.match-card:last-child {
  border-bottom: none;
}

.match-info .status-label {
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 5px;
}

.status-now {
  background: #ffeded;
  color: #ff4d4d;
  border: 1px solid #ff4d4d;
}

.status-soon {
  background: #eef9ff;
  color: #007bff;
  border: 1px solid #007bff;
}

.match-title {
  font-weight: bold;
  display: block;
  margin-top: 5px;
}

.match-time {
  font-size: 0.85em;
  color: #666;
}

#statusBannerContainer {
  width: 90%;
  max-width: 600px;
  margin: 10px auto;
}

.status-banner {
  padding: 10px 15px;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-banner.green {
  background-color: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #389e0d;
}

.status-banner.red {
  background-color: #fff1f0;
  border: 1px solid #ffa39e;
  color: #cf1322;
}

.status-banner .category-name {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 10px;
}

/* 種目ごとのセクション設定 */
.category-section {
  margin-bottom: 30px;
  width: 95%;
  margin-left: auto;
  margin-right: auto;
}

.category-title {
  background-color: #4cafef;
  color: white;
  padding: 8px 15px;
  border-radius: 5px 5px 0 0;
  margin-bottom: 0;
  font-size: 1.1rem;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0;
  border: 1px solid #ddd;
}

/* --- 種目別セクションのデザイン --- */
#scheduleBody {
  display: flex;
  flex-direction: column;
  gap: 40px;
  /* セクション間の余白 */
  padding: 20px 0;
}

.category-section {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid #eef2f5;
  width: 95%;
  margin: 0 auto;
}

/* 種目名のヘッダー */
.category-title {
  background: linear-gradient(135deg, #4cafef 0%, #2196f3 100%);
  color: white;
  margin: 0;
  padding: 12px 20px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 種目別のテーブル */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  text-align: center;
}

.schedule-table th {
  background-color: #f8f9fa;
  color: #666;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px;
  border-bottom: 2px solid #eee;
}

.schedule-table td {
  padding: 15px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.95rem;
  color: #333;
}


.schedule-table tr:last-child td {
  border-bottom: none;
}

@media (max-width:768px) {
  .schedule-table td{
    font-size: 0.8rem;
    padding: 19px 7px;
  }
  
}
/* 時刻の強調 */
.time-cell {
  font-weight: bold;
  color: #4cafef;
  white-space: nowrap;
}

/* 場所のバッジ風デザイン */
.place-text {
  background: #f0f4f8;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #555;
}

/* 🏆アイコンの装飾 */
.match-icon {
  color: #ffa000;
  margin-right: 4px;
}

.tournament-controls {
  background-color: #fff;
  /* 背景色：白 */
  padding: 20px;
  margin: 20px auto;
  /* 上下20px、左右中央寄せ */
  max-width: 800px;
  /* 横幅が広がりすぎないように制限 */
  border-radius: 10px;
  /* 角を丸く */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  /* 軽い影をつける */

  /* フレックスボックスで中身を整列 */
  display: flex;
  flex-wrap: wrap;
  /* 折り返しを許可 */
  justify-content: center;
  /* 中央揃え */
  align-items: center;
  gap: 15px;
  /* 各パーツの隙間 */
}

/* --- 見出し (h2oo) --- */
.tournament-controls .h2oo {
  width: 100%;
  /* 横幅いっぱいに広げて改行させる */
  text-align: center;
  margin: 0 0 10px 0;
  /* 下に少し余白 */
  font-size: 1.5rem;
  color: #333;
  border-bottom: 2px solid #4cafef;
  /* 下線（テーマカラー） */
  padding-bottom: 5px;
  display: inline-block;
  /* 下線の長さを文字に合わせるならinline-blockにしてtext-align制御も可ですが、今回は幅いっぱいでシンプルに */
}

/* --- プルダウン (select) --- */
.tournament-controls select {
  padding: 10px 15px;
  font-size: 16px;
  /* スマホで勝手にズームしないサイズ */
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #f9f9f9;
  cursor: pointer;
  outline: none;
  min-width: 120px;
  /* 最低限の幅 */
}

.tournament-controls select:focus {
  border-color: #4cafef;
  /* 選択時に青枠にする */
  background-color: #fff;
}

/* --- 表示ボタン --- */
#tournamentSearchBtn {
  padding: 10px 30px;
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  background-color: #4cafef;
  /* テーマカラーの青 */
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  /* ホバー時の色変化を滑らかに */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#tournamentSearchBtn:hover {
  background-color: #3595d6;
  /* ホバー時に少し濃く */
  transform: translateY(-1px);
  /* 少し浮き上がる演出 */
}

#tournamentSearchBtn:active {
  transform: translateY(1px);
  /* 押したときに沈む演出 */
}

/* =========================================
   スマホ用レスポンシブ設定 (画面幅768px以下)
   ========================================= */
@media (max-width: 768px) {
  .tournament-controls {
    flex-direction: column;
    /* 縦並びにする */
    width: 90%;
    /* 横幅を少し狭める */
    gap: 15px;
  }

  /* プルダウンとボタンを横幅いっぱいにする */
  .tournament-controls select,
  #tournamentSearchBtn {
    width: 100%;
    max-width: 100%;
    text-align: center;
    /* 文字を中央に */
  }

  .tournament-controls .h2oo {
    font-size: 1.2rem;
    /* 見出しを少し小さく */
  }
}