:root {
    --color-primary: #0a0a0a;
    --color-light: #4A7856;
    --color-dark: #1E3F20;
    --color-secondary: #915050;
    --color-winner: #FFB833;
    --color-marked: grey;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    background-color: white;
    font-size: 15px;
}

header {
    display: flex;
    width: 100vw;
    padding: 2rem;
    align-items: center;
    height: 70px;
    background-color: var(--color-primary);

}

h1 {
    color: white;
}

p {
    line-height: 1.5;
}


.container {
    display: flex;
    overflow-x: hidden;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 1%;
}

.options-container {
    display: flex;
    padding: 0.75rem;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.side-container {
    display: flex;
    flex-direction: column;
    background-color: white;
    text-align: center;
    justify-content: center;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    gap: 0.5rem;
}
.status-container {
    display: flex;
    flex-direction: row;
    background-color: white;
    text-align: center;
    justify-content: center;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    gap: 1rem;
}

.difficulty-bar {
    display: flex;
    gap: 0.1rem;
    border-radius: 0.75rem;
    width: fit-content;
    overflow: hidden;
}

.difficulty-button {
    border: none;
    padding: 0.25rem 0.5rem;
    background-color: #555555;
    color: #CCCCCC;
}

.difficulty-button:hover {
    background-color: #777777;
    color: white;
}

.difficulty-button.active {
    background-color: var(--color-winner);
    color: black;
}

.restart-button {
    padding: 0.25rem 1.5rem;
    background-color: #555555;
    color: white;
    border: 0.1rem solid var(--color-primary);
    border-radius: 0.75rem;
}

.restart-button:hover {
    background-color: #777777;
    color: white;
    border-color: var(--color-winner);
}

.img-status {
    display: none;
    width: 100%;
    background-color: #dadada;
    padding: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
}


.tile {
    display: flex;
    aspect-ratio: 1/1;
    justify-content: center;
    align-items: center;
    font-size: 0;
    background-color: var(--color-light);
    background-blend-mode: multiply;
    background-image: url("checker-pattern.svg");
    background-position: center;
    background-size: 60%;
    border: 0.20rem solid black;
    border-radius: 0.5rem;
    transform: rotateY(180deg);
    transform-style: preserve-3d;

    transition: transform 400ms ease;
   
}

.end-tile {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 100%;
    flex-direction: column;
    background-color: var(--color-dark);
    color: white;
    outline: white solid 0.25rem;
    border: 0.20rem solid black;
    border-radius: 0.5rem;
}

.end-tile-bottom {
    display: flex;
    padding: 0.25rem;
    width: 90%;
    border-top: 0.2rem solid white;
    align-items: center;
    justify-content: center;
    gap: 5px
}

.end-tile-bottom > img{
    width: 0.75rem;
}

.mark-mode {
    display: flex;
    aspect-ratio: 1/1;
    justify-content: center;
    align-items: center;
    font-size: 0;
    background-color: var(--color-marked);
    background-image: url("lock.svg");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 70%;
    outline: white solid 0.25rem;
    border: 0.20rem solid black;
    border-radius: 0.5rem;
}

.mark-mode.active {
    border-color: var(--color-winner);
}

.flipped {
    transform: rotateY(0deg);
    background-color: var(--color-light);
    background-blend-mode: normal;
    background-image: none;

    background-size: 65%;
    background-position: center;
    background-repeat: no-repeat;
}

.flipped[value="1"] {
    background-image: url("one.svg");
}

.flipped[value="2"] {
    background-image: url("two.svg");
}

.flipped[value="3"] {
    background-image: url("three.svg");
}

.flipped[value="4"] {
    background-image: url("bomb.svg");

    background-color: var(--color-secondary);
}

.marked {
    background-color: var(--color-marked) !important;
    background-image: url("lock.svg"), url("checker-pattern.svg");
    background-blend-mode: normal, multiply;
    background-repeat: no-repeat, repeat;
    background-position: center;
    background-size: 70%, 60%;
}

.board {
    padding: 1rem;
    width: 100%;
    max-width: 550px;
    min-width: 350px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;

}

.rules-container {
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.rules-container > div >h2 {
    text-align: center;
}

.rule-section {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;

}

.explanation {
    display: flex;
    align-items: center;
    gap: 0.5rem;

}

.explanation > img {
    width: 2rem;
}

.img-explanation {
    width: 100%;
    padding: 1rem;
}

@media (min-width: 1080px) {
    .container {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        padding: 2rem;
    }

    .options-container {
        padding-top: 1rem;
        justify-content: flex-start;
        height: 540px;
    }
    
    .status-container {
        flex-direction: column;
        max-width: 250px;
    }

    .img-status {
        display: flex;
    }

    .board {
        min-width: 500px;
    }
    .end-tile {
        font-size: 1.5rem;
    }

    .rules-container.side-container {
        text-align: start;
        max-width: 500px;
        padding: 1rem;
    }


    .img-explanation {
        padding: 0.5rem;
        width: 100%;
    }

}