/*flex*/

body {
    margin: 0 auto;
    /*目前只有从这里限制博文宽度不至于过宽导致转行找不到下一行 focus区    for the large screens it's best to limit to maximum width*/
    max-width: 800px;
    font-family: "Helvetica Neue", Helvetica, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    background-color: #fafafa;
}

ul {
    /*之前是用来处理postList也许在mobile下面的样式问题，但是现在发现这种做法会使得文章里的ul li缩进上格式乱掉；去除默认的padding-inline-start: 40px;*/
    /* padding: 0; */
}

img {
    max-width: 100%;
}

a {
    text-decoration: none;
    /*去掉下划线*/
    color: #5fbf5e;
    /*可以避免访问后link变色的问题*/
}

/********************************************************general css end*/
textarea {
    width: 100%;
  field-sizing: content; /* 仅 Chrome 118+ 支持 */
      font-family: inherit;/*By default, a \u003ctextarea\u003e does not automatically inherit the font-family from \u003cbody\u003e in all browsers (especially older ones). But you can easily make it inherit by explicitly setting*/
    font-size: inherit;
    line-height: 1.5;
}

h1 {
    text-align: center;
    /*box-shadow: 0 -4px 6px .2px #aaaaaa;*/
    /*    box-shadow: 0 1px 5px 0 rgba(0,0,0,.2);*/
    /*    background: #fff;*/
/*    padding: 8% 4%;*/
}

a.logo {

    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 400%;
    padding: 0.3em;
    /*和浏览器窗口上边缘有点距离*/

}

a.logo img {
    width: 15%;
    margin: 0.2em;
}

nav {
    display: flex;
    justify-content: space-between;

    padding: 30px 0px;
    /*和上面的内容有点距离*/

}


nav a {
    flex-grow: 1;
    text-align: center;
    word-break: keep-all;
/*    padding: 1em;防止窗口过窄的时候各link的字挨在一起*/
}

a:hover {
    color: DeepSkyBlue;
    /*颜色表 http://www.w3school.com.cn/cssref/css_colorsfull.asp*/
}



hr {
    margin: 2em 0;
    display: block;
    unicode-bidi: isolate;
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
    margin-inline-start: auto;
    margin-inline-end: auto;
    overflow: hidden;
    border-style: inset;
    border-width: 1px;
}

.icon {
    width: 10%;
}

.pagination {
    text-align: center;
}

#postInfo {
    display: flex;
    justify-content: space-around;
}

#postInfo\u003e* {
    text-align: center;
}

svg {
    vertical-align: middle;
}



#promotion {
    padding: 1% 0%;
    margin-bottom: 1em;
    background: #fff;
    border-radius: 1em;
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .2);

    display: flex;
    flex-wrap: wrap;
    /*转行*/
    justify-content: center;
    /*整块内容水平居中*/
    align-items: center;
    /*并排垂直居中*/
}

#promotion ul li {
    margin: 2em;
    list-style-type: none;
}

.about {
    text-align: center;
    display: block;
    /* background: #f0f0f0; */
    padding: 1em;
}


.postTitle {
    border-bottom: 1px solid #e0e0e0;
    padding: 1em 0em;
    background: #fff;
    font-size: 1.2em;
    line-height: 2em;
}

#donate {
    display: flex;
    justify-content: center;
    padding: .5em 0;
    /*   background-color: #ec6149;
  border-radius: 2em; */
}

.mainContent {
    /*box-shadow: 0 4px 6px .2px #aaaaaa;*/
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, .2);
    background: #fff;
    padding: 4%;
    line-height: 200%;

}



video,audio,iframe{
    width: 100%;
    display:block;
    border-radius:8px;
    box-shadow:0 4px 14px rgba(0,0,0,0.12);
}

#warning {
    color: red;
    display: none;
    margin-top: 5px;
}

#result {
    margin-top:15px;
    display:none;
}

#statusText {
    color:green;
}

#progressContainer {
    border:1px solid #ccc;
    width:300px;
    height:20px;
    margin-top:10px;
}

#progressBar {
    background-color:green;
    height:100%;
    width:0%;
}

#storyLinks {
    margin-top:15px;
}

/* 哔哩哔哩 iframe 自适应 */
iframe[src*="player.bilibili.com/player.html"],#mse {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9; /* CSS原生比例写法 */
  border: none;
  border-radius: 8px; /* 可选 */
  background-color: transparent;
}

.dataframe {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.dataframe th,
.dataframe td {
  padding: 8px;
  border: 1px solid #ddd !important;
}

.dataframe thead tr {
  text-align: left;
  background-color: #f2f2f2;
}

.dataframe th {
  white-space: nowrap;
  text-align: center;
}

.anki-button {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 20px auto 0;
}

.anki-button img {
    width: 24px;
    height: 24px;
}

.message-display {
    margin-top: 10px;
    font-weight: bold;
    text-align: center;
}

.message-display.success {
    color: #5fbf5e;
}

.message-display.error {
    color: red;
}


.input-video-wrapper {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.input-video-wrapper > form,
.input-video-wrapper > video {
    flex: 1;
    min-width: 0;
}

.input-video-wrapper textarea {
    width: 100%;
}

.input-video-wrapper form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-video-wrapper #submitBtn {
    align-self: stretch;
}