@media(prefers-color-scheme: light) {
  :root {
    --theme-background-color: #acceed;
    --theme-background-color-light: #dbecfc;
    --theme-background-color-deep: #92bee7;
    --pure-background-color: #f8fafc;
    --pure-background-color-deep: rgb(242, 242, 242);
    --border-color: #d1f3fc;
    --light-gray: 131,131,131;
  }
}

@media(prefers-color-scheme: dark) {
  :root {
    --theme-background-color: #acceed;
    --theme-background-color-light: #dbecfc;
    --theme-background-color-deep: #92bee7;
    --pure-background-color: #f8fafc;
    --pure-background-color-deep: rgb(242, 242, 242);
    --border-color: #d1f3fc;
    --light-gray: 131,131,131;
  }
}

:root {
  --font-family-defaut: '微软雅黑', 'Segoe UI', Tahoma, Verdana, sans-serif;
  --font-size-title: 24px;
  --font-size-content: 17px;
  --font-size-comment: 15px;
  --font-size-small: 13px;
}

a, abbr, acronym, address, applet, article, aside, audio, b, big, blockquote, body, canvas, caption, center, cite, code, dd, del, details, dfn, div, dl, dt, em, embed, fieldset, figcaption, figure, footer, form, h1, h2, h3, h4, h5, h6, header, hgroup, html, i, iframe, img, ins, kbd, label, legend, li, mark, menu, nav, object, ol, output, p, pre, q, ruby, s, samp, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, time, tr, tt, u, ul, var, video {
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline;
}

h1, h2, h3, h4, h5, h6, p {
  font-weight: inherit;
  margin-inline: inherit;
  margin-block: inherit;
}

ul, dl {
  list-style-type: none;
}

h1 {
  font-size: var(--font-size-title);
}

img {
  vertical-align: middle;
}

:focus-visible {
  outline: none;
}

a {
  font: inherit;

  transition: color 0.4s ease;
}

a:link, a:visited, a:active {
  text-decoration: unset;
  color: #4991e4;
}

a:hover, a:focus {
  color: #24476f;
  --text-decoration: underline;

  transition: color 0.4s ease;
  /*color: #c5ecf3;*/
}

hr {
  background-color: var(--border-color);
  height: 2px;
  padding: 0;
  margin: 24px 0;
  border: 0;
  --width: 80%;
}

code {
  font-family: console;
  padding: 3px;
  border: 1px, solid, var(--border-color);
  border-radius: 3px;
}

input[type=button], input[type=submit]{
  font-family: var(--font-family-defaut);
  font-size: var(--font-size-comment);
  font-weight: 500;
  background-color: var(--theme-background-color);
  color: var(--pure-background-color-deep);
  transition: background-color 0.4s ease;

  border: 1px;
  border-radius: 3px;
  padding: 8px 14px;
}

input[type=button]:hover, input[type=submit]:hover {
  cursor: pointer;
  background-color: var(--theme-background-color-deep);
  transition: background-color 0.4s ease;
}

body {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  font-family: var(--font-family-defaut);
  
  background-color: var(--pure-background-color);
  color: #484a46;
}

.announce {
  margin-top: 66px;
  font-size: var(--font-size-small);
  background-color: var(--theme-background-color-deep);
  padding: 3px;
}

.announce>* {
  margin: 0 1% 0 1%;
}

.header {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1145;

  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  flex-direction: row;
  max-height: 60px;
  padding: 3px 0.5em 3px 0.5em;

  background-color: var(--theme-background-color);
}

.header-left>*,
.header-right>* {
  padding: 0.5em;
  font-size: var(--font-size-comment);
}

.main-container {
  background-color: var(--pure-background-color);
  --margin: 0%;
  margin: 60px 9%;
  font-size: var(--font-size-content);
  height: 100%;
  min-width: 800px;
  /*max-width: 68em;*/
}

main {
  margin: 3% 0;
  min-width: 700px;
}

.column-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: nowrap;
}

.row-center {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  flex-wrap: nowrap;
}

