/*****************************************************************************/
/* screen.css                                                                */
/* ==========                                                                */
/* screen styles                                                             */
/*  AUTHOR: Song Ho Ahn (song.ahn@gmail.com)                                 */
/* CREATED: 2005-07-26                                                       */
/* UPDATED: 2024-11-16                                                       */
/*****************************************************************************/

html {
	scroll-behavior:smooth;
}
body {
	margin:0;
	padding:0;
	/*font-family:arial,helvetica,sans-serif;*/
	font-family:"segoe ui", "HelveticaNeue-Light", "Helvetica Neue", "Helvetica", sans-serif;
	font-weight:400;
	font-size:16px;
	color:black;
	box-sizing:border-box;
}
p {
	margin-top:0;
}
h1 {
	color:#666;
	text-align:center;
	line-height:1.1em;
}
h2 {
	border-top:5px solid #999;
	margin:30px 0 5px 0;
	/*padding:0.1em;*/
	color:#666;
}
h3 {
	border-top:1px solid #999;
	margin:30px 0 0 30px;
	padding:0;
	color:#666;
}
h4 {
	border-top:1px solid #999;
	margin:30px 0 0 30px;
	padding:0;
	color:#666;
}
img {
	border:0;
	padding:0;
	margin:0;
	max-width:100%;
	height:auto;
}
img.responsive {
	width:100%;
	height:auto;
}
img.center {
	vertical-align:middle;
}
figure {
	margin:0;
}
figure > img {
	width:100%;
	height:auto;
}
figcaption {
	font-size:0.8em;
	font-weight:200;
	text-align:center;
	color:#666;
}
hr {
	border:1px dashed #aaa;
	margin:1em;
}
.codeblock {
	display:block;
	font-family:"courier new", courier, monospace;
	font-size:14px;
	border:1px solid #999;
	background-color:#fcfcfc;
	margin:10px 0px;
	padding:0 10px;
	line-height:130%;
	overflow:auto;
}
.comment {
	color:#060;
}

/* float blocks */
.fl { float:left; }
.fr { float:right; }
.clear { clear:both; }

/* responsive width */
.w30 { width:30%; }
.w40 { width:40%; }
.w50 { width:50%; }
.w60 { width:60%; }
.w70 { width:70%; }
.w80 { width:80%; }
.w90 { width:90%; }

/* margin */
.ml10 { margin-left:10px; }
.ml30 { margin-left:30px; }
.mr10 { margin-right:10px; }
.mr30 { margin-right:30px; }

/* caption */
.caption {
	font-size:0.8em;
	font-weight:200;
	text-align:center;
	color:#666;
}

/* webglwrap iframe */
.webglwrap {
	width:100%;
	margin:0;
	padding:0;
	border:1px solid #999;
	box-sizing:border-box;
	-webkit-border-radius:5px;
	-moz-border-radius:5px;
	border-radius:5px;
}

/* whole content: menu+left+right */
#wrap {
    display:flex;
    gap:10px;
    position:relative;
    box-sizing:border-box;
}
/* menu block */
#menublock {
    flex:0 0 300px;
    /*min-width:250px;*/
}
/* main content: left+right */
#mainblock {
    flex:1 1 0;
    display:flex;
    /*flex-wrap:wrap;*/
}
#leftblock {
    flex:1 1 810px; /* 800px + paddings */
    max-width:810px;
    margin-right:10px;
    border-left:1px dashed #aaa;
    border-right:1px dashed #aaa;
    overflow:clip;
}
#rightblock {
    flex:1 1 250px;
}
.innerblock {
	padding:5px;
	line-height:1.3em;
}

/* TOC specific */
#toc {
    position:fixed;
    top:20px;
    padding:10px;
    font-weight:200;
    font-size:0.94em;
    background-color:#f8f8f8;
}
#toc ul {
    margin:0;
    padding-left:0;
    list-style-type:none;
}
#toc a {
    display:block;
    text-decoration:none;
    color:#000;
    padding:5px 20px;
    border-left:3px solid #ddd;
    transition:all 0.2s ease-in-out;
}
#toc a:hover {
    background-color:#ddd;
    border-left:3px solid #aaa;
}
#toc a.active {
    color:#fff;
    background-color:#666;
    border-left:3px solid #000;
}

