* {
    font-size: 30px;
}

body {
    background-image: url('../game/sprites/starsSpace.png');
    color: white;
    font-family: 'Press Start 2P', monospace;

    /* font-family: 'Red Hat Display', sans-serif; */
    font-size: 28px;
    
    box-sizing: border-box;
    cursor: url('../game/sprites/reticule.png') 32 32, auto;

    --primary: black;
    --secondary: white;
    --tertiarty: #ccffff;
    --quick: 0.15s;
}

h1 span {
    display: none;
}

.title {
    width: 856px;
    margin-bottom: 100px;

    image-rendering: optimizeSpeed;             /* Older versions of FF          */
    image-rendering: -moz-crisp-edges;          /* FF 6.0+                       */
    image-rendering: -webkit-optimize-contrast; /* Safari                        */
    image-rendering: -o-crisp-edges;            /* OS X & Windows Opera (12.02+) */
    image-rendering: pixelated;                 /* Awesome future-browsers       */
    -ms-interpolation-mode: nearest-neighbor;   /* IE                            */
}

canvas {    
    image-rendering: optimizeSpeed;             /* Older versions of FF          */
    image-rendering: -moz-crisp-edges;          /* FF 6.0+                       */
    image-rendering: -webkit-optimize-contrast; /* Safari                        */
    image-rendering: -o-crisp-edges;            /* OS X & Windows Opera (12.02+) */
    image-rendering: pixelated;                 /* Awesome future-browsers       */
    -ms-interpolation-mode: nearest-neighbor;   /* IE                            */
}

.content {
    display: grid;
    grid-gap: 20px;
    position: fixed;
    height: 100vh;
    width: 100vw;
    place-content: center;
    background: hsl(0,0%,0%,0.8);
    z-index: 5;
    cursor: url('../pointer.png'), auto;

}

.menu {
    display: grid;
    grid-gap: 20px;
    justify-content: center;
}
.screen {
    display: none;
    width: 100vw;
    height: 100vh;
    place-content: center;
}

.screen.active {
    display: grid;
}

#startScreen {
    background: linear-gradient(110deg, #ff007711, #2e04ff11, #00aeff11, #bf00ff11);
    background-size: 400% 400%;
	animation: gradient 20s infinite;
}

#pauseScreen {
    padding: 10vw;
    max-width: 1200px;
    grid-template-columns: 1fr 1fr;
    grid-gap: 50px;
}

.controls {
    color: white;
    background: rgba(0,0,0, 0.5);
    padding: 20px 40px 0;
    box-sizing: border-box;
}
.controls p {
    color: var(--secondary);
}
.controlsGrid {
    display:grid;
    grid-template-columns: 1fr 1fr;
}

/* #screenEffects {
    position: fixed;
    cursor: default;
    pointer-events: none;
    z-index: 15;
    width: 100vw;
    height: 102vh;
    --scanColorA: rgba(0, 0, 139, 0.02);
    --scanColorB: rgba(0, 128, 128, 0.01);
    --scanOffset: 20px;
    --scanLineWidth: 40px;
    background: repeating-linear-gradient(
        0deg,
        var(--scanColorA),
        var(--scanColorA) var(--scanOffset),
        var(--scanColorB) var(--scanOffset),
        var(--scanColorB) var(--scanLineWidth)
        );

    user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;

    animation: scanlines 1s linear infinite;
}
@keyframes scanlines {
  from {transform: translate(0px, 0px);}
  to {transform: translate(0px, var(--scanLineWidth));}
} */

h1, h2, h3 {
    text-align: center;
    margin-bottom: 1em;
    font-weight: bold;
}

h1 {
    font-family: 'Press Start 2P', monospace;
    font-size: 3em;
}
h2 {
    font-size: 1.5em;
    min-width: 400px;
}
h3 {
    font-size: 1em;
    margin-bottom: 0.5em;
    color: var(--primary);
}

p {
    color: var(--primary);
    font-size: 0.85em;
    line-height: 1.5em;
}

#fadeToBlack {
    position: absolute;
    width: 100vw;
    height: 100vh;
    background: black;
    z-index: 10;
    opacity: 0;
    transition: opacity 1s;

    pointer-events: none;
}
#fadeToBlack.active {
    opacity: 1;
}

#titles, #openingText, .slide {
    position: absolute;
    width: 100vw;
    height: 100vh;
    display:grid;
    place-content: center;
    opacity: 1;
    transition: opacity 2s;
}
#openingText {
    pointer-events: none;
    place-content: center;
    display: none;
}
#openingText p {
    font-size: 1.25em;
    color: white;
    max-width: 800px;
}

#openingText .pressEnter {
    font-size: 0.75em;
    color: rgba(255, 255, 255, 0.15);
    position: absolute;
    bottom: 20px;
    text-align: center;
    width: 100vw;

    animation: pulse 4s ease-in-out infinite;
}

