/*---------------------------------------------*/
::-webkit-scrollbar {
  width: 8px;
  /* height: 8px; */
}

::-webkit-scrollbar-thumb {
  background: #ddd;
}

::-moz-selection {
  background-color: #ccc;
}

::selection {
  background-color: #ccc;
}

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
}

[type='reset'],
[type='submit'],
button,
html [type='button'] {
  -webkit-appearance: button;
}

.clearfix:after {
  content: '';
  display: block;
  clear: both;
}

.omit {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/*---------------------------------------------*/

a {
  text-decoration: none;
  color: #666;
}

.post-content.markdown-body p {
  line-height: 2;
}
img[alt*='col-1-center'] {
  display: inline-block;
  max-width: 50% !important;
  transform: translateX(50%);
}
img[alt*='col-2'] {
  display: inline-block;
  max-width: 48% !important;
}
img[alt*='col-2'] + img[alt*='col-2'] {
  padding-left: 2%;
}
img[alt*='col-3'] {
  display: inline-block;
  max-width: 31.333% !important;
}
img[alt*='col-3'] + img[alt*='col-3'] {
  padding-left: 1%;
}
img[alt*='col-4'] {
  display: inline-block;
  max-width: 21% !important;
}
img[alt*='col-4'] + img[alt*='col-4'] {
  padding-left: 1%;
}
img[alt*='qr'] {
  max-width: 20% !important;
}
img[alt*='img2icon'] {
  height: 24px;
  width: 24px;
  vertical-align: middle;
}
/*---------------------------------------------*/
body {
  font-family: Lucida Sans Unicode, Verdana, 'Hiragino Sans GB', -apple-system,
    Microsoft Yahei, sans-serif;
  /*
  *  https://labs.qianduan.net/macfont.html
  */
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  font-size: 16px;
  color: #666;
  letter-spacing: 0.5px;
  background-size: cover;
  line-height: 1.5;
  margin: 0;
}

#root {
  max-width: 90%;
  width: 720px;
  margin: 3em auto;
  display: block;
  padding: 0 20px;
}

#root::before {
  content: '';
  display: block;
  opacity: 0.06;
  z-index: -1;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

#header {
  position: relative;
  padding: 0.3em 0;
  border-bottom: 1px solid #d8dadc;
}

header a {
  color: #000;
}

#logo {
  color: #000;
}

#header h1,
#header h2 {
  margin: 0;
  padding: 0;
}

#header p {
  margin-top: 0;
}
nav a {
  margin: 0 5px;
}
@media (max-width: 460px) {
  .link {
    display: none;
  }
}

#header .link {
  position: absolute;
  bottom: 1px;
  right: 0;
  line-height: 21px;
}

.link a {
  cursor: pointer;
  padding: 2px;
  margin: 0 3px;
}

.link img {
  width: 15px;
  height: 15px;
}

.page-navigator li {
  padding: 0.2em;
}

.page-navigator .current {
  display: inline-block;
  -webkit-transform: scale(1.2);
  transform: scale(1.2);
}
.post-content {
  padding: 1em 0;
}
.post {
  padding: 0.7em 0;
}

.post-list {
  margin: 0;
  padding: 0;
}

.post-item {
  padding: 0.4em 0;
  letter-spacing: 1px;
  margin: 0;
  text-transform: uppercase;
}
.post-item a:hover {
  border-bottom: 1px solid #333;
}

.post-meta {
  font-size: smaller;
  color: #999;
}

.post > .post-meta {
  text-align: right;
}

.page-navigator,
.post-meta,
.post-near,
.comment-list {
  margin: 0;
  padding: 0;
}

.previous {
  float: left;
}

.next-post {
  float: right;
}

#comments {
  padding: 0.3em 0;
}

#comments a:hover,
#footer a:hover,
.post-near a:hover {
  color: #32393f;
  border-bottom: 1px solid #32393f;
}

#comments input,
#comments textarea,
.error-page input {
  border: none;
  outline: 0;
  background: 0 0;
  padding: 5px 0;
  font-family: inherit;
  font-size: 15px;
  border-bottom: 1px solid #d8dadc;
}

