* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  background: rgb(5, 181, 224);
}

/* Home */
h1 {
  text-align: center;
  margin: 100px;
  color: #fff;
  font-size: 4em;
  text-shadow: 5px 5px 10px #333;
}
h2 {
  text-align: center;
  margin: 100px;
  color: #fff;
  font-size: 3em;
  text-shadow: 5px 5px 10px #333;
}
.ch {
  font-family: "microsoft yahei", "SF Pro SC", "宋体";
}
.container {
  display: flex;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}
.container main .wrapper {
  width: 80%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 100px auto;
}
/* .box {
  width: 100%;
  height: 50px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2em;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: bold;
}
.box:hover {
  background: darkblue;
  color: #fff;
} */
a {
  text-decoration: none;
}

main {
  background: rgb(5, 181, 224);
  margin: 80px auto 0 auto;
  border-radius: 10px;
  width: 95%;
}

.startBx {
  display: flex;
  max-width: 700px;
  margin: 50px 30px;
  padding: 30px;
  border-radius: 20px;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: rgb(5, 181, 224);
  background: #fff;
}
.startBx.hide {
  display: none;
}
.startBx h2 {
  color: #28344e;
  font-size: 4em;
}
main button {
  display: block;
  width: 200px;
  height: 50px;
  font-size: 22px;
  font-weight: bold;
  margin: 10px;
}
.textInt {
  height: 40px;
  width: 50px;
  font-size: 1.5em;
  text-align: center;
}
.startBx span {
  font-size: 1.5em;
  color: #333;
}

/* typingBx */
.start {
  display: block;
}
.typingBx {
  max-width: 700px;
  margin: 50px 30px;
}
.typingBx.active {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
}
.typingBx.hide {
  display: none;
}

.question-number {
  font-size: 18px;
  color: #009688;
  font-weight: 600;
  line-height: 25px;
}

.typingBx header {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 70px;
  padding: 0 30px;
  background: #fff;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0px 5px 5px 1px rgba(0, 0, 0, 0.1);
}
header .title {
  font-size: 2em;
  color: #28344e;
}

header .timer {
  color: #004085;
  background: #fff;
  border: 1px solid #fff;
  height: 45px;
  width: 400px;
  padding: 0 8px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .timer .timer_sec {
  height: 50px;
  width: 210px;
  font-size: 30px;
  font-weight: 500;
  border-radius: 5px;
  background-color: #28344e; /*紺色*/
  position: relative;
  text-align: center;
  line-height: 50px;
  color: #fff;
  margin: 5px auto;
}

header .timer .timer_sec.ani {
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  line-height: 50px;
  text-align: center;
  user-select: none;
  position: relative;
}
.start {
  width: 160px;
}
header .time_line {
  position: absolute;
  bottom: 0px;
  left: 0px;
  height: 3px;
  background: #007bff;
}

section {
  padding: 25px 30px 20px 30px;
  background: #fff;
  position: relative;
}

#ios {
  position: absolute;
  opacity: 0;
  font-size: 16px;
}
#text,
#ios {
  font-size: 4em;
  font-weight: bold;
  color: #666;
  text-align: center;
  word-break: break-word;
}

#jp,
#ch {
  font-size: 2em;
  font-weight: bold;
  color: #666;
  text-align: center;
}
#ch {
  font-family: "Microsoft YaHei";
}

span {
  transition: all 0.3s 0s ease;
  position: relative;
}

.addBlue {
  font-size: 0.5em;
  color: #00f;
}
.addRed {
  color: red;
}

.currentType,
.miss {
  color: red;
  font-size: 1.5em;
}

p,
.span {
  font-size: 1.5em;
}

span.active::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 5px;
  height: 4px;
  width: 100%;
  opacity: 0;
  background: #17a2b8;
  animation: blink 1s ease-in-out infinite;
}
@keyframes blink {
  50% {
    opacity: 1;
  }
}

/* resultBx */
.resultBx {
  max-width: 700px;
  margin: 100px auto;
  border-radius: 10px;
  box-shadow: 3px 3px 10px blue;
}
.resultBx.hide {
  display: none;
}

.resultBx p {
  font-size: 2em;
}
.resultBx .totalCurrentType,
.resultBx .totalMiss,
.resultBx .totalTimer_sec,
.resultBx .totalAve {
  font-size: 2em;
  font-weight: bold;
  color: crimson;
}
.resultBx input {
  width: 70%;
  border: none;
}
.resultBx #name,
.resultBx #studentNum {
  font-size: 2rem;
}
.resultBx input[type="submit"] {
  width: 80px;
  padding: 0.5rem 1rem;
  margin: 0 auto;
  display: block;
  margin-top: 30px;
}
.resultBx button {
  width: 200px;
  margin: 50px auto;
}

.content-table {
  border-collapse: collapse;
  margin: 25px auto;
  font-size: 1.2rem;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}
.content-table thead tr {
  background: #005498;
  color: #ffffff;
  text-align: center;
  font-weight: bold;
}
.content-table th,
.content-table td {
  padding: 12px 15px;
  background: none;
}
.content-table tbody tr {
  border-bottom: 1px solid #dddddd;
  transition: 0.8s all ease;
}
.content-table tbody tr:nth-of-type(even) {
  background: #f3f3f3;
}
.content-table tbody tr:last-of-type {
  border-bottom: 2px solid #005498;
}
.content-table tbody tr:hover {
  font-weight: bold;
  color: #005498;
}

@media screen and (max-width: 970px) {
  .container {
    display: grid;
    grid-template:
      "main"
      "aside";
  }
  main {
    margin: 80px auto 0 auto;
  }
  .container aside {
    margin: 50px auto 30px auto;
  }
}

@media (max-width: 650px) {
  h1 {
    font-size: 2em;
    margin: 30px;
  }
  h2,
  .startBx h2 {
    font-size: 1.5em;
    margin: 10px;
  }

  .container {
    display: flex;
    flex-direction: column;
  }
  .container main .wrapper {
    margin: 30px auto;
  }

  .typingBx header {
    max-height: 150px;
    height: 100%;
  }
  .typingBx header .timer {
    height: auto;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .main {
    width: 99%;
  }
  h3 {
    text-align: center;
  }
  .content-table {
    font-size: 1rem;
  }
  .content-table th,
  .content-table td {
    padding: 10px 7px;
  }
  .date {
    font-size: 0.8rem;
  }

  .typingBx header {
    max-height: 140px;
  }
  #text {
    font-size: 2.5em;
    word-break: break-all;
  }
  #jp,
  #ch {
    font-size: 1.2em;
    margin: 5px auto;
  }
  .typingBx p {
    font-size: 1em;
  }

  .startBx,
  .typingBx,
  .resultBx {
    margin: 10px;
    padding: 5px;
  }
  .resultBx p {
    font-size: 1.3em;
  }
  .typingBx.active {
    width: 90%;
  }
}
