:root {
    --pixel-size: 4px;

    /* --canvaswidth: 160;
    --canvasheight: 144; */
}
@font-face {
    font-family: 'NES';
    src: url('/src/screen/NES.woff2') format('woff2');
}
@media( min-width: 700px ) {
    :root {
       --pixel-size: 5px;
    }
}
@media( min-width: 1000px ) {
    :root {
       --pixel-size: 6px;
    }
}
@media( min-width: 1600px ) {
    :root {
       --pixel-size: 8px;
    }
}

html, body {
    height: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    image-rendering: pixelated;
    text-transform: uppercase;
}


i {
    font-style: normal;
    text-transform: lowercase;
    font-size: 1.5em;
    line-height: 1;
    margin-left: -0.25em;
    margin-right: -0.25em;
}


* {
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

.opening {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    padding: 0 40px;

    height: 100%;

    outline: var(--pixel-size) solid #fff;

    gap: 10em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #000000;
    /* transition: all eargb(0, 0, 0); */
    pointer-events: all;

    z-index: 25;
}
.level-screen {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    padding: 0 20px;

    height: 100%;
    font-family: "NES";
    background-color: #000000;
    color: white;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    z-index: 22;
    text-align: center;
    line-height: 1.6em;

    pointer-events: none;
}
.opening.closed img,
.opening.closed button,
.opening.gone,
.level-screen.gone,
.level-screen.closed p,
.level-screen.closed .td
{
    display: none;
}

img.td {
    max-width: 2ch;
    width: 100%;
}

.logo {
    position: relative;
    max-width: 50ch;
    width: 100%;
}

/* @keyframes bobbing {
    0% {
        transform: translateY(0);
    }
  
    100% {
        transform: translateY(8px);
    }
} */
@keyframes static {
    60% {
        opacity: 1;
    }
    63% {
        opacity: 0;
    }
    64% {
        opacity: 1;
    }
    67% {
        opacity: 1;
    }
  
    68% {
        opacity: 0.4;
    }

    69% {
        opacity: 1;
    }
}

.screen-title {
    /* max-width: 34rem; */
    /* max-width: 50rem; */
    width: 100%;
/* 
    animation: 1.5s infinite alternate bobbing; */
}
.screen-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    width: 150%;

    transition: all ease .2s;

    /* opacity: .5; */

    animation: 5s infinite static;
}



.screen-glow.two{

    width: 200%;

}

button.enter {
    font-family: "NES";
    font-size: 2rem;
    letter-spacing: .05em;
    padding: 10px;

    /* color: #00004c;
    background: none; */

    color: white;
    background: #00004c;

    border: 5px solid currentColor;
    cursor: pointer;
}
button.enter:hover {
    color: white;
    background-color: #00004c;
    border-color: #00004c;

    border: 7px solid currentColor;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #a7e6f3;
    position: relative;
}


canvas {
    /* aspect-ratio: auto 16 / 9; */
    /* aspect-ratio: auto 9 / 16; */
    width: 100%;
    height: 100%;
}

h1.counter-display {
    font-family: "NES";
    font-size: 2rem;
    letter-spacing: .05em;

    position: absolute;
    left: 30px;
    top: 30px;
    margin: 0;
    color: white;
    background: black;
    padding: 20px 40px;
}
   
.frame {
    /* width: calc(var(--pixel-size) * 160);
    height: calc(var(--pixel-size) * 144); */
    width: calc(var(--pixel-size) * 320);
    height: calc(var(--pixel-size) * 320);
    /* aspect-ratio: auto 9 / 16; */
    aspect-ratio: auto 320 / 320;
    /* width: 100%; */
    outline: var(--pixel-size) solid #fff;
/* 
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10; */
}
.dpad {
    position:absolute;
    right: calc(var(--pixel-size) * 8);
    bottom: calc(var(--pixel-size) * 8);
    width: calc(var(--pixel-size) * 37);
    height: calc(var(--pixel-size) * 38);
    z-index: 20;
    user-select: none;
}
.dpad-button {
    appearance:none;
    outline:0;
    border:0;
    background:transparent;
    padding:0;
    cursor:pointer;
}
.dpad-button svg {
    display:block;
    height: calc(var(--pixel-size) * 13);
}

.dpad-button.pressed .Arrow_arrow-inset { stroke:#07c2cc; }
.dpad-button.pressed .Arrow_arrow-body { stroke:#17dfea; }

.dpad-up {
    position: absolute;
    left: calc(var(--pixel-size) * 12);
    top:0;
}
.dpad-down {
    position: absolute;
    bottom:var(--pixel-size);
    left: calc(var(--pixel-size) * 12);
}
.dpad-left {
    position: absolute;
    top: calc(var(--pixel-size) * 12);
    left:0;
}
.dpad-right {
    position: absolute;
    top: calc(var(--pixel-size) * 12);
    right:0;
}

.dpad {
    user-select:none;
}



.creds {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;

    background-color: rgba(0, 0, 0, 0);

    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 100;

    pointer-events: none;
    transition: all ease 6s;
}
.creds img {
    height: 50%;
    margin-top: auto;
    transform: translateY(100%);
    transition: all ease 30s;
}

.creds.herewego {
    background-color: rgba(0, 0, 0, 1);
}
.creds.herewego img {
    transform: translateY(0%);
}

.credit-frame {
    position: absolute;
    max-width: 52ch;
    min-height: 400px;
    max-height: 58vh;
    left: 50%;
    top: 30px;
    width: 100%;

    transform: translateX(-50%);

    font-family: "NES";
    font-size: 1rem;
    letter-spacing: .05em;
    text-align: center;

    color: white;
    overflow: hidden;
}
@keyframes starwars {
    100% {
        transform: translateY(-100%);
    }
}

.credits {
    transform: translateY(58vh);
    line-height: 1.5em;
    display: none;
}

.credits p {

    margin: 0 auto 4em;
    
}

.credits.on {
    display: block;
    animation: 75s linear starwars infinite;
}

@media only screen and (max-width: 600px) {
    .screen-glow.two{

        width: 150%;
    
    }
    .level-screen {

        font-size: 1.6rem;

    }
    h1.counter-display {

        top: 10px;
        left: 10px;
        font-size: 1.6rem;

    }
    .credit-frame {
        
        width: 80%;
        max-width: unset;

    }
    .credits.on {
        animation: 90s linear starwars infinite;
    }
}

#subtitle {

    font-family: "NES";
    letter-spacing: .05em;
    line-height: 2;
    position: absolute;
    left: 50%;
    top: calc(50% - 15vh);
    transform: translate(-50%, -100%);
    margin: 0;
    text-align: center;
    color: white;
    background: black;
    padding: 1em 2em;
    width: calc(100vw - 75px);
    max-width: 400px;

}

.poem {

    text-align: left;
    margin: 25vh 0;
    
}

.indent-1 {

    padding-left: 10%;;

}

.indent-2 {

    padding-left: 20%;;

}

.indent-3 {

    padding-left: 30%;;

}

.indent-4 {

    padding-left: 40%;;

}


.indent-5 {

    padding-left: 50%;;

}