body {
    font-family: 'Fredoka', sans-serif;
    text-align: center;
    opacity: 0;
}
body.ready {
    opacity: 1;
}
header {
    position: relative;
    color: #355071;
    max-width: 800px;
    margin: 0 auto;
}
header .title {
    font-size: 22px;
}
header.popup-header {
    color: #fff;
}
header.popup-header .game-info {
    visibility: hidden;
}
.title {
    margin-top: 24px;
}
.title span,
.gphrazy span {
    font-family: 'Special Elite', cursive;
    font-size: 1em;
    margin-right: 4px;
}
.title strong,
.gphrazy strong {
    font-family: 'Rock Salt', cursive;
    font-size: 1.6em;
}
.popup .title {
    color: white;
    margin-top: 32px;
}
.game-actions {
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translate(0,-50%);
    font-size: 1em;
}
.game-actions i {
    padding: 8px;
    cursor: pointer;
}
.game-actions .fa-chart-bar {
    transform: rotate(-90deg);
}
.main-section {
    margin: 16px auto;
    max-width: 800px;
}
.guessbox {
    margin: 60px 8px;
    position: relative;
    display: flex;
    justify-content: center;
}
.guessbox .guess-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    opacity: 0.5;
}
.guessbox.ready .guess-section {
    transition: opacity 0.3s ease-in-out 2s;
    opacity: 1;
}
.guessbox.playing .guess-section {
    opacity: 1;
}
.guess-chances {
    display: flex;
    justify-content: center;
    transition: all 0.5s ease-in-out;
    opacity: 0;
    position: relative;
}
.guess-chances:before {
    content: "Timer stopped. Type in your guess!";
    position: absolute;
    top: -24px;
    font-family: 'Special Elite';
    font-size: 16px;
}
.main-section.guess-mode .guess-chances {
    opacity: 1;
}
.main-section.guess-mode .guess-mode-actions {
    display: inline-block;
}
.main-section.guess-mode .guess-now {
    display: none;
}
.main-section .guess-mode-actions {
    display: none;
}
.guess-mode-actions {
    display: flex;
}
.guess-action:after {
    font-family: 'Special Elite';
    display: block;
    text-transform: none;
    margin-top: 4px;
}
.guess-now:after {
    content: "(I'm feeling confident.)";
    transition: all 0.3s ease-in-out;
}
.guess-check:after {
    content: "(Check please.)";
}
.guess-cancel:after {
    content: "(More clues.)";
}
.guess-chances span {
    font-family: 'Rock Salt', cursive;
    width: 20px;
    height: 20px;
    border-radius: 10px;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
    margin: 0 8px;
    position: relative;
    font-size: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.guess-chances span.lost:after {
    content: "x";
    font-family: 'Rock Salt', cursive;
    position: absolute;
    font-size: 32px;
    top: -7px;
    left: 1px;
    color: #d21818;
}
.guessbox div {
    display: flex;
}
.guessbox span {
    width: 36px;
    height: 44px;
    margin: 8px 1px;
    font-size: 26px;
    background: #ccc;
    display: flex;
    justify-content: center;
    align-items: center;
}
.guessbox .has-space {
    margin-left: 30px;
}
.guess-action {
    display: inline-block;
    margin: 24px auto 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 4px;
    background: #355071;
    padding: 6px 24px;
    color: white;
    cursor: pointer;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    transition: all 0.2s ease-in-out;
}
.guess-action:active {
    transform: scale(0.98);
    
}
.guess-action:disabled,
.guess-action[disabled]{
    opacity: 0.3;
    cursor: not-allowed;
    color: #dccccc;
}
.guess-action.play-now {
    margin-top: 8px;
}
.guess-action.play-now:after {
    content: "(I accept all risks.)";
}
.guess-action.resume:after {
    content: "(Let me back in!)";
}
.guess-action.guess-cancel {
    background-color: #d21818;
}
.popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s ease-in-out 0.2s, opacity 0.2s ease-in-out;
}
.popup.show {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s ease-in-out, opacity 0.2s ease-in-out  0.2s;
}
.popup.notransition, .popup.show.notransition {
    transition: none;
}
.popup.instructions {
    font-size: 18px;
    line-height: 1.2em;
    color: #355071;
}
.popup.initial-instructions {
    background: #355071;
}
.popup.initial-instructions .close-popup {
    display: none;
}
.popup.non-actionable header,
.popup.non-actionable .play-now {
    display: none;
}
.popup .popup-content {
    max-width: 90vw;
    min-width: 300px;
    background: white;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 24px;
    border-radius: 4px;
}
.popup.instructions .popup-content ol {
    text-align: left;
}
.popup.instructions .popup-content li {
    margin-bottom: 16px;
}
.popup.instructions li.emphasize {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 24px;
    display: inline-block;
}
.popup.instructions li.highlight {
    color: #d21818;
}
.popup.instructions .phrazy {
    font-family: 'Rock Salt', cursive;
}
.popup .share {
    padding: 8px;
    background: #355071;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    position: relative;
}
.popup .share span {
    position: absolute;
    top: -24px;
    padding: 4px 8px;
    border-radius: 2px;
    background-color: rgba(0,0,0,0.6);
    left: 50%;
    transform: translate(-50%, 0);
    opacity: 0;
}
.popup .share.copied span {
    animation-duration: 2s;
    animation-name: showHide;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}
