html,
body {
    font-family: Arial, helvetica, sans-serif;
    margin: 0;
    height: 99.5%;
    width: 100%;
}

section {
    margin-left: auto;
    margin-right: auto;
    max-width: 650px;
}

code {
    background: #f8f8f8;
}

blockquote,
pre {
    margin: 0 0 1em;
    padding: 1em;
    background: #f8f8f8;
    -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 0 0.2rem;
    -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 0 0.2rem;
    box-shadow: rgba(0, 0, 0, 0.2) 0 0 0.2rem;
}

pre {
    word-wrap: normal;
    white-space: pre;
}

canvas {
    width: 100%;
    height: 100%
}

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    padding: 0.25rem;
    text-align: left;
    border: 1px solid #ccc;
}

section {
    line-height: 1.6rem;
}

h1 {
    font-size: 2em;
    margin: .3em;
}

h3 {
    font-size: 1em;
    margin-top: 0.5em;
    margin-bottom: 0.3em;
}


.container {
    height: 100%;
    width: 100%;
    display: flex;

    flex-direction: column;
    justify-content: flex-start;

}

.navigation {
    display: flex;

    flex-direction: row;
    justify-content: flex-start;

    list-style: none;
    margin: 0;

    background: deepskyblue;
    padding-left: 0;
}

.navigation a {
    text-decoration: none;
    display: block;
    padding: 0.5em;
    color: white;
}

#nx,
#ny,
#nz {
    width: 20%;
}

#progress {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 100;
    height: 10px;
    background-color: #b70000;
}

#stats {
    z-index: 100;
    position: absolute;
    bottom: 0;
}

#material-list {
    padding: 0px 5px 0px 5px;
    flex: 1;
}

#options-list {
    padding: 0px 5px 0px 5px;
    overflow: auto;
    flex: 2;
}

#menu {
    height: 100%;
    width: 100%;
    position: absolute;
    display: flex;
    flex-direction: column;
}

#vibcrystal {
    height: 100%;
    width: 100%;
    position: absolute;
}

#highcharts {
    height: 100%;
    width: 100%;
    position: absolute;
}

#mode-list {
    height: 100%;
    width: 100%;
    position: absolute;
    box-sizing: border-box;
}

.material-name {
    vertical-align: middle;
    text-align: center;
    height: 3em;
    margin: 0;
}

.flex-container {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 0;
    margin: 0;
    justify-content: space-around;

    flex: 1;
    display: flex;
    -webkit-flex-flow: row wrap;
    flex-flow: row wrap;
    align-items: stretch;
}

.flex-menu {
    width: 100%;
    flex: 1;
    order: 1;
    position: relative;
}

.flex-vibcrystal {
    width: 100%;
    flex: 2;
    order: 2;
    position: relative;
}

.flex-highcharts {
    width: 100%;
    flex: 2;
    order: 3;
    position: relative;
}

#lattice td {
    width: 20%;
}

#atompos td {
    width: 20%;
}

ap {
    width: 10%;
}

#mat {
    list-style: none;
    margin: 0;
    height: 200px;
    overflow: auto;
    padding-left: 0;
}

#mat li a {
    text-decoration: none;
    margin-bottom: 0.2em;
    display: block;
    transition: font-size 0.3s ease, background-color 0.3s ease;
}

#mat li a:hover {
    background: deepskyblue;
}

#ref {
    font-size: 0.8em;
    list-style: none;
    margin: 0;
    padding-left: 0;
    padding-top: .5em;
    padding-bottom: .5em;
}


@media all and (max-width: 700px) {
    .navigation {
        justify-content: space-around;
    }

    .container {
        height: auto;
    }

    .flex-container {
        -webkit-flex-flow: column wrap;
        flex-flow: column wrap;
        height: auto;
    }

    #menu {
        height: auto;
        position: relative;
    }

    .flex-menu {
        flex: auto;
        order: 1;
        height: initial;
    }

    .flex-vibcrystal {
        flex: auto;
        min-height: 500px;
        width: 90%;
    }

    .flex-highcharts {
        flex: auto;
        order: 3;
        min-height: 500px;
    }

    body {
        overflow: auto;
    }
}

.selected-mode {
    background-color: deepskyblue;
    color: white;
}

#mode-table tr:hover {
    cursor: pointer;
    background-color: #f0f0f0;
}

#mode-table tr.selected-mode:hover {
    background-color: #00bfff;
}