@font-face {
    font-family: "ibm_vga";
    src: url("https://plaao.net/shared/fonts/Web437_IBM_VGA_8x16.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "nec_apc";
    src: url("https://plaao.net/shared/fonts/Web437_NEC_APC3_8x16.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "terminus";
    src: url("https://plaao.net/shared/fonts/Terminus.woff") format("woff");
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: "juliamono";
    src: url("https://plaao.net/shared/fonts/JuliaMono-Light.woff2") format("woff");
    font-weight: normal;
    font-style: normal;
}

img {
    image-rendering: optimizeSpeed;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
	
	-moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    user-select: none;
}

body {
    --fontsiz: 20px;
    font-size: var(--fontsiz);

    background-color: black;
    color: white;

    font-family: "MS Gothic", "terminus", "nec_apc";
	
	font-smooth: never;
	-webkit-font-smoothing: none;

    margin: 0;
}

@property --showval {
    syntax: "<number>";
    inherits: true;
    initial-value: 1.0;
}

@keyframes popin {
  0% {
    --showval: 0;
    pointer-events: none;
  }
  100% {
    --showval: 1;
    pointer-events: all;
  }
}

@keyframes popout {
  0% {
    --showval: 1;
    pointer-events: all;
  }
  100% {
    --showval: 0;
    pointer-events: none;
  }
}

.nav {
    position: fixed;

    left: -1px;
    top: calc((-32px * (1 - var(--showval))) - 1px);

    width: calc(100vw);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background-color: #010;
    border: 1px solid white;

    opacity: var(--showval);
}

.nav.hide {
    visibility: hidden;
}

.nav:not(.popin) {
  animation: popout 0.5s ease-out forwards;
}

.nav.popin {
  animation: popin 0.5s ease-out forwards;
}

.navcontainer {
    width: 90vw;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    padding-top: 16px;
    padding-bottom: 16px;
}

.lrnav {
    display: flex;
    flex-direction: row;

    width: 100%;

    justify-content: center;
    align-items: center;
}

.lrnav div {
    border: 1px solid white;
    background-color: #222;
    margin: 8px;
    margin-top: 16px;
    padding: 16px;

    flex-grow: 1;

    flex-basis: 50%;
    text-align: center;
}

.lrnav div:first-child {
    margin-left: 0;
}

.lrnav div:last-child {
    margin-right: 0;
}

.button {
    user-select: none;
    background-color: #222;
}

.button:hover {
    background-color: #444;
}

.button:active {
    background-color: #111;
}

.button.disabled {
    background-color: #111;
    color: #888;
}

.index-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    flex-grow: 1;

    padding: 16px;

    width: 75vw;
    
    border: 1px solid white;
    background-color: #222;
}

.content {
    margin: 96px;
    margin-top: 200px;
    margin-bottom: 0;
}

.content.index {
    margin-top: 96px;
}

.infosection {
    display: flex;
    flex-wrap: wrap;

    --col1: white;
    --col2: white;
    --col3: white;
    --col4: white;
}

.base {
    color: #eee;
}

.levelup {
    color: #dfd;
}

.awaken {
    color: #fdf;
}

.infosection .panel {
    padding: 8px;
    margin: 8px;
    border: 1px solid var(--col2);
    color: var(--col4);
    background-color: var(--col3);

    transition: opacity 0.1s;
}

.ball-info-header {
    display: flex;
    flex-direction: row;
}

.full-line {
    display: flex;
    width: 100%;
}

.ball-blurb {
    display: flex;

    flex-direction: row;

    width: 100%;
}

.ball-image-name {
    display: flex;

    flex-direction: column;

    flex-basis: 25%;
}

.ball-name {
    display: flex;
    justify-content: space-between;
}

.tier {
    white-space: pre;
}

.ball-image {
    display: flex;
    justify-content: center;

    aspect-ratio: 2/1;
}

.ball-image img {
    padding: 16px;
}

.ball-brief-info {
    flex-basis: 75%;

    display: flex;
    flex-direction: column;
}

.ball-tags {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    flex-grow: 1;

    gap: calc(var(--fontsiz) / 2)
}

.ball-tag {
    width: auto;
    flex-grow: 0;
    white-space: pre;
}

.ball-lore-tags {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.ball-lore-tag {
    display: flex;
    flex-direction: column;

    gap: calc(var(--fontsiz) / 3);

    align-items: center;
    white-space: pre;

    flex-grow: 1;
}

.ball-lore-tag .line1 {
    display: flex;
    flex-direction: row;
}

.ball-lore-tag img {
    aspect-ratio: 1/1;
    height: round(var(--fontsiz), 16px);
}

.ball-tagline {
    flex-grow: 1;
}

.ball-game-desc {
    display: flex;
    flex-direction: column;
    gap: calc(var(--fontsiz) / 4)
}

.base-label {
    white-space: pre;
    background-color: #333;
}

.levelup-label {
    white-space: pre;
    background-color: #060;
}

.awaken-label {
    white-space: pre;
    background-color: #606;
}

.templates, .template {
    display: none;
}

.flickin {
    opacity: 1;
}

.flickout {
    opacity: 0;
}

.category-header {
    border: 1px solid white;
    background-color: #222;
    padding: 8px;

    flex-grow: 1;

    text-align: center;
}

.main-page {
    display: flex;

    flex-direction: column;
}

.main-page .category {
    display: flex;
    flex-direction: column;

    background-color: #111;
}

.category.gamesec {
    color: #cfc;
    background-color: #010;
}

.category.loresec {
    color: #ccf;
    background-color: #040411;
}

.opt-list {
    display: grid;

    --v: round(to-zero, calc(70vw / 166px));
    grid-template-columns: repeat(var(--v), minmax(166px, 1fr));
    
    padding-bottom: 16px;
    padding-top: 16px;
}

.balls-list-container {
    display: flex;

    flex-grow: 1;
    
    align-items: center;
    justify-content: center;
}

.ball-entry {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: space-between;

    min-width: calc(132px);
    max-width: calc(132px);

    aspect-ratio: 1/1;

    gap: 16px;

    opacity: 0.7;
}

.ball-entry:hover {
    opacity: 1;
}

.ball-entry:active {
    opacity: 0.4;
}

.ball-entry img {
    flex-grow: 1;
}

.template, .nodisplay {
    display: none !important;
}

.game-entry {
    text-align: center;

    opacity: 0.8;
}

.game-entry:hover {
    opacity: 1;
}

.game-entry:active {
    opacity: 0.4;
}

.info-generic {
    --col1: white;
    --col2: white;

    color: var(--col2);

    display: flex;
    flex-direction: column;

    --m: max(0px, 50vw - 600px);
    margin-left: var(--m);
    margin-right: var(--m);
}

.info-generic .title {
    color: var(--col1);

    display: flex;
    align-items: center;
    justify-content: center;

    border-bottom: 1px solid var(--col1);
    padding: 8px;
    margin-bottom: 8px;
}

.link {
    text-decoration: underline;
    cursor:pointer;
}

a {
    color: #0cf;
}

@media only screen and (min-width: 600px) and (orientation: portrait) {
    .ball-blurb {
        flex-direction: column;
    }
}
