/* 親コンテナ：1280×720を中央に固定 */
#fixed-container {
  position: relative;
  width: 1280px;
  height: 720px;
  margin: 90px auto;
  background-color: #333;
}

/* スプラッシュ画面全体に柔らかいグラデーション背景 */
.splash-background {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at center, rgba(255, 223, 100, 0.3) 0%, transparent 60%),
    repeating-conic-gradient(
      from 0deg,
      rgba(255, 255, 255, 0.4) 0deg,
      rgba(255, 255, 255, 0.4) 10deg,
      rgba(255, 215, 0, 0.2) 10deg,
      rgba(255, 215, 0, 0.2) 20deg
    ),
    linear-gradient(to bottom right, #fff8e1, #ffe0b2);
  background-blend-mode: screen;
}
/* ロゴ画像 */
.title-logo {
  max-width: 90%;
  width: 500px;
  margin-bottom: 20px;
}

/* スタートボタン */
.start-small {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  font-weight: bold;
  background-color: #FFD700;
  border: none;
  border-radius: 50%;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  z-index: 10;
}

/* QRコード画像 */
.qr-code {
  max-width: 300px;
  width: 80%;
}

/* フォームコンテナを中央揃えにする */
#formContainer {
  text-align: center;   /* テキスト、フォーム内の要素を中央揃え */
  margin: 20px auto;    /* 上下に20pxの余白、左右は自動マージンで中央配置 */
  width: 80%;           /* 必要に応じて幅を調整 */
}

/* 入力フィールドとボタンのスタイル（例） */
#formContainer input[type="text"] {
  padding: 10px;
  font-size: 1em;
  width: 60%;
  margin-bottom: 10px;
}

#formContainer button {
  padding: 10px 20px;
  font-size: 1em;
  cursor: pointer;
}

/* 各スライド共通 */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  display: none;
  z-index: 0;
}

/* 背景動画用のスタイル */
.slide-background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

/* カウントダウンや選択人数全体のオーバーレイ */
.overlay {
  position: absolute;
  font-size: 2em;
  background-color: rgba(255,255,255,0.5);
  padding: 10px;
  display: none;
  z-index: 9999;
}

#countdown {
  top: 20px;
  right: 20px;
  color: black;
  font-size: 4.6em;
}
#choiceCounts {
  bottom: 20px;
  left: 20px;
  color: #000;
}

/* ボタンエリア右下 */
#button-area {
  position: absolute;
  bottom: 10px;
  right: 10px;
}

/* 各選択肢の人数用要素 (#countA,#countB,#countC,#countD) */
#countA, #countB, #countC, #countD {
  position: absolute;
  display: none;
  z-index: 9999;
  background-color: rgba(255,255,255,0.7);
  font-size: 3.5em;
  padding: 6px;
  color: red;
}
/* サンプル配置 */
#countA { top: 170px; left: 500px; }
#countB { top: 170px; left: 1100px; }
#countC { top: 450px; left: 500px; }
#countD { top: 450px; left: 1100px; }

/* ★ 4つの赤枠(A,B,C,D) */
#redFrameA, #redFrameB, #redFrameC, #redFrameD {
  position: absolute;
  z-index: 9999;
  border: 5px solid red;   /* 赤枠 */
  display: none; /* 初期は隠す */
}
/* 位置/サイズ(例) */
#redFrameA {
  top: 140px;  left: 45px;
  width: 570px; height: 270px;
}
#redFrameB {
  top: 140px;  left: 645px;
  width: 570px; height: 270px;
}
#redFrameC {
  top: 420px;  left: 45px;
  width: 570px; height: 270px;
}
#redFrameD {
  top: 420px;  left: 645px;
  width: 570px; height: 270px;
}

/* ▼▼ 順位(何位)・名前・時間を分けて表示する5組(合計15要素) ▼▼
   #rankPos1..5, #rankName1..5, #rankTime1..5
*/
#rankPos1, #rankPos2, #rankPos3, #rankPos4, #rankPos5,
#rankName1, #rankName2, #rankName3, #rankName4, #rankName5,
#rankTime1, #rankTime2, #rankTime3, #rankTime4, #rankTime5 {
  position: absolute;
  z-index: 9999;
  display: none;              /* JSで必要時に表示 */
  font-size: 2.4em;
  color: #4f5a66;
  background-color: transparent;
  padding: 8px;
  width: 200px;               /* 独自に調整 */
  white-space: nowrap;        /* 折り返さない */
  overflow: visible;          /* はみ出した部分を見えるままに */
}

/* 例: 何位を左側、名前を中央、時間を右側のレイアウトを試みる */
#rankPos1  { top: 122px; left:  124px; }
#rankName1 { top: 122px; left: 260px; }
#rankTime1 { top: 122px; left: 1080px; }

#rankPos2  { top: 245px; left:  124px; }
#rankName2 { top: 245px; left: 260px; }
#rankTime2 { top: 245px; left: 1080px; }

#rankPos3  { top: 368px; left:  124px; }
#rankName3 { top: 368px; left: 260px; }
#rankTime3 { top: 368px; left: 1080px; }

#rankPos4  { top: 491px; left:  124px; }
#rankName4 { top: 491px; left: 260px; }
#rankTime4 { top: 491px; left: 1080px; }

#rankPos5  { top: 614px; left:  124px; }
#rankName5 { top: 614px; left: 260px; }
#rankTime5 { top: 614px; left: 1080px; }

/* コンテナ全体に perspective を付ける場合（任意） */
.container {
  perspective: 800px;
}

/* 0.6秒かけて 縦方向(rotateX)に 90deg→0deg へ回転しながら、不透明度0→1 */
@keyframes flipCenter {
  0% {
    transform: rotateX(90deg);
    opacity: 0;
  }
  100% {
    transform: rotateX(0deg);
    opacity: 1;
  }
}

.flipCenter {
  animation: flipCenter 1.0s ease forwards;
  transform-origin: center center; /* 回転の中心を要素中央に */
  display: inline-block;           /* インライン要素ならこうする */
}

/* クイズコンテナ */
#quizContainer {
  max-width: 90%;
  margin: 0 auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 10px;
  text-align: center;
}

/* 問題文を大きく表示 */
.questionText {
  font-size: 4em;
  margin-bottom: 20px;
}

/* 前問の回答表示 */
.previousAnswer {
  font-size: 2.5em;
  margin-bottom: 15px;
}

/* クイズフォーム（選択肢） */
.quizForm {
  text-align: center;
}

/* 各選択肢項目 */
.choiceItem {
  margin: 15px 0;
}

/* 選択肢ラベルを大きく */
.choiceLabel {
  font-size: 3em;
  margin-left: 10px;
}

/* 送信ボタン */
.submitButton {
  font-size: 2em;
  padding: 10px 30px;
  margin-top: 20px;
  border: none;
  border-radius: 5px;
  background-color: #0077cc;
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submitButton:hover {
  background-color: #005fa3;
}

input[type="radio"] {
  transform: scale(2.0);
  margin: 0 5px; /* 必要に応じて調整してください */
}

/* スマホ向けの調整（画面幅600px以下の場合） */
@media (max-width: 600px) {
  #quizContainer {
    padding: 20px;
  }
  .questionText {
    font-size: 2em;
  }
  .previousAnswer {
    font-size: 1.2em;
  }
  .choiceLabel {
    font-size: 1.8em;
  }
  .submitButton {
    font-size: 1.8em;
    padding: 8px 24px;
  }
}
