@font-face {
    font-family: msgoth;
    src: url('/arsets/msgothic.woff2');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

:root {
    --bg: #000;
    --bg-a: #000;
    --bg-d: #5a5a5a;
    --fg: #fff;
    --fg-a: #fff;
    --fg-d: #aeaeae;
    --brd: #fff;
    --brd-a: #fff;

    --fn: msgoth;
    --fn-size: 14px;

    --def-gr: linear-gradient(to bottom, var(--fg), var(--fg-d));
}

body {
    font-family: var(--fn);
    font-size: var(--fn-size);
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    overflow: hidden;
}

header {
    height: 20px;
    background: var(--bg-a);
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1000;
}

a {
    color: var(--fg);
}

a:hover {
    color: var(--bg);
    background: var(--def-gr);
}

nav .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;

}

nav .menu > li {
    position: relative;
    margin: 0 10px;
    cursor: pointer;
    height: 100%;
    display: flex;
    align-items: center;
}

nav .menu a,
nav .menu .dirlabel {
    color: var(--fg);
    text-decoration: none;
    display: block;
    padding: 0;
    line-height: 20px;
    margin-bottom: 4px;
    margin-top: 4px;
    border-bottom: 1px solid transparent;
}

nav .menu a:hover, nav .menu .dirlabel:hover {
    color: var(--bg);
    background: var(--fg);
    background-image: var(--def-gr);
    border-bottom: 2px solid var(--fg);
}

nav .menu a.active {
    font-style: italic;
    border-bottom: 2px solid var(--fg);
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-a);
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 100px;
    z-index: 1;
    border: 1px dotted var(--brd);
    padding-bottom: 3px;
    padding-top: 4px;
}

.submenu.show {
    display: block;
}

.submenu li {
    padding: 2px 5px;
    height: 20px;
    display: flex;
    align-items: center;
    position: relative;
}

.submenu a {
    color: var(--fg);
    display: block;
    width: 100%;
    line-height: 20px;
    margin-bottom: 4px;
    margin-top: 5px;
}

.submenu .submenu {
    z-index: 2;
    top: 5px;
    left: calc(100% - 20px);
    border-top: 1px dotted var(--brd);
    border-left: 1px dotted var(--brd);
    margin-top: 0;
}

.submenu .dirlabel:hover {
    color: var(--bg);
    background: var(--fg);
}

#main {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    display: grid;
    gap: 10px;
    background: var(--bg) url('/arsets/bgtile.png') repeat;
    box-sizing: border-box;
    padding: 10px;
    z-index: 1;
}

.window {
    background: var(--bg-a);
    border: 1px solid var(--brd);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--fg);
    background-image: var(--def-gr);
    color: var(--bg);
    padding: 2px 5px;
    padding-right: 2px;
    font-style: normal;
    border-bottom: 1px solid var(--fg);
    border-top: 1px solid var(--fg);
    height: 20px;
    box-sizing: border-box;
    /*
    border-left: 2px dotted var(--bg);
    border-right: 2px dotted var(--bg);
    */
}

.tt {
    flex: 1;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    text-shadow: 0px 0px 4px var(--fg);
}

.t {
    display: inline-block;
    white-space: nowrap;
}

.t.sc {
    animation: scr 6s linear infinite;
}

@keyframes scr {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.close {
    flex-shrink: 0;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--bg);
}

.close:hover {
    background: var(--bg);
    color: var(--fg);
}

.body {
    flex: 1;
    overflow: auto;
    padding: 0 5px;
    min-height: 0;
}

.body a {
    text-decoration: underline 1px solid var(--fg);
}

.body img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.button-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    align-content: flex-start;
    padding: 12px 0
}

.button-grid__item img {
    max-width: 100%;
    height: auto;
    display: block;
}

.button-grid__item {
    display: inline-block;
    padding: 0px;
    line-height: 0;
    width: 88px;
    height: 31px;
}

.wrappa {
    position: relative;
    display: block;
    line-height: 0;
    max-width: 100%;
    max-height: 100%;
}

.wrappa img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    margin: 0 auto;
}

.wrappa::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-image: radial-gradient(circle, rgb(255, 255, 255) 1px, transparent 1px);
    background-size: 6px 6px;
    opacity: 0;
    z-index: 1;
    mix-blend-mode: difference;
}

.wrappa:hover img {
    filter: grayscale(100%);
}

.wrappa:hover::before {
    opacity: 1;
}