
:root {
  --font-size: 16px;
  --line-height: 1.4;
  --h1-font-size: 18px;
  --max-width: 1400px;
  --max-height: 1000px;
}

@font-face {
    font-family: unbounded;
    src: url(/static/unbounded.ttf);
}

html {
  scroll-behavior: smooth;
}

html, body {
	height: 100%;
}

body {
	font-size: var(--font-size);
	color: black;
	font-family: sans-serif;
	background-image: url(/static/bg.png);
	overflow-x: hidden;
	font-size: 14px;
}

h1 {
	font-size: var(--h1-font-size);
	font-family: unbounded;
}

a {
	color: black;
}

.clear {
	clear: both;
}

img.icon32x32 {
	width: 32px;
	height: 32px;
}

img.icon64x32 {
	width: 64px;
	height: 32px;
}

#page_backing {
	position: fixed;
	margin: 0 auto;
	max-width: var(--max-width);
	top: 0;
	height: 100%;
	width: 100%;
	left: 50%;
	transform: translateX(-50%);
	background-image: url(/static/backing.png);
}

#page_limiter {
	position: relative;
	margin: 0 auto;
	max-width: var(--max-width);
	height: 100%;
}

#page_menu {
	position: relative;
	padding-right: 25%;
	z-index: 10;
	background-color: #f0f0f0;
	background: linear-gradient(#ffffff, #c0c0c0);
	padding-bottom: 8px;
	font-family: unbounded;
}

#page_application {
	position: relative;
	left: 0px;
	width: 75%;
	background-color: #d0d0d0;
	height: calc(100% - 48px);
	color: black ;
	text-align: center;
	float: left;
	max-height: var(--max-height);
}

#page_application > .error {
	background-color: red;
	color: white;
	padding: 10px;
	font-weight: bold;
}

#page_continue {
	clear: both;
	background-color: #e0e0e0;
	padding: 16px;
}

#page_column {
	background-color: #e0e0e0;
	color: #203040;
	top: 48px;
	overflow: visible;
	font-size: min(var(--font-size), 1.32vw);
	padding: 0 16px 16px 16px;
	box-sizing: border-box;
}

#page_application ~ #page_column {
	width: 25%;
	float: left;
}

#page_column h1 {
	font-size: min(var(--h1-font-size), 1.8vw);
}

div.images, div.tabs {
	margin-top: 1em;
	margin-bottom: 1em;
}

h1 {
	margin-bottom: -0.3em;
	margin-top: 1.2em;
}

.page_column > *:first-child {
	margin-top: 0;
}

.hi {
	color: lime;
}

#page_ad1 {
	height: 200px;
	border: 1px solid white;
	margin: 20px 0;
}

#page_help {
	display: none;
	position: relative;
	float: right;
	right: 8px;
	width: 23px;
	height: 32px;
	top: 8px;
	background-image: url(/static/help.png);
	margin-bottom: 8px;
	margin-left: 8px;
	margin-right: 8px;
}

#page_fullscreen {
	position: relative;
	float: right;
	right: 8px;
	width: 40px;
	height: 22px;
	top: 8px;
	border: 4px solid black;
	cursor: pointer;
	padding-top: 2px;
	font-size: 9px;
	line-height: 10px;
	color: black;
	text-align: center;
	z-index: 10;
	font-family: sans-serif;
	margin-left: 8px;
}

/* THEMES */

#page_theme {
	position: relative;
	float: right;
	right: 8px;
	width: 48px;
}

#page_theme_toggle {
	display: block;
	position: absolute;
	width: 48px;
	height: 48px;
	left: 0px;
	top: 0px;
	background-image: url(/static/spectrum.png);
	background-size: 32px 32px;
	background-repeat: no-repeat;
	background-position: 8px 8px;
	z-index: 12;
	cursor: pointer;
}

#page_themes {
	position: absolute;
	display: none;
	left: 0px;
	top: 48px;
	width: 88px;
	cursor: pointer;
	z-index: 12;
	background-color: #404040;
	padding-bottom: 8px;
}

#page_theme_cover {
	display: none;
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 11;
}

#page_theme_check {
	visibility: hidden;
}

#page_theme_check:checked ~ #page_theme_toggle {
	background-color: #303030;
}

