@charset "UTF-8";
/* CSS Document */

.suruCSS {
  font-family: sans-serif;
  background: #fdfdfd;
  padding: 1em;
  border: 1px solid #ccc;
  max-width: 400px;
  margin: 10px auto;
  text-align: center;
}

.suruCSS .choices button {
  margin: 0.5em;
  padding: 0.5em 1em;
  font-size: 16px;
  cursor: pointer;
}

.suruCSS .result-area {
  display: flex;
  justify-content: space-around;
  margin-top: 1em;
  align-items: center;
}

.suruCSS .score-board {
  margin-top: 1em;
  font-size: 16px;
}

.suruCSS #resetBtn {
  margin-top: 1em;
  padding: 0.4em 1.2em;
  background-color: #9999ff;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.suruCSS .choices {
  display: flex;
  justify-content: space-around;
  margin-top: 1em;
  flex-wrap: wrap;
}

.suruCSS .choices button {
  background-color: #f0f8ff;
  border: 1px solid #aaa;
  border-radius: 8px;
  padding: 0.5em;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  width: 100px;
  margin: 0.5em;
}

.suruCSS .choices button img {
  display: block;
  margin: auto;
  margin-bottom: 0.5em;
}

.suruCSS .message-area {
  margin-top: 1em;
  font-size: 18px;
  font-weight: bold;
  min-height: 1.5em;
}

/* 色分け（クラスに変更） */
.win { color: red; font-weight: bold; }
.loss { color: green; font-weight: bold; }
.tie { color: blue; font-weight: bold; }

/* モバイル対応 */
@media screen and (max-width: 480px) {
  .suruCSS {
    padding: 0.5em;
  }

  .suruCSS .result-area {
    flex-direction: row; /* ← column → row に変更 */
    justify-content: space-around;
    align-items: center;
    gap: 0.5em; /* 任意で少し間隔を入れる */
  }

  .suruCSS .choices {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
  }

  .suruCSS .choices button {
    width: 30%;
    font-size: 14px;
    margin: 0.3em;
  }

  .suruCSS #resetBtn {
    width: 100%;
    font-size: 16px;
  }
}

.suruCSS .choices button.clicked {
  animation: clickFlash 0.8s ease;
  background-color: #cce5ff;
  transform: scale(1.1);
}

@keyframes clickFlash {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* 回転アニメーション */
@keyframes rotateEffect {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}
/*
.rotate {
  animation: rotateEffect 1s ease-in-out;
}
*/
.rotate {
  animation: rotateEffect 2s ease-in-out;
}
