/*-----基礎-----*/
html {
  font-family: serif;
}

table {
  width: 100%;
  height: auto;
  margin: 0 auto;
  user-select: none;
}

tr {
  width: 100%;
  height: auto;
  margin: 0 auto;
  user-select: none;
}

th {
  width: 100%;
  height: auto;
  margin: 0 auto;
  user-select: none;
}

p {
  text-align: center;
  margin: 0 auto;
  margin-bottom: 1%;
}

#mainboard {
  width: 100%;
  height: auto;
}
/*----------*/

/*-----説明書css-----*/
#explanation_menu_table {
  width: 90%;
}
.menu_tr {
  margin: 0 auto;
}
.menu_th {
  margin: 0 auto;
  width: 25%;
}
.menu_div1 {
  margin: 0 auto;
  width: 100%;
  height: 30px;
  border: solid 1px;
  background: rgb(255, 147, 80);
  transition: 0.5s;
}
.menu_div1:hover {
  color: #fff;
  background: rgb(14, 107, 31);
  border-radius: 5px;
}
.menu_div2 {
  margin: 0 auto;
  width: 100%;
  height: 30px;
  border: solid 1px;
  background: rgb(255, 221, 86);
  transition: 0.5s;
}
.menu_div2:hover {
  color: #fff;
  background: rgb(14, 107, 31);
  border-radius: 5px;
}
#explanation_table {
  width: 90%;
  background-color: rgb(186, 213, 254);
}
.title_div {
  margin: 0 auto;
  width: 100%;
  height: 25px;
  background-color: rgb(36, 50, 113);
}
.title_p {
  height: 100%;
  margin: 0 auto;
  color: white;
  text-align: left;
  padding-left: 5px;
}
.explanation_div {
  margin: 0 auto;
  width: 100%;
  height: auto;
}
.explanation_p {
  height: 100%;
  margin: 0 auto;
  text-align: left;
  padding-left: 5px;
}
.image_div {
  width: 100%;
  height: auto;
  background-repeat: no-repeat;
  background-size: contain;
}
.video_video {
  width: 100%;
  height: auto;
  background-color: #fff;
}
/*----------*/

/*-----8角形css-----*/
#octagon_scene {
  width: 100%;
  height: 500px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
}

#octagon_css_heart {
  position: absolute;
  margin-left: auto;
  margin-right: auto;
  margin-top: 250px;
  width: 1px;
  height: 1px;
  display: flex;
  justify-content: center;
}

#octagon_heart {
  margin-left: auto;
  margin-right: auto;
  width: 200px;
  height: 1px;
  background-color: none;
  > div {
    position: absolute;
    width: 200px;
    height: 1px;
    background-color: none;
    > div {
      position: absolute;
      width: 200px;
      height: 70px;
      background-color: #254f79;
      transform-origin: 100% 0%;
      transform: rotate(67.5deg) scale(0.7653668, 1);
    }
  }
}

#time_text {
  margin-top: auto;
  margin-bottom: auto;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  vertical-align: middle;
  text-align: center;
  font-size: 600%;
  pointer-events: none;
  user-select: none;
  color: #ebd127;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

.octagon_heart_count {
  animation: turnAround 8s linear 0s;
  animation-iteration-count: 5;
}

@keyframes turnAround {
  0% {
    transform-origin: 0% 0%;
    transform: rotateZ(0deg);
  }
  2%,
  12.5% {
    transform-origin: 0% 0%;
    transform: rotateZ(45deg);
  }
  14.5%,
  25% {
    transform-origin: 0% 0%;
    transform: rotateZ(90deg);
  }
  27%,
  37.5% {
    transform-origin: 0% 0%;
    transform: rotateZ(135deg);
  }
  39.5%,
  50% {
    transform-origin: 0% 0%;
    transform: rotateZ(180deg);
  }
  52%,
  62.5% {
    transform-origin: 0% 0%;
    transform: rotateZ(225deg);
  }
  64.5%,
  75% {
    transform-origin: 0% 0%;
    transform: rotateZ(270deg);
  }
  77%,
  87.5% {
    transform-origin: 0% 0%;
    transform: rotateZ(315deg);
  }
  89.5%,
  100% {
    transform-origin: 0% 0%;
    transform: rotateZ(360deg);
  }
}

.octagon_center_edge1 {
  transform-origin: 0% 0%;
  transform: rotate(45deg);
}

.octagon_center_edge2 {
  transform-origin: 0% 0%;
  transform: rotate(90deg);
}

.octagon_center_edge3 {
  transform-origin: 0% 0%;
  transform: rotate(135deg);
}

.octagon_center_edge4 {
  transform-origin: 0% 0%;
  transform: rotate(180deg);
}

.octagon_center_edge5 {
  transform-origin: 0% 0%;
  transform: rotate(225deg);
}

.octagon_center_edge6 {
  transform-origin: 0% 0%;
  transform: rotate(270deg);
}

.octagon_center_edge7 {
  transform-origin: 0% 0%;
  transform: rotate(315deg);
}

.octagon_center_edge8 {
  transform-origin: 0% 0%;
  transform: rotate(360deg);
}

#octagon_edge1_id {
  background-image: url(img/3日月.png);
  background-size: 30% 70%;
  background-position: center;
  background-repeat: no-repeat;
}