#page_theme_check:checked ~ #page_themes {
	display: block;
	background-color: #303030;
}

#page_theme_check:checked ~ #page_theme_cover {
	display: block;
}

#page_themes > div {
	text-align: center;
	line-height: 32px;
	color: white;
	float: left;
}

#page_theme_grayscale {
	margin-top: 8px;
	margin-left: 8px;
	width: 32px;
	height: 32px;
	background-color: #8c8c8c;
}

#page_theme_sandy {
	margin-top: 8px;
	margin-left: 8px;
	width: 32px;
	height: 32px;
	background-color: #ac7c61;
}

#page_theme_blue {
	margin-top: 8px;
	margin-left: 8px;
	width: 32px;
	height: 32px;
	background-color: #7991c0;
}

#page_theme_jungle {
	margin-top: 8px;
	margin-left: 8px;
	width: 32px;
	height: 32px;
	background-color: #619f4b;
}

/* DIALOG */

#page_dialog {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	background-color: white;
	padding: 8px;
	font-weight: bold;
	text-align: center;
	visibility: hidden;
	font-size: min(3.5vmin, 16px);
	z-index: 1;
}

#page_dialog > .exclam {
	display: none;
	color: red;
}

#page_dialog.closed > .exclam {
	display: block;
}

#page_dialog.closed {
	top: calc(100% - 32px);
	left: calc(100% - 32px);
	border-radius: 8px;
}

#page_dialog > .inner {
	position: relative;
	display: table;
	border-spacing: 6px;
	margin: -6px;
	border-collapse: separate;
	left: 50%;
	transform: translateX(-50%);
}

#page_dialog.closed > .inner {
	display: none;
}

#page_dialog > .inner > .message {
	display: table-cell;
	padding: 5px;
	vertical-align: middle;
	color: black;
}

#page_dialog > .inner > .button {
	display: table-cell;
	vertical-align: middle;
	padding: 10px;
	background-color: rgb(54, 104, 166);
	color: white;
	border-radius: 5px;
}

/* CONSOLE */

#page_console {
	position: relative;
	float: right;
	right: 8px;
	width: 48px;
}

#page_console_toggle {
	display: none;
	position: absolute;
	width: 48px;
	height: 48px;
	left: 0px;
	top: 0px;
	background-image: url(/static/warning.png);
	background-size: 32px 32px;
	background-repeat: no-repeat;
	background-position: 8px 8px;
	z-index: 12;
	cursor: pointer;
}

#page_console_cover {
	display: none;
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 11;
}

#page_console_check {
	visibility: hidden;
}

#page_console_check:checked ~ #page_console_toggle {
	background-color: #303030;
}

#page_console_check:checked ~ #page_console_cover {
	display: block;
}

#page_console_output {
	position:absolute;
	left: 50%; top: 50%;
	width: 50%; height: 50%;
	transform: translate(-50%, -50%);
	overflow-y: auto;
	overflow-x: hidden;
	color: white;
	background-color: #404040;
	padding: 8px;
}

#page_console_output > * {
	white-space: pre-wrap;
	word-break: break-all;
}

#page_console_output::before {
	content: 'На странице произошли некоторые ошибки.';
	display: block;
}

/* */

#page_memory {
	display: none;
	float: none !important;
	font-size: 12px;
	color: #808080 !important;
}

#page_fullscreen > .excl {
	position: absolute;
	background-color: white;
	height: 6px;
	left: -4px;
	width: 4px;
	top: 0px;
}

#page_logo {
	display: block;
	float: left;
	height: 32px;
	width: auto;
	padding: 8px 8px 8px 52px;
	margin: 0 0 -8px 8px;
	background-image: url(/static/logo.png);
	background-repeat: no-repeat;
	font-size: 20px;
	line-height: 17px;
	font-weight: bold;
}

#page_logo span {
	font-size: 16px;
}

#canvas2d {
	left: 0;
	top: 0;
	opacity: 0.0;
	transition: opacity 0.5s;
	position: relative;
}

#canvas2d:focus {
	outline: none;
}

#page_loading {
	position: relative;
	top: 50%;
	left: 0;
	right: 0;
	margin-top: -50px;
}

#page_copyright {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	background-color: #202020;
	color: #c0c0c0;
	padding: 8px;
}