#comments textarea {
  background: transparent url(../images/commentsbg.gif) right center no-repeat !important;
  overflow: auto;
  height: 5em;
  width: 100%;
  resize: none;
}

input:focus,
textarea:focus {
  border-bottom: 1px solid #a4a9ad;
}

input#author,
input#mail,
input#url {
  width: 32.8%;
}

#comments input.button,
#comments input.submit,
.error-page input[type='submit'] {
  border: none;
  letter-spacing: 2px;
  line-height: 2em;
  color: #fff;
  padding: 3px 10px;
  background-color: #666;
  border-radius: 3px;
  vertical-align: middle;
  cursor: pointer;
}

#comments input.submit:disabled {
  cursor: not-allowed;
}

@media screen and (max-width: 768px) {
  input#author,
  input#mail,
  input#url {
    width: 100%;
  }

  input#author,
  input#mail {
    margin-bottom: 0.5em;
  }
}

#comments ol,
#comments ul {
  list-style-type: none;
}

.comment-parent {
  border-top: 1px solid #ddd;
}

.comment-list li {
  padding: 5px 0;
}
/* .comment-list li:last-child {
  padding-bottom: 0;
} */
.comment-list p {
  display: inline;
}

.comment-children {
  margin-left: 1.5em;
}

.comment-by-author > div:first-child .fn a {
  color: #444b50;
  font-style: normal;
  font-weight: 700;
}

.comment-by-author > div:first-child .fn a::after {
  background-color: rgba(87, 93, 97, 0.5);
  position: relative;
  left: 4px;
  content: '#';
  display: inline-block;
  border-radius: 3px;
  font-size: small;
  margin-right: 8px;
  padding: 0 0.4em;
}

#comments input#robot {
  position: absolute;
  clip: rect(0, 0, 0, 0);
}

#comments input#robot + label {
  color: red;
  cursor: pointer;
}

#comments input#robot + label::before {
  content: '\a0';
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.4em;
  border-radius: 50%;
  border: 1px solid red;
  text-indent: 0.15em;
  line-height: 1;
}

#comments input#robot:checked + label {
  color: #01cd78;
  cursor: pointer;
}

#comments input#robot:checked + label::before {
  background-color: #01cd78;
  background-clip: content-box;
  border: 1px solid #01cd78;
  padding: 0.1em;
}

.respond {
  padding-top: 2em;
  border-top: 1px solid #ddd;
}

#footer {
  font-size: 14px;
  padding: 20px 0;
  text-align: center;
}
.error-page,
#footer,
.respond {
  text-align: center;
}
canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -999;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#back-to-top {
  display: none;
  cursor: pointer;
  position: fixed;
  right: 50px;
  bottom: 10%;
  z-index: 2;
  width: 2em;
  height: 2em;
}

#back-to-top svg {
  width: 2em;
  height: 2em;
  opacity: 0.6;
}

#back-to-top svg:hover {
  opacity: 1;
}

#main img {
  cursor: zoom-in;
}

img[alt='friend'] {
  height: 40px;
  width: 40px;
  border-radius: 40px;
  margin: 0 10px 0 0;
  vertical-align: middle;
}

.imageView,
.imageView > img {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(26, 26, 26, 0.65);
  margin: auto;
  z-index: 999;
}

.imageView {
  display: none;
  position: fixed;
  overflow: auto;
}

.imageView > img {
  animation: feda-large 0.3s;
  cursor: zoom-out;
  position: absolute;
  max-height: 90%;
  max-width: 90%;
}

@keyframes feda-large {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 修复响应式设计 */
@media (max-width: 768px) {
  #root {
    margin: 1em auto;
    padding: 0 10px;
  }
  
  #header .link {
    position: static;
    text-align: center;
    margin-top: 10px;
  }
  
  nav a {
    display: inline-block;
    margin: 5px;
  }
}

/* 修复移动端布局 */
@media (max-width: 480px) {
  #root {
    width: 95%;
  }
  
  body {
    font-size: 14px;
  }
}