/* disqus comment block */
#disqus_thread {
	display:block;
}

/* discord block */
widgetbot {
    width:100%;
    height:600px;
}

#contentblock
{
	width:45em;
	margin:10px 10px 10px 30px;
	padding-top:0px;
	line-height:130%;
	/*float:left;*/
}

#footer {
	font-style:normal;
	border-top:1px solid #999;
	font-size:0.9em;
	padding-top:5px;
	line-height:110%;
}

/* image map */
.mapblock {
	position:relative;
}
.mapoverlay {
	position:absolute;
	z-index:100;
}
.mapregion {
	position:absolute;
	top:0;
	left:0;
	display:none;
	z-index:99;
}
.mapbg {
	position:absolute;
	top:0;
	left:0;
	z-index:98;
}

/* default color of body text and its background */
.font_sansserif { font-family:sans-serif; }
.font_serif { font-family:serif; }

/* text alignments */
.center { text-align:center; }
.right { text-align:right; }

/* links */
a { border:0; }
a:link { color:blue; }
a:visited { color:purple; }
a:active { color:blue; }
a:hover { color:red; }

/* navlink stuff */
.link {
	margin:0;
	padding:0;
}
.link a {
	display:block;
	color:black;
	background-color:white;
	padding:0.2em;
	text-decoration:none;
}
.link a:hover {
	color:black;
	background-color:#eee;
	border:0;
}

/* table attributes */
table, td, th
{
	border-color:#999;
	border-style:solid;
}
table
{
	border-width:0 0 1px 1px;
	border-spacing:0;
	border-collapse:collapse;
}
td, th
{
	border-width:1px 1px 0 0;
	margin:0;
	padding:2px;
}


.linklist > li {
    padding-bottom:0.5em;
}

/* horizontal flexbox */
.flexrow {
	display:flex;
    /*flex-wrap:wrap;*/
}
.flexcol1 { flex:1 1 1; }
.flexcol2 { flex:1 1 2; }
.flexcol3 { flex:1 1 3; }

/*===== css3 =====*/
.shadow {
	-moz-box-shadow: 0px 0px 10px #888;
	-webkit-box-shadow: 0px 0px 10px #888;
	box-shadow: 0px 0px 10px #888;
    /*filter:drop-shadow(0, 0, 10px, #888);*/
}

.crossfade {
	position:relative;
}
.crossfade img {
	position:absolute;
	left:0;
}
@-webkit-keyframes key_crossfade {
	0%   { opacity:1; }
	45%  { opacity:1; }
	55%  { opacity:0; }
	100% { opacity:0; }
}
@-moz-keyframes key_crossfade {
	0%   { opacity:1; }
	45%  { opacity:1; }
	55%  { opacity:0; }
	100% { opacity:0; }
}
@-ms-keyframes key_crossfade {
	0%   { opacity:1; }
	45%  { opacity:1; }
	55%  { opacity:0; }
	100% { opacity:0; }
}
@keyframes key_crossfade {
	0%   { opacity:1; }
	45%  { opacity:1; }
	55%  { opacity:0; }
	100% { opacity:0; }
}
.crossfade img.top {
	-webkit-animation-name: key_crossfade;
	-webkit-animation-timing-function: ease-in-out;
	-webkit-animation-iteration-count: infinite;
	-webkit-animation-duration: 10s;
	-webkit-animation-direction: alternate;

	-moz-animation-name: key_crossfade;
	-moz-animation-timing-function: ease-in-out;
	-moz-animation-iteration-count: infinite;
	-moz-animation-duration: 10s;
	-moz-animation-direction: alternate;

	-ms-animation-name: key_crossfade;
	-ms-animation-timing-function: ease-in-out;
	-ms-animation-iteration-count: infinite;
	-ms-animation-duration: 10s;
	-ms-animation-direction: alternate;

	animation-name: key_crossfade;
	animation-timing-function: ease-in-out;
	animation-iteration-count: infinite;
	animation-duration: 10s;
	animation-direction: alternate;
}

