/* ===== 基础 ===== */
* { box-sizing: border-box; }
body {
    margin: 0;
    background-color: #fff;
    font-size: .8em;
    color: #333;
    font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
}
h1 { color: #901; margin: 0 0 .6em; margin-top: .7em; padding: 0; font-weight: 700; }
h2, h3, h4, h5, h6 { margin: .5em 0 .4em; padding: 0; letter-spacing: 1px; }
ul { list-style: square; }
li, p { line-height: 141%; }
a { text-decoration: none; background: 0 0; color: #b01; }
a:visited { color: #824; }
a:hover { text-decoration: underline; background-color: transparent; }
a.newpage { color: #d61; text-decoration: none; }

#content-wrap {
    position: relative;
    margin: 2em auto 0;
    max-width: 1040px;
    min-height: 1300px;
    height: auto !important;
}

/* 红黑白条纹背景 */
div#container-wrap {
    background: url(/static/img/body_bg.png) top left repeat-x;
    background-color: #fff;
}

/* ===== 页头 ===== */
#header {
    width: 90%;
    margin: 0 auto;
    max-width: 980px;
    position: relative;
    height: 140px;
    z-index: 10;
    padding-bottom: 22px;
    background: url(/static/img/logo.png) 10px 40px no-repeat;
}
#header h1, #header h2 { margin-left: 120px; padding: 0; float: left; max-height: 95px; }
#header h2 { clear: left; font-size: 105%; max-height: 38px; }
#header h1 a, #header h2 span { display: block; margin: 0; line-height: 0; max-height: 0; }
#header h1 a {
    padding: 50px 0 15px;
    color: #eee;
    background: 0 0;
    font-family: BauhausLTDemi, Simhei, Arial, sans-serif;
    font-size: 160%;
    text-decoration: none;
    text-shadow: 3px 3px 5px #000;
    letter-spacing: .9px;
}
#header h2 span {
    padding: 8px 0;
    font-weight: 700;
    color: #f0f0c0;
    text-shadow: 1px 1px 1px #000;
    text-shadow: 1px 1px 1px rgba(0,0,0,.8);
}

#search-top-box { position: absolute; top: 79px; right: 9px; width: 250px; text-align: right; }
#search-top-box-input {
    border: solid 1px #999; border-radius: 5px; color: #ccc;
    background-color: #300; box-shadow: inset 1px 1px 3px rgba(0,0,0,.5);
    padding: 3px 6px;
}
#search-top-box-input:focus, #search-top-box-input:hover {
    border: solid 1px #fff; color: #fff; background-color: #633;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,.8);
}
#search-top-box-form input[type=submit] {
    border: solid 1px #999; border-radius: 5px; padding: 3px 8px;
    font-size: 90%; font-weight: 700; color: #ccc; background-color: #633;
    background: linear-gradient(to bottom,#966,#633,#300);
    box-shadow: 0 1px 3px rgba(0,0,0,.5); cursor: pointer;
}
#login-status { color: #aaa; font-size: 90%; z-index: 30; position: absolute; top: 45px; right: 9px; }
#login-status a { background: 0 0; color: #ddd; }

