/* Memory */
:root {
    --white: #fefefe;
    --background: #eee;
    --lightgrey: #ddd;
    --darkgrey: #999;
    --green: #1DB954;
    --highlight: #ff0;
    --selected: #f0f;
    --selected-bis: #0ff;
    --error: #ff0;
}
html {
    font-size: 16px;
    background-color: var(--background);
    font-weight: 600;
}
html * {
    box-sizing: border-box;
}
body {
    width: 100%;
    height: 100%;
    position: absolute;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    color: var(--darkgrey);
    align-content: flex-start;
}
body,
button,
input,
select,
optgroup,
textarea,
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}
.container {
    width: 100%;
    text-align: center;
}
p {
    width: 100%;
    margin: 0 auto;
    font-weight: 400;
}
#table {
    display: flex;
    flex-wrap: wrap;
    width: 80%;
    min-width: 280px;
    max-width: 380px;
    margin: 0 auto;
    border: 1px solid var(--lightgrey);
    border-radius: 0.5rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.10);
    background-color: var(--white);
}
#table .cell {
    position: relative;
    min-width: 2rem;
    width: calc(100% / 6);
    border: 1px solid var(--lightgrey);
    transition: all 0.25s linear;
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAAXNSR0IArs4c6QAAAE5JREFUKFNjfPfu3X8hISFGBjwApIaRJIUgw3CZCjIIJA+2Ep+pMDnSFWKzHmYtyFlw32KzHlkMRSGyqcimwT0DC0KYJIyPHBJ4Axo5DgDi50NmODjjrQAAAABJRU5ErkJggg==);
}
#table .cell.active,
#table .cell.cleared {
    background-image: none;
}
#table .cell:nth-child(1) {
    border-top-left-radius: 0.5rem;
}
#table .cell:nth-child(6) {
    border-top-right-radius: 0.5rem;
}
#table .cell:nth-child(43) {
    border-bottom-left-radius: 0.5rem;
}
#table .cell:nth-child(48) {
    border-bottom-right-radius: 0.5rem;
}
#table .cell.cleared {
    cursor: not-allowed;
}
#table .cell.clickable {
    cursor: pointer;
}
#table .cell.clickable:hover {
    background-color: var(--highlight);
}
#table .cell.active:before,
#table .cell.cleared:before {
    opacity: 1;
}
#table .cell:before {
    display: block;
    position: absolute;
    height: 100%;
    width: 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 80% auto;
    content: '';
    transition: all 0.25s linear;
    opacity: 0;
}
.error {
    background-color: var(--error);
    color: var(--white);
}
.win {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--white);
    border-radius: 0.5rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.50);
    padding: 1rem 2rem;
    width: 80%;
    min-width: 280px;
    max-width: 380px;
}
.win .flex {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    text-align: center;
}
.win h1,
.win button {
    width: 100%;
}
.win a {
    text-decoration: none;
    color: var(--green);
    transition: all 0.2s ease;
    padding: 0.2rem 0.5rem;
    margin-top: 0.5rem;
    border-radius: 0.2rem;
    border: 1px solid var(--green);
}
.win a i {
    padding-right: 0.5rem;
}
.win a:hover {
    color: white;
    background-color: var(--green);
}
button {
    background-color: transparent;
    border-radius: 0.2rem;
    border: 1px solid var(--selected);
    color: var(--selected);
    padding: 0.5rem;
    cursor: pointer;
    display: inline-block;
    transition: all 0.2s linear;
}
button:hover {
    border-color: var(--selected-bis);
    color: var(--selected-bis);
}
button.reset {
    margin-top: 2rem;
}
button.replay {
    margin-top: 1rem;
    padding: 0 0 0.5rem 0;
    border-radius: 0;
    border: 0;
}
.valign-center {
    display: inline-flex;
    align-items: center;
    align-content: center;
    text-align: center;
}
.description {
    margin-top: 2rem;
    margin-bottom: 2rem;
    width: 80%;
    min-width: 280px;
    max-width: 380px;
}
.description p {
    margin-bottom: 1rem;
    text-align: center;
    font-size: 14px;
}
.description p:first-child::after {
    display: block;
    content: '';
    width: 50%;
    height: 0;
    margin: 0 auto;
    padding-bottom: 1rem;
    border-bottom: 1px solid black;
}
.logo {
    display: block;
    height: 0.5rem;
    margin: 1rem auto 0.5rem auto;
}