@font-face {
    font-family: 'VT323';
    src: url('assets/vt323-regular-webfont.woff2') format('woff2'),
         url('assets/vt323-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Press Start 2P';
    src: url('assets/pressstart2p-regular-webfont.woff2') format('woff2'),
         url('assets/pressstart2p-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    background: rgb(0,0,0);
    font-family: 'Arial', sans-serif;
    text-align: center;
    overflow: visible;
}

.panel {
    background: black;
    color: #aaffaa;
    box-shadow:
        3px 3px 0px 0px #003300,
        inset 3px 3px 0px 0px #003300;
    border: 3px double green;
    border-radius: 10px;
    padding: 5px 2px;
}
.panel select {
    background: transparent;
    color: #00ff00;
    padding: 2px 5px;
    border: none;
    border-bottom: 1px dotted green;
    font-size: 12pt;
}
.panel select > option {
    background: black;
    border: 1px green;
    outline: none;
}
.panel select:focus {
    outline: none;
    border-bottom: 1px dotted #00ffff;
}

.panel input {
    background: transparent;
    border: none;
    border-bottom: 1px dotted green;
    color: #00ff00;
    font-family: 'Press Start 2P', 'Arial', sans-serif;
    font-size: 16px;
    margin-left: 20px;
}
.panel input:focus {
    outline: none;
    border-bottom: 1px dotted #00ffff;
}

.panel button {
    padding: 0.5em 2em;
    border-radius: 10px;
    background: #006600;
    border: 2px outset;
    border-top-color: #009900;
    border-right-color: #003300;
    border-bottom-color: #003300;
    border-left-color: #009900;
    color: white;
}
.panel button:focus { outline: none; background: #009900; }

#inventoryWindow {
    display: none;
    padding: 5px 20px;
    position: fixed;
    left: 50%;
    top: 30%;
    width: 600px;
    margin-left: -300px;
    margin-top: -150px;
}
#inventoryWindow h1 {
    font-size: 12pt;
    font-family: 'Press Start 2P', sans-serif;
}
#inventoryWindow .item-weight {
    position: absolute;
    right: 5px;
    bottom: 5px;
    font-size: 8pt;
}
#itemList {
    width: 600px;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px dotted green;
    border-radius: 5px;
    background: #001100;
    list-style: none;
    padding: 0px;
    text-align: left;
    /* to make it a position parent */
    position: relative;
}
#itemList li {
    padding: 2px 10px;
    font-size: 12pt;
    font-weight: bold;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}
#itemList li.selected {
    background: blue;
    color: white;
}
#itemList li img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: 5px;
}
.slot {
    display: inline-block;
    float: left;
    width: 64px;
    height: 64px;
    border: 1px solid black;
    border-radius: 10px;
}
.slot.disabled {
    opacity: 0.5;
}
.slot.error {
    background: url('assets/cancel.png');
}
.slot img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
}
#itemPopup {
    display: none;
    font-size: 12pt;
    padding: 20px 20px;
    border: 1px solid black;
    border-radius: 5px;
    background: silver;
    position: fixed;
    left: 50%;
    top: 50%;
    margin-left: -200px;
    margin-top: -50px;
    width: 400px;
    z-index: 20000;
}
#itemPopup div { text-align: center; }
#itemPopup span { font-weight: bold; }
#itemPopup img {
    width: 64px;
    height: 64px;
    vertical-align: middle;
    border: 1px solid black;
    border-radius: 5px;
    margin-right: 10px;
}
#itemPopup .two { display: none; }

/*----------------------------------*/
#deathScreen, #victoryScreen {
    display: none;
    position: absolute;
    left: 0; top: 0; right: 0; bottom: 0;
    z-index: 9000;
    background: black;
    color: white;
    font-family: 'Press Start 2P', sans-serif;
    font-size: 24px;
}
#deathScreen > div, #victoryScreen > div {
    position: absolute;
    left: 50%;
    top: 50%;
    margin-left: -400px;
    margin-top: -300px;
    width: 800px;
    max-height: 70vh;
}
#deathScreen .instruction, #victoryScreen .instruction {
    font-size: 8px;
    margin: auto;
}
#deathScreen img {
    float: left;
}
#victoryScreen img { margin-bottom: 10px; }

