@font-face {
  font-family: 'Arial Narrow';
  src: url('../font/arial-narrow.ttf');
  font-display: fallback;
  font-weight: normal;
  font-style: normal;
}

.nav {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  height: 40px;
  z-index: 90;
  background-color: #fff;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .3);
}

.nav .logo {
  font-size: 17px;
  padding: 0 10px;
  color: #000;
  user-select: none;
  cursor: pointer;
  font-family: 'Arial Narrow';
  height: 32px;
  line-height: 32px;

  background-image: url(../svg/comic-logo-dark.svg);
  background-repeat: no-repeat;
  background-position: 4px center;
  background-size: contain;
  background-color: transparent;
}

.nav .logo:hover {
  color: #666;
}

.nav .logo>span {
  margin-left: 30px;
}

.nav form {
  flex: 2;
}

.nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 5;
  position: relative;
  background-color: #fff;
  text-align: right;
  overflow: auto;
  white-space: nowrap;
}

.nav li {
  display: inline-block;
}

.nav li a {
  line-height: 40px;
  display: block;
  padding: 0 12px;
}

.nav a {
  color: #000;
}

.nav a.active,
.nav a:hover {
  line-height: 34px;
  color: #666;
  border-bottom: 3px #666 solid;
}

.nav .menu {
  box-sizing: border-box;
  display: none;
  width: 32px;
  height: 32px;
  padding: 4px;
  margin: 4px 6px;
  cursor: pointer;
  user-select: none;
  background: url('../svg/menu.svg');
  background-repeat: no-repeat;
  background-position: center center;

  background-size: 75% 75%;
}

.nav .menu:hover {
  background-color: none;
  border-radius: 50%;
}

.nav ul.active li {
  display: inline-block;
}

.nav input[type=search] {
  padding: 1px 12px;
  margin: 0;
  border: 1px #ddd solid;
  border-radius: 16px;
  color: #999;
  line-height: 28px;
  outline: 0;
  width: 100%;
  background-color: #fff;
  resize: none;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
}

.noscroll {
  overflow: hidden;
  height: 100%;
}

@media screen and (max-width: 768px) {
  .nav {
    justify-content: space-between;
  }

  .nav .logo>span {
    display: none;
  }

  .nav .logo {
    width: 28px;
    background-position: 4px center;
    background-size: 75% 75%;
  }

  .nav .menu {
    display: block;
  }

  .nav ul {
    width: 100%;
    position: absolute;
    top: 40px;
    text-align: center;
  }

  .nav li {
    width: 100%;
    display: none;
    line-height: 36px;
    border-top: 1px #eee solid;
  }

  .nav li:last-child {
    border-bottom: 1px #eee solid;
  }

  .nav ul.active {
    min-height: 100vh;
    animation: expland 0.3s;
  }

  .nav ul.active li {
    display: block;
  }

  .nav ul.active~.menu {
    background: url('../svg/x.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 80% 80%;
    background-color: transparent;
    transform: rotate(360deg);
    animation: rotation 0.3s linear 1;
  }

  .nav ul.inactive~.menu {
    transform: rotate(360deg);
    animation: rollback 0.3s linear 1;
  }
  
  .nav li a {
    line-height: 36px;
  }

  .nav a.active,
  .nav a:hover {
    border-bottom: 0;
    background-color: #eee;
  }

  @keyframes expland {
    0% {
      opacity: 0;
      transform: translate(0, -800px)
    }

    100% {
      opacity: 1;
      transform: translate(0, 0)
    }
  }

  @keyframes rotation {
    from {
      transform: rotate(0deg);
    }

    to {
      transform: rotate(360deg);
    }
  }

  @keyframes rollback {
    from {
      transform: rotate(360deg);
    }

    to {
      transform: rotate(0deg);
    }
  }
}


input::-webkit-input-placeholder {
  color: #ccc;
}

input::-moz-input-placeholder {
  color: #ccc;
}

input::-ms-input-placeholder {
  color: #ccc;
}