* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

@font-face {
    font-family: somar;
    src: url(assets/fonts/SomarSans-Regular.ttf);
}

body {
    margin: 0;
    font-family: somar;
    background: rgb(251 251 243);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    height: 105vh;
}

.top-background {
    max-width: 360px;
    width: 100%;
    align-self: flex-start;
    position: fixed;
}
.text-container {
    width: 100%;
    max-width: 80vw;
    margin-top: 25px;
    direction: rtl;
}
.RTL-heading span {
    color: #62c6c6;
}
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px;
    height: 70vh;
    width: 100%;
    position: relative;
    direction: rtl;
}

.words-container,
.images-container {
    display: flex;
    flex-direction: column;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    height: 100%;
    justify-content: space-around;
}

.word,
.image {
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    position: relative;
}
.word::after,
.image::after {
    content: "";
    top: 50%;
    width: 10px;
    height: 10px;
    position: absolute;
    background-color: #62c6c6;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    -ms-border-radius: 50%;
    -o-border-radius: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    -o-transform: translate(-50%, -50%);
}
.word::after {
    left: -15px;
}
.image::after {
    right: -25px;
}
.image img {
    max-width: 250px;
}

svg#svg-lines {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.feedback-overlay,
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.473);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    flex-direction: column;
}

.hidden {
    display: none;
}

.feedback-overlay img,
.celebration-overlay p,
.celebration-overlay img {
    max-width: 40%;
    color: #fff;
    font-size: 2rem;
    text-align: center;
}

.repeat-btn {
    padding: 10px 25px;
    background-color: #8a1538;
    border: none;
    outline: none;
    border-radius: 5px;
    color: white;
}
.selected::after {
    background: #8a1538;
}

.matched {
    border-color: #19c519;
}
.buttom-background {
    width: 100%;
    position: absolute;
    z-index: -3;
    bottom: 0;
    opacity: 0.3;
}
@media (min-width: 768px) {
    .game-container {
        flex-direction: row;
        justify-content: space-between;
        max-width: 80vw;
    }
}
@media (max-width: 768px) {
    body {
        height: 95vh;
    }
    .feedback-overlay img,
    .celebration-overlay p,
    .celebration-overlay img {
        max-width: 60%;
    }
    .game-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .image img {
        max-width: 120px;
    }
    .buttom-background {
        position: absolute;
        bottom: 0px;
        z-index: -1;
    }
}
