/* 初始化 */
* {
    border: 0;
    margin: 0;
    padding: 0;
    text-decoration: none;
}

body {
    width: 100%;
    height: 100%;
    background: #eee;
    font-size: 15px;
}

.fl {
    float: left;
}

.fr {
    float: right;
}

.clear {
    clear: both
}

h1 {
    font-size: 1.5em;
}

h2 {
    font-size: 1.2em;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.content .main {
    margin-top: 2em;
}

.shadow {
    padding-top: 1em;
    background: #fff;
    padding: 1em;
    margin-top: 1em;
    margin-bottom: 1em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    border-radius: 3px;
}

.widget {
    border-left: 4px solid #66B0DA;
}

/* 顶部 */
.top {
    padding: 1em;
    border-bottom: 1px solid #ddd;
    background: #fff
}

.top div {
    max-width: 1200px;
    margin: 0 auto;
}

.top span {
    display: inline-block;
}

.top span a {
    color: #000;
}

.top span a:hover {
    color: #E7790C;
}

.top .focus {
    color: #E7790C
}

.top .fl span {
    font-size: 0.8em;
}

.top .fr span {
    margin-left: 1.5em;
}

/* 尾部 */
.footer {
    padding: 1em;
    border-top: 1px solid #ddd;
    background: #fff;
    margin-top: 1em;
}

.footer p {
    max-width: 1200px;
    margin: 0 auto;
}

#go_top {
    background: #fff;
    border-radius: 1em;
    position: fixed;
    bottom: 2em;
    right: 2em;
    cursor: pointer;
    border: 2px solid #ddd
}

#go_top img {
    width: 20px;
    padding: 10px;
}

/* 导航页 */
#nav .main_top h1 {
    display: inline-block;
}

#nav .main_top p {
    display: inline-block;
    font-size: 0.9em;
    color: #444
}

#nav .main {
    display: inline-block;
}

#nav .panel {
    margin-top: 1em;
}

#nav .panel .panel_title {
    margin-left: 1.5em;
    padding: 0.5em;
    font-weight: bold;
    border-top: 1px solid #1EAFF1
}

#nav .panel .panel_body {
    width: 100%;
}

#nav .panel .panel_body:after {
    clear: both;
    content: '';
}

#nav .panel .panel_body div {
    float: left;
    width: 17%;
    border: 1px solid #ccc;
    text-align: center;
    margin: 1em;
    overflow: hidden;
    border-radius: 3px;
}

#nav .panel .panel_body div:hover {
    background: #1EAFF1;
}

#nav .panel .panel_body div a {
    padding: 0.5em 0;
    display: block;
}

#nav .panel .panel_body div p {
    font-size: 1.2em;
    white-space: nowrap;
}

#nav .panel .panel_body div span {
    font-size: 12px;
    font-family: Microsoft JhengHei;
}

#nav .panel .panel_body a {
    color: #000
}

#nav .panel .panel_body a:hover * {
    color: #fff;
}

#nav_fixed {
    position: fixed;
    right: 0%;
    top: 3.5em;
    max-width: 170px;
}

#nav_fixed p {
    color: #66B0DA;
    border-bottom: 1px dotted #ddd;
    margin-bottom: 0.5em;
    padding-bottom: 0.3em;
    font-size: 1.1em;
}

#nav_fixed ul li {
    border-bottom: 1px dotted #ddd;
    padding: 0.5em;
    text-align: center;
    list-style: none;
}

#nav_fixed ul li a {
    width: 100%;
    color: #666;
}

#nav_fixed ul li a:hover {
    color: #000;
}

#nav_fixed .fixed {
    position: fixed;
}

/* 关于页 */
#about h2 {
    margin: 1em 0 0.5em 0;
}

#about h2:before {
    content: '[';
    margin-right: 0.3em;
    color: #3c8cdd;
    font-size: 1.2em;
}

#about h2:after {
    content: ']';
    margin-left: 0.3em;
    color: #3c8cdd;
    font-size: 1.2em;
}

#about p {
    text-indent: 2em;
}

/* 小工具 */
#tool>div {
    padding: 1em 0;
    border-bottom: 1px dashed #a2afb9
}

#tool button {
    background: #1E9FFF;
    height: 38px;
    line-height: 38px;
    padding: 0 18px;
    color: #fff;
    text-align: center;
    font-size: 14px;
    border-radius: 2px;
    cursor: pointer;
    margin: 0 10px;
}

#tool input {
    height: 38px;
    line-height: 38px;
    padding-left: 10px;
    border: 1px solid #e6e6e6;
    border-radius: 2px;
    width: 170px;
}

#tool p {
    margin: 10px 0;
}

/* 首页,列表,内容,搜索 */
#index .fl {
    width: 68%
}

#index .fr {
    width: 30%;
}

#index .news h2 {
    margin-bottom: 0.5em;
    font-weight: 500;
    font-family: Michroma, 'Segoe UI Light', 'Segoe UI', 'Segoe UI WP', 'Microsoft Jhenghei', '微软雅黑', sans-serif, Times;
}

#index .news h2 a {
    color: #1EAFF1;
    font-size: 1.3em;
}

#index .news h2 a:hover {
    color: #0965BC
}

