* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: BASE;
    src: local('PingFang SC'),
        local("microsoft yahei");
}

html {
    font: normal 16px;
    font-family: BASE;
}

a:link,
a:visited {
    color: #000000;
    text-decoration: none;
}

a:hover {
    color: #016194;
    text-decoration: underline;
}

.comment-section {
    list-style: none;
    max-width: 850px;
    width: 100%;
    margin: 20px auto;
    padding: 10px;
}

.comment {
    display: flex;
    border-radius: 3px;
    margin-bottom: 45px;
    flex-wrap: wrap;
}

.comment.user-comment {
    color: #808080;
}

.comment.author-comment {
    color: #60686d;
    justify-content: flex-end;
}

/* User and time info */

.comment .info {
    width: 17%;
}

.comment.user-comment .info {
    text-align: right;
}

.comment.author-comment .info {
    order: 3;
}

.comment .info a {
    /* User name */
    display: block;
    text-decoration: none;
    color: #656c71;
    font-weight: bold;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    padding: 10px 0 3px 0;
}

.comment .info span {
    /* Time */
    font-size: 16px;
    color: #9ca7af;
}

/* The user avatar */

.comment .avatar {
    width: 8%;
}

.comment.user-comment .avatar {
    padding: 10px 18px 0 3px;
}

.comment.author-comment .avatar {
    order: 2;
    padding: 10px 3px 0 18px;
}

.comment .avatar img {
    display: block;
    border-radius: 10px;
}

.comment.user-comment .avatar img {
    float: right;
}

/* The comment text */

.comment p {
    line-height: 1.5;
    padding: 18px 22px;
    width: 50%;
    position: relative;
    word-wrap: break-word;
    border-radius: 3px;
}

.comment.user-comment p {
    background-color: #f3f3f3;
}

.comment.author-comment p {
    background-color: #e2f8ff;
    order: 1;
}

.user-comment p:after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #f3f3f3;
    left: -8px;
    top: 18px;
}

.author-comment p:after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    border-radius: 10px;
    background-color: #ffffff;
    border: 2px solid #e2f8ff;
    right: -8px;
    top: 18px;
}

/* Comment form */

.write-new {
    margin: 10px auto;
    width: 50%;
}

.write-new input {
    height: 1.5em;
    color: #444;
    font: inherit;
    outline: 0;
    border-radius: 3px;
    border: 1px solid #cecece;
    background-color: #fefefe;
    box-shadow: 1px 2px 1px 0 rgba(0, 0, 0, 0.06);
    overflow: auto;
    width: 100%;
    min-height: 20px;
    padding: 15px 20px;
}

.write-new textarea {
    color: #444;
    font: inherit;
    outline: 0;
    border-radius: 3px;
    border: 1px solid #cecece;
    background-color: #fefefe;
    box-shadow: 1px 2px 1px 0 rgba(0, 0, 0, 0.06);
    overflow: auto;
    width: 100%;
    min-height: 80px;
    padding: 15px 20px;
}

.write-new img {
    border-radius: 50%;
    margin-top: 15px;
}

.write-new button {
    float: right;
    background-color: #016194;
    box-shadow: 1px 2px 1px 0 rgba(0, 0, 0, 0.12);
    border-radius: 2px;
    border: 0;
    color: #ffffff;
    font-weight: bold;
    cursor: pointer;

    padding: 10px 25px;
    margin-top: 18px;
}

/* Responsive styles */

@media (max-width: 850px) {

    /* Make the paragraph in the comments take up the whole width,
    forcing the avatar and user info to wrap to the next line*/
    .comment p {
        width: 100%;
    }

    /* Reverse the order of elements in the user comments,
    so that the avatar and info appear after the text. */
    .comment.user-comment .info {
        order: 3;
        text-align: left;
    }

    .comment.user-comment .avatar {
        order: 2;
    }

    .comment.user-comment p {
        order: 1;
    }

    /* Align toward the beginning of the container (to the left)
    all the elements inside the author comments. */
    .comment.author-comment {
        justify-content: flex-start;
    }

    .comment-section {
        margin-top: 10px;
    }

    .comment .info {
        width: auto;
    }

    .comment .info a {
        padding-top: 15px;
    }

    .comment.user-comment .avatar,
    .comment.author-comment .avatar {
        padding: 15px 10px 0 18px;
        width: auto;
    }

    .comment.user-comment p:after,
    .comment.author-comment p:after {
        width: 12px;
        height: 12px;
        top: initial;
        left: 28px;
        bottom: -6px;
    }

    .write-new {
        width: 100%;
    }
}

header {
    padding: 5px;
    text-align: center;
    line-height: 1.5;
}

.links a {
    background-color: #016194;
    box-shadow: 1px 2px 1px 0 rgba(0, 0, 0, 0.12);
    /*    border-radius: 2px;*/
    color: #ffffff;
    padding: 5px 10px 5px 10px;
    margin: 5px;
    text-decoration: none;
    appearance: button;
    -moz-appearance: button;
    -webkit-appearance: button;
}

.no {
    background-color: #f3f3f3;
    box-shadow: 1px 2px 1px 0 rgba(0, 0, 0, 0.12);
    /*    border-radius: 2px;*/
    color: #ffffff;
    padding: 5px 10px 5px 10px;
    text-decoration: none;
    appearance: button;
    -moz-appearance: button;
    -webkit-appearance: button;
}

footer {
    padding: 5px;
    text-align: center;
    line-height: 1.5;
}

.center {
    text-align: center;
}

#s {
    font-size: 16px;
    height: 1.5em;
    color: #444;
    font: inherit;
    outline: 0;
    border-radius: 3px;
    border: 1px solid #cecece;
    background-color: #fefefe;
    box-shadow: 1px 2px 1px 0 rgba(0, 0, 0, 0.06);
    overflow: auto;
    width: 400px;
    min-height: 20px;
    padding: 15px 20px;
}
#s::-webkit-input-placeholder{text-align:center;}
#s:-moz-placeholder{text-align:center;}
#s:-ms-input-placeholder{text-align:center;}
