body {
  font-family: "Kiwi Maru", serif;
  background: linear-gradient(to bottom, #fdfbfb, #ebedee);
  color: #333;
  text-align: center;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.container:hover {
  transform: scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

h1 {
  color: #d26c1f;
  font-size: 36px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
  margin-bottom: 25px;
  font-family: "Rampart One", sans-serif;
}

h2,
h3 {
  color: #f67c1f;
  font-size: 28px;
  margin-bottom: 20px;
  font-weight: bold;
  line-height: 1.5;
}

h4 {
  font-size: 18px;
  line-height: 1.6;
  color: #555;
}

button {
  font-size: 18px;
  padding: 20px 30px;
  margin: 10px;
  background: linear-gradient(to right, #ffce57, #f9a32b);
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

button:hover {
  background: linear-gradient(to right, #f9a32b, #d87b1f);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

button:active {
  background: #d87b1f;
  transform: translateY(2px);
  box-shadow: none;
}

.timer {
  font-size: 24px;
  font-weight: bold;
  color: #333;
  margin: 20px 0;
}

#yomifuda {
  font-size: 30px;
  color: #444;
  font-weight: bold;
  margin: 20px 0;
}

/*
#fuda-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
  justify-items: center;
  margin-top: 20px;
  position: relative;
}
*/

/*
#fuda-container button {
  font-size: 14px;
  padding: 10px;
  width: 120px;
  height: 50px;
  background: #ffffff;
  color: #333;
  border: 2px solid #f67c1f;
  border-radius: 10px;
  cursor: pointer;
  text-align: center;
  transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
*/

#fuda-container button.correct {
  background: #dff0d8;
  color: #3c763d;
  border-color: #d6e9c6;
}

#fuda-container button.incorrect {
  background: #f2dede;
  color: #a94442;
  border-color: #ebccd1;
}

#fuda-container button:hover {
  background: #f9f9f9;
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#fuda-container button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#fuda-container button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#result-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
  padding: 30px;
  background: #ffffff;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 画像専用コンテナを横並びに */
.result-images {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 30px;  /* 画像間の余白を設定 */
  width: 100%;
}

/* 画像の共通スタイル（中央揃えの余白などは不要になるか調整） */
.result-images img {
  width: 150px;
}

/*
#result-area img {
  display: block; // インライン要素の余白をなくす 
  margin: 5px auto; // 上下10px、左右自動で中央揃え 
  width: 150px;
}
*/

#result-message {
  font-size: 24px;
  color: #333;
  margin-bottom: 20px;
}

#final-result {
  margin-top: 30px;
  padding: 40px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#final-result h2 {
  font-size: 30px;
  margin-bottom: 20px;
}

#final-result p {
  font-size: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  h1 {
    font-size: 28px;
  }
  h2,
  h3 {
    font-size: 24px;
  }
  button {
    font-size: 16px;
  }
  .timer {
    font-size: 20px;
  }
}

#fuda-container {
  position: relative;
  width: 100%;
  height: 400px;
  border: 2px solid #ccc;
  overflow: hidden;
}

/* 修正前
#fuda-container button {
  border: none;
  background: none;
  padding: 5px;
  cursor: pointer;
}

#fuda-container button img {
  width: 100px; // 適切なサイズに調整 
  height: auto;
}
*/

/* 修正後 */
#fuda-container button {
  width: 110px;
  height: 110px;
  padding: 0;
  border: 2px solid #f67c1f; /* 枠線を追加 */
  background: #f8f8ff; /* 背景を追加 */
  margin: 5px; /* ボタン同士の間隔調整 */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#fuda-container button img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 画像の縦横比を保ちつつボタン枠内に収める */
}

.fuda-button {
  position: absolute;
  padding: 10px;
  background-color: #f8c8dc;
  border-radius: 5px;
  border: none;
  cursor: pointer;
}

img {
  max-width: 100%;
  height: auto;
}

/* Small screen adjustments */
@media (max-width: 600px) {
  .container {
    padding: 10px; /* 余白を小さめに調整 */
    /* ...existing styles... */
  }
  /* 必要に応じて他の要素の調整も追加 */
}