/* ===== 顶部栏 ===== */
#top-bar {
    position: absolute;
    top: 140px;
    left: 0;
    width: 100%;
    height: 21px;
    line-height: 21px;
    padding: 0;
    margin: 0;
    z-index: 20;
    font-size: 90%;
    background: transparent;
}
#top-bar > .top-bar > ul { float: right; margin: 0; padding: 0; list-style: none; }
#top-bar .top-bar > ul > li { border: 0; position: relative; float: left; }
#top-bar .top-bar > ul > li > a {
    display: inline-block; height: 21px; line-height: 21px; padding: 0 12px;
    color: #fff; background: transparent; text-decoration: none; text-shadow: 1px 1px 1px #000;
}
#top-bar .top-bar > ul > li:hover > a { background: #eee; color: #a01; text-shadow: none; }
#top-bar .top-bar > ul > li > ul {
    position: absolute; top: 21px; left: 0; display: none;
    min-width: 200px; margin: 0; padding: 0; list-style: none;
    background: #fff; border: solid 1px #666; box-shadow: 0 2px 6px rgba(0,0,0,.5);
    z-index: 30;
}
#top-bar .top-bar > ul > li:hover > ul { display: block; }
#top-bar .top-bar > ul > li > ul > li { float: none; border-width: 0; }
#top-bar .top-bar > ul > li > ul > li > a {
    display: block; padding: 2px 12px; line-height: 160%;
    color: #a01; background: #fff; border-top: 1px solid #ddd;
}
#top-bar .top-bar > ul > li > ul > li > a:hover { text-decoration: none; background: #f4f4f4; }
#top-bar .top-bar > ul > li:last-child > ul { right: 0; left: auto; }

/* ===== 侧栏 ===== */
#side-bar {
    clear: none; float: none; position: absolute; top: .5em; left: 2em;
    width: 17em; padding: 0; border: 0; display: block;
}
#side-bar .side-block {
    padding: 10px; border: 1px solid #600; border-radius: 10px;
    box-shadow: 0 2px 6px rgba(102,0,0,.5); background: #fff; margin-bottom: 15px;
}
#side-bar .side-block .heading {
    color: #600; border-bottom: solid 1px #600; padding-left: 15px;
    margin-bottom: 5px; font-size: 8pt; font-weight: 700;
}
#side-bar .side-block .heading:not(:first-child) { margin-top: 10px; }
#side-bar .side-block .heading p { margin: 0; }
#side-bar .side-block .menu-item {
    margin: 2px 0; display: flex; align-items: center; line-height: 141%;
}
#side-bar .side-block .menu-item img {
    width: 13px; height: 13px; border: 0; margin-right: 4px; flex-shrink: 0;
    position: relative; top: -1px;
}
#side-bar .side-block .menu-item a { font-weight: 700; }
#side-bar .side-block .menu-item .sub-text { font-size: 80%; color: #666; }

/* 不同侧栏块背景 */
#side-bar .side-block.newcomer { background-color: #f0fff6; }
#side-bar .side-block.resources { background-color: #e7e5e8; }
#side-bar .side-block.admin { background-color: #fff0f0; }
#side-bar .side-block.media { background-color: #e5e5ff; }
#side-bar .side-block.license { background-color: #f0f0f0; }

/* 折叠块 */
.collapsible-block-folded,
.collapsible-block-unfolded-link { margin: 4px 0; }
.collapsible-block-link {
    font-weight: 700; cursor: pointer; display: inline-block; color: #b01;
}
.collapsible-block-link:hover { text-decoration: underline; }
.side-block .collapsible-block-link { color: #600; }
.collapsible-block-folded .collapsible-block-link {
    padding-left: 17px;
    background: url(/static/img/expand.png) 0 2px no-repeat;
    min-height: 14px;
}

/* ===== 主内容 ===== */
#main-content {
    margin: 0 2em 0 22em;
    padding: 1em;
    position: relative;
}
#breadcrumbs { margin: -1em 0 1em; }

