/*
    GLOBAL
*/

html, body, .cryps {
    width: 100%;
    margin: 0;

    background-color: #000000;
    font-family: 'Jura';
    color: whitesmoke;
    font-size: 16pt;

    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;

    /* this is the sweet nectar to keep it full page*/
    height: 99%;
    max-height: 99%;
    min-height: 99%;
}

html {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

*, *:before, *:after {
  box-sizing: inherit;
}

h1 {
    font-size: 2em;
    margin: 0;
}

h2 {
    font-size: 1.5em;
    margin: 0;
}


figure {
    margin: 0;
}

/* main container */
.cryps {
    padding: 0 2em;
    display: flex;
    flex-flow: column;
}

main {
    display: flex;
    flex-flow: row wrap;
    flex: 1 1 90%;

    padding-top: 1em;

    align-content: flex-start;
    justify-content: flex-start;
    align-items: flex-start;
}

button, input {
    font-family: 'Jura';
    color: whitesmoke;
    height: auto;
    border-width: 2px;
    border-color: whitesmoke;
    border-radius: 0;
    letter-spacing: 0.25em;
    box-sizing: border-box;

    /*the transitions */
    transition-property: all;
    transition-duration: 0.5s;
    transition-delay: 0;
    transition-timing-function: ease;
}

button:hover, button:focus {
    /*colour necesary to bash skellington*/
    color: whitesmoke;
    border-color: whitesmoke;
}

button.right[disabled]:hover, button.left[disabled]:hover {
    box-shadow: none;
}

button.top:hover, button.top:focus {
    box-shadow: inset 0 0.25em 0 0 whitesmoke;
}

button.right:hover, button.right:focus {
    box-shadow: inset -0.5em 0 0 0 whitesmoke;
}

button.left:hover, button.left:focus {
    box-shadow: inset 0.5em 0 0 0 whitesmoke;
}

button.hidden {
    opacity: 0;
}

svg {
    flex: 1;
    fill: none;
    stroke: whitesmoke;
    stroke-width: 0;
}

/*
    COLOURS
*/

.green {
    color: #1FF01F;
    stroke: #1FF01F;
}

.red {
    color: #a52a2a;
    stroke: #a52a2a;
}

.blue {
    color: #3498db;
    stroke: #3498db;
}

.yellow {
    color: #FFD123;
    stroke: #FFD123;
}

.purple {
    color: #A25AC1;
    stroke: #A25AC1;
}

.cyan {
    color: #6AD1BF;
    stroke: #6AD1BF;
}

/*
    LOGIN
*/

.login {
    flex: 0 1 25%;
    display: flex;
    flex-flow: column;
}

.cryps input {
    border-color: #444;
    background-color: #333;
    border-radius: 0;
}

.cryps input:focus {
    border-color: whitesmoke;
}

/*
    MENU
*/
header {
    display: flex;
    flex-flow: row;
}

.header-title {
    flex: 1;
    letter-spacing: 0.05em;
}

.header-username {
    letter-spacing: 0.05em;
    display: inline;
}

.header-status {
    text-align: right;
}

.header-status svg {
    margin: 0.5em 0 0 1em;
    height: 1.5em;
    background-color: black;
    stroke: whitesmoke;
}

.ping-path {
    fill: none;
    stroke-width: 4px;
    stroke-dasharray: 121, 242;
    animation: saw 2s infinite linear;
}

@keyframes saw {
    0% {
        stroke-dashoffset: 363;
    }
    100% {
        stroke-dashoffset: 0;
    }
}

.menu-cryps {
    display: flex;
    flex-flow: row wrap;
    flex: 1;
    justify-content: space-between;
}

.menu-cryp-ctr {
    flex: 0 0 30%;
    flex-flow: column;

    text-align: center;
    display: flex;
    justify-content: center;
}

.spawn-btn .menu-cryp {
    border: 1px solid #333;
    color: #333;
    display: flex;
    flex-flow: row wrap;
    align-content: center;
    justify-content: center;
}

.spawn-btn input {
    flex: 1 1 100%;
    width: 100%;
    margin: 1em;
}

.spawn-btn button {
    flex: 1;
    margin: 0.5em 2em;
    border-color: #333
}

.spawn-btn input[disabled], .spawn-btn button[disabled] {
    opacity: 0
}

.menu-cryp {
    height: 100%;
    margin: 0.5em;
    box-sizing: border-box;
    border: 1px solid black;

    transition-property: border;
    transition-duration: 0.5s;
    transition-delay: 0;
    transition-timing-function: ease;
}

.menu-instance-list {
    flex: 1;
    order: 99;
    flex-flow: row wrap;

    display: flex;
    align-content: flex-start;
}

.menu-instance-btn {
    box-sizing: border-box;
    flex: 1 1 100%;
    font-size: 1.5em;
    border-width: 2px;
    padding: 0.5em;
    margin-right: 0.5em;
}

/*
    INSTANCE
*/

.instance {
    display: flex;
    flex-flow: row wrap;
    align-content: flex-start;
}

.instance-hdr {
    display: flex;
    flex-flow: row;

    flex: 0 0 100%;
    margin-bottom: 1em;
}

.instance-info {
    flex: 0 0 50%;
}

.instance .spacer {
    flex-grow: 1
}

.menu-btn, .nav-btn {
    flex: 1 0 25%;
}

.ready-btn {
    flex: 1 0 50%;
}

/* nav hidden on desktop */
.nav-btn {
    display: none;
}

.ready-btn:hover {
    transition-property: all;
    transition-duration: 2s;
    transition-timing-function: ease;
    color: forestgreen;
    border-color: forestgreen;
    /*box-shadow: inset -0.5em 0 0 0 forestgreen;*/
}

.instance-ui-btn {
    font-size: 100%;
    padding: 0;
    margin: 0;
}

.vbox-btn:active, .vbox-btn:hover, .vbox-btn:focus {
    color: black;
}

.vbox-btn.reclaiming, .vbox-btn.reclaiming:hover {
    color: #a52a2a;
    box-shadow: inset 0.5em 0 0 0 #a52a2a;
}

.vbox {
    flex: 1 1 25%;

    display: flex;
    flex-flow: row wrap;
    align-content: flex-start;
    min-width: 250px;
}

.vbox-hdr {
    display: flex;
    align-items: flex-end;

    flex: 1 0 100%;
}

.vbox-hdr div:first-child {
    flex-grow: 1;
}

.vbox-hdr .bits {
    font-size: 2em;
    line-height: 1em;
}

.vbox-btn {
    flex: 1 0 100%;
    margin: 0;
    padding: 0 0.5em;
    background-color: whitesmoke;
    color: black;
}

.vbox-btn:hover {
    color: black;
}

.vbox-table {
    table-layout: fixed;
    width: 100%;
}

.vbox-table td {
    border: 1px solid whitesmoke;
    padding: 0.2em;
    text-align: center;
    height: 40px;
    cursor: pointer;
    text-transform: uppercase;

    transition-property: all;
    transition-duration: 0.5s;
    transition-delay: 0;
    transition-timing-function: ease;

}

.vbox-table td:active {
    background-color: whitesmoke;
    color: black;
}

.vbox-table td svg {
    stroke-width: 2px;
    height: 96%;
    vertical-align: text-bottom;
}

.spacer {
    flex: 1 0 25%;
}

.cryp-list {
    flex: 1 1 25%;

    display: flex;
    flex-flow: column;
    height: 95%;
    padding: 0 2em 0 2em;

    min-width: 300px;
}

/*
    INFO
*/
.thresholds .spec-goals {
    display: flex;
    justify-content: space-around;
}

.info-spec {
    margin-top: 1em;
}

.spec-goals figure {
    margin: 1em 0;
}

.spec-goals figure svg {
    height: 1em;
}

.spec-goals .unmet {
    opacity: 0.5;
}

.info-cryp .skills {
    display: flex;
}

.info-cryp .skills .cryp-skill-btn {
    border: 1px solid whitesmoke;
}

.info-cryp .stats, .info-cryp .specs {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
}

.info-cryp .stats .speed {
    flex: 1 0 100%;
}

.info-cryp .stats figure {
    flex: 0 0 30%;
    border: 0;
    margin: 1em 0;
    text-align: center;
}

.info-cryp .stats .stat-icon {
    height: 2.5em;
}

.info-cryp .specs figure {
    border: 0;
    margin: 1em 0;
    text-align: center;
}


/* CRYP BOX */
.cryp-box {
    flex: 1 1 100%;

    display: flex;
    flex-flow: column;
    border: 1px solid whitesmoke;
    margin-bottom: 1em;
    justify-content: center;

    transition-property: all;
    transition-duration: 0.5s;
    transition-delay: 0;
    transition-timing-function: ease;
}

.cryp-box-top {
    display: flex;
    flex: 1 1 75%;
    width: 100%;
    justify-content: center;
    align-items: stretch;
}

.cryp-box .particle {
    position: fixed;
    z-index: -10;
}

.cryp-box figure {
    margin: 0;
    flex: 0 0 50%;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-flow: column;
}

.cryp-box .stats {
    flex: 0 0 20%;
    width: 100%;
    display: flex;
    border-top: 1px solid whitesmoke;
}

.stats figure {
    flex: 1 1 0;
    border: 0;
    align-items: center;
    padding: 0.5em 0 0 0;
}

.stats figcaption {
    font-size: 75%;
}

.cryp-box .skills {
    display: flex;
    flex-flow: row wrap;
    flex: 1 1 50%;
    height: 100%;
}

.cryp-skill-btn {
    flex: 1 1 100%;
    font-size: 16pt;
    border-width: 1px;
    padding: 0;
    margin: 0;
    border-bottom-width: 0px;
    border-left-width: 1px;
    border-right-width: 0px;
}

.cryp-list .skills .cryp-skill-btn:first-child {
    border-top-width: 0;
}

.stat-icon {
    height: 2em;
    stroke-width: 5px;
    fill: none;
}

/* GAME */
.game-back-btn {
    flex: 0 0 20%;
}

.cryp-skill-btn[disabled] {
    color: #333333;
    font-size: 14pt;
}

.cryp-box.ko {
    animation: none;
    opacity: 0.5;
    filter: grayscale(100%);
}

.cryp-box.unfocus {
    filter: blur(5px);
}

.cryp-box.red-damage {
    filter: drop-shadow(0 0 0.2em red);
    border-width: 5px;
    color: red;
    border-color: red;
}

.red-damage button {
    border: 3px solid red;
    color: red;
}

.red-damage .stats {
    border-top: 3px solid red;
}

.team-player {
    padding: 0;
}

.team-opponent {
    padding: 0;
}

.team-opponent .cryp-box-top {
    flex-flow: column;
    justify-content: center;
    align-items: stretch;
}

.team-opponent .cryp-box-top figure {
    flex: 1;
}

/*.logs {
    flex: 0 0 100%;
}
*/
.selected-skills {
    flex: 1 1 25%;

    display: flex;
    flex-flow: column;
    height: 95%;
    padding: 0 2em 0 2em;
    justify-content: center;
}

.stack-line {
    display: flex;
    align-items: center;
    padding-left: 2em;
    flex: 1;
}

.mobile-skills {
    display: none;
}

@media (max-width: 1000px) {
    .selected-skills {
        display: none;
    }
}

@media (max-width: 800px) {
    h2 {
        font-size: 1em;
    }

    main {
        flex: 1 1 auto;
        flex-flow: column;
    }

    main.game {
        flex-flow: column-reverse;
        justify-content: space-between;
    }

    main.game .instance-hdr {
        order: 99;
    }

    .login {
        width: 100%;
    }

    header {
        font-size: 0.5em;
    }

    .header-username {
        display: none;
    }

    .menu-instance-list {
        order: -1;
        flex: unset;
        width: 100%;
    }

    .menu-instance-btn {
        margin-right: 0;
        margin-bottom: 0.5em;
        padding: 0.2em;
    }

    .menu-btn {
        display: none;
    }

    .nav-btn {
        display: unset;
    }

    .vbox {
        flex: 1 1 100%;
    }

    .cryps {
        font-size: 0.75em;
        padding: 0 0.5em;
    }

    /*fucken beats me why needed */
    .cryp-box .skills {
        height: unset;
    }

    .cryp-box-top figure {
        flex: 1;
        font-size: 60%;
    }

    .menu-instance-btn {
        font-size: 1em;
    }

    .instance-hdr {
        flex: unset;
        width: 100%;
    }

    .cryp-list {
        display: flex;
        flex-flow: row;

        height: unset;
        width: 100%;

        padding: 0;
        flex: unset;
    }

    .instance-info {
        flex: 1;
    }

    .info-cryp {
        text-align: center;
    }

    .cryp-box {
        margin: 0;
        border-left-width: 0px;
    }

    .cryp-box:first-child {
        border-left-width: 1px;
    }

    .spawn-btn button {
        margin: 1em;
        padding: 0.2em;
        width: 100%;
    }

    .cryp-box .skills {
        display: none;
    }

    .selected-skills {
        display: block;
    }

    .mobile-skills {
        display: flex;
        flex-flow: row;
        width: 100%;
    }

    .cryp-skill-btn {
        flex: 1;
        font-size: 16pt;
        border-width: 1px;
        padding: 0;
        margin: 0;
        border-bottom-width: 0px;
        border-left-width: 1px;
        border-top-width: 1px;
        border-right-width: 0px;
    }

    .cryp-skill-btn:first-child {
        border-top-width: 1px;
        border-left-width: 0px;
    }

    .cryp-box .stats figure {
        padding: 0.2em 0;
    }

    .stat-icon {
        height: 1em;
    }

    .cryp-list .stats figcaption {
        display: none;
    }

    .hidden {
        display: none;
    }
}
