$text-color: #000;
$text-color-reverse: #fff;

$header-height: 44px;
$header-bg-color: $text-color;

$section-width: 1000px;

body {
  margin: 0 auto;
  width: 100%;
  min-width: $section-width;
  overflow-x: hidden;
}

* {
  color: $text-color;
  word-break: break-word;
  word-wrap: break-word;
}

a {
  color: $text-color;

  &:visited, &:hover, &:focus {
    color: $text-color;
  }
}

input[type='text'], input[type='password'], input[type='email'], input[type='number'], button, textarea {
  border: 1px solid $text-color;
}

input[type='text'], input[type='password'], input[type='email'], input[type='number'], textarea {
  width: calc(100% - 14px);
  padding: 7px;
  resize: none;

  &:focus {
    outline: 0;
  }
}

//textarea {
//  width: $section-width - 14px;
//  resize: none;
//}

button {
  padding: 5px 10px;

  &:focus {
    outline: 0;
  }
}

ol, ul {
  margin-left: 0;
  padding-left: 25px;
  li {
    line-height: 1.7em;
  }
}

.pull-left {
  float: left;
}

.pull-right {
  float: right;
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.clear {
  clear: both;
}

.container {
  header {
    width: 100%;
    height: $header-height;
    background-color: $header-bg-color;

    .title {
      font-size: 18px;
      font-weight: 500;
    }

    ul {
      list-style-type: none;
      padding: 0;
      margin: 0;

      li {
        float: left;
        padding: 0 7px;
        line-height: $header-height;

        a {
          color: $text-color-reverse;
          text-decoration: none;
        }

        &.active {
          background-color: $text-color-reverse;

          a {
            color: $text-color;
          }
        }
      }

      li:first-child {
        padding-left: 15px;
      }
    }

    ul:last-child {
      float: right;

      li:first-child {
        padding-left: 7px;
      }

      li:last-child {
        padding-right: 15px;
      }
    }

    #notReadCount {
      color: $text-color;
      background-color: $text-color-reverse;
      padding: 0 4px;
      display: none;
    }
  }

  section {
    margin: 0 auto;
    width: $section-width;
    padding: 15px 0;

    .box {
      margin: 0 auto;
      border: 1px solid $text-color;

      .box-heading {
        padding: 10px 15px;
        border-bottom: 1px solid $text-color;
        overflow: hidden;
      }

      .box-footer {
        padding: 10px 15px;
        border-top: 1px solid $text-color;
        overflow: hidden;
      }

      .box-body {
        padding: 15px;
        overflow: hidden;
      }
    }

    .topics {
      .title {
        font-size: 18px;
        text-decoration: none;
      }
      .divide {
        padding-bottom: 10px;
        border-bottom: 1px solid $text-color;
      }
    }

    .title {
      font-size: 22px;
      font-weight: 500;
    }

    .content {
      img {
        max-width: 100%;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
      }

      pre {
        padding: 10px;
        background-color: #f5f5f5;

        code {
          white-space: pre-wrap;
        }
      }
      table {
        width: 100%;
        border-collapse: collapse;
        border: 1px solid $text-color;
        td, th {
          border: 1px solid $text-color;
          padding: 5px;
        }
      }

      .embed-responsive {
        position: relative;
        display: block;
        height: 0;
        padding: 0;
        overflow: hidden;

        .embed-responsive-item,
        iframe,
        embed,
        object,
        video {
          position: absolute;
          top: 0;
          left: 0;
          bottom: 0;
          height: 100%;
          width: 100%;
          border: 0;
        }
      }

      // Modifier class for 16:9 aspect ratio
      .embed-responsive-16by9 {
        padding-bottom: 56.25%;
      }
    }

    .tags {
      overflow: hidden;
      .item {
        float: left;
        width: 25%;
        height: 88px;
        overflow: hidden;
        margin-bottom: 10px;

        .description {
          font-size: 14px;
          margin-top: 10px;
          overflow: hidden;
        }
      }
    }

    .tag {
      text-decoration: none;
      background-color: $text-color;
      color: $text-color-reverse;
      padding: 2px 8px;
    }

    .comments {
      img {
        max-width: 100%;
      }

      .fa {
        cursor: pointer;
      }
    }
    .user {
      overflow: hidden;
      .left {
        float: left;
        width: 200px;
      }
      .right {
        width: $section-width - 215px;
        float: right;
      }
      .menu {
        position: fixed;
      }
      .settings {
        p {
          margin-bottom: 5px;
        }
        button {
          margin-top: 10px;
        }
      }
    }
  }

  footer {
    padding: 15px;
    border-top: 1px solid $text-color;
    text-align: center;
  }
}
