html {
    font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "PingFang SC", "Microsoft YaHei", sans-serif;
}

html, body {
    height: 100%;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: $header-bg-color;
    height: $header-height;
    box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.2);
    transition: all 0.3s;

    .title {
        display: none;
    }

    .logo {
        display: block;
        width: $header-height * 0.7;
        height: $header-height * 0.7;
        margin-top: $header-height * 0.15;
        float: left;

        img {
            width: 100%;
            height: 100%;
        }
    }

    .nav {
        float: right;

        .switch {
            display: none;
        }

        .menu {
            margin: 0;
            max-height: $header-height;
            line-height: $header-height;
            transition: all .5s;
        }

        .menu-item {
            float: left;
            list-style-type: none;
            margin: 0 4px;

            a {
                font-size: 13px;
                color: #555;
                text-decoration: none;
                padding: 5px 10px;
                border-radius: 2px;

                &:hover {
                    background-color: $menu-hover-bg-color;
                }
            }
        }

        .iconfont {
            margin: 0 3px;
            font-size: 13px;
        }
    }
}

.footer {
    box-sizing: border-box;
    position: relative;
    background-color: $footer-bg-color;
    width: 100%;
    height: $footer-height;
    margin-top: -$footer-height;
    padding-top: 14px;
    color: #555;
    letter-spacing: 0.5px;

    p {
        font-size: 12px;
        text-align: center;
        margin: 0;
        line-height: 1.6;
    }
}

.main {
    box-sizing: border-box;
    min-height: 100%;
    overflow: hidden;
    padding-top: $header-height;
    padding-bottom: $footer-height + 10px;
}

.content-wrapper {
    box-sizing: border-box;
    overflow: hidden;
    width: $wrapper-width;
    margin: 0 auto;
    padding: 0 20px;
}

.post-preview {
    overflow: hidden;
    margin: 40px 0;

    .post-title {
        font-size: 26px;
        font-weight: 400;
        margin: 16px 0;

        a {
            color: #333;
            text-decoration: none;

            &:hover {
                text-decoration: underline;
            }
        }
    }

    .post-desc {
        line-height: 1.6;
        color: #555;
        font-size: 14px;
        letter-spacing: 0.6px;
        margin: 20px 0 10px 0;
    }

    .post-detail-btn {
        display: inline-block;
        font-size: 14px;
        color: #666;
        cursor: pointer;
        float: right;

        &:hover {
            color: $pink-color;
        }
    }
}

.post-box {
    padding-bottom: 40px;


    .post-tag-vote {
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        padding: 10px 0;
        margin-top:  40px;
    }

    .post-tags {
        float: left;
        max-width: 70%;

        .iconfont {
            color: #aaa;
            font-size: 26px;
            vertical-align: middle;
        }
    }

    .post-vote {
        float: right;
        color: #555;
        font-weight: bold;
        font-size: 13px;
        user-select: none;

        .post-vote-item {
            cursor: pointer;
            margin-right: 10px;
        }

        .iconfont {
            font-weight: initial;
            color: #aaa;
            font-size: 26px;
            vertical-align: sub;
        }
    }
}

.post-box, .post-preview {
    .post-meta {
        font-size: 12px;
        color: #999;
        margin-bottom: 10px;
        line-height: 2;

        .iconfont {
            font-size: 12px;
            margin-right: 2px;
        }
    }

    .split-line {
        margin: 0 4px;
    }

    .post-header {
        text-align: center;
        padding: 20px 0 40px 0;

        h2 {
            color: #333;
            font-size: 26px;
        }
    }
}

.pagination {
    border-top: 1px solid #F5F5F5;
    border-bottom: 1px solid #F5F5F5;
    padding-top: 6px;

    ul {
        margin: 0;
        padding: 0;
    }

    li {
        list-style-type: none;
        float: left;
        margin-right: 4px;
        margin-bottom: 6px;
    }

    a {
        display: block;
        color: #666;
        text-decoration: none;
        background-color: #F5F5F5;
        height: 30px;
        line-height: 30px;
        padding: 0 12px;
        text-align: center;
        font-size: 12px;

        &.active {
            color: $pink-color;
            font-weight: bold;
        }

        &:hover {
            color: #666;
            background-color: $pink-color;
        }
    }

    .pagination-list, .pagination-total-count {
        float: left;
    }

    .pagination-total-count {
        font-size: 13px;
        line-height: 30px;
        margin-left: 10px;
    }
}

