@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible');

header > h1 {
    font-weight: 400;
}

h1 {
    font-family: "Atkinson Hyperlegible", sans-serif;
    text-align: center;
    font-style: normal;
}

main {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-weight: 400;
    font-style: normal;
}

footer {
    margin-top: 6em;
    text-align: center;
}

#game-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

#message {
    margin-top: 1.6em;
    margin-bottom: 1.6em;
    text-align: center;
    font-size: 1.4em;
    opacity: 0;
    height: 1.6rem;
}

#actions {
    display: block;
    width: 50%;
    margin: auto;
    margin-top: 3em;
    text-align: center;
}

#actions > input {
    min-width: 80px;
    height: 1.6em;
    padding: 0.6em;
    padding-left: 1em;
    padding-right: 1em;
    border-radius: 0.8em;
    border: 1px solid black;
    margin-left: 6px;
    margin-right: 6px;
    cursor: pointer;
    background-color: #fff;
    line-height: 0.5em;
}

#mistakes {
    width: 30%;
    margin: auto;
    text-align: center;
}

#mistakes ul {
    list-style: none;
    display: inline-block;
    height: 2rem;
    width: 120px;
    text-align: left;
    margin-bottom: 0.5rem;
}
#mistakes ul li {
    list-style: none;
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0;
}

#answers > div {
    position: absolute;
    text-align: center;
    visibility: hidden;
    border: 1px solid black;
    border-radius: 8px;
}

#answers > div.visible {
    visibility: visible;
}

#answers > div > div {
    text-wrap: nowrap;
}

#answers > div > div.answer-word-list {
    font-size: 0.8em;
}


#game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    align-items: center;
    justify-content: center;
}

#game-grid .option {
    font-family: "Atkinson Hyperlegible", sans-serif;
    font-size: 1em;
    font-weight: 700;
    font-style: normal;
    text-align: center;
    text-transform: uppercase;
    text-wrap: nowrap;
    vertical-align: middle;
    border: 1px solid #888;
    width: 160px;
    height: 6em;
    margin: 8px;
    border-radius: 8px;
    background-color: #eee;
    color: #000;
    cursor:pointer;
}

#game-grid .option:hover {
    border: 1px solid black;
    background-color: #ccc;
    cursor:pointer;
}

#game-grid .option.pressed {
    background-color: #444;
    color: #eee;
}


@keyframes fade-out {
  0% {opacity: 1;}
  50% {opacity: 1;}
  100% {opacity: 0;}
}

.fading {
    animation-name: fade-out;
    animation-duration: 4s;
}

#game-grid .option.confirmed.group-1 {
    background-color: #8fc;
}
#game-grid .option.confirmed.group-2 {
    background-color: #f86;
}
#game-grid .option.confirmed.group-3 {
    background-color: #ff8;
}
#game-grid .option.confirmed.group-4 {
    background-color: #8cf;
}

/* CREATION */

input {
    font-size: 1em;
}

#creation {
    width: 50%;
    margin: auto;
}

section.group-creation {
    margin: 32px;
}

section.group-creation > div {
    text-align: center;
}

.group-explanation {
    width: 100%;
    margin-bottom: 1rem;
}

.group-word {
    display: inline-block;
    width: 20%;
    margin: auto;
}

#creation-output {
    border: 1px solid black;
    min-height: 96px;
    width: 40%;
    margin: auto;
}

#play-creation {
    display: block;
    text-align: center;
    font-size: 1.2em;
    padding-left: 1em;
    padding-right: 1em;
    margin: auto;
    margin-top: 2rem;
}

.group-1 {
    background-color: #8fc;
}
.group-2 {
    background-color: #f86;
}
.group-3 {
    background-color: #ff8;
}
.group-4 {
    background-color: #8cf;
}

::placeholder {
  color: rgba(0, 0, 0, 0.5);
  opacity: 1; /* Firefox */
}

input[type=text] {
    border: 1px solid black;
    padding: 4px;
}

/* Responsive Bits */

@media all and (min-width: 699px) and (max-width: 520px), (max-width: 1151px) {
    body {
        font-size: 5vw;
    }
    #creation, #mistakes, #actions  {
        width: 100%;
    }
    #mistakes > ul {
        width: 30%;
    }
    #game-grid > .option {
        height: 8rem;
    }
}