.page-foot {
  width: 100%;
  --height: 7em;
  background-color: var(--theme-background-color-light);
  
  .footer-content {
    display: flex;
    justify-content: center;
    font-size: var(--font-size-small);
    text-align: center;
    padding: 1% 2% 1% 2%;

    p {
      margin: 5px;
    }
  }
}

.hide-text {
  transition-duration: .2s;
  transition-property: color;
  border: 2px solid var(--border-color);
}

.hide-text:not(:hover) {
  color: #0000;
}

.title-text {
  cursor: help;
  border-bottom: 2px dashed var(--border-color);
}

#comment-preload {
  --width: 60%;
}

.write-comment {
  display: flex;
  flex-direction: column;
  align-items: center;

  margin: 0em;
  /*padding: 1em;*/
  border: 1px solid var(--border-color);
  border-radius: 6px;

  background-color: var(--pure-background-color);

}

.write-comment textarea,
.write-comment input[type=text] {
  font-family: var(--font-family-defaut);

  position: relative;
  width: 100%;

  border: 0;
  padding: 0;
  padding: 0;
  margin: 4px 8px 4px 0;

  background-color: var(--pure-background-color);
}

.write-comment textarea:focus-visible,
.write-comment input[type=text]:focus-visible {
  outline-width: 3px;
  outline-style: solid;
  outline-color: var(--border-color);
}

.write-comment input[type=text] {
  border-top: 2px dashed var(--border-color);
  padding-top: 3px;
  line-height: 25px;
}

.write-comment textarea {
  min-height: 12em;
  resize: none;
}

.write-comment-name {
  font-family: var(--font-family-defaut);

  position: relative;
  width: 100%;
}

.write-comment .post-comment {
  width: 90%;
  display: flex;
  justify-content: center;
}

.more-comments {
  display: flex;
  justify-content: center;
}

#post-comment {
  float: right;
}

.cmt-line {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  margin: 1em 0 1em 0;

}

.cmt-user img {
  width: 2.5em;
  height: 2.5em;
}

.cmt-time {
  font-family: Console;
  font-size: var(--font-size-small);
  color: var(--light-gray);
}
.cmt-text {
  margin: 8px 0 8px 0;
  text-indent: 1em;
  font-size: var(--font-size-comment);
}

.cmt-name {
  margin: 0 5px 0 5px;
  font-family: var(--font-family-defaut);
  font-weight: 600;
}

.nav-list {
  position: relative;
}

main>div>img {
  width: 80%;
}

.list-dropdown-hidden:not(:hover) .list-dropdown {
  display: none;
  opacity: 0%;
}

.list-dropdown {
  display: block;
  position: absolute;
  left: 0;
  z-index: 400;

  padding: 7px 0;
  border-radius: 5px;

  background-color: var(--pure-background-color-deep);

  transform: translateX(-50%);
  transition-duration: .3s;
  transition-property: opacity;
  opacity: 100%;
}

