/* The "odyes" look of the old Joomla template (templates/odyes/css/template.css, 2016, by Saga),
   rebuilt for plain HTML. Desktop keeps the old 980 px layout; narrow screens get one column. */

body {
	width: 100%;
	font-family: Tahoma, Arial, Verdana, sans-serif;
	margin: 0;
	padding: 0;
	font-size: 12px;
	background: #fff;
	text-align: center;
}
.clr { clear: both; font-size: 0; line-height: 0; }
.bg { background: #12171d url(/images/template/content.png) top center repeat-y; }
.menu_bg { background: transparent url(/images/template/bg.gif) top left repeat-x; }
[hidden] { display: none !important; }

#wrapper { margin: 0 auto; width: 980px; }
#header {
	background: transparent url(/images/template/header.jpg) top center no-repeat;
	height: 270px;
	padding: 0 10px;
}
.header_logo { float: left; width: 480px; height: 220px; }
#logo {
	display: block;
	width: 300px;
	height: 160px;
	margin-top: 40px;
	text-indent: -9999px;
	overflow: hidden;
}
#news_flash { float: left; width: 480px; height: 170px; padding: 50px 0 0 0; overflow: hidden; }

/* top menu */
#top_menu { width: 960px; padding: 0; margin: 0 auto; overflow: hidden; }
.top_menu_separator {
	display: table;
	margin: 0 auto;
	background: transparent url(/images/template/menu_separator.png) top left no-repeat;
	padding: 0 2px;
}
#top_menu ul { margin: 0 auto; padding: 0; height: 50px; text-align: center; list-style: none; }
#top_menu ul li {
	text-transform: uppercase;
	font-size: 13px;
	font-weight: bold;
	float: left;
	padding: 0;
	margin: 0;
	line-height: 50px;
}
#top_menu ul li a, #top_menu ul li a:visited {
	font-family: Tahoma, Verdana, sans-serif;
	font-size: 13px;
	float: left;
	display: block;
	color: #d4d5d6;
	text-decoration: none;
	font-weight: bold;
	line-height: 50px;
	padding: 0 10px;
	margin: 0;
	background: transparent url(/images/template/but.png) top right repeat-x;
}
#top_menu ul li a:hover { background-image: url(/images/template/but_hover.png); }

/* page frame */
#content { background: transparent url(/images/template/content.png) top left repeat-y; }
.content_t {
	background: transparent url(/images/template/content_top.png) top center no-repeat;
	width: 940px;
	margin: 0 auto;
	padding: 20px;
}
#leftcolumn, #rightcolumn { float: left; margin: 0; padding: 0 0 20px 0; width: 180px; text-align: center; }
#rightcolumn { float: right; }
#main { float: left; width: 560px; padding: 0; font-size: 12px; margin: 0 10px 10px 10px; text-align: left; color: #999; }
#main_full { float: left; width: 740px; padding: 0 10px 10px 10px; font-size: 12px; text-align: left; color: #999; }
#footer { line-height: 20px; }
.copyright { font-size: 12px; text-align: center; width: 100%; margin: 0 auto; color: #999; }

/* side boxes ("rounded" module chrome: div.module > div > div > div) */
#leftcolumn div.module_menu, #rightcolumn div.module_menu, #leftcolumn div.module, #rightcolumn div.module {
	margin: 0; padding: 0 0 10px 0; text-align: center; width: 180px;
}
#leftcolumn div.module_menu > div, #rightcolumn div.module_menu > div, #leftcolumn div.module > div, #rightcolumn div.module > div {
	background: transparent url(/images/template/l_r_middle.gif) top left repeat-y;
	padding: 0; margin: 0;
}
#leftcolumn div.module_menu > div > div, #rightcolumn div.module_menu > div > div, #leftcolumn div.module > div > div, #rightcolumn div.module > div > div {
	background: transparent url(/images/template/l_r_bottom.gif) bottom center no-repeat;
	padding: 0 0 10px 0; margin: 0;
}
#leftcolumn div.module_menu > div > div, #leftcolumn div.module > div > div { text-align: left; }
#leftcolumn div.module_menu > div > div > div, #rightcolumn div.module_menu > div > div > div, #leftcolumn div.module > div > div > div, #rightcolumn div.module > div > div > div {
	background: url(/images/template/l_r_top.gif) top center no-repeat;
	padding: 0; margin: 0; color: #999; font-size: 12px;
}
#leftcolumn div > div > div > div > h3, #rightcolumn div > div > div > div > h3 {
	font-size: 13px;
	font-family: Tahoma, Verdana, sans-serif;
	font-weight: bold;
	text-align: left;
	color: #48678c;
	height: 30px;
	line-height: 30px;
	margin: 0 auto;
	padding: 0 0 5px 10px;
	background: url(/images/template/h3.png) top center no-repeat;
}