.page_link {
	background-color: #606060;
	line-height: 30px;
	height: 30px;
	margin-left: 10px;
	margin-top: 10px;
}

.page_menu_block {
	display: block;
	float: left;
	height: 32px;
	margin: 8px 4px 0;
	padding-left: 4px;
	padding-right: 4px;
}

.page_menu_block._sel {
	background-color: #d0d0d0;
	background: linear-gradient(#c0c0c0, #ffffff);
	
}

.page_menu_block > a {
	text-decoration: none;
}

.page_menu_block > ._tit {
	display: block;
	float: left;
	line-height: 32px;
	padding-left: 4px;
	padding-right: 4px;
}

.page_menu_block._sel > ._tit {
	text-decoration: none;
}

.page_menu_block > ._lnk {
	display: block;
	float: left;
	line-height: 24px;
	height: 24px;
	margin-top: 4px;
	margin-left: 4px;
	padding-left: 4px;
	padding-right: 4px;
}

.page_menu_block > ._lnk._sel {
	background-color: #ffffff;
	text-decoration: none;
	cursor: default;
}

.page_menu_block > ._lnk {
}

/* --- Tabs --- */

.tabs {
  position: relative;   
  clear: both;
  z-index: 2;
}
.tab {
  float: left;
}
.tab label {
	position: relative;
	display: block;
  padding: 0 10px; 
  box-sizing: border-box;
  height: 34px;
  line-height: 34px;
  overflow: hidden;
  z-index: 2;
}
.tab [type=radio] {
  display: none;   
}
.content {
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  padding: 20px 10px;
  visibility: hidden;
}
[type=radio]:checked ~ label {
	background-color: #c0c0c0;
  z-index: 2;
}
[type=radio]:checked ~ label ~ .content {
  z-index: 1;
  visibility: visible;
}

.tabs .cover {
	position: absolute;
	left: 0;
	top: 34px;
	right: 0;
	bottom: 0;
	background-color: #c0c0c0;
	z-index: 1;
}

/* ------------------ */
table {
  border-collapse: collapse;
 border-spacing: 10px;
	border-collapse: separate;
}
tr { 
  border: solid;
  border-width: 0 0;
}
td:first-child {
	width: 1px;
}

/* IMAGE LINES */

div.images {
    position: relative;
    clear: both;
    margin-left: -5px;
    margin-right: -5px;
    padding: 1%;
}

div.images::after {
    display: block;
    clear: both;
    content: "";
}

div.images > * {
    display: block;
    float: left;
    box-sizing: border-box;
    padding: 1% 1% 1% 1%;
    text-align: center;
}

div.images > a {
    text-decoration: none;
    background-color: #c0c0c0;
}

div.images > a:hover {
    background-color: #808080;
    color: #000000;
}

div.images > * > img {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    vertical-align: middle;
    margin-bottom: 1%;
}

#page_column div.images > a[rel=wiv] > img {
	filter: brightness(120%) contrast(120%) saturate(120%);
}

div.images > * > video {
    display: block;
    width: 100%;
    height: auto;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

div.images > .b1 { width: 100% }
div.images > .b2 { width: 50% }
div.images > .b3 { width: 33.33333333333% }
div.images > .b4 { width: 25% }
div.images > .b5 { width: 20% }
div.images > .b6 { width: 16.66666666666% }
div.images > .b7 { width: 14.28571428571% }
div.images > .b8 { width: 12.5% }
div.images > .b9 { width: 11.11111111111% }
div.images > .b10 { width: 10% }

/* ADAPTIVE */
@media (max-width: 900px) {
	#page_application { width: 100%; }
	#page_help { display: block; }
	#page_column { width: 100%; font-size: inherit; }
	#page_column h1 { font-size: var(--h1-font-size); }
	#page_continue {
		margin-left: auto;
	}
	#page_menu {
		width: 100%;
	}
}

/* PROGRESS */

#page_progress {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 14px;
	color: white;
}

#page_progress > .logo {
	display: block;
}

#page_progress_progress {
	border: 1px solid white;
	margin-top: 8px;
	margin-bottom: 2px;
}

#page_progress_progress > * {
	background-color: white;
	height: 6px;
	width: 0;
}

#page_progress_file {
	float: left;
}

#page_progress_percents {
	float: right;
}