.popup .share:before {
    content: "Share";
    font-size: 13px;
    margin-right: 4px;
    letter-spacing: 0.5px;
}
.guessbox input {
    width: 100%;
    height: 100%;
    padding: 0;
    font-size: 26px;
    font-family: 'Fredoka', sans-serif;
    text-align: center;
    text-transform: uppercase;
    border: 1px solid rgb(168, 166, 166);
    border-radius: 4px;
    transition: all 0.3s ease-in-out;
}
.guessbox input.wrong-letter {
    background: #d21818;
    color: white;
}
.guessbox input.correct-letter {
    background: #2b922b;
    color: white;
}
.guessbox.wrong-guess span{
    transition: all 0.3s ease-in-out;
}
.guessbox.wrong-guess input,
.guessbox.wrong-guess span,
.guessbox input.empty {
    background: #d21818;
}
.popup h2, .popup h3 {
    margin: 0;
}
.popup p {
    letter-spacing: 1px;
    margin-top: 8px;
}
.popup h3 {
    font-family: 'Special Elite';
    font-size: 20px;
}
.popup .grade {
    font-family: 'Rock Salt', cursive;
    display: inline-block;
    width: 48px;
    border-radius: 4px;
    color: white;
    margin-top: 8px;
}
.popup .grade:before {
    font-size: 10px;
    line-height: 1.2em;
}
.popup h2.grade:before {
    font-size: 20px;
}
.popup .grade:before,
.stats .chart-labels span:before {
    display: inline-block;
    margin: 8px;
}
.popup .grade-a,
.stats .chart span:nth-child(1),
.progress span.prog-a {
    background: #2b922b;
}
.popup .grade-a:before,
.progress span.prog-a:before {
    content: "A";
}
.popup .grade-b,
.stats .chart span:nth-child(2),
.progress span.prog-b {
    background: #66be1e;
}
.popup .grade-b:before,
.progress span.prog-b:before {
    content: "B";
}
.popup .grade-c,
.stats .chart span:nth-child(3),
.progress span.prog-c {
    background: #d7d72b;
}
.popup .grade-c:before,
.progress span.prog-c:before {
    content: "C";
}
.popup .grade-d,
.stats .chart span:nth-child(4),
.progress span.prog-d {
    background: rgb(243, 166, 22);
}
.popup .grade-d:before,
.progress span.prog-d:before {
    content: "D";
}
.popup h2.grade-f {
    width: 100px;
}
.popup .grade-f,
.stats .chart span:nth-child(5) {
    background: #d21818;
}
.popup .grade-f:before {
    content: "F";
}
.popup h2.grade-f:before {
    content: "Failed";
}
.popup .bottom-bar {
    display: grid;
    grid-template-columns: auto 76px;
    align-items: center;
    font-size: 12px;
    border-top: 1px solid #d6cdcd66;
    padding-top: 8px;
}
.popup .bottom-bar .next-phraze {
    justify-self: start;
}
.popup .bottom-bar .next-phraze span {
    font-size: 22px;
}
.popup .fa-xmark {
    position: absolute;
    right: 8px;
    top: 8px;
    font-size: 18px;
    padding: 16px;
    cursor: pointer;
}
.stats {
    position: relative;
}
.stats .chart{
    width: 100%;
    height: 120px;
    margin-top: 8px;
}
.stats .chart span {
    height: 120px;
    align-self: end;
    opacity: 0.7;
    line-height: 2em;
    display: flex;
    align-items: end;
    justify-content: center;
    font-size: 8px;
}
.stats .chart,
.stats .chart-labels {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: 1fr;
    align-content: center;
    font-size: 11px;
    color: white;
}
.stats .chart,
.stats .chart-labels,
.progress span {
    font-family: 'Rock Salt', cursive;
}
.overall-stats {
    display: grid;
    justify-items: center;
    grid-template-columns: 1fr 1fr;
    max-width: 300px;
    margin: 16px auto;
    grid-gap: 4px;
}
.overall-stats h5 {
    font-size: 14px;
}
.overall-stats span {
    align-self: end;
}
.overall-stats span.game-total {
    font-family: 'Rock Salt', cursive;
    font-size: 14px;
    padding: 4px 0;
}
.progress {
    width: 90%;
    margin: 24px auto 8px;
    position: relative;
}
.progress-bar {
    display: grid;
    grid-template-columns: 20% 20% 20% 40%;
    position: relative;
}
.progress-bar .divider {
    position: absolute;
    width: 1px;
    bottom: 0;
    height: 4px;
    background-color: #ffffff87;
}
.progress-bar-cover,
.progress-bar-timer {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    transition: all .5s linear;
    width: 0;
}
.progress-bar-cover {
    background: #dfe3e7;
    border-radius: 0 4px 4px 0;
    z-index: 5;
}
.progress-bar-cover.penalty {
    background: #d21818;
}
.progress-bar-timer {
    transition: all 5s linear;
    background: rgba(255, 255, 255, 0.664);
    top: auto;
    height: 4px;
}
.progress-bar-timer.hide {
    opacity: 0;
    transition-duration: .5s;
}
.progress span {
    height: 20px;
    color: white;
    font-size: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.progress span:first-child {
    border-radius: 4px 0 0 4px;
}
.progress span:last-of-type {
    border-radius: 0 4px 4px 0;
}
.guessbox h2 {
    position: absolute;
    font-size: 14px;
    font-family: 'Rock Salt';
    top: 22px;
    transition: all 0.3s ease-in-out;
    letter-spacing: 1px;
    z-index: 10;
}
.guessbox h2.show {
    animation-duration: 2s;
    animation-name: zoomin;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

.main-nav {
    left: 24px;
    right: auto;
    border-radius: 30px;
    background: #355071;
    z-index: 100;
}
.main-nav .menu-icon {
    color: white;
}
.main-nav .nav-list {
    position: absolute;
    width: 200px;
    padding: 16px;
    box-sizing: border-box;
    background: white;
    box-shadow: rgb(0 0 0 / 16%) 0px 3px 6px, rgb(0 0 0 / 23%) 0px 3px 6px;
    min-height: 280px;
    border-radius: 4px;
    top: 40px;
    list-style: none;
    transform: scale(0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out, visibility 0s ease-in-out 0.2s;
    transform-origin: top left;
}
.main-nav .nav-list.show {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
    transition: all 0.2s ease-in-out  0.2s, visibility 0s ease-in-out;
}
.main-nav ul li a {
    text-decoration: none;
    display: block;
}
.main-nav li.parent {
    font-family: 'Syncopate', sans-serif;
    font-size: 18px;
    text-transform: uppercase;
    color: black;
    box-shadow: 0px 18px 8px -18px rgb(0 0 0 / 15%);
    padding-bottom: 8px;
    text-align: left;
}
.main-nav li.parent span {
    display: block;
}
.main-nav li:not(.parent) {
    padding: 16px 0;
    cursor: pointer;
    margin-bottom: 8px;
}
.main-nav .gphrazy {
    font-size: 12px;
    background: #355071;
}
.main-nav .gphrazy a {
    color: #ccc;
}
.main-nav .word {
    font-family: 'Pacifico', cursive;
    font-size: 21px;
    background-color: #E5DCC8;
}
.main-nav .word a {
    color: #003314;
}
.main-nav .email i {
    padding: 8px 4px;
}
.main-nav .contact {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
    color: lightgray;
    display: flex;
    align-items: center;
}
.main-nav .contact a {
    text-decoration: none;
    color: black;
    display: inline-block;
    padding: 0 20px;
}
@keyframes zoomin {
    from {
        transform: scale(1);
        top: 22px;
    }
  
    50% {
        transform: scale(2.4);
        top: 22px;
    }
  
    to {
        transform: scale(1);
        top: -12px;
    }
  }

  @keyframes showHide {
    from {
        opacity: 0;
    }
  
    50% {
       opacity: 1;
    }
  
    to {
        opacity: 0;
    }
  }

  @media only screen and (max-width: 768px) {
    header .title {
        font-size: 16px;
    }
    header .game-actions {
        right: 8px;
    }
    header .game-actions.main-nav {
        left: 16px;
        right: auto;
    }
    .guessbox {
        margin: 40px 8px;
    }
    .guess-mode-actions {
        flex-wrap: wrap;
        margin: 0 16px;
    }
    .guess-action {
        margin-top: 16px;
    }
  }