body {
  background-color: #ECECFF;
  display: flex;
  flex-direction: column;
}

header {
  margin: 1.2rem auto 0.8rem;
  font-family: "Lolita", "STXihei", "Source Han Sans", "Microsoft YaHei", "SimHei", sans-serif;
  color: #8246E8;
}

.intro {
  min-width: 35rem;
  padding: 0.8rem;
  margin: 1.2rem auto;
  font-size: small;
  text-align: center;
  background-color: #FFCCCC;
  border-radius: 3px;
  box-shadow: 0 0 5px grey;
}

hr {
  width: 60%;
  min-width: 40rem;
  margin: 0.5rem auto;
}

main {
  width: 50%;
  margin: 1.5rem auto;
  min-width: 40rem;
}

/* 表格样式 */
table {
  table-layout: fixed;
  width: 100%;
  margin: 0 auto;
  border-spacing: 0 0.8rem;
  min-width: 40rem;
}

th {
  background-color: #FFFFCC;
  padding: 0.5rem;
}

th img {
  height: 0.8rem;
  margin: 0.1rem;
}

/* 列宽定义 */
thead th:nth-child(1) {
  border-radius: 3px 0 0 3px;
  width: 50%;
}

thead th:nth-child(2) {
  width: 3rem;
}

thead th:nth-child(3) {
  width: 3rem;
}

thead th:nth-child(4) {
  width: 5rem;
}

thead th:nth-child(5) {
  border-radius: 0 3px 3px 0;
  width: 5rem;
}

/* 行样式 */
tr {
  border-radius: 3px; /* 边框样式只影响阴影效果 */
  box-shadow: 0 0 3px grey;
}

tbody tr {
  transition: box-shadow 0.5s;
}

/* 单元格样式 */
td {
  padding: 1rem;
  vertical-align: middle;
  text-align: center;
}

/* 各列样式 */
tbody td:nth-child(5n+1) {
  display: flex;
  flex-direction: column;
  text-align: left;
}

tbody td:nth-child(5n+2),
tbody td:nth-child(5n+4),
tbody td:nth-child(5n+5) {
  padding: 0 0.5rem;
}

tbody td:nth-child(5n+2) img {
  display: block;
  width: 100%;
  height: 2.5rem;
  object-fit: contain;
}

tbody td:nth-child(5n+4) img,
tbody td:nth-child(5n+5) img {
  height: 1.5rem;
}

tbody td img:hover {
  cursor: pointer;
}

/* 奇偶行样式 */
tbody tr:nth-child(even) td {
  background-color: #CCFFFF;
}

tbody tr:nth-child(odd) td {
  background-color: #CCFFCC;
}

tbody tr:nth-child(even):hover {
  box-shadow:
    0.5rem 0.5rem 0.5rem 1px rgba(0, 0, 0, 0.7),
    0 0 0.5rem 0.1rem #CCFFFF;
}

tbody tr:nth-child(odd):hover {
  box-shadow:
    0.5rem 0.5rem 0.5rem 1px rgba(0, 0, 0, 0.7),
    0 0 0.5rem 0.1rem #CCFFCC;
}

tbody tr td:first-child {
  border-radius: 3px 0 0 3px;
}

tbody tr td:last-child {
  border-radius: 0 3px 3px 0;
}

.detail {
  height: 0;
  display: none;
  opacity: 0;
  font-size: small;
}

.detail p {
  margin: 0.5rem;
}

/* 文章视窗样式 */
#viewer {
  width: 100%;
  height: 100%;
  position: fixed;
  opacity: 0;
  display: none;
  background-color: rgba(128, 128, 128, 0);
  transition: opacity 0.5s, background-color 0.5s;
}

#viewer iframe {
  width: 90%;
  height: 85%;
  margin: 5rem auto;
  display: block;
  border: 1px solid #8246E8;
  border-radius: 5px;
  box-shadow: 0 0 10px #8246E8;
}


@media screen and (max-width: 40rem) {
  .intro {
    min-width: auto;
  }

  hr {
    width: 100%;
    min-width: auto;
  }

  main {
    width: auto;
    min-width: auto;
  }

  table {
    min-width: auto;
  }

  thead th:nth-child(2) {
    width: auto;
  }

  thead th:nth-child(4) {
    width: auto;
  }

  thead th:nth-child(5) {
    width: auto;
  }

  #viewer iframe {
    width: 100%;
  }
}