/* menus in the side boxes */
#leftcolumn ul.menu, #rightcolumn ul.menu { text-align: left; padding: 2px 10px 0 10px; }
#leftcolumn ul.menu li a, #rightcolumn ul.menu li a {
	padding: 0 0 0 10px;
	text-decoration: none;
	font-size: 13px;
	background: url(/images/template/menu_row.gif) center left no-repeat;
	margin: 0;
	color: #999;
}
#leftcolumn ul.menu li a:hover, #rightcolumn ul.menu li a:hover,
#leftcolumn ul.menu li.current > a, #rightcolumn ul.menu li.current > a { text-decoration: underline; color: #999; }
#leftcolumn ul.menu li ul, #rightcolumn ul.menu li ul { margin: 0; padding: 0; }
#leftcolumn ul.menu li ul li a, #rightcolumn ul.menu li ul li a {
	display: block;
	margin: 0 0 0 15px;
	padding: 0 0 0 18px;
	line-height: 17px;
}
#rightcolumn ul.menu li { margin: 0 0 0 10px; }
#rightcolumn ul.menu { padding: 2px 0 0 0; }
#leftcolumn ul.menu li img, #rightcolumn ul.menu li img { vertical-align: middle; }
ul.latestnews { padding: 2px 0 0 0; }
ul.latestnews li { text-align: left; margin: 0 0 0 10px; padding-right: 6px; }
ul.latestnews li a span { font-size: 13px; }