.slide {
    height: 100vh;
    align-content: center;
    grid-gap: 40px;
}
.slide img {
    max-height: 50vh;
    justify-self: center;
}

#openingText.hide, #titles.hide, .slide.hide {
    opacity: 0;
}

.big {
    font-size: 1.5em;
}
.gold {
    color: gold;
    font-weight: bold;
}
.red {
    color: crimson;
    font-weight: bold;
}

#stats {
    background: var(--tertiarty);
    padding: 20px;
    position: relative;
}

.emphasis{
    font-weight: bold;
}

.grade {
    font-size: 1.25em;
    line-height: 1.5em;
    display: grid;
    position: absolute;
    right: -15px;
    bottom: -15px;
    place-items: center;
    width: 50px;
    height: 50px;
    text-align: center;
    background: var(--secondary);
    color: var(--primary);
    padding: 5px;
    border: 4px solid var(--primary);
    border-radius: 50px;
    box-shadow: var(--primary) 0 0 10px;
    font-weight: bold;
    transform: rotate(10deg);
}

a.button {
    text-decoration: none;
    cursor: url('../pointerHover.png'), auto;
}

button, a > button {
    cursor: url('../pointerHover.png'), auto;
    background: var(--primary);
    color: var(--secondary);

    font-family: 'Press Start 2P', monospace;
    
    width: 100%;
    height: 50px;
    position: relative;
    
    padding: 5px 25px;
    display: block;
    border: none;
    box-sizing: border-box;
    text-align: left;
    font-weight: bold;

    transition: color var(--quick), background var(--quick);
}

button:hover, button:focus, button.selected {
    color: var(--primary);
    background: var(--secondary);
    cursor: url('../pointerHover.png'), auto;
}

button .flare {
    display: block;
    position: absolute;

    background: var(--primary);

    left: 0;
    top: 0;
    width: 0px;
    height: 100%;
    transition: width var(--quick);
}

button:hover .flare, button:focus .flare, button.selected .flare {
    width: 15px;
}

#container {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

canvas {
    width: 100%;
}

.version {
    position: fixed;
    bottom: 0;
    right: 0;
    font-size: 0.5em;
    padding: 10px;
    background: black;
    color: var(--secondary);
    opacity: 0.7;
    z-index: 6;
    cursor: pointer;
}
.version:hover {
    background: var(--secondary);
    color: var(--primary);
    cursor: url('../pointerHover.png'), auto;    
}

#ui {
    position: fixed;
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
    grid-template-rows: auto auto auto 1fr;
    padding: 30px;
    z-index: 1;
    display: none;

    user-select: none;
    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
}
#ui.active {
    display: grid;
}

#timer {
    display: none;
    justify-self: center;
    color: var(--secondary);
    width: 100px;
}

#timer span.mil {
    font-size: 0.7em;
}

.box {
    background: rgba(0,0,0, 0.5);
    padding: 10px 20px;
}
#levelStart {    
    justify-self: left;
    align-self: end;
    opacity: 0;
    color: var(--secondary);
}
#levelStart .sector {
    font-size: 1em;
    padding-bottom: 20px;
}
#levelStart .subsector {    
    font-size: 0.75em;
}

.start {
    animation: levelStart 5s;
}

#objectives {
    justify-self: left;
    align-self: start;
    display:grid;
    margin-top: 70px;
}

#objectives div {
    opacity: 0;
    padding: 10px 10px 5px;
    font-size: 0.7em;
}

#objectives .objective {
    color: var(--secondary);
    opacity: 1;
    animation: fadeIn 1s ease-in;
}

#objectives .objective.primary {
    color: goldenrod;
}

#orbs {
    display: grid;
    grid-auto-flow: column;
    justify-content: left;
    padding: 20px 0;
    align-self: start;
    align-items: center;
    grid-gap: 20px;
}

.orbNumber {
    color: white;
    animation: orbPulse 0.5s ease-out;
}
@keyframes orbPulse {
    from { color: var(--secondary); }
    to { color: white;}
}


#health {
    justify-self: left;
    display: grid;
    grid-auto-flow: column;
    grid-gap: 0px;
    justify-content: left;
    /* padding: 30px 0; */
    background: rgba(110, 202, 255, 0.6);
    border-radius: 5px;

}

.hitPoint {
    width: 40px;
    height: 60px;
    
    padding: 5px;
    box-sizing: border-box;
}
.hitPoint div {
    border-radius: 5px;
    width: 100%;
    height: 100%;
    background: cyan;
}
.hitPoint.empty {
    background: rgba(61, 61, 61, 0.6);
}
.hitPoint.empty div {
    background: rgb(61, 61, 61);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes levelStart {
    0% {
        transform: translateX(20px);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    15% {
        transform: translateX(0px);
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes gradient {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}