@import 'reset.css';
@import 'touch.css';
@font-face {
    font-family: 'Chonky';
    src: url('../fonts/Chonkly.otf') format('opentype');
}

body {
    background: #3e2723;
    color: white;
    overflow-x: hidden;
}

#game-title {
    font-family: 'Permanent Marker', sans-serif;
    font-size: 3.25rem;
    padding: 1.5rem;
}

main {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

#canvas-container {
    position: relative;
    background: #94746e;
    width: calc(700 / 850 * 85vh);
    height: 85vh;
    border: .15rem solid #516c5a;
    pointer-events: none;
    user-select: none;
    text-shadow: .2rem .2rem #505050;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#canvas-border {
    padding: .2rem;
    background: linear-gradient(to top, #001d0a, #174928);
    border: .15rem solid #516c5a
}

#ui-display {
    position: absolute;
    top: 0;
    left: 0;
    height: 4rem;
    width: 100%;
    font-family: 'Chonky', 'Squada One', sans-serif;
    font-size: 2rem;
    padding: 1rem;
    box-sizing: border-box;
    text-align: right;
    display: flex;
    justify-content: space-between;
}

#audio-controls i {
    pointer-events: all;
    cursor: pointer;
    padding-right: .5rem;
}

#audio-controls i:hover {
    pointer-events: all;
    cursor: pointer;
    color: #ffe77e;
}

#audio-controls i:active {
    transform: translateY(.1rem);
}

#audio-controls i.muted {
    color: rgb(114, 114, 114);
}

.pulse {
    animation: text-pulse 1.5s ease;
    animation-iteration-count: infinite;
    -webkit-animation: text-pulse 1.5s ease;
    -webkit-animation-iteration-count: infinite;
}

.start-prompt {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    font-family: 'Chonky', 'Squada One', sans-serif;
    font-size: 2.25rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

@keyframes text-pulse {
    0% {
        font-size: 2.25rem;
    }
    50% {
        font-size: 2.35rem;
    }
    100% {
        font-size: 2.25rem;
    }
}

@-webkit-keyframes text-pulse {
    0% {
        font-size: 2.25rem;
    }
    50% {
        font-size: 2.35rem;
    }
    100% {
        font-size: 2.25rem;
    }
}

#end-prompt {
    position: relative;
    top: 0;
    lefT: 0;
    height: 100%;
    width: 100%;
    font-family: 'Chonky', 'Squada One', sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    visibility: hidden;
}

#end-text {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: text-flash .5s ease;
    animation-iteration-count: infinite;
    -webkit-animation: text-flash .5s ease;
    -webkit-animation-iteration-count: infinite;
}

@keyframes text-flash {
    0% {
        color: white;
    }
    50% {
        color: rgb(255, 55, 55);
    }
    100% {
        color: white;
    }
}

@-webkit-keyframes text-flash {
    0% {
        color: white;
    }
    50% {
        color: rgb(255, 55, 55);
    }
    100% {
        color: white;
    }
}

#end-summary {
    padding: 1.5rem;
    width: 80%;
}

.summary-list-item {
    font-size: 1.75rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .15rem;
    box-sizing: border-box;
}

.restart-prompt {
    height: 2.25rem;
    font-size: 2.25rem;
    text-align: center;
}

.flex-column-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

aside {
    font-family: 'Squada One', sans-serif;
    padding-top: 1.5rem;
    flex: 1 1 auto;
    width: 300px;
}

aside header {
    width: 100%;
    font-weight: 600;
    font-size: 2.75rem;
    line-height: 2.75rem;
    padding: .5rem;
    padding-top: 0;
    box-sizing: border-box;
    text-align: center;
}

#blurb {
    font-size: 1.75rem;
    font-family: 'Permanent Marker';
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.instruction-list {
    box-sizing: border-box;
    width: 100%;
    padding: 1rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    font-size: 1.5rem;
}

.instruction-list li {
    margin-bottom: 1rem;
}

.hidden {
    display: none;
}

#wallslide-header {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
    padding-bottom: 1rem;
    font-size: 2rem;
}

#highscore-list {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    font-size: 2rem;
    margin-top: 1rem;
}

#highscore-list li {
    margin-bottom: 1rem;
}

.key {
    display: inline-block;
    color: #303030;
    background-color: #e5e5e5;
    border-radius: 10%;
    box-shadow: .2rem .2rem #5a5a5a;
    padding: .25rem .5rem;
    vertical-align: middle;
    margin-right: .3rem;
    margin-left: .2rem;
    margin-bottom: .3rem;
}

@media (min-width: 601px) {
    #canvas-container {
        min-height: 640px;
        min-width: calc(700 / 850 * 640px);
    }
}

@media (max-width: 1600px) {
    main {
        width: 65vw;
        min-width: calc(700 / 850 * 640px);
        flex-direction: column;
        align-items: center;
    }

    aside {
        width: 100%;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 10px;
    }

    main {
        width: 100vw;
        min-width: 0;
    }
    
    #canvas-border {
        width: 95vw;
        height: calc(850 / 700 * 95vw);
        box-sizing: border-box;
    }

    #canvas-container {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 320px) {
    html {
        font-size: 9px;
    }
}