@charset "UTF-8";
@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
.omikuji-explanation {
  font-family: "noto-sans-jp", sans-serif;
  text-align: center;
  text-shadow: 0px 0px 8px #fff, 0px 0px 8px #fff, 0px 0px 8px #fff, 0px 0px 8px #fff, 0px 0px 8px #fff, 0px 0px 8px #fff, 0px 0px 8px #fff, 0px 0px 8px #fff, 0px 0px 8px #fff, 0px 0px 8px #fff, 0px 0px 8px #fff;
}

/* おみくじ箱のコンテナを中央寄せ */
#omikuji-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* おみくじ箱の画像 */
#omikuji-box {
  margin-bottom: 20px;
  /* 回転の中心を指定 */
  transform-origin: center;
  /* pointer-events: none; // アニメーション終了時の処理で制御するため削除 */
}

#omikuji-image {
  width: 200px;
  height: auto;
  animation: wobble 0.5s infinite alternate ease-in-out;
  /* Ensure the element can be transformed */
  display: inline-block;
}

@media (max-width: 760px) {
  #omikuji-image {
    width: 150px;
    height: auto;
  }
}
@keyframes wobble {
  0% {
    transform: rotate(0deg) translate(0, 0);
  }
  25% {
    /* Tilt slightly left and move a little */
    transform: rotate(-1.5deg) translate(-1px, -1px);
  }
  50% {
    /* Tilt slightly right and move a little */
    transform: rotate(1.5deg) translate(1px, 1px);
  }
  75% {
    /* Tilt slightly left again and move a little */
    transform: rotate(-1deg) translate(-0.5px, -0.5px);
  }
  100% {
    /* Return to original state (optional, as 'alternate' handles the reverse) */
    transform: rotate(0deg) translate(0, 0);
  }
}
/* ================================================== */
/* ⭐︎ 修正箇所 1: 回転アニメーションの定義を修正 */
/* -------------------------------------------------- */
/* 回転中に透明度は変化せず、最後の瞬間に消える */
@keyframes rotateBox {
  0% {
    transform: rotate(0deg);
    opacity: 1; /* 開始時は不透明 */
  }
  100% {
    /* 360度回転 */
    transform: rotate(360deg);
    opacity: 0;
  }
}
/* JavaScriptで付与する回転中のクラス */
.is-rotating {
  animation: rotateBox 1s ease-out forwards; /* 1秒間で回転 */
}

/* ボタンのスタイル（任意） */
#draw-button,
#reset-button {
  padding: 8px 15px;
  font-size: 1em;
  cursor: pointer;
  border: none;
  border-radius: 5px;
  background-color: #b82343;
  color: white;
  box-shadow: 0 4px #8e1c35;
  transition: background-color 0.3s;
}

#draw-button:hover,
#reset-button:hover {
  background-color: #8e1c35;
}

/* 結果表示エリアのスタイル */
#result-area {
  /* 変更なし */
  width: 100%;
  max-width: 800px;
  margin: 10px auto;
  padding: 30px;
  border: 3px solid transparent;
  border-radius: 10px;
  background-color: #fff8dc;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

/* 和歌の表示 */
#waka-poem {
  background-color: #fffaf0;
  padding: 20px;
  border: 1px solid #333;
  margin-top: 10px;
}

.poem {
  font-family: "Kaisei HarunoUmi", serif;
  font-size: 1.3em;
  margin: 15px auto;
  line-height: 1.8;
  /* 縦書きは維持 */
  writing-mode: vertical-rl;
  text-align: start;
  display: block;
}

.poet-name {
  font-size: 0.75em;
  margin: 0 0 0 5px;
  display: block;
  text-align: center;
  margin-bottom: 8px;
}

.meaning {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 20px;
  white-space: pre-wrap;
  text-align: left;
}

/* 解釈のセクション */
.interpretation-section {
  margin: 0.5em 0 2em;
  padding: 10px;
  border-left: 5px solid #b82343;
  text-align: left;
  background-color: #fffaf0;
}

.interpretation-section h4 {
  color: #b82343;
  margin-top: 0;
  font-size: 1.1em;
}

/* 非表示にするクラス */
.hidden {
  display: none !important;
}

/* 結果表示エリア内の各要素の初期状態（透明） */
#result-area h2,
#result-area .poem,
#result-area .meaning,
#result-area hr,
#result-area h3,
#result-area .interpretation-section,
#result-area #reset-button {
  /* 最初は透明 */
  opacity: 0;
  /* フェードインの滑らかなアニメーションを設定 */
  transition: opacity 0.3s ease-in-out;
  /* 少し上に移動した状態から始める（オプション） */
  transform: translateY(10px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

/* JavaScriptでこのクラスを付与し、要素を表示させる */
.show-item {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

h2 {
  font-family: "Kaisei HarunoUmi", serif;
  font-weight: normal;
  color: #b82343;
}

p {
  font-size: 1em;
  margin-top: 0.5em;
}

#interp-love,
#interp-work {
  white-space: pre-wrap;
}/*# sourceMappingURL=omikuji.css.map */