/* text */
ul { margin: 0; padding: 0; list-style: none; list-style-position: outside; }
li { line-height: 18px; padding-left: 0; padding-top: 0; }
.article-body ul, .category-desc ul, .article-body ol, .category-desc ol, .items-more ol, .cat-children ul { padding-left: 2em; }
.article-body ul, .category-desc ul { list-style: disc; }
a { outline: none; }
a:link, a:visited { text-decoration: underline; font-weight: normal; color: #8F9DAD; font-size: 12px; }
a:hover { text-decoration: none; color: #8F9DAD; }
p { margin-top: 0; margin-bottom: 5px; text-align: justify; font-size: 12px; }
td { font-family: Tahoma, Arial, Verdana, sans-serif; color: #999; font-size: 12px; text-align: left; }
img, table { border: none; }
a img { border: none; }
h1 { padding: 0; font-family: Tahoma, Arial, sans-serif; font-size: 1.3em; font-weight: bold; color: #999; text-align: left; }
h2, .contentheading { padding: 0; font-family: Tahoma, Arial, sans-serif; font-size: 12px; color: #999; text-align: left; font-weight: bold; margin-bottom: 0; }
h3, .componentheading { margin: 0; font-family: Tahoma, Arial, sans-serif; font-size: 13px; text-align: left; color: #999; padding: 0; }
h4 { font-family: Tahoma, Arial, sans-serif; color: #999; font-size: 11px; text-transform: uppercase; }
hr { border: 0; border-top: 1px solid #555; }

/* build.py puts every outermost table of a text in <div class="tbox">: no box of its own on a desktop; on narrow
   screens it scrolls sideways by itself when the table is wider than the screen (see the end of this file) */
.tbox { display: contents; }

/* old Joomla 1.5 tables that live on inside some texts */
table.contentpaneopen { margin: 0 4px 0 0; }
table.contentpaneopen td { padding: 0; line-height: 14px; font-size: 12px; text-align: left; }
table.contentpaneopen td.contentheading { font-size: 12px; vertical-align: middle; color: #aaa; font-weight: bold; }
table.contentpaneopen td.createdate { height: 20px; vertical-align: top; font-size: 11px; color: #49678D; }
table.contentpaneopen td.modifydate { height: 20px; vertical-align: top; font-size: 11px; color: #49678D; text-align: right; }
table.contentpaneopen li { margin-bottom: 5px; }
table.contentpaneopen h3 { margin-top: 25px; }
.small { font-size: 11px; color: #49678D; font-weight: normal; text-align: left; }
.highlight { background-color: #bfc3c8; }
div.caption { padding: 0 10px; }
div.caption p { font-size: .9em; color: #999; text-align: center; }

/* article pages (the Joomla 3 changes in the old template) */
div.item-page, div.blog-item, div.blog-featured { font-size: 13px; }
div.page-header h2 { font-size: 15px; margin: 0 0 6px 0; }
div.page-header h2 a:link, div.page-header h2 a:visited { font-size: 15px; font-weight: bold; }
dl.article-info { margin: 0 0 10px 0; }
dd.createdby, dd.createdby span { color: #49678D; font-size: 13px; margin: 0; }
.article-body { margin-bottom: 15px; }
.article-index { float: right; margin: 0 0 10px 10px; padding: 6px 10px; background: #20252b; border: 1px solid #2d3640; max-width: 260px; }
.article-index h3 { color: #48678c; }
.article-index ul { list-style: none; padding: 0; }
h3.pagebreak { margin: 20px 0 8px 0; padding: 4px 0; border-bottom: 1px solid #2d3640; color: #48678c; font-size: 14px; }
p.readmore { text-align: right; }
div.blog-item { margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #2d3640; }

/* category pages */
table.category { width: 100%; border-collapse: collapse; margin: 6px 0 15px 0; }
table.category th { text-align: left; color: #999; font-weight: normal; padding: 4px; border-bottom: 1px solid #666; }
table.category td { padding: 3px 4px; }
#categorylist_header_title { width: 70%; }
.cat-children, .items-more { margin: 10px 0; }
.cat-children h3, .items-more h3 { color: #48678c; margin-bottom: 4px; }

/* news box on the front page (filled by /news.php from the forum) */
.newsbox { margin: 0 0 15px 0; text-align: left; }
.newsbox .module > div { background: #20252b; border: 1px solid #2d3640; }
.newsbox h3 {
	color: #48678c; font-size: 13px; font-weight: bold; height: 30px; line-height: 30px;
	margin: 0; padding: 0 10px; background: #1b222b; border-bottom: 1px solid #2d3640;
}
.newsbox ul { list-style: none; margin: 0; padding: 6px 10px; }
.newsbox li { line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.newsbox li a:link, .newsbox li a:visited { font-size: 13px; }
.newsbox .date { color: #49678D; margin-right: 8px; font-size: 12px; }
.newsbox p.more { margin: 0; padding: 0 10px 6px 10px; text-align: right; }

/* languages: <html data-lang> is set by the script in <head> (templates/lang.js). Elements with data-langs show only
   for the languages they list; without data-lang (no scripts) the Traditional Chinese ones show and the switch hides. */
html:not([data-lang="zh-CN"]):not([data-lang="en"]) [data-langs]:not([data-langs~="zh-TW"]),
html[data-lang="zh-CN"] [data-langs]:not([data-langs~="zh-CN"]),
html[data-lang="en"] [data-langs]:not([data-langs~="en"]) { display: none !important; }
html:not([data-lang]) #lang_switch, html:not([data-lang]) iframe[data-src] { display: none; }
/* 简体中文: the page body waits (at most 2.5 s) until /assets/zh-cn.js has converted it (templates/lang.js) */
html.zh-wait #content { visibility: hidden; }
#wrapper { position: relative; }
#lang_switch {
	position: absolute; top: 58px; right: 20px;
	padding: 4px 10px; background: rgba(18, 23, 29, 0.8); border-radius: 3px;
	color: #666; font-size: 12px; line-height: 18px;
}
#lang_switch a:link, #lang_switch a:visited { color: #8F9DAD; font-size: 12px; }
#lang_switch a[aria-current], #lang_switch a[aria-current]:hover { color: #fff; font-weight: bold; text-decoration: none; cursor: default; }
/* "This page is in Chinese for now." under the title, for English visitors only (build.py EN_NOTE) */
p.en-note { color: #d0b060; text-align: left; margin: 0 0 10px 0; }
p.en-note a:link, p.en-note a:visited { color: #d0b060; }
/* justified English leaves wide gaps between words on narrow screens; Chinese text stays justified */
.article-body [lang="en"] p { text-align: left; }

/* the English front page /en/ (pages/en.md) */
.en-front .article-body { max-width: 640px; }
.en-front h1 { font-size: 22px; color: #fff; margin: 4px 0 4px 0; }
.en-front h2 { font-size: 16px; color: #ffff00; margin: 18px 0 6px 0; }
.en-front p, .en-front li { font-size: 14px; line-height: 22px; text-align: left; }
.en-front li { margin-bottom: 4px; }
.en-front .article-body ol { list-style: decimal; }
.en-front a:link, .en-front a:visited { font-size: 14px; overflow-wrap: anywhere; }
.en-front code { color: #00ff00; font-size: 14px; }
.en-front p.en-lead { color: #00ffff; font-size: 15px; }
.en-front p.en-back { margin-top: 18px; }

/* the front page's "server online, N players" line (from /status-badge.php) */
.ody-live-badge { color: #ccc; font-size: 12px; }
.ody-live-badge .dot { color: #3c3; }

/* narrow screens: one column, menu bar wraps, wide tables scroll inside the text */
@media (max-width: 1000px) {
	.bg, #content { background-image: none; }
	#wrapper { width: auto; }
	#header { height: auto; padding: 0; background-size: cover; background-position: 30% bottom; }
	#top_menu { width: auto; background: rgba(18, 23, 29, 0.85); }
	.top_menu_separator { display: block; background: none; }
	#top_menu ul { height: auto; display: flex; flex-wrap: wrap; justify-content: center; }
	#top_menu ul li, #top_menu ul li a, #top_menu ul li a:visited { float: none; line-height: 40px; }
	#top_menu ul li a { background: none; padding: 0 8px; }
	.header_logo { float: none; width: auto; height: 0; padding-bottom: 22%; position: relative; }
	#logo { position: absolute; left: 10%; top: 10%; width: 30%; height: 70%; margin: 0; }
	#news_flash { display: none; }
	#lang_switch { position: static; border-radius: 0; padding: 6px 12px; text-align: right; background: #12171d; font-size: 14px; line-height: 22px; }
	#lang_switch a:link, #lang_switch a:visited { font-size: 14px; }
	.content_t { width: auto; padding: 10px; display: flex; flex-direction: column; background: none; }
	#main, #main_full { order: 1; float: none; width: auto; margin: 0 0 10px 0; padding: 0; overflow-x: auto; }
	#leftcolumn { order: 2; }
	#rightcolumn { order: 3; }
	.content_t > .clr { order: 4; }
	#footer { order: 5; }
	#leftcolumn, #rightcolumn { float: none; width: auto; padding: 0; }
	#leftcolumn div.module_menu, #rightcolumn div.module_menu, #leftcolumn div.module, #rightcolumn div.module { width: auto; }
	#leftcolumn div.module_menu > div, #rightcolumn div.module_menu > div, #leftcolumn div.module > div, #rightcolumn div.module > div,
	#leftcolumn div.module_menu > div > div, #rightcolumn div.module_menu > div > div, #leftcolumn div.module > div > div, #rightcolumn div.module > div > div,
	#leftcolumn div.module_menu > div > div > div, #rightcolumn div.module_menu > div > div > div, #leftcolumn div.module > div > div > div, #rightcolumn div.module > div > div > div {
		background: #20252b; padding-bottom: 6px;
	}
	#leftcolumn div > div > div > div > h3, #rightcolumn div > div > div > div > h3 { background: #1b222b; }
	.article-body img, .category-desc img, .blog-featured img { max-width: 100%; height: auto; }
	/* the old texts use fixed-width tables (530-730 px): let them shrink to the screen; tables with 7 or more
	   columns keep their natural width and scroll sideways inside the text instead */
	.article-body table, .category-desc table, .blog-featured table { width: 100% !important; height: auto !important; }
	.article-body table:has(> tbody > tr > :nth-child(7), > tr > :nth-child(7)),
	.category-desc table:has(> tbody > tr > :nth-child(7), > tr > :nth-child(7)) { width: max-content !important; }
	.article-body td, .category-desc td, .blog-featured td { overflow-wrap: break-word; }
	.article-index { float: none; max-width: none; margin: 0 0 10px 0; }
	.tbox { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	/* menus written as wide tables of links (class m-flow, set by build.py: the skill menu on every skill page):
	   each row's links wrap onto as many lines as they need */
	#main table.m-flow, #main_full table.m-flow, table.m-flow > tbody { display: block; width: auto !important; }
	table.m-flow > tbody > tr { display: flex; flex-wrap: wrap; column-gap: 14px; margin-bottom: 4px; }
	table.m-flow > tbody > tr > td { display: block; width: auto !important; padding: 4px 0; white-space: nowrap; }
	.article-body td, .category-desc td, .blog-featured td, .article-body tr, .category-desc tr, .blog-featured tr { height: auto !important; }
	#main img, #main_full img { max-width: 100%; height: auto; }
	p.gap { line-height: 8px; margin: 0; }     /* the old texts' empty spacing paragraphs (build.py) */

	/* readable text: 15 px instead of 12 px (sizes written into the texts themselves stay as they are) */
	body, p, td, th, li, dd, #main, #main_full, div.item-page, div.blog-item, div.blog-featured, .copyright { font-size: 15px; }
	p, li, td, th, dd { line-height: 1.6; }
	table.contentpaneopen td { font-size: 15px; line-height: 1.6; }
	table.contentpaneopen td.createdate, table.contentpaneopen td.modifydate, .small { font-size: 13px; }
	a:link, a:visited { font-size: 15px; }
	.article-body a:link, .article-body a:visited, .category-desc a:link, .category-desc a:visited,
	.blog-featured a:link, .blog-featured a:visited, table.category a:link, table.category a:visited { font-size: inherit; }
	div.page-header h2, div.page-header h2 a:link, div.page-header h2 a:visited { font-size: 18px; line-height: 1.4; }
	dd.createdby, dd.createdby span { font-size: 14px; }

	/* menus: one link per row, rows at least 40 px tall, so a finger hits the right one */
	#leftcolumn ul.menu li a, #rightcolumn ul.menu li a, ul.latestnews li a { display: block; font-size: 16px; line-height: 24px; padding-top: 8px; padding-bottom: 8px; }
	#leftcolumn ul.menu li a, #rightcolumn ul.menu li a { background-position: 0 50%; }
	#leftcolumn ul.menu li ul li a, #rightcolumn ul.menu li ul li a { padding-top: 8px; padding-bottom: 8px; line-height: 24px; background-position: 0 50%; }
	#leftcolumn ul.menu li, #rightcolumn ul.menu li, ul.latestnews li { line-height: 24px; }
	ul.latestnews li a span { font-size: 16px; }
	#leftcolumn div > div > div > div > h3, #rightcolumn div > div > div > div > h3 { font-size: 16px; height: auto; line-height: 40px; }
	#lang_switch a:link, #lang_switch a:visited { display: inline-block; padding: 6px 4px; font-size: 15px; }
	.newsbox li { line-height: 32px; }
	.newsbox li a:link, .newsbox li a:visited { font-size: 15px; }
}

/* phones: the page-layout tables of the old texts (class m-stack, set by build.py: 2-4 columns with running text)
   show their cells one below the other instead of squeezed side by side */
@media (max-width: 600px) {
	table.m-stack, table.m-stack > tbody, table.m-stack > thead, table.m-stack > tfoot,
	table.m-stack > tbody > tr, table.m-stack > thead > tr, table.m-stack > tfoot > tr,
	table.m-stack > tbody > tr > td, table.m-stack > tbody > tr > th, table.m-stack > thead > tr > td, table.m-stack > thead > tr > th {
		display: block; width: auto !important; height: auto !important;
	}
	table.m-stack > tbody > tr > td, table.m-stack > tbody > tr > th, table.m-stack > thead > tr > td, table.m-stack > thead > tr > th {
		border: 0 !important; padding: 3px 0 !important;
	}
	table.m-stack[border]:not([border="0"]) > tbody > tr { border-bottom: 1px solid #3a4450; padding: 6px 0; }
	table.m-stack > tbody > tr > td[rowspan]:not([rowspan="1"]) { font-weight: bold; color: #ccc; }
}
