/* The number game */
:root {
    --white: #fefefe;
    --bacground: #eee;
    --lightgrey: #ddd;
    --darkgrey: #999;
    --highlight: #0ff;
    --selected: #f0f;
    --red: #f00;
}
html {
    font-size: 16px;
    background-color: var(--bacground);
    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;
    font-family: 'Montserrat', sans-serif;
    color: var(--darkgrey);
    align-content: center;
}
.container {
    width: 100%;
    text-align: center;
}
p {
    width: 80%;
    min-width: 280px;
    max-width: 480px;
    margin: 0 auto 2rem auto;
    font-weight: 400;
}
table {
    width: 80%;
    min-width: 280px;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 0.5rem;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.10);
    background-color: var(--white);
}
table td {
    min-width: 2rem;
    border: 1px solid var(--lightgrey);
    text-align: center;
    transition: all 0.25s linear;
    padding: 0;
}
table td.cleared {
    cursor: not-allowed;
    color: var(--red);
    font-size: 2rem;
}
table td.clickable {
    cursor: pointer;
}
table td.clickable:hover {
    background-color: var(--highlight);
}
table td.active {
    color: var(--white);
    background-color: var(--selected);
}
table tr:first-child td:first-child {
    border-top-left-radius: 0.5rem;
}
table tr:first-child td:last-child {
    border-top-right-radius: 0.5rem;
}
table tr:last-child td:first-child {
    border-bottom-left-radius: 0.5rem;
}
table tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
}
.error {
    background-color: var(--red);
    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: 2rem 4rem;
}
.win .flex {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    text-align: center;
}
.win h1,
.win button {
    width: 100%;
}
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(--highlight);
    color: var(--highlight);
}
button.reset {
    margin-top: 2rem;
}