/* PUZZLE PAGE CSS */

.loader-container {
    position: fixed;
    display: none;
    z-index: 999;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loader {
    width: 60px;
    aspect-ratio: 1;
    --g: conic-gradient(from -90deg at 10px 10px, #171717 90deg, #0000 0);
    background: var(--g), var(--g), var(--g);
    background-size: 50% 50%;
    animation: l17 1s infinite;
}

.logo-div {
    position: absolute;
}

@keyframes l17 {
    0% {
        background-position: 0 0, 10px 10px, 20px 20px
    }

    33% {
        background-position: -30px 0, 10px 10px, 20px 20px
    }

    66% {
        background-position: -30px 0, -20px 10px, 20px 20px
    }

    100% {
        background-position: -30px 0, -20px 10px, -10px 20px
    }
}

.puzzle-container {
    margin-top: 4%;
    display: flex;
    width: 100%;
    padding-bottom: 0.8rem;
}

.puzzle-container-right {
    width: 35%;
    color: #ffffff;
    margin-top: 0.8%;
    padding-bottom: 0.5rem;
    background-color: #171717;
}

#start-btns-container {
    margin: 4%;

}

#puzzle-info-container {
    display: none;
}

.head {
    background: rgb(255, 99, 3);
    background: linear-gradient(90deg, rgba(255, 99, 3, 1) 0%, rgba(255, 204, 74, 1) 100%);
    text-align: center;
    font-size: 1.3rem;
    padding: 0.8rem 0px;
    color: #000000;
}

#start-btns-container p {
    margin: 0.8rem 0px 1.6rem;
}

.puzzle-container-left {
    width: 65%;
    text-align: center;
    padding-left: 12%;
    justify-content: center;
    align-items: center;
}

.puzzh1 {
    text-align: center;
    margin-top: 4rem;
    color: #141414;
    font-size: 3rem;
}

#puzzle-info-container h3 {
    text-align: center;
    margin: 1rem auto;
}

.playBtn {
    background-color: var(--color3);
    border: none;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    font-weight: bold;
    margin-top: 2rem;
    margin-left: 2rem;
    font-size: 1.2rem;
    padding: 1rem 3rem;
}

#nextBtn,
#redo {
    background-color: var(--color3);
    border: none;
    outline: none;
    padding: 1rem 0rem;
    width: 10rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.2rem;
}

#redo {
    margin-left: 10px;
}

.playBtn:hover,
#nextBtn:hover,
#copy:hover,
.replyBtns button:hover,
#redo:hover {
    color: white;
    background-color: var(--color2);
    transition: 500ms;
    cursor: pointer;
}

.replyBtns {
    width: fit-content;
    display: inline-block;
    margin: 0rem 2rem 0rem 0rem;
}

.replyBtns button {
    background-color: var(--color3);
    border: none;
    display: inline;
    outline: none;
    margin-left: 2rem;
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;

}

.sub-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;

}

.black-3c85d {
    background-color: #7ac142 !important;
}

.white-1e1d7 {
    background-color: #ffffff !important;
}

.board-b72b1 {
    border-color: #000000;
}


.fa-gear {
    margin-right: 1%;
    margin-top: 0.8rem;
    height: fit-content;
    cursor: pointer;
}

#settings-close,
#flip {
    cursor: pointer;
}

#space {
    display: none;
}

.settings {
    display: none;
    position: fixed;
    top: 50%;
    z-index: 1;
    background-color: #121212;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1.2rem;
    padding: 1rem 2rem;
    left: 50%;
    width: 30%;
    transform: translate(-50%, -50%);
    box-shadow: 0px 0px 20px var(--color3);
}

#flip {
    rotate: 90deg;
}

.settings select {
    margin-left: 18px;
    width: 40%;
    font-size: 1.1rem;
}

.highlight1-32417,
.highlight2-9c5d2 {
    box-shadow: inset 0 0 74px 74px rgba(0, 255, 0, 0.7) !important;
}