.list-dropdown-ul {
  overflow-y: auto;
  padding-top: 0px;
  min-width: 70px;
  max-height: 210px;

  text-wrap: nowrap;

  background-image:
    radial-gradient(farthest-side at 50% 0, rgba(var(--light-gray), 0.3), #0000),
    radial-gradient(farthest-side at 50% 100%, rgba(var(--light-gray), 0.3), #0000);
  background-position: 0 0, 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 9px;
  z-index: 1;
}

.list-dropdown-ul>li {
  margin: 0 9px;
}

.list-dropdown-ul>li>* {
  display: block;
  padding: 11px 9px;
  border-radius: 5px;
  
  transition-duration: .3s;
  transition-property: background-color, color;
}

.list-dropdown-ul>li>*:hover {
  background-color: var(--theme-background-color-light);
}

.list-dropdown-ul::before, .list-dropdown-ul::after {
  background-color: var(--pure-background-color-deep);
  content: "";
  display: block;
  height: 10px;
  width: 100%;
  margin: 0 0 -10px;
  
}
.list-dropdown-ul::after {
  margin: -10px 0 0;
}

.nav-bar-left {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.nav-bar-left>li {
  margin: 0.3em 1em 0.3em 1em;
}


.top-container-frame {
  margin: 2em 0 2em 0;
  width: 80%;
}

.top-container-frame h2 {
  background-color: var(--theme-background-color-light);
}

.top-container {
  margin: 2em 0 2em 0;
  width: 80%;
}

.top-container h2,
.top-container-frame h2 {
  /* background-color: var(--theme-background-color-light); */
  font-size: 1.5em;
  /*font-weight: bold;*/
  margin: 0;
  padding: 8px;
}

.sub-container {
  border-top: 0;
  margin-top: 0;
  overflow: hidden;
  h3 {
    font-size: 1.2em;
    margin: 0;
  }
  p {
    line-height: 25px;
    margin-bottom: 1.2em;
  }
}


.sub-container>* {
  margin: 14px;
}

.select-links {
  display: flex;
  width: 100%;
}

.select-links a {
  background-color: var(--theme-background-color-light);

  width: 8em;
  height: 1.2em;
  padding: 1.2em 0;

  text-align: center;

  border-radius: 1.2em;
}

.f-r {
  float: right;
  clear: right;
  width: 50%;
}

.f-l {
  float: left;
  clear: left;
  width: 50%;
}

.border {
  border: 1px solid var(--theme-background-color-light);
}

.error-container {
  --position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  background-color: #f8d7da;
  border-radius: 6px;
  color: #721c24;
  max-height: 300px;
  --max-width: 600px;
  overflow-y: auto;
  margin: 0 auto;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 9999;

}

.error-header {
  font-weight: bold;

  display: flex;
  --background-color: #f5f5f5;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.error-header:hover {
  background-color: #f9e5e6;
}

.error-content {
  padding: 0;
  --background-color: #fff;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.error-header.active + .error-content {
    max-height: 1000px;
    padding: 0;
}

#errorContent {
  padding: 5px 10px;
}

.error-type {
  color: #dc3545;
  font-weight: bold;
}

.error-message {
  margin: 5px 0;
}

.error-stack {
  white-space: pre;
  --font-size: 0.9em;
  margin-top: 10px;
  background-color: #f1f1f1;
  padding: 8px;
  border-radius: 4px;
  overflow-x: auto;
}

.error-close-btn {
  background: none;
  border: none;
  color: #721c24;
  font-size: 1.2em;
  cursor: pointer;
}

.error-header.active .collapse-btn::before {
  transform: rotate(90deg);
}

.error-header.active .collapse-btn::after {
  transform: rotate(180deg);
  opacity: 0;
}

.error-item {
  --margin-bottom: 15px;
  padding-bottom: 15px;
  --border-bottom: 1px solid #f5c6cb;
}

.error-item:last-child {
  border-bottom: none;
}

.collapse-container {
  --max-width: 600px;
  margin: 0 auto;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.collapse-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  background-color: #f5f5f5;
  cursor: pointer;
  transition: background-color 0.2s;
}

.collapse-header:hover {
  background-color: #e9e9e9;
}

.collapse-title {
  font-weight: bold;
  font-size: 16px;
}


.collapse-btn {
  width: 20px;
  height: 20px;
  position: relative;
  transition: transform 0.3s ease;
}

.collapse-btn::before, .collapse-btn::after {
  content: '';
  position: absolute;
  background-color: #555;
  transition: all 0.3s ease;
}

/* 初始状态 - 向右的三角形 */
.collapse-btn::before {
  top: 0;
  left: 9px;
  width: 2px;
  height: 20px;
  transform: rotate(0deg);
}

.collapse-btn::after {
  top: 9px;
  left: 0;
  width: 20px;
  height: 2px;
  transform: rotate(0deg);
}

/* 展开状态 - 向下的三角形 */
.collapse-header.active .collapse-btn::before {
  transform: rotate(90deg);
}

.collapse-header.active .collapse-btn::after {
  transform: rotate(180deg);
  opacity: 0;
}