#index .news .up_details {
    font-size: 0.8em;
    color: #666;
    border-bottom: 1px dashed #ccc;
    margin-bottom: 1em;
    padding-bottom: 0.3em
}

#index .news .up_details span {
    margin-right: 1em;
}

#index .news .up_details a {
    color: #E7790C
}

#index .news .up_details a:hover {
    text-decoration: underline;
}

#index .pages li {
    display: inline-block;
    margin-left: 0.3em;
    list-style: none;
}

#index .pages li a {
    border: 1px solid #e3e3e3;
    padding: 0.2em 0.6em;
    color: #444;
}

#index .pages li a:hover {
    background: #f1f1f1
}

#index .news * {
    line-height: 2em;
}

#index .news table tr {
    background: #fff;
    border-top: 1px solid #ccc;
}

#index .news table tr:nth-child(2n) {
    background: #f8f8f8;
}

#index .news table td,
#index .news table th {
    padding: 6px 13px;
    border: 1px solid #ddd;
}

/* 右侧 */
.search form {
    border: 1px solid #ddd;
    position: relative;
    width: 100%
}

.search p,
.category p,
.newest p,
.tag p {
    color: #66B0DA;
    border-bottom: 1px dotted #ddd;
    margin-bottom: 0.5em;
    padding-bottom: 0.3em;
}

.search form #search {
    padding: 0.7em;
    width: 95%;
    position: relative
}

.search form #submit {
    cursor: pointer;
    padding: 0.4em 1em;
    position: absolute;
    right: 0.3em;
    top: 0.3em;
    color: #fff;
    background: #C7C7C7;
    border-radius: 0.3em
}

.search form #search:focus {
    outline: none;
}

.search form #search:focus+#submit {
    background: #ff7f00
}

.category li {
    border-bottom: 1px dotted #ddd;
    padding: 0.5em;
    position: relative;
    list-style: none;
}

.category li a {
    width: 100%;
    color: #666;
    display: block;
}

.category li a span {
    color: #fff;
    padding: 0.1em 0.5em;
    background: #66B0DA;
    border-radius: 1em;
    display: block;
    position: absolute;
    top: 0.8em;
    right: 1em;
    font-size: 0.7em
}

.category li:hover {
    background: #66B0DA
}

.category li:hover a {
    color: #fff;
}

.category li:hover a span {
    background: #fff;
    color: #66B0DA
}

.category .focus {
    background: #66B0DA
}

.category .focus a {
    color: #fff;
}

.category .focus a span {
    background: #fff;
    color: #66B0DA
}

.show .news h1 {
    text-align: center;
    color: #1EAFF1;
    font-weight: initial;
    margin-bottom: 0.3em;
}

.show .news .up_details {
    text-align: center;
}

.show .news .details {
    width: 90%;
}

.newest li {
    list-style: inside disc;
    color: #ddd;
}

.newest li a {
    color: #666;
}

.newest li a:hover {
    color: #1EAFF1;
    text-decoration: underline;
}

.tag a {
    display: inline-block;
    color: #666;
    text-shadow: 1px 1px 1px white;
    padding: 0.4em 0.8em 0.4em 1.5em;
    background: #EEE url("../images/tag.png") 5px center no-repeat;
    border: 1px solid #DDD;
    border-radius: 0.3em;
    font-size: 0.5em;
}

.tag a:hover {
    background-color: #F9F9F9;
}

/* 新闻聚合 */
#news a {
    color: #000;
}

#news #news-header {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

#news #news-header div {
    display: inline-block;
    padding: 5px 10px;
}

#news #news-header div a:hover {
    color: #E7790C;
}

#news #news-header .id-checked a {
    color: #E7790C;
}

#news #main li {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    list-style-position: inside
}

#news #main li a {
    margin-left: 10px;
}

#news #main li a:hover {
    color: #1EAFF1;
    text-decoration: underline;
}

/* 移动端 */
@media only screen and (max-width:640px) {
    .top .fl span {
        display: none;
    }

    #nav .panel .panel_body div {
        width: 100%;
        text-align: left;
        padding-left: 2em;
    }

    #index .fl {
        width: 100%
    }

    #index .fr {
        display: none;
    }

    #yearRemain {
        display: none;
    }
}

/* 记事本 */
#text {
    height: 85vh;
    overflow: scroll;
}

#text #editor {
    border-top: 1px solid #e6e6e6;
    width: -webkit-fill-available;
    padding: 1em;
    height: 95%;
}

#text [contenteditable] {
    outline: 0px solid transparent;
}

/* 代码块 */
.language-markup {
    counter-reset: linenumber;
    background: #2d2d2d;
    color: #ccc;
    padding: 1em 1em 1em 3em;
    border-radius: 5px;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    overflow-x: auto;
    white-space: pre-wrap;
    position: relative;
}

.language-markup code {
    display: block;
}

.language-markup code>span {
    display: block;
    counter-increment: linenumber;
    padding-left: 10px;
    position: relative;
}

.language-markup code>span::before {
    content: counter(linenumber);
    position: absolute;
    left: -2.5em;
    width: 2em;
    text-align: right;
    color: #999;
    user-select: none;
}