:root {
	--color: #202020;
	--bg: #FFFFFF;
	--ctl-bg: #ffffff;
	--hr-color: #b0b0b0;
	--pale-grey: #c0c0c0;
	--pale-grey-grad: #d0d0d0;
	--path-bg: #e8e8e8;
	--controller_bg: #f0f0f0;
	--line: #aecccc;
	--a-link: #0E66bA;
	--a-visited: #65a0e5;
	--a-hover: #BF3A00;
}


html { background-color: #122632; }
body { color: var(--color); background-color: var(--bg); margin: 0em; padding-top: 50px; text-align: center; box-sizing: border-box; }

div { font-family: verdana, arial, sans-serif; padding: 0; margin: 0; }

div.bound { max-width: 900px; text-align: left; display: block; margin: auto;}
div.wide { max-width: 1350px; text-align: left; display: block; margin: auto;}
div.full { padding: 5px 0; }
div.band { background-color: var(--controller_bg); }

a:link    {color: var(--a-link); text-decoration: none;}
a:visited {color: var(--a-visited); text-decoration: none;}
a:hover, a:active {color: var(--a-hover); text-decoration: underline;}
a:hover::before { text-decoration: none; }

a:link.g, a:visited.g {color: #00aa00;}
a:hover.g, a:active.g {color: #00ff00;}

p { padding: 0.5em 5px; margin: 0; }
p.mar {text-indent: 2em;}

h1 { font-family: "PT Serif", verdana, arial; color: var(--color); font-size: 2em; padding: 20px 5px; overflow-wrap: break-word; margin: 0;}
h2, h3, h4 { margin: 0; padding: 10px 5px; }

h2 a:link, h2 a:visited {color: #004E8C;}

div.path { background-color: var(--path-bg); padding: 0; min-height: 43px; }
div.path a:link { color: #606060; padding: 12px 5px 0 5px; display: inline-block; }
div.path a:visited { color: #606060; }
div.path a:hover { text-decoration: underline; }
div.path img { max-width: 40px; max-height: 34px; border-radius: 3px; margin: 0 5px; padding: 0; vertical-align: -60%; }
div.path .toggle { margin: 3px 5px 2px 5px;}

div.maintitle { background-color: var(--path-bg); padding: 0px 0px 10px 0px; margin-bottom: 1em; }
div.maintitle a:link { color: #606060; padding: 1px 10px 0 5px; display: inline-block; font-weight: bold; }
div.maintitle a:visited { color: #606060; }
div.maintitle a:hover { text-decoration: underline; }
div.maintitle img { max-width: 56px; max-height: 50px; border-radius: 3px; margin: 1.9em 8px 0 5px; padding: 0; vertical-align: -50%; float:left; }
div.maintitle input[type=submit] { margin-top: 4px; }

div.cloud { max-width: 50%; margin: 5px 5px 5px 20px; }
div.cloud a:link, div.cloud a:visited { color: #808080; }

div.desc {  margin-top: -1em; padding-left: 5px; }

div.controller { padding-bottom: 15px; background-color: var(--controller_bg); }

#l { margin-top: 10px; display: inline-block; }

div.timePassed { background: #f8f8f8; color: #e0e0e0; font-size: x-large; font-weight: bold; padding: 15px 0; margin-bottom: 5px;
	border-top: 2px solid #f0f0f0; }

span.namecontrol { float: right; padding-top: 20px; padding-right: 5px; }

img {border: 0; max-width: 100%; max-height: 100vh;}
img.tex {vertical-align: middle}

video { max-width: 100%; }
iframe { max-width: 100%; }

.center {text-align: center;}
.r { text-align: right; }
.right { float: right; }
.small { font-size: smaller; }
.bold {font-weight: bold; }
.show { display: block; }
.overflow { overflow: hidden; overflow-x: auto; }
.nobr { white-space:nowrap; }

.veil { position: fixed; left: 0; top: 0; right: -15px; bottom: 0; z-index: 3; background-color: black; background-color: rgba(0,0,0,0.4); display: none; }

div.clear {clear: both}

span.red  {color: #FF0000;}
span.green{color: #00FF00;}
span.blue {color: #0000FF;}
span.q    {color: #808080;}


#tool {
	position: fixed;
	left: 0; top: 0; right: 0;
	height: 50px;
	background-color: #244c65;
	box-shadow: 0 1px 0 rgba(27, 27, 27, 0.2);
	z-index: 6;
	width: auto;
}

a.tool, button.tool {
	color: #dfdfdf;
	text-decoration: none;
	height: 	50px;
	display: inline-block;
	padding: 0 10px;
	vertical-align: top;
	cursor: pointer;

	&:link, &:visited { color: #dfdfdf; }
	&:hover { background-color: #345c75; }
}

div.scroll-icons { display: inline-block; overflow-y: hidden; overflow-x: hidden; white-space: nowrap; max-height: 60px; }

.i { background-image: url('gamedev_image.svg'); background-repeat: no-repeat; display: inline-block; margin: 0; padding: 0; }
a.tool .i { margin-top: 9px; }

.x32 { width: 32px; height: 32px; }

span.gamedev-logo { background-position: 0 0; width: 140px; }
span.gamedev { background-position: 0 0; }

span.pubs { background-position: -32px -32px; }
span.projects { background-position: -64px -32px; }
span.forum { background-position: -96px -32px; }
span.job { background-position: -128px -32px; }
span.arrowdown { background-position: -236px -32px; }
span.letter { background-position: -256px -32px; }

span.blink { animation: 0.5s infinite alternate blink; }
@keyframes blink { from { opacity: 1; } 75% { opacity: 1; } to { opacity: 0; } }

span.tool { padding-top: 15px; }

#enter-pos { background-color: #244c65; float: right; }

img.userpic { margin-left: 8px; border-radius: 3px; }


.modal-content {
	position: relative;
	top: 50px;
	float: right;
	text-align: left;
    background-color: var(--bg);
    padding: 20px;
    border: 1px solid var(--hr-color);
    max-width: 450px;
    display: block;
    border-radius: 4px;
	box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
}

#close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

#close:hover,
#close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#search {
	position: fixed;
	background-color: var(--pale-grey);
    top: 50px;
    z-index: 2;
    min-height: 50px;
    width: 100%;
    max-width: 900px;
	display: none;
	box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.2);
	border-radius: 5px;
}

#search div { padding: 10px 5px 0px 5px; }
#search p { text-align: right; }
#search input[type=text] { width: 100%; }


#menu {
	position: fixed;
	color: d0d0d0;
    background-color: rgb(205, 213, 223);
    width: 150px;
    top: 50px;
    bottom: 0;
    left: 0;
    overflow: auto;
    overflow-x: hidden;
    display: none;
}

#menu .content { padding: 10px; }
#menu::-webkit-scrollbar { display: none; }

#menu ul {padding: 0; margin:0px; margin-bottom: 10px; overflow: hidden;}
#menu ul li {margin: 1px; padding: 5px 5px; list-style: none;}
#menu ul a {color: #606060; text-decoration: none; display: inline-block; width: 100%;}
#menu ul a:hover {color: var(--color); }

ul.menu li.sel {background: #2e2e2e; margin: 1px; padding: 1px; padding-left: 3px; }
ul.menu li.sub {background: #CDD5DF; margin: 1px; padding: 2px; }
ul.menu li ul {background: #CDD5DF; list-style: none; padding: 0px; padding-top: 2px;margin: 0px;}
ul.menu li ul li {border-top: 1px solid #E7EDF3; background: #CDD5DF; margin: 0px; padding: 3px; padding-left: 8px; }
ul.menu li ul li.sel {border-top: 1px solid #E7EDF3; background: #CDD5DF; margin: 0px; padding: 3px; padding-left: 1px; }

.dropdown { position: relative; display: inline-block; }

.dropdown_view {
	display: none;
	position: absolute;
	right: 0;
	background-color: var(--bg);
	min-width: 100px;
	overflow: auto;
	box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.2);
	z-index: 5;
	border-radius: 4px;
	text-align: left;
}

.dropdown_view a { padding: 8px 16px; display: block; }
.dropdown_view a:hover { background-color: var(--path-bg); }

a.profile { padding: 8px 16px; display: block; }

a.tag { color: #606060; background-color: var(--path-bg); padding: 2px 3px 4px 3px; margin: 2px 1px 0px 1px; border-radius: 3px; display: inline-block; min-width: 1.5em; text-align: center; }
a.tag:hover { background-color: #D5E0E0; }

div.overright {overflow: auto; max-height: 360px;}
div.text {padding-top: 2px; padding-bottom: 10px;}
div.mes {border: 1px solid #c5d5f0; padding: 1px; margin-left: 0px; margin-right: 0px; margin-top: 2px; margin-bottom: 10px; height: 1%;}

div.code { background: var(--path-bg); }
div.quote, blockquote {background: var(--path-bg); padding: 2px 10px 5px 10px; margin: 2px 5px; }
div.quote div.quote, blockquote blockquote { border: 2px solid var(--bg); }
div.offtop {color: #808080; margin-left: 0px; margin-right: 0px; padding: 0px; font-size: smaller; }

span.splink { color: var(--a-link); border-bottom: 1px dashed var(--a-link); cursor: pointer; display: inline-block; margin: 3px; padding: 4px;}
span.splink:hover { color: #FF8F30; border-bottom: 1px dashed #FF8F30; }

div.menu {border: 1px solid #a6bfdc; padding: 1px; margin-bottom: 10px}
div.menu p {background: #92B4D7; font-weight: bold; min-height: 15px; margin: 1px; padding: 2px}

div.list {background: var(--path-bg); color: #808080; min-height: 15px; border: 1px; margin: 1px; padding: 2px 6px}
div.sect {background: #D5E0E0; font-size: 1.4em; font-weight: bold; margin-top: 0; padding: 4px 6px; }
div.rubric {background: var(--path-bg); font-size: 1.1em; font-weight: bold; margin-top: 5px; padding: 2px 20px; }
div.sect a:visited, div.rubric a:visited {color: var(--a-link); }

div.menuitem {background: #92B4D7; font-weight: bold; min-height: 15px; border: 1px; margin: 1px; padding: 2px}
div.menusel  {background: #cDd5df; font-weight: bold; height: 15px; border: 1px; margin: 1px; padding: 1px}

div.row { margin-left: 3.2em; margin-bottom: 1px; padding: 0.2em 0.5em; overflow-wrap: break-word; }
div.u { border-bottom: 1px solid #EFEFEF; }
span.row { float: left; display: block; width: 2.9em; text-align: center; padding: 0.3em 0; margin-top: 0.3em; border-radius: 3px; }

div.margin10 { margin-top: 10px; margin-bottom: 10px; }

div.menu p a {color: #00002A; text-decoration: none;}
div.menu p a:hover {color: #FFFFFF;}

span.q a:link, span.q a:visited {color: #808080;}

table.page { width: 100%; }
table.page th { background: #bbccda; padding: 3px; text-align: left; font-weight: bold;}
table.page th.center {text-align: center;}
table.page th a:link {color: #004E8C;}
table.page th a:visited {color: #004E8C;}

table.page tr.sec td {background: #dadde2;}

table.page td {background: #e6e6e6; padding: 3px; }
table.page td b a:link    {color: #1E4E8C; text-decoration: none;}
table.page td b a:visited {color: #7196BB; text-decoration: none;}
table.page td b a:active  {color: #00304B; text-decoration: underline;}
table.page td b a:hover   {color: #BF3A00; text-decoration: underline;}


table.mes {width: 100%;}
table.mes th {background: #D5E0E0; text-align: left; width: auto; padding-left: 3px;}
table.mes th.red {background: #E5D0D0;}
table.mes th.red a {color: #2E2E5C;}
table.mes th.red a:hover {color: #BF3A00; text-decoration: underline; }
table.mes td {background: #DCDCDD; color: #808080; text-align: right; width: 45px; padding: 2px;}
table.mes td.center {text-align: center;}
table.mes td.level {text-align: center; width: 90px}


td { vertical-align: middle; }
td.co   {background: #D6DDDD;}
td.code   {background: #E7E7E7;}

b.title  {color: #00304b; font-size: large;}

tt { font-family: monospace, 'courier new', courier; }

pre { font-family: monospace, 'courier new', courier; margin: 0px; width: auto; display: inline-block;
	text-align: left; padding: 10px; white-space: pre-wrap; background: var(--path-bg); 
}
div.pre { background: var(--path-bg); margin: 10px 0; width: 100%;}

pre span.key {color: #0030fF}
pre span.comment {color: #808080}
pre span.digit {color: #F04000}
pre span.string {color: #00808F}
pre span.bracket {color: #a06000}

form {margin: 0; padding: 0;}
textarea {color: var(--color); background: var(--ctl-bg); border: 1px solid var(--hr-color); box-sizing: border-box; margin: 8px 0 0 0; padding: 0; width: 100%; font-size: 1em; padding: 4px; border-radius: 3px; font-family: verdana, arial, sans-serif; }
input {   color: var(--color); background: var(--ctl-bg); border: 1px solid var(--hr-color); box-sizing: border-box; margin: 0; padding: 4px; font-family: verdana, arial, sans-serif; font-size: 1em; border-radius: 3px; max-width: 100%; }
select {  color: var(--color); background: var(--ctl-bg); border: 1px solid var(--hr-color); font-size: 1em; height: 30px; margin-top: 5px;}
input[type=checkbox] { margin: 5px; }

div.buttons { padding: 8px 5px; border: 0; border-top: 1px solid var(--hr-color); }

button {
	font-size: 1em;
	color: #ffffff;
	padding: 0;
	cursor: pointer; 
	border: none;
	background-color: Transparent;
 	vertical-align: middle;
 	background-repeat: repeat-x;
 	opacity: 0.85;
	border-radius: 3px;
	-webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none;

	&:hover  { opacity: 1; }
	&:active { transform: translate(1px, 1px); }
	&:disabled { filter: grayscale(100%); opacity: 0.4; }
}

button.grayscale {
	filter: grayscale(100%); opacity: 0.7;
	&:hover  { filter: grayscale(0); opacity: 1; }
}

button.flat { line-height: 1.8em; padding: 2px 12px; }

button.volume {
 	line-height: 1.8em; padding: 2px 12px;
	border-style: solid; border-width: 1px;
	box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
	text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

button.grey { background-image: linear-gradient(#606060, #505050); border-color: #303030; }
button.red  { background-image: linear-gradient(#bb0000, #aa0000); border-color: #990000; }
button.green{ background-image: linear-gradient(#199A44, #098A34); border-color: #005900; }
button.blue { background-image: linear-gradient(#3994CA, #2984BA); border-color: #09649A; }

button.pale_grey { background-image: linear-gradient(var(--pale-grey-grad), var(--pale-grey)); border-color: #b0b0b0; color: var(--color); }
button.pale_green { background-image: linear-gradient(#b0ddc0, #a0ccb0); border-color: #709080; color: var(--color); }

button.enter { margin: 6px 5px 6px 5px; }
button.mess  { margin: -2px 8px 2px 6px; }

button div {
	background-image: url('gamedev_image.svg'); background-repeat: no-repeat; display: inline-block; 
	width: 24px; height: 24px;
	vertical-align: middle;
}

button img { max-width: 36px; max-height: 34px; border-radius: 3px; padding-right: 5px; vertical-align: middle; }

button div.picture { background-position:   0px -64px; }
button div.formula { background-position: -48px -64px; }
button div.quest   { background-position: -96px -64px; }

button div.menutog { background-position:    0px -32px; width: 32px; height: 32px; }
button div.lupa    { background-position: -160px -32px; width: 32px; height: 32px; }
button div.nouser  { background-position: -192px -32px; width: 32px; height: 32px; }
button div.arrowdown { background-position: -236px -32px; width: 8px; height: 32px; }
button div.letter  { background-position: -256px -32px; width: 32px; height: 32px; }

button div.edit   { background-position:   0px -88px; width: 16px; height: 16px; }
button div.delete { background-position: -32px -88px; width: 16px; height: 16px; }
button div.cite   { background-position: -64px -88px; width: 16px; height: 16px; }
button div.settings { background-position: -16px -88px; width: 16px; height: 16px; }

button div.vk      { background-position: -160px 0; width: 32px; height: 32px; }
button div.twitter { background-position: -192px 0; width: 32px; height: 32px; }

div.path button { margin: 5px }


ul {padding-left: 15px; margin: 2px}
li {padding-left: 0px; padding-top: 1px; padding-right: 0px; padding-bottom: 5px; margin-left: 15px; margin-top: 0px; margin-right: 15px; margin-bottom: 0px;}

div.seo, div.seo a:link, div.seo a:visited, div.seo a:active, div.seo a:hover {color: #808080; font-size: smaller; text-decoration: none}

.unselectable { -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; }


div.pages { padding: 0px 0 8px 5px; }
div.pages span { font-weight: bold; display: inline-block; min-width: 24px; text-align: center; border-radius: 2px; padding: 0 4px; }
div.pages a { background: #f0f0f0; padding: 7px 4px 7px 4px; display: inline-block; margin: 2px 0 2px 0; 
	border-radius: 2px; min-width: 24px; text-align: center; }
div.pages a:hover { background: #dadde2; text-decoration: none; }


div.footer { background: #122632; min-height: 200px; padding-top: 20px; margin-top: 0px; color: #dfdfdf;}

div.footblock { display: inline-block; padding: 0 5px; }

div.footblock a { display: block; vertical-align: top; }

hr { border: 0; border-top: 1px solid var(--hr-color); }

hr.mes {    
    margin-top: 0px;
    margin-bottom: 5px;
    border-top: 1px solid #eee;
    height: 0;
    box-sizing: content-box;
    display: block;
    overflow: hidden;
    border-top-color: #aecccc;
}

div.head { color: #808080; text-align: left; border-top: 1px solid var(--line); padding-top: 2px; margin-top: 10px;}
div.head div.pic {display: inline-block; min-width: 34px; padding: 0 0 0 4px; text-align: center; vertical-align: top; margin-top: 4px; }
div.head img {max-width: 40px; max-height: 34px; border-radius: 3px; vertical-align: -12%;}
div.head ul {display: inline-block; padding: 0 0 0 5px; margin: 0; }
div.head li {margin: 0; padding: 0; list-style: none;}
div.head li.bold { font-size: 1.1em; }
div.head li.bold a:visited {color: var(--a-link); }
div.head li.norm { color: var(--color); max-width: 700px; }
div.head div.right { text-align: right; padding-right: 5px; }

div.head div.member { min-width: 51px; }
div.head img.member { max-width: 60px; max-height: 51px; }

div.docs {border: 1px solid #c5d5f0; padding: 3px; margin-left: 0px; margin-right: 0px; margin-top: 2px; margin-bottom: 20px;}
div.docdesc { border-top: 1px solid var(--line); padding-top: 2px; margin-top: 10px; }
div.docdesc img.preview { float: left; margin: 11px 8px 8px 5px; border-radius: 5px; }
div.dochead { display:inline-block; margin: 0 5px; padding-top: 5px; max-width: 780px; }
div.dochead a.title:link, div.dochead a.title:visited { color: var(--color); font-size: 1.2em; } 

a.gray:link, a.gray:visited { color: #808080; text-decoration: none; }
a.gray:hover, a.gray:active { color: #BF3A00; text-decoration: underline; }

p.date { text-align: right; font-size: smaller; color: #c0c0c0; margin-bottom: 15px; cursor: default; }
span.date { font-size: smaller; color: #c0c0c0; }

div.youtube_container { width: 100%; max-width: 900px; }
div.youtube { position: relative; width: 100%; padding-top: 56.25%; box-sizing: border-box; background-color: #000000; }
div.youtube iframe { position: absolute; left:0; top:0; }
div.youtube img { position: absolute; left:0; top:0; right:0; bottom: 0; height: 100%; margin-left: auto; margin-right: auto; }
div.youtube img.play { cursor: pointer; }


div.wid_sect { padding: 5px; background-color: #f0f0f0; }

div.wid_sect div.docs { border: 0; background-color: #ffffff; margin:0; }

.bg_deepgrey { background-color: #e0e0e0; }

.mathjax { padding: 1px 0 5px 0; display: inline-block; overflow: hidden; vertical-align:middle; }

#advert { margin: 20px 0; }


span.mobile { display: none; }
.not-mobile { display: inline-block; }
.desktop { display: none; }

/* less than 900px */
@media only screen and (max-width: 900px) {
	#enter-pos { float: none; position:absolute; right: 0; top: 0; }
}

/* mobile plus */
@media only screen and (max-width: 700px) {
	.hidesmall { display: none; }
	span.mobile { display: inline-block; }
	.not-mobile { display: none; }
	div.scroll-icons { display: block; overflow-y: hidden; overflow-x: auto; margin-right: 60px;}
	div.docdesc img.preview { max-width: 180px; width: auto; height: auto;}
}

/* mobile */
@media only screen and (max-width: 330px) {
	a.tool { min-width: 32px; padding-left: 5px; }
}


/* middle*/
@media screen and (min-width: 480px) {
	div.path span + span::before { content: "/"; color: #606060; }
}

/* desktop */
@media screen and (min-width: 800px) {
}

/* big-desktop */
@media screen and (min-width: 1214px) {
	#menu { margin-left: -158px; left: auto;}
}


.thumbnails {
	display: grid;
	grid-column-gap: 8px;
	grid-row-gap: 8px;
	margin: 0 5px 1em 5px;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.thumbnails .cell {
    min-height: 14em;
	border-radius: 0.4em;
    overflow: hidden;
	background-color: var(--path-bg);
}

.thumbnails .cell .cap { padding: 8px; width: auto; }

.thumbnail {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-content: space-between;
    flex-direction: column;
    background-color: #F0F0F0;
}

.thumbnail a { display: block; min-height: 12em; }
