/* RESET */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 13px;
    line-height: 1.231;
    font-family: arial,helvetica,clean,sans-serif;
    /* vertical-align: baseline; */
    background: transparent;
}

strong {
    font-weight: bold;
}


ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after, q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* PAGE LAYOUT */

html, body {
    height: 100%;
}

#wrapper {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -80px; /* the bottom margin is the negative value of the footer's height */
}

body {
    margin: 0 auto;
    /* width: 960px; */
    min-width: 960px;
}

#leftcolumn {
    float: left;
    width: 160px;
}

#content {
    margin: 0 20px 0 160px;
}

#push {
    clear: both;
}

#footer, #push {
    height: 80px; /* #push must be the same height as #footer */
}

#footer {
    clear: both;
    /* margin: 0 auto; */
    padding: 20px 20px 0;
    /* width: 940px; */
}

/* HEADER */

#header {
    height: 200px;
}

#header h1 {
    color: #fff;
    font-size: 272%;
    margin: 0;
    padding: 20px 0 0 120px;
}

#header h2 {
    color: #fff;
    font-size: 108%;
    margin: 0;
    padding: 0 0 0 120px;
}

/* MENU 1 */

#menu1 {
    /*float: left;*/
    height: 42px;
    margin: 0 0 0 0;
    width: 100%;
}

#menu1 ul {
    padding: 0;
    margin: 0;
    float: left;

}

#menu1 ul li { 
    display: inline; 
}

#menu1 ul li a, #menu1 ul li a:link {
    color: #fff;
    float: left;
    padding: 7px 10px 8px 10px;
    text-decoration: none;
}

#menu1 ul li a:hover {
    background-color: #fff;
    color: #37657f;
    padding: 7px 10px 8px 10px;
}

/* MENU 2 */
/*
#menu2 { 
    float: left;
    margin: 0 0 0 20px;
    width: 110px;
}

* html #menu2 { 
    float: left;
    margin-left: 0;
    padding-left: 20px;
    width: 125px;
}
*/

#menu2 { 
    background-color: #5f8499;
    padding: 10px 0;
}

#menu2 ul li a {
    color: #fff;
    display: block;
    font-size: 93%;
    font-weight: normal;
    padding: 0.25em 0 0.25em 0;
    text-decoration: none;
    text-indent: 10px;
    width: 100%;
}

#menu2 ul li a:hover {
    background-color: #afc1cc;
    color: #37657f;
}

/* SIDEBAR */

#sidebar_bg {
}

.sidebar {
    position: relative;
    background-color: #afc1cc;
    color: #fff;
    margin: 5px;
    width: 150px;
    min-height: 100%;
}

#userinfo, #contestinfo {
    width: 130px;
    padding: 10px;
}
/* have problem on IE -- what's this?
--
* html .sidebar {
    position: relative;
    color: #fff;
    margin: 0 0 0 130px;
    padding: 10px;
    width: 110px;
}
*/

.sidebar a, .sidebar a:link {
    color: #37657f;
}

/* HEADINGS */

h1, h2, h3, h4, h5, h6 
{     
    color: #37657f;
    letter-spacing: 1px;
    margin: 6px 0;
    text-transform: uppercase;
    font-weight: bold;
    font-family: verdana, sans-serif; /* generic font families are preferred */
}

h1 {
    font-size: 189%;
}

h2 {
    font-size: 146.5%;
}

h3 {
    /*
    border-top: 2px dotted #afc1cc;
    border-bottom: 2px dotted #afc1cc;
    padding: 5px 0;
    */
    font-size: 131%;
}

h4, h5, h6 {
    font-size: 100%;
}

/* LINKS */

a, a:link, a:active, a:visited {
    color: #ea1c26;
    font-weight: bold;
    text-decoration: underline;
}

a:hover {
    color: #37657f;
    text-decoration: none;
}

/* SITE STYLES */

body, #menu1, #header {
    background-color: #37657f;
}

#wrapper {
    background-color: #fff;
}

div {
    margin: 0;
}

p {
    margin: 9px 0;
}

img {
    border: 0;
}

.float_left { 
    float: left; 
}

.float_right { 
    float: right; 
}

p.float_left { 
    float: left;
    width: 48%;
    margin: 0 2% 20px 0;
}

p.float_right { 
    float: right; 
    width: 48%;
    margin: 0 0 20px 0;
}

img.float_left { 
    border-bottom: 7px solid #37657f;
    float: left;
    margin: 4px 10px 0 0;
    padding: 0 0 3px 10px;
}

img.float_right { 
    border-bottom: 7px solid #37657f;
    float: right;
    margin: 4px 0 0 10px;
    padding: 0 0 3px 10px;
}

.clear:after {
    content: ".";
    display: block;
    clear: both;
    visibility: hidden;
    line-height: 0;
    height: 0;
}

.clear {
    display: inline-block;
}

* html .clear {
    height: 1%;
}

/* added by liangent */

#code_upload form {
    margin: 10px 5px 10px;
    border-top: 2px dotted #37657f;
}

th {
    font-weight: bold;
}

#main_list {
    width: 100%;
}

#main_list, #contest_results_table {
    text-align: center;
    margin: 10px;
}

#main_list td,
#main_list th,
#contest_results_table td,
#contest_results_table th {
    padding: 0.2em;
}

#main_list thead, #contest_results_table thead {
    border-bottom: 1px solid #afc1cc; /* color is the same as background color of sidebar */
}

#main_list a {
    display: block;
}

.prevlink {
    float: left;
}

.nextlink {
    float: right;
}

