@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP&family=Roboto&display=swap");
body {
  margin: 0;
}

img {
  vertical-align: top;
}

* {
  font-family: "Roboto", "Noto Sans JP", sans-serif;
}

main {
  width: 650px;
  margin: 0 auto;
}

#first #top {
  margin-top: 50px;
  border: solid #4b0082 25px;
  padding: 40px;
  height: 235.625px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#first #top #title {
  font-size: 40px;
  font-weight: 700;
}
#first #top #sub-title {
  font-size: 18px;
  margin-top: 10px;
}
#first #start {
  margin-top: 40px;
}
#first #start #level {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
}
#first #start #start-btn {
  color: #fff;
  background: #4b0082;
  border: solid #4b0082 2px;
  text-align: center;
  line-height: 30px;
  font-size: 20px;
  font-weight: 700;
  width: 150px;
  height: 30px;
  padding: 8px 15px;
  border-radius: 27px;
  margin: 20px auto 45px auto;
  user-select: none;
  cursor: pointer;
}
#first #start #start-btn:hover {
  opacity: 0.8;
  background: #fff;
  color: #4b0082;
}

#play {
  display: none;
}
#play #display {
  margin-top: 50px;
  border: solid #4b0082 25px;
  padding: 40px;
  height: 235.625px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#play #display #question {
  font-size: 18px;
}
#play #display #number {
  font-size: 150px;
  font-weight: 700;
  margin-top: 15px;
}
#play #info ul {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 0;
  gap: 30px;
}
#play #info ul li {
  list-style: none;
}
#play #info ul li #escape-btn {
  padding: 3px 10px;
  color: #fff;
  background: #dc143c;
  border-radius: 5px;
  user-select: none;
  cursor: pointer;
}
#play #answer-btn {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  margin-top: 80px;
  pointer-events: none;
}
#play #answer-btn div {
  width: 200px;
  height: 100px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  user-select: none;
  cursor: pointer;
}
#play #answer-btn div span {
  font-size: 17px;
}
#play #answer-btn div:nth-child(1) {
  background: rgb(69, 108, 226);
  color: #fff;
}
#play #answer-btn div:nth-child(2) {
  background: #ffa500;
}
#play #answer-btn div:hover {
  opacity: 0.8;
}

#result {
  display: none;
}
#result #result-display {
  margin-top: 50px;
  border: solid #4b0082 25px;
  height: 315.625px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#result #result-display #result-title {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  font-size: 43px;
  font-weight: 700;
}
#result #result-display #result-title #result-level {
  font-size: 23px;
  font-weight: 700;
  margin-left: 10px;
}
#result #result-display #score {
  font-size: 120px;
  font-weight: 700;
}
#result #result-display #result-info {
  display: flex;
  flex-direction: row;
  gap: 40px;
  margin-top: 10px;
}
#result #result-display #result-info #rate,
#result #result-display #result-info #time {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 18px;
}
#result #details #right-wrong {
  display: flex;
  flex-direction: column;
}
#result #details #right-wrong table {
  border-collapse: collapse;
  border-spacing: 0;
  margin-top: 20px;
  text-align: center;
}
#result #details #right-wrong table th {
  background: rgba(75, 0, 130, 0.3764705882);
  border: solid 1px #000;
  padding: 3px 10px;
}
#result #details #right-wrong table td {
  border: solid 1px #000;
  padding: 3px 10px;
}
#result #details #links {
  display: flex;
  gap: 30px;
}
#result #details #links .link {
  margin-top: 20px;
  width: 196.6666666667px;
  height: 35px;
  line-height: 35px;
  text-align: center;
  border: solid #4b0082 2px;
  border-radius: 17.5px;
  user-select: none;
  cursor: pointer;
}
#result #details #links .link:hover {
  background: rgba(75, 0, 130, 0.2509803922);
}
#result #details #links .link a {
  display: block;
  height: 100%;
  color: #000;
  text-decoration: none;
}

footer {
  width: 650px;
  margin: 0 auto;
  margin-top: 100px;
  font-size: small;
}
footer ul {
  display: flex;
  gap: 40px;
}

@media screen and (max-width: 650px) {
  main {
    width: 95%;
  }
  #first #top {
    padding: 20px;
  }
  #play #display #number {
    font-size: 120px;
  }
  #play #info ul {
    flex-direction: column;
    align-items: first baseline;
    gap: 0;
  }
  #play #answer-btn {
    margin-top: 20px;
  }
  footer {
    width: 95%;
  }
}
@media screen and (max-width: 480px) {
  #first #top {
    border: solid 20px #4b0082;
    padding: 15px;
    text-align: center;
  }
  #start #level {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
  #play #answer-btn div {
    width: 130px;
  }
  #result #result-display #score {
    font-size: 90px;
  }
  #result #details #right-wrong {
    width: 100%;
    overflow: scroll;
  }
  #result #details #links {
    gap: 15px;
  }
}