@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Zen+Maru+Gothic:wght@300;400;500;700;900&display=swap');

html, body {
  font-size: 16px;
  background-color: #ffaa2b;
  font-family: 'Zen Maru Gothic', sans-serif;
}

h1 {
  color: #ffffff;
  text-align: center;
  font-size: 5rem;
  font-weight: 900;
  margin: 0 auto;
  margin-top: 1rem;
  	-webkit-animation: tracking-in-expand-fwd-bottom 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
	        animation: tracking-in-expand-fwd-bottom 0.8s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

h2 {
  color: #ffffff;
  text-align: center;
  font-size: 2rem;
  margin: 0 auto;
  margin-bottom: 2rem;
}
h3 {
  color: #ffffff;
  text-align: center;
  font-size: 1rem;
  margin: 2rem auto;
}

#container {
  background-color: #ffffff;
  width: 85%;
  border-radius: 1rem;
  margin: 0 auto;
  padding: 1.5rem;
}

#time {
  color: #ffaa2b;
  font-size: 9rem;
  text-align: center;
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0,139,253,0.25);
  margin: .5rem;
  font-family: "Roboto", sans-serif;
  font-weight: 900;
  font-style: normal;
}

#buttons {
  font-size: 3rem;
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap; /* ボタンが複数行になる場合のために追加 */
}

#start, #stop, #reset{
  width: 8rem;
  height: 8rem;
  font-size: 4rem;
  border-radius: 100vh;
  background-color: #3dc738;
  padding: 1rem;
  margin: 1rem 3rem;
  box-shadow: 0 0 20px rgba(77, 78, 79, 0.25);
  color: #fff;
  cursor: pointer;
  text-align: center;
  border: none;
}
/* ... 既存のCSSコード ... */

#button1 {
  width: 4rem;
  height: 4rem;
  font-size: 1.5rem;
  padding: 1rem;
  margin: 1rem;
  text-align: center;
  border-radius: 100vh;
  background-color: #8ae987;
  box-shadow: 0 0 20px rgba(77, 78, 79, 0.25);
  color: #2e3b47;
  cursor: pointer;
  border: none;
  /* 初期表示: 全画面表示ボタンは表示 */
  display: block;
}
#button2 {
  width: 4rem;
  height: 4rem;
  font-size: 1.5rem;
  padding: 1rem;
  margin: 1rem;
  text-align: center;
  border-radius: 100vh;
  background-color: #8ae987;
  box-shadow: 0 0 20px rgba(77, 78, 79, 0.25);
  color: #2e3b47;
  cursor: pointer;
  border: none;
  /* 初期表示: 全画面解除ボタンは非表示 */
  display: none;
}

/* ... 既存のCSSコード ... */
#start:disabled{
    background-color: #8ae987;
display: none;
}
#stop:disabled{
    background-color: #8ae987;
display: none;
}
#reset:disabled{
    background-color: #8ae987;
display: none;
}

/* ----------------------------------------------
 * Generated by Animista on 2024-5-22 21:20:24
 * Licensed under FreeBSD License.
 * See http://animista.net/license for more info. 
 * w: http://animista.net, t: @cssanimista
 * ---------------------------------------------- */

/**
 * ----------------------------------------
 * animation tracking-in-contract
 * ----------------------------------------
 */
@-webkit-keyframes tracking-in-contract {
  0% {
    letter-spacing: 1em;
    opacity: 0;
  }
  40% {
    opacity: 0.6;
  }
  100% {
    letter-spacing: normal;
    opacity: 1;
  }
}
@keyframes tracking-in-contract {
  0% {
    letter-spacing: 1em;
    opacity: 0;
  }
  40% {
    opacity: 0.6;
  }
  100% {
    letter-spacing: normal;
    opacity: 1;
  }
}

#itadakimasu {
  font-size: 6em; /* 非常に大きく表示 */
  color: #1da518;
  font-weight: bold;
  text-align: center;
  z-index: 10; /* 他の要素より手前に表示 */
  display: none; /* 初期状態では非表示 */
  animation: pop-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards; /* 表示アニメーション */
    margin-top: 1rem;
  margin-bottom: 1rem;
}

/* アニメーションのキーフレーム */
@keyframes pop-in {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  80% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 親要素 #container に position: relative; を追加して、absolute の基準にする */
#container {
  background-color: #ffffff;
  width: 85%;
  border-radius: 1rem;
  margin: 0 auto;
  padding: 1.5rem;
  position: relative; /* これを追加 */
  overflow: hidden; /* 子要素がはみ出さないように */
}


/* 画面を揺らすアニメーション */
@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }

  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%, 60% {
    transform: translate3d(4px, 0, 0);
  }
}

.shake {
  animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
}