@keyframes sparkle {
    0% { color: red; }
    10% { color: orange; }
    20% { color: yellow; }
    30% { color: lightgreen; }
    40% { color: green; }
    50% { color: cyan; }
    60% { color: blue; }
    70% { color: violet; }
    80% { color: magenta; }
    90% { color: white; }
    100% { color: red; }
}
#victoryScreen h1 { animation: sparkle 1s infinite; }


/*----------------------------------*/
#mainMenu {
    position: fixed;
    left: 50%; top: 25%;
    margin-top: -150px;
    margin-left: -400px;
    width: 800px; height: 600px;
    background: url('assets/titlescreen.png');
    background-repeat: no-repeat;
    padding-top: 504px;
    color: #00ff00;
}
#mainMenu h1 {
    position: absolute;
    left: 10px;
    top: 10px;
    margin-top: 0px;
    font-family: 'Press Start 2P', sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: linear-gradient(silver, darkgrey);
}
#mainMenu label {
    display: inline-block;
    min-width: 230px;
    text-align: left;
}

#mainMenu .panel {
    position: relative;
    top: 20px;
}

/*---- star map ----------------------- */
#starMapPanel {
    display: none;
    width: 600px;
    height: 200px;
    position: absolute;
    top: 50vh; left: 50vw;
    margin-top: -100px;
    margin-left: -300px;
    z-index: 100;
    font-size: 16px;
    overflow: hidden;
}
#starMapInfo {
    margin: 5px;
    font-family: 'VT323', sans-serif;
    font-size: 16px;
    text-align: left;
}

#starMapInfo h1 {
    font-size: 16pt;
    text-align: center;
    padding: 5px 0px;
    margin: 0px 0px 5px 0px;
    border-bottom: 1px dotted green;
}
#starMapInfo label {
    display: inline-block;
    color: #009900;
    width: 20%;
    text-align: right;
    padding-right: 2em;
}
#starMapInfo span {
    display: inline-block;
    width: 70%;
}

/*----help window------------------------------------*/
#helpText {
    position: fixed;
    right: 0px;
    top: 0px;
    height: 100vh;
    width: 0px;
//    width: 600px;
    border: 1px solid black;
}
.help {
    background: #333333;
    color: #eeffee;
}
.help a { color: #aaffaa; }
.help a:visited { color: #66ff66; }   
.help .credits {
    font-size: 10pt;
    font-weight: normal;
    text-align: center;
}
.help p {
    text-align: left;
    text-indent: 2em;
}
.help blockquote {
    width: 500px;
    font-size: 8pt;
    font-style: italic;
    text-align: left;
    margin: auto;
}
.help span.key {
    font-family: 'Courier New', 'Courier', monospaced;
    font-weight: bold;
    color: #00ff00;
}
.help ul, .help ul li {
    text-align: left;
}
span.symbol {
    font-family: 'Courier New', 'Courier', monospaced;
    background: black;
    margin: 2px;
    height: 1.3em;
}
#helpTab {
    position: absolute;
    left: 0px; top: 100px;
    margin-left: -80px;
    width: 140px;
    font-size: 12pt;
    font-weight: bold;
    background: silver;
    color: black;
    border: 1px solid black;
    border-bottom: none;
    border-radius: 5px 5px 0px 0px;
    -webkit-transform: rotate(-90deg);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    cursor: pointer;
}
@keyframes toggle1 {
    0% { opacity: 1.0; }
    90% { opacity: 1.0; }
    100% { opacity: 0.0; }
}
@keyframes toggle2 {
    0% { opacity: 0.0; }
    90% { opacity: 0.0; }
    100% { opacity: 1.0; }
}
.alternate {
    position: relative;
    display: inline-block;
    width: 0.4em;
    height: 0.9em;
}
.alt1 {
    position: absolute;
    left: 0; top: 0;
    animation: toggle1 5s infinite;
}
.alt2 {
    position: absolute;
    left: 0; top: 0;
    animation: toggle2 5s infinite;
}
