@import url("https://fonts.googleapis.com/css2?family=Pangolin&display=swap");

::backdrop {
    background-image: linear-gradient(
        90deg,
        black,
        gray
    );
    opacity: 0.75;
}
body {
    font-family: "Pangolin", cursive;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
dialog {
    position: absolute;
    top: 0;
}

.menu {
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 62px;
    position: absolute;
    padding: 0;
    margin: 0;
}
.menu li {
    list-style: none;
}

.menu .nav-container a {
    text-decoration: none;
    color: #0e2431;
    font-weight: 500;
    font-size: 1.2rem;
    padding: 0.7rem;
}

.menu .nav-container a:hover{
    font-weight: bolder;
}

.nav-container {
    display: block;
    position: relative;
    height: 60px;
}

.nav-container .checkbox {
    position: absolute;
    display: block;
    height: 32px;
    width: 32px;
    top: 20px;
    left: 20px;
    z-index: 3;
    opacity: 0;
    cursor: pointer;
}

.nav-container .hamburger-lines {
    height: 26px;
    width: 32px;
    position: absolute;
    top: 17px;
    left: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nav-container .hamburger-lines .line {
    display: block;
    height: 4px;
    width: 100%;
    border-radius: 10px;
    background: #0e2431;
}

.nav-container .hamburger-lines .line1 {
    transform-origin: 0 0;
    transition: transform 0.4s ease-in-out;
}

.nav-container .hamburger-lines .line2 {
    transition: transform 0.2s ease-in-out;
}

.nav-container .hamburger-lines .line3 {
    transform-origin: 0 100%;
    transition: transform 0.4s ease-in-out;
}

.menu .menu-items {
    padding-top: 120px;
    box-shadow: inset 0 0 2000px rgb(255, 255, 255);
    background: rgb(255, 255, 255);
    height: 100vh;
    width: 100%;
    transform: translate(-150%);
    display: flex;
    flex-direction: column;
    margin-left: -40px;
    padding-left: 50px;
    transition: transform 0.5s ease-in-out;
    text-align: center;
}

.menu .menu-items li {
    margin-bottom: 1.2rem;
    font-size: 1.5rem;
    font-weight: 500;
}

.nav-container input[type="checkbox"]:checked ~ .menu-items {
    transform: translateX(0);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line1 {
    transform: rotate(45deg);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line2 {
    transform: scaleY(0);
}

.nav-container input[type="checkbox"]:checked ~ .hamburger-lines .line3 {
    transform: rotate(-45deg);
}
#app {
    position: relative;
    width: 100vw;
    height: 100vh;
}
#game {
    background-color: whitesmoke;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 32px 1fr 32px 1fr 32px 1fr 32px 1fr 32px;
    height: 100%;
}
.grid.rows-3 {
    grid-template-rows: 32px 1fr 32px 1fr 32px 1fr 32px;
}
.grid.rows-5 {
    grid-template-rows: 32px 1fr 32px 1fr 32px 1fr 32px 1fr 32px 1fr 32px;
}
.row {
    display: grid;
    grid-template-columns: 32px 1fr 32px 1fr 32px 1fr 32px 1fr 32px;
}

.cols-3 .row {
    grid-template-columns: 32px 1fr 32px 1fr 32px 1fr 32px;
}
.cols-5 .row {
    grid-template-columns: 32px 1fr 32px 1fr 32px 1fr 32px 1fr 32px 1fr 32px;
}

.border, .vertical-border, .horizontal-border {
    position: relative;
}
.color::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    background-image: url('./img/splat.png');
    background-size: 100% 100%;
}
.number-clue::before{
    background-image: url('./img/dark-splat.png');
}

.color-0::before {
    background-image: url('./img/white.png');
}
.color-1::before {
    background-image: url('./img/blue.png');
}
.color-2::before {
    background-image: url('./img/red.png');
}
.color-4::before {
    background-image: url('./img/yellow.png');
}
.color-3::before {
    background-image: url('./img/purple.png');
}
.color-6::before {
    background-image: url('./img/orange.png');
}
.color-5::before {
    background-image: url('./img/green.png');
}
.color-Infinity::before {
    background-image: url('./img/black.png');
}
.color-Infinity {
    color: white;
}
.vertical-border, .horizontal-border, .cell {
    display: grid;
    align-items: center;
    text-align: center;
}
.cell {
    font-size: 300%;
    position: relative;
}
.cell::before {
    top: 5%;
    bottom: 5%;
    right: 5%;
    left: 5%;
}
.cell-content {
    z-index: 2;
}
.clue {
    z-index: 3;
    color: white;
    text-shadow: 0 0 1px black;
    font-size: 1.2em;
}
.vertical-border .clue {
    display: inline-block;
    transform: rotate(-90deg);
    margin-left: -50%;
}
.clue.not {
    text-decoration-line: line-through;
    text-decoration-thickness: 5px;
    text-decoration-color: red;
}
.color-2 .clue.not {
    text-decoration-color: black;
}
#color-select, #number-input {
    display: inline-block;
    width: 100%;
}

.candidates {
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.3);
    font-size: 0.5em;
    position: absolute;
    width: 50%;
    height: 30%;
    bottom: 0;
    right: 0;
}

.candidates ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.candidates li {
    display: inline-block;
}
.color-select, .number-select, .color-candidate {
    display: inline-block;
    position: relative;
    opacity: 0.1;
    height: 2em;
    width: 2em;
}
.color-candidate {
    width: 1em;
    height: 1em;
}

.color-select.selected, .number-select.selected, .color-candidate {
    opacity: 1;
}

#undo, #redo {
    position: absolute;
    z-index: 3;
    top: 0;
    cursor: pointer;
    height: 32px;
    width: 32px;
    text-indent: -99em;
    overflow: hidden;
    background-size: 100% 100%;
    background-color: transparent;
    border: none;
    /** icon by https://www.flaticon.com/authors/dhtgicon */
    background-image: url('img/back-arrow.png');
    opacity: 0.5;
}
#undo {
    right: 36px;
}
#redo {
    right: 0;
    transform: scaleX(-1);
}
#undo.disabled, #redo.disabled {
    opacity: 0.1;
    cursor: not-allowed;
}