.prevnext {
    width: 100%;
    margin: 10px 0;
    text-align: center;
}

.prevnext:after {
    clear: both;
}

h1 a {
    color: #37657f;
    letter-spacing: 1px;
    margin: 18px 0 6px 0;
    text-transform: uppercase;
    font-size: 100%;
}

table .formtable {
    border: 0;
}

.submission_detail_item {
    margin-left: 2em;
}

#header h1, #header h2 {
    visibility: hidden;
}

/* the Lines Below is added by Norman */

/* merged to another */

#main_content p, #main_content pre, #home_content ul, #home_discuss {
    margin-left: 2em;
}
/*
.submission_detail_item_expand_button, .submission_detail_item_collapse_button {
    color: blue !important;
    text-decoration: none !important;
}
*/
.for_screen_reader {
    display: none;
}

#site_wide_announcements {
    border: 3px dotted #afc1cc;
    margin: 6px;
    padding: 6px;
    /* color: #37657F; */
    color: #afc1cc;
    list-style: circle inside;
    padding-left: 6px;
}

#site_wide_announcements ul li {
    padding-top: 2px;
    padding-bottom: 2px;
}

.iofilename {
    text-transform: none;
    font-weight: bold;
}

.sortable thead {
    cursor: pointer;
}

#contest_results_table .problem_results_detail {
    font-family: monospace; /* "lucida console", "courier new", courier, sans-serif; */
}

dfn {
    font-style: normal;
    border-bottom: 1px dotted;
}

#main_content h2, #main_content h3, #main_content h4, #main_content h5, #main_content h6 {
    border-bottom: 1px solid #afc1cc;
    /*
    color: white;
    background-color: #618fa2;
    */
}

a:link{color:#2f6c9e}
a:visited{color:#2f6c9e}

#home_discuss th {
    text-align: left; 
}

#pas_code {
    width: 100%;
}

#home_content li {
    padding-top: 2px;
    padding-bottom: 2px;
}

/* DEBUG */
/*
body {
    border: 1px solid red !important;
}

#wrapper {
    border: 1px solid blue !important;
}

#content {
    border: 1px solid green !important;
}

body {
    min-width: 1280px !important;
}
*/

#main_content blockquote {
    margin-left: 4em;
}

.ratiobar {
    border: 1px solid #37657f;
    padding: 1px;
}

.ratiobar div {
    background: #afc1cc;
}

p.markup {
    vertical-align: middle;
}

#id_tags {
   width: 350px;
}


.contest-not-started:before {
   padding-left: 5px;
   background: url(http://media.oj.oiers.cn/images/new.gif);
}
/*
# there's sidebar
li.contest-not-started:before {
    content: "NEW";
    font-size: smaller;
    color: #37657f;
    border: dotted #afc1cc 1px;
}
*/

/* XXX: paths! */

#footer {
    background: url(../images/footer.png) repeat-x 0% 0%;
}

/* HEADER */

#header {
    background-repeat: no-repeat;
    background-position: center center;
}

#menu1 {
    background-image: url(../images/bg_menu1.png);
    background-repeat: repeat-x;
    background-position: top left;
}
/*
#menu2 ul li a {
    background: url(../images/arrow.gif) no-repeat left center;
}

#menu2 ul li a:hover {
    background: url(../images/arrowOn.gif) no-repeat left center;
}
*/
/* SIDEBAR */
/*
#sidebar_bg {
    background: url(../images/sidebar_bg.png) repeat-y 0% 0%;
}
*/
img.float_left {
    background: #fff url(../images/img_border.gif) no-repeat 0% 0%;
}

img.float_right {
    background: #fff url(../images/img_border.gif) no-repeat 0% 0%;
}

/* from MediaWiki's main.css */
.wikimarkup abbr,
.wikimarkup acronym,
.wikimarkup .explain {
	border-bottom: 1px dotted black;
	color: black;
	background: none;
	cursor: help;
}
.wikimarkup q {
	font-family: Times, "Times New Roman", serif;
	font-style: italic;
}
/* Disabled for now
.wikimarkup blockquote {
	font-family: Times, "Times New Roman", serif;
	font-style: italic;
}*/
.wikimarkup code {
	background-color: #f9f9f9;
}
.wikimarkup pre {
	padding: 1em;
	border: 1px dashed #2f6fab;
	color: black;
	background-color: #f9f9f9;
	line-height: 1.1em;
}
.wikimarkup ul {
	line-height: 1.5em;
	list-style-type: square;
	margin: .3em 0 0 1.5em;
	padding: 0;
	list-style-image: url(images/bullet-icon.png);
}
.wikimarkup ol {
	line-height: 1.5em;
	margin: .3em 0 0 3.2em;
	padding: 0;
	list-style-image: none;
}
.wikimarkup li {
	margin-bottom: .1em;
}
.wikimarkup dt {
	font-weight: bold;
	margin-bottom: .1em;
}
.wikimarkup dl {
	margin-top: .2em;
	margin-bottom: .5em;
}
.wikimarkup dd {
	line-height: 1.5em;
	margin-left: 2em;
	margin-bottom: .1em;
}
/* Tables */
.wikimarkup table {
	font-size: 100%;
	color: black;
	/* we don't want the bottom borders of <h2>s to be visible through
	 * floated tables */
	background-color: white;
}
.wikimarkup fieldset table {
	/* but keep table layouts in forms clean... */
	background: none;
}

/* end from mediawiki */

.errorlist li {
    color: red;
}

#main_content p {
	line-height: 1.6em;
	max-width: 600px;
}
