@font-face {
    font-family: 'HK Super Round Bold';
    font-style: normal;
    font-weight: normal;
    src: local('HK Super Round Bold'), url('HKSuperRound-Bold.woff') format('woff');
}

html {
    font-size: min(2vw, 10px);
    color: #1a1a1b;
    font-family: 'Clear Sans', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: white;
    min-height: 100vh;
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: row nowrap;
    text-align: center;
}

button.icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 4px;
}

.wrapper {
    position: relative;
    width: 50rem;
    min-height: 100vh;
    margin: auto;
    display: flex;
    overflow: hidden;
    flex-flow: column nowrap;
    align-items: center;
}

header {
    background-color: white;
    height: 5rem;
    width: 50rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #e2e4e4;
}

.title {
    position:fixed;
    top: 0;
    z-index: 10;
}

h1 {
    font-family: 'HK Super Round Bold';
    font-weight: 700;
    font-size: 3.6rem;
    padding-top: 0.4rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: center;
    left: 0;
    right: 0;
    pointer-events: none;
}
h2 {
    font-family: 'HK Super Round Bold';
    font-weight: 700;
    font-size: 2.5rem;
    text-transform: uppercase;
    padding-top: 0.4rem;
    letter-spacing: 0.1em;
    text-align: center;
    left: 0;
    right: 0;
    pointer-events: none;
}

#game {
    width: 100%;
    margin: 5rem 0 25rem 0;
}

#board {
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    flex: 1;
}

.guess {
    text-align: center;
    white-space: nowrap;
    margin: 1rem 0;
}

.empty::before {
    content: "";
    display: block;
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 50%;
    border: 1px solid #cacaca;
    margin: 0 .2rem;

    text-align: center;
    vertical-align: middle;
    text-transform: uppercase;
    font-weight: bold;
}

.letter {
    font-family: 'HK Super Round Bold';
    display: inline-block;
    position: relative;
    font-size: 2.3rem;
    line-height: 4.9rem;
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 50%;
    border: 1px solid #cacaca;
    margin: 0 .2rem;

    text-align: center;
    vertical-align: middle;
    text-transform: uppercase;
    font-weight: bold;
}

.letter.absent {
    background-color: #959b9d;
    color: white;
    border: none;
}

.letter.present {
    background-color: #e8b838;
    color: white;
    border: none;
}

.letter.head {
    background-color: #4fb061;
    color: white;
    border: none;
}

.letter.tail {
    background-color: #4fb061;
    color: white;
    border: none;
}

.letter.tail::before {
    content: "";
    display: block;
    position: absolute;
    background-color: #4fb061;
    z-index: -10;
    top: 0;
    bottom: 0;
    left: -.2rem;
    right: -.2rem;
    transform: translate(-50%, 0);
}

.letter.start::after {
    content: "";
    display: block;
    position: absolute;
    background-color: #4fb061;
    z-index: -10;
    top: 0;
    bottom: 0;
    left: -.2rem;
    right: 50%;
}

.letter.end::after {
    content: "";
    display: block;
    position: absolute;
    background-color: #4fb061;
    z-index: -10;
    top: 0;
    bottom: 0;
    right: -.2rem;
    left: 50%;
}

#keyboard {
    position: fixed;
    bottom: 0;
    width: 50rem;
    display: flex;
    flex-flow: column nowrap;
    user-select: none;
    touch-action: manipulation;
    background-color: white;
}

#keyboard>div {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    margin: 0.4rem 0;
}

#keyboard button {
    font-family: 'HK Super Round Bold';
    font-weight: bold;
    font-size: 1.5rem;
    height: 5.8rem;
    line-height: 6rem;
    flex: 1;
    outline: none;
    border: none;
    cursor: pointer;
    user-select: none;
    background-color: #e2e4e4;
    color: #1a1a1b;
    border-radius: 0.4rem;
    margin: 0 0.3rem;
}


#keyboard button#keyboard_backspace {
    display: flex;
    justify-content: center;
    align-items: center;
}

#keyboard button.absent {
    background-color: #959b9d;
    color: white;
}

#keyboard button.present {
    background-color: #e8b838;
    color: white;
}

#keyboard button.correct {
    background-color: #4fb061;
    color: white;
}

#keyboard .spacer {
    flex: 0.5;
}

#result {
    width: 100%;
    margin: 5rem 0;
}

.result_count {
    font-family: 'HK Super Round Bold';
    display: flex;
    flex-flow: row;
    justify-content: center;
    align-items: baseline;
}

.result_count_label {
    line-height: 2rem;
    font-size: 1.8rem;
    text-align: Left;
    padding-left: 2rem;
    display: inline-block;
}

#letters_used, #words_used {
    display: block;
    font-size: 8rem;
    line-height: 8rem;
}

.slash {
    height: 9rem;
    width: 0;
    border-left: 1px solid #1a1a1b;
    transform: rotate(20deg);
}

.timer {
    font-family: 'HK Super Round Bold';
    width: 100%;
}

.timer>h2 {
    text-align: center;
    margin-bottom: 10px;
}

#timer {
    font-size: 36px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    letter-spacing: 0.05em;
}

.share {
    display: flex;
    justify-content: center;
    align-items: center;
}

#share_image_button  {
    background-color: #4fb061;
    color: white;
    font-family: inherit;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: uppercase;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.3);
    width: 40%;
    font-size: 20px;
    margin: 0 1rem;
    height: 52px;
}

#help, #stats{
    z-index: 20;
    position: fixed;
    top: 100vh;
    width: 50rem;
    height: 100vh;
    overflow: hidden;
    background-color: white;
    opacity: 0;
    transition: 0.3s ease-in-out;
}

input[type=radio]:checked+#help, input[type=radio]:checked+#stats {
    opacity: 1;
    top: 0;
}

.example {
    margin: 1.5rem;
}

.example .guess {
    margin: 0;
}

.example p {
    margin: .5rem;
}


.stats_container {
    font-family: 'HK Super Round Bold';
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-around;
    margin: 4rem 0;
}

.stats_number {
    font-size: 4rem;
    line-height: 4rem;
    text-align: center;
}

.stats_label {
    line-height: 2rem;
    font-size: 1.8rem;
    text-align: center;
}

#alert {
    font-family: 'HK Super Round Bold';
    font-size: 1.5rem;
    letter-spacing: 0.1rem;

    position: fixed;
    left: auto;
    right: auto;
    color: white;
    padding: 2rem;
    background-color: #1a1a1b;
    box-shadow: #0005 0px 5px 20px;

    opacity: 0;
    top: -30vh;
    transition: 0.3s ease-in-out;
}

#alert.visible {
    opacity: 1;
    top: 15vh;
}