/* CSS button */
.cssbutton {
	display:inline-block;
	color:#333;
	font-size:0.9em;
	text-shadow:1px 1px 0px #fff;
	padding:3px 10px;
	margin:5px 0px;
	border:1px solid #999;
	-webkit-border-radius:5px;
	-moz-border-radius:5px;
	border-radius:5px;
	background:#eee;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #eee), color-stop(1, #ddd));
	background:-moz-linear-gradient(center top, #eee 5%, #ddd 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd');
	-moz-box-shadow:inset 0px 1px 0px 0px #fff;
	-webkit-box-shadow:inset 0px 1px 0px 0px #fff;
	box-shadow:inset 0px 1px 0px 0px #fff;
}
.cssbutton:hover {
	background-color:#ddd;
	background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ddd), color-stop(1, #eee));
	background:-moz-linear-gradient(center top, #ddd 5%, #eee 100%);
	filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dddddd', endColorstr='#eeeeee');
	cursor:pointer;
}
.cssbutton:active {
	position:relative;
	top:1px;
}


/* media query ********************************************/
@media screen and (max-width:1200px) {
    #wrap {
        gap:0px;
    }
    #rightblock {
        display:none;
    }
}
@media screen and (max-width:1105px) {
    #wrap {
        flex-direction:column;
    }
    #leftblock, #rightblock {
        max-width:100%;
    }
    #leftblock {
        border:none;
        margin-right:0;
    }
    /*
    #rightblock {
        margin-right:10px;
    }
    */
    .codeblock {
        /*font-size:14px;*/
        width:calc(100% - 22px);
    }
    code.ml30 {
        width:calc(100% - 52px);
    }
    /* menu */
    #menublock {
        display:none;
        /*width:100vw;*/
        flex:1 1 100%;
        position:fixed;
        justify-content:center;
        background-color:#f80;
        /*display:none;*/
        /*max-width:0;*/
        /*overflow:hidden;*/
        /*
        position:fixed;
        top:0;
        width:100vw;
        height:2.5em;
        background-color:#f00;
        */
    }
    #menu ul {
        display:flex;
        white-space:nowrap;
    }
    #menu li li a {
        display:none;
    }
    /*
    #menu ul a {
        display:inline;
        float:left;
    }
    */
}
@media screen and (max-width:600px)
{
    .w70, .w80, .w90 { width:100%; }
}
@media screen and (max-width:500px)
{
    .flexrow { flex-wrap:wrap; }
    .w40, .w50, .w60 { width:100%; }
}
@media screen and (max-width:300px)
{
    .w10, .w20, .w30 { width:100%; }
}


/* MENU ***************************************************/
#menu { /* <nav> */
    position:sticky;
    top:0;
    width:100%;
    height:100vh;
    font-size:0.94em;
    font-weight:200;
    padding:0 5px 0 10px;
    overflow:auto scroll;
    box-sizing:border-box;
}
/* for all levels */
#menu ul {
    list-style-type:none;
    margin:0;
    padding-left:0;
    position:relative;
    overflow:hidden;
    transition:height 0.2s ease-in-out;
    height:auto; /* must set actual height in JS for anim */
}
#menu a {
    display:block;
    text-decoration:none;
    padding:5px;
    vertical-align:middle;
    color:#000;
    border-left:3px solid transparent;
    border-right:3px solid transparent;
}
#menu a:hover {
    background-color:#eee;
    border-left:3px dotted #888;
    border-right:3px dotted #888;
}
#menu a.focuseditem {
    color:#fff;
    background-color:#666;
    border-left:3px solid #000;
    border-right:3px solid #000;
}
#menu .plusminus {
    display:inline-block;
    width:16px;
    height:16px;
    line-height:16px;
    margin-right:3px;
    background-color:#f00;
    background:url("/files/plusminus.png") no-repeat -16px center;
    background-size:32px 16px;
}
#menu span.collapseditem {
    background-position:0px center;
}
#menu #menu_home {
    font-size:1.5em;
}
#menu #menu_home img {
    vertical-align:middle;
    width:32px;
    height:32px;
}
/* for level 0 */
#menu ul a {
    font-weight:bold;
    display:flex;       /* for vertical centered items */
    align-items:center;
}
#menu > ul > li {
    border-bottom:2px dotted #aaa;
}
/*
#menu > ul > li:nth-child(2n) {
    background-color:#fafafa;
}
*/
/* level 1 */
#menu li li a {
    font-weight:200;
    padding-left:20px;
}
/* level 2 */
#menu li li li a {
    font-weight:200;
    padding-left:40px;
}