#pieces-theme {
    margin-left: 62px;
}

.settings button {
    background-color: var(--color3);
    border: none;
    outline: none;
    padding: 0.6rem 1rem;
    font-weight: bold;
    border-radius: 6px;
    border: 2px solid var(--color3);
}

.settings button:hover {

    cursor: pointer;
    background-color: #121212;
    color: #ffffff;
}

#board_wrapper {
    position: relative;
}

#primary_canvas,
#drawing_canvas,
#board {
    position: absolute;
    top: 0px;
    left: 0px;
    margin-top: 0.8rem;
}

#primary_canvas,
#drawing_canvas {
    opacity: 0.8;
    padding: 2px;
}

#puzzleFEN {
    width: 50%;
    font-size: 1.2rem;
    text-align: center;
    padding: 8px;
    border: none;
    background-color: #171717;
    color: #ffffff;

}

label[for='puzzleFEN'] {
    margin-right: 1rem;
}

#FENcontainer {
    display: none;
    width: 100%;
    justify-content: center;
    align-items: center;
    height: 60px;
}

#copy {
    cursor: pointer;
    margin-left: 1rem;
    padding: 9px;
    background-color: var(--color3);
    border-radius: 50px;
}

.moves-container {
    display: flex;
    height: 275px;
    overflow-y: scroll;
    width: 100%;
    margin-top: 1.5rem;

}

#moves-section {
    display: flex;
    width: 100%;
}

.moves-serial {
    width: 10%;
}

.moves-serial li {
    margin-left: 1rem;
    list-style: none;
    margin-bottom: 10px;
    border-bottom: 1px solid #262626;
    padding-bottom: 4px;
}

#com-moves {
    width: 45%;
}

#user-moves {
    width: 45%;
}

#user-moves li,
#com-moves li {
    list-style: none;
    margin-bottom: 10px;
    border-bottom: 1px solid #262626;
    padding-bottom: 4px;
}

.piece-417db {
    z-index: 1 !important;
}

.promotion-pieces {
    display: none;
    height: fit-content;
}

.promotion-pieces img {
    height: 70px;
}

.highlight {
    color: var(--color3);
    font-weight: bold;
}

#start-puzzle-container {
    justify-content: space-evenly;
    flex-direction: column;
}

#start-puzzle-container h2 {
    text-align: center;
    margin: 10% 0px;
}

#start-puzzle-container input {
    margin-left: 2rem;
    accent-color: var(--color3);
}

#start-puzzle-container label[for="category"] {
    margin-left: 2rem;
}

#start-puzzle-container select {
    font-size: 1.2rem;
}

#whatsapp-btn {
    right: unset;
    left: 1.8%;
}


.streak-container,
.highest-streak-container {
    width: 12%;
    height: 10%;
    display: inline-flex;
    align-items: center;
    visibility: hidden;

}

.streak-container img,
.highest-streak-container img {
    width: 80%;
    height: 90%;
}

.highest-streak-container {
    margin-left: -1.7rem;
}



.circle-container {
    width: 56px;
    height: 56px;
    display: inline-block;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #7ac142;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 0rem auto 0px;
    box-shadow: inset 0px 0px 0px #7ac142;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__check.animateElement {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #7ac142;
    }

}

.selected-sqaure {
    box-shadow: inset 0 0 74px 74px rgba(0, 255, 0, 0.7) !important;
}

.legal-move::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25px;
    height: 25px;
    background-color: #243B0D;
    border-radius: 50%;
    opacity: 0.7;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.legal-move-capture::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 70px;
    height: 70px;
    background-color: rgba(36, 59, 13, 0.5);
    border-radius: 50%;
    opacity: 0.7;
    transform: translate(-50%, -50%);
    z-index: 10;
}

#nextBtn .checkmark,
.circle {
    display: none;
}

