// @font-face {
//     font-size: 16px;
//     font-family: 'roboto';
//     font-style: normal;
//     font-weight: 500;
//     src: url(Roboto-Medium.ttf) format('truetype');
// }
@main-color: #222;
@theme-color: #4b42a3;
@border-color: #e9e9e9;
@bg-color: #eee;
body {
  font-family: 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.9;
  -webkit-text-size-adjust: 100%;
  overflow: hidden;
}

@media all and (max-width: 600px) {
  body {
    font-family: 'roboto', 'Microsoft YaHei', sans-serif;
  }
}

img {
  display: block;
  margin: 20px auto;
  max-width: 100%;
  vertical-align: middle;
}

a {
  color: @main-color;
  text-decoration: none;
  -webkit-transition: all 0.5s;
  outline: none;
}

a:hover {
  color: @theme-color;
}

table {
  margin: 10px 0;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}


/*
    头部样式
*/

.site-header {
  transition: 0.5s all;
  background-color: #fff;
  z-index: 9999;
  border-bottom: 1px solid @border-color;
  height: 100px;
  position: fixed;
  top: 0;
  width: 100%;
  .site-title {
    transition: 0.2s all;
    font-size: 18px;
    line-height: 100px;
    float: left;
    padding-right: 150px;
  }
  .site-nav {
    transition: 0.2s all;
    position: relative;
    z-index: 9999;
    float: right;
    line-height: 100px;
    .menu-icon {
      display: none;
    }
    .page-link {
      color: @main-color;
      transition: 0.2s all;
      height: 100px;
      display: inline-block;
      text-transform: capitalize;
      padding-left: 10px;
      padding-right: 10px;
      &:hover, &.active {
        color: @theme-color;
      }
    }
  }
  &.reading {
    height: 50px;
    .site-title {
      line-height: 50px;
    }
    .site-nav {
      line-height: 50px;
      .page-link {
        height: 50px;
      }
    }
  }
}

@media screen and (max-width: 600px) {
  .site-header {
    .site-nav {
      position: absolute;
      top: 50%;
      margin-top: -18px;
      right: 10px;
      background-color: #fff;
      border: 1px solid @border-color;
      border-radius: 2px;
      text-align: right;
      .menu-icon {
        display: block;
        float: right;
        width: 36px;
        height: 26px;
        line-height: 0;
        padding-top: 6px;
        text-align: center;
        svg {
          width: 18px;
          height: 15px;
          path {
            fill: @main-color;
          }
        }
      }
      .trigger {
        clear: both;
        display: none;
      }
      &:hover .trigger {
        display: block;
        padding-bottom: 5px;
      }
      .page-link {
        height: auto;
        line-height: 1.5;
        display: block;
        padding: 5px 10px;
      }
    }
  }
}


/*
    底部样式
*/

.site-footer {
  border-top: 1px solid @border-color;
  .footer-col-wrapper {
    font-size: 16px;
    color: @main-color;
    .footer-col {
      float: left;
      text-align: center;
      // width: 33.3%;
      padding-left: 20px;
      padding-right: 20px;
      a {
        display: block;
        padding: 30px 0;
      }
    }
    @media screen and (max-width: 600px) {
      .footer-col {
        text-align: left;
        float: none;
        width: 100%;
        a {
          padding: 10px;
        }
      }
    }
  }
}


/*
    包裹层
*/

.wrapper {
  max-width: -webkit-calc(1340px - (30px * 2));
  max-width: calc(1340px - (30px * 2));
  margin-right: auto;
  margin-left: auto;
  padding-right: 30px;
  padding-left: 30px;
}

@media screen and (max-width: 800px) {
  .wrapper {
    max-width: -webkit-calc(800px - (30px));
    max-width: calc(800px - (30px));
    padding-right: 15px;
    padding-left: 15px;
  }
}


/*
    列表下导航
*/

.page {
  display: block;
  margin: 0 auto;
  font-size: 14px;
  position: relative;
  text-align: center;
  @width: 24px;
  span, a {
    float: left;
    line-height: @width;
    width: @width;
    height: @width;
    display: inline-block;
  }
  a {
    &:hover {
      cursor: pointer;
      border-radius: 100px;
      background-color: #000;
      color: #fff;
    }
  }
  .next, .prev {
    display: inline-block;
    position: absolute;
    top: 0;
    &:after {
      content: '';
      position: absolute;
      @arrow-width: 8px;
      height: @arrow-width;
      width: @arrow-width;
      top: 50%;
      left: 50%;
      transform-origin: 50% 50%;
      border-top: 1px solid @main-color;
      border-right: 1px solid @main-color;
    }
    &:hover {
      &:after {
        border-top: 1px solid #fff;
        border-right: 1px solid #fff;
      }
    }
  }
  .prev {
    left: -@width;
    &:after {
      transform: translate(-25%, -60%) rotate(-135deg);
    }
  }
  .next {
    right: -@width;
    &:after {
      transform: translate(-75%, -60%) rotate(45deg);
    }
  }
  span {
    cursor: default;
    color: @theme-color;
  }
}


/*
    首页列表
*/

.post-list {
  margin-left: 0;
  list-style: none;
  li {
    border-bottom: 1px solid @border-color;
    padding: 20px;
    margin-bottom: 30px;
    .post-link {
      max-width: 100%;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
      display: block;
      font-size: 24px;
      text-transform: capitalize;
      ;
    }
    .post-meta {
      font-size: 14px;
      color: #828282;
    }
    .preview {
      font-size: 16px;
      display: block;
      color: #555;
      text-indent: 2em;
      margin-top: 10px;
      margin-bottom: 10px;
      &:hover {
        color: @theme-color;
      }
    }
    .read-more {
      font-size: 12px;
      display: inline-block;
      line-height: 1em;
      padding: 6px 9px;
      -webkit-border-radius: 15px;
      border-radius: 15px;
      background-color: #eee;
      color: #999;
      text-decoration: none;
      margin-top: 10px;
      &:hover {
        color: #fff;
        background-color: @theme-color;
      }
    }
  }
}