#octagon_edge2_id {
  background-image: url(img/上弦の月.png);
  background-size: 30% 70%;
  background-position: center;
  background-repeat: no-repeat;
}

#octagon_edge3_id {
  background-image: url(img/12日月.png);
  background-size: 30% 70%;
  background-position: center;
  background-repeat: no-repeat;
}

#octagon_edge4_id {
  background-image: url(img/月はすっぽん.png);
  background-size: 30% 70%;
  background-position: center;
  background-repeat: no-repeat;
  align-self: flex-start;
}

#octagon_edge5_id {
  background-image: url(img/18日月.png);
  background-size: 30% 70%;
  background-position: center;
  background-repeat: no-repeat;
}

#octagon_edge6_id {
  background-image: url(img/下弦の月.png);
  background-size: 30% 70%;
  background-position: center;
  background-repeat: no-repeat;
}

#octagon_edge7_id {
  background-image: url(img/27日月.png);
  background-size: 30% 70%;
  background-position: center;
  background-repeat: no-repeat;
}

/*----------*/

/*-----ボタンcss-----*/
.button1 a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin: 0 auto;
  padding: 1em 2em;
  width: 100%;
  color: #333;
  font-size: 0.5em;
  font-weight: 500;
  background-color: #ccc;
  border-radius: 50vh;
  transition: 0.3s;
}

.button1 a::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border: 2px solid #c8c464;
  border-radius: 50vh;
  transition: 0.2s;
}

.button1 a::after {
  content: "";
  width: 5px;
  height: 5px;
  border-top: 3px solid #333333;
  border-right: 3px solid #333333;
  transform: rotate(45deg);
}

.button1 a:hover::before {
  top: 0;
  left: 0;
}

.button1 a:hover {
  text-decoration: none;
  background-color: #a0c4d3;
}

.button2 a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin: 0 auto;
  padding: 1em 2em;
  width: 100%;
  color: #333;
  font-size: 0.5em;
  font-weight: 500;
  background-color: #ccc;
  border-radius: 50vh;
  transition: 0.3s;
}

.button2 a::before {
  content: "";
  position: absolute;
  top: -5px;
  left: -5px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  border: 2px solid #459347;
  border-radius: 50vh;
  transition: 0.2s;
}

.button2 a::after {
  content: "";
  width: 5px;
  height: 5px;
  border-top: 3px solid #333333;
  border-right: 3px solid #333333;
  transform: rotate(45deg);
}

.button2 a:hover::before {
  top: 0;
  left: 0;
}

.button2 a:hover {
  text-decoration: none;
  background-color: #a0c4d3;
}

#button_box {
  display: flex;
  justify-content: center;
}

#starttime_button {
  margin-left: auto;
  margin-right: auto;
  display: inline-block;
  text-decoration: none;
  background: #90d665;
  color: rgba(0, 0, 0, 0.47);
  font-size: 120%;
  font-family: "Times New Roman", Times, serif;
  font-weight: bold;
  width: 120px;
  height: 120px;
  line-height: 120px;
  border-radius: 50%;
  text-align: center;
  overflow: hidden;
  box-shadow: 0px 0px 0px 5px #4c9e38;
  border: solid 2px rgba(255, 255, 255, 0.47);
  transition: 0.4s;
}

#starttime_button:hover {
  border-style: dashed;
}
/*----------*/

/*-----スマホ用-----*/
@media screen and (max-width: 480px) {
  /*-----8角形-----*/
  #octagon_scene {
    width: 100%;
    height: 360px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
  }

  #octagon_css_heart {
    position: absolute;
    margin-left: auto;
    margin-right: auto;
    margin-top: 180px;
    width: 1px;
    height: 1px;
    display: flex;
    justify-content: center;
  }

  #octagon_heart {
    margin-left: auto;
    margin-right: auto;
    width: 150px;
    height: 1px;
    background-color: none;
    > div {
      position: absolute;
      width: 150px;
      height: 1px;
      background-color: none;
      > div {
        position: absolute;
        width: 150px;
        height: 50px;
        background-color: #254f79;
        transform-origin: 100% 0%;
        transform: rotate(67.5deg) scale(0.7653668, 1);
      }
    }
  }

  #time_text {
    margin-top: auto;
    margin-bottom: auto;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    vertical-align: middle;
    text-align: center;
    font-size: 500%;
    pointer-events: none;
    user-select: none;
    color: #ebd127;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  }

  #octagon_edge7_id {
    text-align: center;
    font-size: 300%;
    pointer-events: none;
    user-select: none;
    color: #ebd127;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  }
  /*----------*/

  /*-----ボタン-----*/
  #button_box {
    display: flex;
    justify-content: center;
  }

  #starttime_button {
    margin-left: auto;
    margin-right: auto;
    display: inline-block;
    text-decoration: none;
    background: #90d665;
    color: rgba(0, 0, 0, 0.47);
    font-size: 90%;
    font-family: "Times New Roman", Times, serif;
    font-weight: bold;
    width: 100px;
    height: 100px;
    line-height: 100px;
    border-radius: 50%;
    text-align: center;
    overflow: hidden;
    box-shadow: 0px 0px 0px 5px #4c9e38;
    border: solid 2px rgba(255, 255, 255, 0.47);
    transition: 0.4s;
  }

  #starttime_button:hover {
    border-style: dashed;
  }
}