.tagcloud {
    a {
        display: inline-block;
        text-decoration: none;
        font-weight: 400;
        font-size: 12px;
        color: #555;
        height: 18px;
        line-height: 18px;
        padding: 0 5px 0 10px;
        position: relative;
        border-radius: 0 5px 5px 0;
        margin-left: 10px;
        margin-right: 5px;
        background: #ccc;
        font-family: Menlo,Monaco,Andale Mono,lucida console,Courier New,monospace;

        &:hover {
            opacity: .8
        }

        &::before {
            content: " ";
            width: 0;
            height: 0;
            position: absolute;
            top: 0;
            left: -18px;
            border: 9px solid transparent;
            border-right-color: #ccc;
        }

        &::after {
            content: " ";
            width: 4px;
            height: 4px;
            background-color: #fff;
            border-radius: 4px;
            box-shadow: 0 0 0 1px rgba(0,0,0,.3);
            position: absolute;
            top: 7px;
            left: 2px
        }

        &.color0 {
            color: #fff;
            background: $pink-color;
            &::before {
                border-right-color: $pink-color;
            }
        }

        &.color1 {
            color: #fff;
            background: #cc8167;
            &::before {
                border-right-color: #cc8167;
            }
        }

        &.color2 {
            color: #fff;
            background: #F44337;
            &::before {
                border-right-color: #F44337;
            }
        }
    }
}

.message {
    box-sizing: border-box;
    position: fixed;
    width: 330px;
    line-height: 1;
    padding: 14px 26px 14px 13px;
    border: 1px solid #ebeef5;
    border-radius: 8px;
    top: 0;
    right: 0;
    left: 0;
    margin: auto;
    font-size: 12px;
    color: #606266;
    opacity: 0;
    overflow: hidden;
    word-break: keep-all;
    background-color: #fff;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
    text-align: center;
    z-index: 9999;

    .iconfont {
        vertical-align: middle;
        font-size: 30px;
    }
}

// mardown body
.markdown-body {
    line-height: 1.6;
    color: #555;
    font-size: 14px;
    letter-spacing: 0.6px;
}

.markdown-body blockquote {
    background-color: #F5F5F5;
    color: #000;
    padding: 5px 15px;
}

.markdown-body code {
    border-radius: 2px;
    background: #e1e1e1;
    color: #000;
}

// aside
.sidebar-open {
    padding-left: $sidebar-width;

    .sidebar {
        left: 0;

        &-op {
            .iconfont {
                transform: rotate(0deg);
            }
        }
    }

    .header {
        left: $sidebar-width;
    }
}

.sidebar {
    box-sizing: border-box;
    background-color: $sidebar-bg-color;
    position: fixed;
    left: -$sidebar-width;
    top: 0;
    bottom: 0;
    width: $sidebar-width;
    z-index: 200;
    color: #999;
    text-align: center;
    letter-spacing: 0.2px;
    transition: all 0.3s;
    padding: 0 20px;

    a {
        color: #999;
        &:hover {
            color: #f5f5f5;
        }
    }

    .author {
        &-avatar {
            display: block;
            box-sizing: border-box;
            position: relative;
            width: 80px;
            height: 80px;
            border-radius: 80px;
            overflow: hidden;
            border: 3px solid #333;
            padding: 6px;
            margin: 30px auto;

            img {
                display: block;
                width: 100%;
                height: 100%;
            }
        }

        &-name {
            display: block;
            line-height: 2;
        }
        &-ch-name {
            color: #f5f5f5;
            font-size: 18px;
            font-weight: bold;
        }
        &-en-name {
            font-size: 14px;
        }

        &-links {
            margin-top: 30px;
            font-size: 13px;
            word-wrap: break-word;
            line-height: 1.6;

            a {
                padding: 0 4px;
            }
        }
    }

    .collection {
        margin-top: 40px;
        letter-spacing: 1px;

        >a {
            display: inline-block;
            text-decoration: none;
        }

        .center {
            border-left: 1px solid #333;
            border-right: 1px solid #333;
        }

        &-span {
            display: block;
            width: 60px;
        }
        &-count {
            font-size: 18px;
            font-weight: bold;
        }
        &-name {
            font-size: 13px;
            margin-top: 7px;
        }
    }

    .friends-links {
        word-wrap: break-word;
        line-height: 1.6;

        &-title {
            font-size: 14px;
            font-weight: bold;
            margin-top: 50px;
            margin-bottom: 8px;
        }

        a {
            font-size: 12px;
            padding: 0 4px;
        }
    }

    &-op {
        position: absolute;
        width: 40px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        right: -40px;
        bottom: $footer-height;
        background-color: #bbb;
        color: #fff;
        cursor: pointer;
        border-radius: 4px;

        .iconfont {
            display: block;
            transform: rotate(45deg);
            font-size: 18px;
            font-weight: bold;
        }
    }
}