#undoBtn {
    position: absolute;
    bottom: -25%;
    margin-left: 1.5rem;
}

#nextBtn {
    position: relative;
    float: right;
    bottom: -2.5%;
    margin-right: 1.7rem;
}

#chess-board {
    cursor: grab;
}

.puzzle-share-btns {
    width: fit-content;
    text-align: center;
    margin: 0px auto;
    position: relative;
    top: 2rem;
    font-size: 1.4rem;
}

.puzzle-share-btns a i {
    color: #ffffff;
    border-radius: 50px !important;
}

.timer-container {
    width: 18%;
}

#puzzle-timer {
    float: right;
    margin-right: 1rem;
}

.moves-container::-webkit-scrollbar-track {
    background: #121212;
}

.moves-container::-webkit-scrollbar {
    width: 10px;
}

.moves-container::-webkit-scrollbar-thumb {
    background: var(--color3);
    border-radius: 5px;
}

.circle {
    margin: -5% 0px 0px 14.2%;
    position: absolute;
    width: 56px;
    height: 56px;
    background-color: #e04436;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: circleExpand 0.6s ease-in-out forwards;
    opacity: 0;
}

.crossmark {
    position: relative;
    width: 60%;
    height: 60%;
}

.line {
    position: absolute;
    width: 100%;
    height: 10%;
    background-color: white;
    border-radius: 5px;
    top: 50%;
    transform: translate(-50%);
    transform-origin: center;
    opacity: 0;
}

.line1 {
    transform: rotate(45deg);
    animation: drawLine 0.2s ease-in 0.2s forwards;
}

.line2 {
    transform: rotate(-45deg);
    animation: drawLine2 0.2s ease-in 0.3s forwards;
}

@keyframes circleExpand {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes drawLine {
    0% {
        opacity: 0;
        transform: scaleX(0) rotate(45deg);
    }

    100% {
        opacity: 1;
        transform: scaleX(1) rotate(45deg);
    }
}

@keyframes drawLine2 {
    0% {
        opacity: 0;
        transform: scaleX(0) rotate(45deg);
    }

    100% {
        opacity: 1;
        transform: scaleX(1) rotate(-45deg);
    }
}

#board {
    width: 600px;
}


#drawing_canvas,
#primary_canvas {
    width: 592px;
    height: 592px;
}

.head img {
    display: inline-block;
    width: 40px;
}

#white-king,
#black-king {
    display: none;

}

.first-head {
    display: flex;
    justify-content: center;
    align-items: center;
}

#first-move {
    display: inline-block;
    margin-top: 0px;
    width: fit-content;
}


select option:checked,
select option:hover,
select option:active {
    background-color: var(--color3) !important;

}

