/* すべての要素に対してボックスサイズをborder-boxに設定（paddingやborderを含めたサイズ計算） */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; 
}

/* html全体の余白と高さ設定 */
html {
  margin: 0;
  height: 100%;
}

/* bodyの基本スタイル設定（中央配置など） */
body {
  margin: 0;
  height: 100vh;
  font-family: sans-serif;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ゲーム全体のコンテナ */
.container {
  margin: 0 auto;
  background: #ffffff;
  border: 2px solid #333;
  width: 100%;
  max-width: 1196px;
  height: 540px;
  display: flex;
  flex-direction: column;
  background-image: url("assets/bg.png"); /* 背景画像 */
  background-size: cover;
  background-position: center;
  user-select: none;
  -webkit-user-select: none;
}

/* ヘッダー部分（時間やスコア表示） */
.game-header {
  height: 50px;
  padding: 10px 14px;
  flex: 0 0 50px;
  display: flex;
  align-items: center;
}

/* 情報表示エリア */
.info {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: bold;
  width: 100%;
  font-size: 20px;
}

/* メインゲームエリア */
.game-main {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
}

/* 共通ボタンスタイル */
.btn {
  padding: 18px 40px;
  font-size: 24px;
  font-weight: bold;
  border: none;
  border-radius: 999px;
  background: #18c56e;
  color: white;
  cursor: pointer;
  box-shadow: 0 6px #0e9f56;
  transition: all 0.15s ease;
}

/* ホバー時 */
.btn:hover {
  background: #1edc7c;
}

/* クリック時 */
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 2px #0e9f56;
}

/* ゲーム中のパネル */
.game-panel {
  width: 100%;
  height: 100%;
  display: none; /* 初期は非表示 */
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px 28px 24px;
  position: relative;
}

/* 絵文字表示エリア */
.emoji-display {
  font-size: 92px;
  line-height: 1;
  margin-top: 8px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 選択肢エリア */
.choice-area {
  width: min(720px, 100%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 18px;
}

/* 選択ボタン */
.choice-btn {
  width: 100%;
  padding: 18px 20px;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  border: 3px solid #70a1ff;
  border-radius: 999px;
  background: white;
  color: #333;
  transition: 0.15s ease;
  box-shadow: 0 5px rgba(112, 161, 255, 0.35);  
}

/* ホバー時 */
.choice-btn:hover {
  background: #eaf3ff;
  border-color: #4f8cff;
  transform: translateY(-1px);
}

/* クリック時 */
.choice-btn:active {
  transform: scale(0.98);
}

/* 不正解ボタン */
.choice-btn.wrong {
  background-color: #dcdde1;
  opacity: 0.55;
  pointer-events: none;
  box-shadow: none;
}

/* 無効時 */
.choice-btn:disabled:hover {
  background: #dcdde1;
  border-color: #70a1ff;
  transform: none;
}

/* コレクションエリア */
.collection-area {
  margin-top: 24px;
  padding-top: 14px;
  width: min(720px, 100%);
  min-height: 90px;
  border-top: 2px dashed #70a1ff;
  text-align: center;
}

/* ラベル */
.collection-label {
  margin: 0 0 8px;
  font-size: 16px;
  color: #7f8c8d;
  font-weight: bold;
}

/* アイテム表示 */
.items {
  min-height: 44px;
}

/* 取得アイテム */
.collected-item {
  font-size: 34px;
  display: inline-block;
  margin: 0 3px;
  animation: pop 0.3s ease-out;
}

/* ポップアニメーション */
@keyframes pop {
  0% {
    transform: scale(0);
  }
  80% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* 結果画面 */
.result {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  padding: 20px;
}

/* タイトル */
.result-title {
  margin: 0;
  font-size: 34px;
}

/* スコア表示 */
.result-text {
  margin: 0;
  font-size: 30px;
  font-weight: bold;
}

/* 新記録 */
.new-record {
  font-size: 24px;
  font-weight: bold;
  color: #f59e0b;
  margin: 4px 0;
}

/* アイテム表示 */
.result-items {
  font-size: 34px;
  line-height: 1.4;
  min-height: 48px;
  max-width: 80%;
  word-break: break-word;
}

/* 判定マーク */
.judge-mark {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: 220px;
  height: 220px;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
}

/* 表示状態 */
.judge-mark.show {
  display: flex;
}

/* 正解 */
.judge-mark.correct::before {
  content: "◯";
  font-size: 190px;
  line-height: 1;
  color: rgba(255, 90, 90, 0.72);
  font-weight: bold;
}

/* 不正解 */
.judge-mark.wrong::before {
  content: "×";
  font-size: 180px;
  line-height: 1;
  color: rgba(60, 130, 255, 0.78);
  font-weight: bold;
}

/* 無効状態 */
.disabled {
  pointer-events: none;
}