// 评论模块
.comment-info {
    padding-top: 20px;
    font-size: 14px;
    color: #555;
    
    .comment-list {
        list-style-type: none;
        padding-left: 0;
        font-size: 13px;

        &-child {
            list-style-type: none;
            margin-top: 15px;
            padding-left: 2em;

            .comment-list-item {
                background: #fbfbfb;
                margin-top: 4px;
            }
        }

        &-item {
            padding: 15px 0;
            border: 1px solid #eee;
            padding: 15px;
            margin-top: 15px;

            background-color: #fbfafa;

            .head {
                margin: 0;
            }
            .name {
                font-weight: bold;

                a {
                    color: #555;
                    text-decoration: none;

                    &:hover {
                        text-decoration: underline;
                    }
                }
            }
            .time {
                color: #333;
                font-style: italic;
                font-weight: 300;
            }
            .reply-button {
                font-weight: bold;
                cursor: pointer;
                color: #34538B;

                &:hover {
                    text-decoration: underline;
                }
            }
            .content {
                padding: 10px 0;
                border-top: 1px dashed #ddd;
                border-bottom: 1px dashed #ddd;
                margin: 15px 0;

                h1,h2,h3,h4,h5,h6 {
                    border-bottom: none;
                }
                h1 {
                    font-size: 1.3em;
                }
                h2 {
                    font-size: 1.25em;
                }
                h3 {
                    font-size: 1.2em;
                }
                h4 {
                    font-size: 1.15em;
                }
                h5 {
                    font-size: 1.1em;
                }
                h6 {
                    font-size: 1.05em;
                }
            }
        }
    }

    .comment-more {
        display: none;
        user-select: none;
        cursor: pointer;
        font-size: 13px;
        text-align: right;

        font-weight: 700;
        color: #34538b;

        &:hover {
            text-decoration: underline;
        }
    }
}

.comment-placeholder {
    min-height: 396px;
}

.comment-container.fixed {
    position: fixed;
    background-color: rgba(0,0,0,0.2);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;

    .comment-tool {
        background-color: #fff;
        width: $comment-dialog-width;
        padding: 10px 20px;
        border-radius: 5px;
        margin-left: 50%;
        transform: translateX(-50%);
        margin-top: $header-height * 2;
    }
}

.comment-tool {
    padding-top: 20px;
    font-size: 14px;
    color: #555;
    
    .editormd {
        margin-bottom: 0;
    }

    .comment-author-info {
        border-top: 1px solid #eee;
        padding-top: 10px;

        .item {
            margin-bottom: 10px;
        }
    }

    .comment-content-box {
        position: relative;
    }

    .md-editor {
        height: 150px;
        border: 1px solid #eee;
    }

    .author {
        &-name {
            width: 200px;
        }
        &-mail {
            width: 200px;
        }
        &-site {
            width: 200px;
        }
    }

    input {
        outline: none;
        height: 20px;
        border: 1px solid #eee;
        border-radius: 2px;
        font-size: 13px;
        color: #555;
        padding: 3px 4px;
    }

    .comment-btn {
        cursor: pointer;
        padding: 6px 20px;
        border-radius: 2px;
        border: 1px solid #eee;
        margin: 10px 0;
        outline: none;
        background-color: #fff;
        height: auto;

        &:hover {
            color: #555;
        }
    }

    .load-editor {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        margin-top: 0;
        
        &:hover {
            font-weight: bold;
        }
    }

    .editor-box {
        overflow: hidden;
    }
}

.not-found {
    font-size: 12px;
    text-align: center;
    margin-top: 100px;
}

a[title="站长统计"] {
    display: none;
}

.scroll-top {
    display: none;
    position: fixed;
    right: 12px;
    bottom: $footer-height;
    background: #AAA;
    z-index: 99;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    text-align: center;
    color: #fff;
    user-select: none;

    &:hover {
        cursor: pointer;
    }

    &-svg {
        margin-top: 50%;
        transform: translateY(-50%);
    }
}