/* 
    发布的文章
*/

.page-content {
  padding: 100px 0 30px 0;
  .wrapper {
    padding-top: 15px;
  }
  .post-header {
    margin-bottom: 30px;
  }
  .post-meta {
    font-size: 14px;
    color: #828282;
  }
  .post-title {
    margin-top: 15px;
    font-size: 42px;
    line-height: 1.5;
    text-transform: capitalize;
  }
}

.post-content {
  h1, h2, h3 {
    // border-bottom: 1px solid #eee;
    margin-bottom: 1em;
    padding-left: 10px;
    border-left: 8px solid #4b42a3;
  }
  a {
    color: #835092;
  }
  p {
    // text-indent: 2em;
    color: @main-color;
    margin-bottom: 1em;
  }
  ol {
    list-style-type: decimal;
  }
  ul {
    list-style-type: circle;
  }
  ol, ul {
    // padding-left: 2em;
    padding-top: 1em;
    padding-bottom: 1em;
    p {
      text-indent: 0;
    }
  }
  margin-bottom: 30px;
  img {
    border: 1px solid @border-color;
  }
  hr {
    height: 1px;
    background-color: @bg-color;
    outline: none;
    border: none;
    margin-top: 20px;
    margin-bottom: 20px;
  }
  pre, code {
    font-size: 14px;
    border: 1px solid @border-color;
    border-radius: 3px;
    background-color: @bg-color;
    margin: 20px 0;
  }
  code {
    padding: 1px 5px;
    margin: 0 3px;
  }
  pre {
    padding: 8px 12px;
    overflow: auto;
    & > code {
      border: 0;
      padding-right: 0;
      padding-left: 0;
    }
  }
}

.ds-powered-by {
  display: none;
}

.category-main {
  margin-top: 15px;
  div {
    display: none;
    -webkit-animation: fadeInDown 0.5s ease both;
  }
  ul {
    margin-left: 0;
  }
  .post-meta {
    display: inline-block;
    margin-left: 15px;
  }
}

@-webkit-keyframes fadeInDown {
  0% {
    opacity: 0;
    -webkit-transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    -webkit-transform: translateY(0);
  }
}

#toTop {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-image: url('../source/up.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 0.4;
  transition: none;
  &:hover {
    opacity: 0.8;
  }
}

#loading {
  z-index: 99999;
  background: #1c1c3d;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  .bokeh {
    top: 50%;
    left: 50%;
    margin-top: -50px;
    margin-left: -50px;
    font-size: 100px;
    width: 100px;
    height: 100px;
    position: relative;
    border-radius: 100px;
    list-style: none;
    li {
      position: absolute;
      width: 20px;
      height: 20px;
      border-radius: 100px;
      &:nth-child(1) {
        left: 50%;
        top: 0;
        margin: 0 0 0 -10px;
        background: #00C176;
        -webkit-transform-origin: 50% 250%;
        -ms-transform-origin: 50% 250%;
        transform-origin: 50% 250%;
        -webkit-animation: rota 1.13s linear infinite, opa 3.67s ease-in-out infinite alternate;
        animation: rota 1.13s linear infinite, opa 3.67s ease-in-out infinite alternate;
      }
      &:nth-child(2) {
        top: 50%;
        right: 0;
        margin: -10px 0 0 0;
        background: #FF003C;
        -webkit-transform-origin: -150% 50%;
        -ms-transform-origin: -150% 50%;
        transform-origin: -150% 50%;
        -webkit-animation: rota 1.86s linear infinite, opa 4.29s ease-in-out infinite alternate;
        animation: rota 1.86s linear infinite, opa 4.29s ease-in-out infinite alternate;
      }
      &:nth-child(3) {
        left: 50%;
        bottom: 0;
        margin: 0 0 0 -10px;
        background: #FABE28;
        -webkit-transform-origin: 50% -150%;
        -ms-transform-origin: 50% -150%;
        transform-origin: 50% -150%;
        -webkit-animation: rota 1.45s linear infinite, opa 5.12s ease-in-out infinite alternate;
        animation: rota 1.45s linear infinite, opa 5.12s ease-in-out infinite alternate;
      }
      &:nth-child(4) {
        top: 50%;
        left: 0;
        margin: -10px 0 0 0;
        background: #88C100;
        -webkit-transform-origin: 250% 50%;
        -ms-transform-origin: 250% 50%;
        transform-origin: 250% 50%;
        -webkit-animation: rota 1.72s linear infinite, opa 5.25s ease-in-out infinite alternate;
        animation: rota 1.72s linear infinite, opa 5.25s ease-in-out infinite alternate;
      }
    }
  }
}

@keyframes rota {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes opa {
  12.0% {
    opacity: 0.80;
  }
  19.5% {
    opacity: 0.88;
  }
  37.2% {
    opacity: 0.64;
  }
  40.5% {
    opacity: 0.52;
  }
  52.7% {
    opacity: 0.69;
  }
  60.2% {
    opacity: 0.60;
  }
  66.6% {
    opacity: 0.52;
  }
  70.0% {
    opacity: 0.63;
  }
  79.9% {
    opacity: 0.60;
  }
  84.2% {
    opacity: 0.75;
  }
  91.0% {
    opacity: 0.87;
  }
}

.book-images {
  width: 90px;
  height: 120px;
}