.dropbtn-category {
    background-color: var(--color3);
    border-radius: 6px;
    display: block;
    color: #000000;
    padding: 16px;
    margin: 0px 2rem;
    width: 100%;
    font-size: 16px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.dropdown-category {
    position: relative;
    display: inline-block;
    width: 89%;
}

.dropdown-content-category {
    display: none;
    position: absolute;
    background-color: #121212;
    margin: 0% 7.5%;
    padding: 2% 4% 1%;
    width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content-category::-webkit-scrollbar-track {
    background: #121212;
}

.dropdown-content-category::-webkit-scrollbar {
    width: 8px;
}

.dropdown-content-category::-webkit-scrollbar-thumb {
    background: var(--color3);
    border-radius: 5px;
}

.dropdown-content-category label {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.dropdown-content-category input {
    margin: 0% !important;
    cursor: pointer;
    accent-color: var(--color3);
}

.selections {
    margin: 6% 2% 0px 8%;
}

#theme-selections {
    color: var(--color3);
    font-weight: bold;
}

.dropdown-content-category {
    display: none;
    height: 45vh;
    overflow-y: scroll;
}

.dropdown-category.active .dropdown-content-category {
    display: block;
}

.dropdown-category:hover .dropbtn-category {
    background-color: var(--color2);
}

.note {
    font-size: 0.7rem;
    color: #a8a8a8;
    margin-top: 10px;
}

.puzzle-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.6rem 0px 1rem;
    background: linear-gradient(180deg, var(--color4) 0%, rgba(255, 255, 255, 1) 100%);
}


.puzzle-header .img1,
.puzzle-header .img3 {
    height: 140px !important;
    width: 130px !important;
}

.puzzle-header .img2 {
    height: 140px !important;
    width: 300px !important;
}


@media only screen and (max-device-width: 480px) {
    .puzzle-header .img1,
.puzzle-header .img3 {
    height: 100px !important;
    width: 90px !important;
}

.puzzle-header .img2 {
    height: 100px !important;
    width: 300px !important;
}
    .legal-move::after {
        width: 15px;
        height: 15px;
    }

    .legal-move-capture::after {
        width: 40px;
        height: 40px;

    }

    #board {
        min-width: fit-content;
        max-width: 98%;
        display: block;
    }

    #nextBtn,
    #redo {
        width: 6rem;
        padding: 0.7rem 0rem;
    }

    #nextBtn {
        bottom: 1%;
        position: absolute;
        right: 1rem;
        margin-right: 0%;
    }

    .settings {
        top: 60%;
        width: 85%;
    }

    .circle-container {
        transform: translateX(-50%);
        left: 50%;
        position: absolute;
        margin: -5% 0px 0px 0px;
    }

    .circle {
        margin: -15% 0px 0px 0px;
        transform: translateX(-50%);
        left: 50%;
    }

    .puzzh1 {
        margin-top: 5rem;
    }

    .puzzle-container {
        flex-direction: column-reverse;
    }

    .puzzle-container-right,
    .puzzle-container-left {
        width: 100%;
    }

    #board_wrapper {
        position: absolute;
        display: block;
        width: 100%;
        margin-left: -11.5%;
    }

    #space {
        display: inline-block;
        visibility: hidden;
        width: 0px;
        position: relative;
        left: 0%;
        z-index: -1;

    }

    #drawing_canvas,
    #primary_canvas {
        visibility: none;
        width: 100% !important;
        height: 100% !important;
    }

    .puzzle-container {
        margin-top: 2rem;
        border: none;
    }

    .board-b72b1 {
        margin: 0% auto !important;
    }

    .fa-gear {
        position: absolute;
        top: 12.5rem;
        left: unset;
        right: 2%;
    }

    .moves-container {
        height: 100px;
    }

    #puzzle-timer {
        margin-right: 0.5rem;
    }

    .promotion-pieces {
        display: none;
        position: fixed;
        z-index: 1;
        background-color: #171717;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .replyBtns button {
        margin-left: 1rem;
    }
    .sub-head{
        margin: 10px 0px;
    }#puzzle-info-container h3{
        margin: 1rem 0px 0.5rem;
    }.moves-container{
        margin-top: 1rem;
    }
}

@media (min-width: 481px) and (max-width: 1024px) {
    .puzzle-container-left {
        padding-left: 0%;
        width: 100%;
    }

    #space {
        display: block;
    }

    .puzzle-container {
        flex-direction: column-reverse;
    }

    .moves-container {
        height: 150px;
    }

    .puzzle-container-right {
        width: 100%;
    }

    #board,
    #primary_canvas,
    #drawing_canvas {
        width: 100% !important;
    }

    .fa-gear {
        left: 3%;
        width: fit-content;
    }

    .selections {
        margin: 5% 2rem 0px 2rem;
    }

    .settings {
        width: 55%;
    }

    .circle-container {
        margin-left: 21vw;
    }

    .circle {
        margin: -6.5% 0px 0px 46.2%;
    }

    .promotion-pieces {
        display: none;
        position: fixed;
        z-index: 1;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: #171717;
    }

    .promotion-pieces img {
        height: 150px;
    }
}