/* 内容面板 */
.content-panel {
    border: solid 1px #888880; border-radius: 10px; background-color: #999990;
    margin: 10px 0 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,.5), inset 0 1px rgba(255,255,255,.3),
                inset 0 10px rgba(255,255,255,.2), inset 0 10px 20px rgba(255,255,255,.25),
                inset 0 -15px 30px rgba(0,0,0,.1);
}
.content-panel.standalone { background: #fcfdfb; }
.content-panel.centered { text-align: center; }
.content-panel.left-column { float: left; width: 48%; }
.content-panel.right-column { float: right; width: 48%; }
.content-panel .panel-heading {
    padding: 2px 10px; color: #fff; font-size: 90%; font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,.35);
}
.content-panel .panel-heading p { margin: 0; }
.content-panel .panel-body {
    padding: 5px 10px;
    background: #fff9f0 url(/static/img/panel-bg-gradient-reverse.png) bottom repeat-x;
}
.content-panel .panel-footer {
    padding: 1px 10px; color: ivory; font-size: 80%; font-weight: 700;
    text-align: right; text-shadow: 1px 1px 2px rgba(0,0,0,.5);
}
.content-panel .panel-footer a { color: #fff; }
.content-panel .panel-footer p { margin: 0; }
.content-panel p { margin: 0.5em 0; }

/* 功能块 */
.feature-block { height: 230px; }
.feature-block .panel-body { height: 160px; overflow-y: hidden; }
.feature-block .feature-title { font-size: 120%; font-weight: bold; }
.feature-block .feature-subtitle { font-size: 90%; }
.feature-block .feature-title > p, .feature-block .feature-subtitle > p { margin: 0; }

/* 新闻块 */
.news-block .panel-body { padding: 0; }
.news-block .panel-body .alternate { padding: 5px 10px; }
.news-block .news-title { font-weight: bold; font-size: 110%; margin-bottom: 5px; color: #633; }
.news-block .news-content { margin: 5px 0; }
.news-block .news-title > p, .news-block .news-content > p { margin: 0; }
.alternate:nth-child(even) { background-color: rgba(255,255,255,.9); }

/* 国际站点块 */
.international-block .panel-body { padding: 0; }
.international-entry { padding: 3px 20px; }
.international-entry:nth-child(even) {
    background-color: rgba(255,255,255,.9);
    border-top: solid 1px #eeeee0; border-bottom: solid 1px #eeeee0;
}
.international-entry table { border-collapse: collapse; width: 100%; }
.international-entry td { vertical-align: middle; }
.international-entry .international-logo { width: 48px; }
.international-entry .international-description { padding: 0 20px; }
.international-entry .international-description > p { padding: 0; margin: 2px 0; }
.international-entry .international-description > p:first-child { font-size: 120%; font-weight: bold; }
.international-entry .international-description > p:not(:first-child) { font-style: italic; }

/* 警告区域 */
.intro-warning { text-align: center; color: #600; }
.intro-warning .unmargined p { margin: 0; line-height: 100%; }
.intro-warning .huge {
    font-size: 400%; font-weight: bold; margin: 2px 0 5px; line-height: 1.1;
}

/* 标签页 */
.yui-navset { margin: 10px 0; }
.yui-navset .yui-nav {
    margin: 0; padding: 0; list-style: none; border-bottom: 2px solid #444;
    display: flex; flex-wrap: wrap;
}
.yui-navset .yui-nav li { margin: 0; padding: 0; }
.yui-navset .yui-nav li a {
    display: block; padding: 4px 14px; background: #d8d8d8;
    color: #333; border: 1px solid #888; border-bottom: 0;
    margin-right: 2px; font-weight: 700; font-style: normal; text-decoration: none;
}
.yui-navset .yui-nav li.selected a { background: #700; color: #fff; border-color: #700; }
.yui-navset .yui-nav li a:hover { background: #d88; color: #fff; text-decoration: none; }
.yui-navset .yui-content {
    background-color: #f5f5f5; padding: 10px; border: 1px solid #ccc; border-top: 0;
}
.yui-navset .yui-content > div { display: none; }
.yui-navset .yui-content > div.selected { display: block; }

/* 新页面表单 */
.new-page-box { text-align: center; margin: 1em 0; }
.new-page-box input[type=text] {
    padding: 3px 6px; border: 1px solid #999; border-radius: 3px;
}
.new-page-box input[type=submit] {
    padding: 3px 12px; border: 1px solid #666; border-radius: 3px;
    background: #eee; cursor: pointer;
}
.new-page-box input[type=submit]:hover { background: #ddd; }

/* 页面标签 */
.page-tags { margin: 1em 0 0; padding: 0; }
.page-tags span { display: inline-block; padding: 0; max-width: 60%; }
.page-tags a {
    display: inline-block; white-space: nowrap; margin-right: 4px;
    padding: 2px 6px; background: #eee; border-radius: 3px; font-size: 90%;
}

/* 页面选项 */
#page-options-container { margin-top: 12px; font-size: 90%; }
#page-options-bottom .btn {
    display: inline-block; padding: 3px 10px; margin: 2px 3px 2px 0;
    background: #eee; border: 1px solid #bbb; border-radius: 3px;
    color: #333 !important; text-decoration: none !important; cursor: pointer;
}
#page-options-bottom .btn:hover { background: #ddd; }

/* 页脚 */
#footer {
    clear: both; font-size: 77%; background: #444; color: #bbb;
    margin-top: 15px; padding: 3px 10px;
}
#footer a { color: #fff; background: 0 0; }
#footer .options { float: right; width: 50%; font-size: 100%; text-align: right; }
#license-area {
    font-size: 75%; color: #666; margin-top: 10px; text-align: center;
}

/* ===== 移动端菜单 ===== */
.open-menu { display: none; }
.close-menu-mask { display: none; }

/* ===== 提示 toast ===== */
#demo-toast {
    position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
    background: rgba(40,40,40,.95); color: #fff; padding: 10px 18px; border-radius: 6px;
    font-size: 13px; z-index: 9999; opacity: 0; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,.4); max-width: 80%; text-align: center;
}
#demo-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== 响应式 ===== */
@media (max-width: 767px) {
    #header { max-width: 90%; height: auto; padding-bottom: 0; }
    #header h1 a { font-size: 120%; padding: 30px 0 10px; }
    #header h2 span { padding: 6px 0; }
    #header, #header h1, #header h2 { margin-left: 0; }
    #header h1, #header h2 { margin-left: 90px; }
    #top-bar {
        position: static; width: 100%; height: auto; margin: 8px 0 0;
        background: rgba(40,40,40,.9); border-radius: 4px;
    }
    #top-bar .top-bar > ul { float: none; text-align: center; }
    #top-bar .top-bar > ul > li { float: none; display: inline-block; }
    #top-bar .top-bar > ul > li > a { padding: 0 10px; height: 28px; line-height: 28px; }
    #top-bar .top-bar > ul > li > ul {
        position: static; display: none; border-width: 0; box-shadow: none; background: #eee;
    }
    #top-bar .top-bar > ul > li:hover > ul { display: block; }

    #side-bar {
        position: fixed; top: 0; left: -20em; width: 17em; height: 100%;
        margin: 0; padding: 1em 1em 0; z-index: 100;
        background: #f8f4f4; overflow-y: auto;
        transition: left .3s ease;
        box-shadow: 3px 0 12px rgba(0,0,0,.35);
    }
    body.side-bar-open #side-bar { left: 0; }

    .close-menu-mask {
        display: none; position: fixed; inset: 0; z-index: 90;
        background: url(/static/img/black.png) repeat;
        opacity: .3;
    }
    body.side-bar-open .close-menu-mask { display: block; }

    .open-menu {
        display: block; position: fixed; top: .5em; left: .5em; z-index: 110;
        width: 34px; height: 34px; line-height: 32px; text-align: center;
        font-family: "Nanum Gothic", sans-serif; font-size: 26px; font-weight: 700;
        color: #888; background: #fff; border: 2px solid #888; border-radius: 50%;
        text-decoration: none !important; cursor: pointer;
        box-shadow: 0 1px 4px rgba(0,0,0,.25);
    }
    .open-menu:hover { box-shadow: 0 0 14px 2px #999; }

    #main-content { margin: 0 5%; padding: 0; }
    .content-panel.left-column, .content-panel.right-column { width: 99%; float: left; }
    .feature-block { height: auto; }
    .feature-block .panel-body { height: auto; overflow-y: visible; }
    #search-top-box { display: none; }
    #login-status { display: none; }
}
