/*
    GLOBAL
*/

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

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

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

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

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


/* 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';
    height: auto;
    color: whitesmoke;
    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.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 {
    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;
}


/*
    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;
    flex: 1;
}

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

.header-username {
    letter-spacing: 0.25em;
    font-size: 2em;
    display: inline;
}

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

.header-status svg {
    margin-left: 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: 0 0 50%;
}

.menu-cryp-ctr {
    flex: 0 0 33%;
    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;
}

.spawn-btn .menu-cryp h2 {
    font-size: 3em;
    flex: 1;
}

.spawn-btn input {
    flex: 1 1 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-cryp h2 {
    font-size: 2em;
}

.menu-instance-list {
    flex: 0 0 50%;
    flex-flow: row wrap;

    display: flex;
    align-content: flex-start;
    height: 100%;
}

.menu-instance-btn {
    box-sizing: border-box;
    flex: 1 1 100%;
    font-size: 150%;
    /*min-width: 20%;*/
    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 {
    flex: 1 0 25%;
}

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

.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 {
    flex: 1 1 25%;

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

.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;
}

.spacer {
    flex: 1 0 25%;
}

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

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

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

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

.cryp-box-top {
    display: flex;
    flex: 1 1 80%;
    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;
}

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

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

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

.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-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;
}

.team-player {
    display: flex;
    flex: 1 0 20%;
    height: 90%;
    padding: 0;
}

.team-opponent {
    display: flex;
    flex: 1 0 20%;
    height: 90%;
    padding: 0;
}

.logs {
    padding-left: 2em;
    display: flex;
    flex-flow: row wrap;
    flex: 0 0 20%;
}

.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;
}