:root {
    --bcg-color: #e5e3d4;
    --bcg-color-2: #9abf80;
    --bcg-color-2-pressed: #f44336;
    --border-color: #1c325b;
    --border-radius-5: 5px;
    --text-color: #6a669d;
    --baloon-main-size: 56px;
    --font-size-base: 16px;
}
html,
body {
    min-height: 100vh;
}

*,
*::after,
*::before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bcg-color);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
}

h1 {
    text-transform: uppercase;
    text-align: center;
}

p {
    font-size: var(--font-size-base);
}

#baloon {
    font-size: var(--baloon-main-size);
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.container {
    width: 600px;
    height: 600px;
    display: flex;
    gap: 20px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: justify;
    border: 1px solid var(--bcg-color-2);
    border-radius: var(--border-radius-5);
    padding: 50px;
}

.box {
    width: 200px;
    height: 200px;
    background: var(--bcg-color-2);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-5);
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    position: relative;

    &::before {
        content: "";
        display: block;
        width: 40px;
        height: 40px;
        background: url("./images/pin.png") center center;
        background-size: contain;
        background-repeat: no-repeat;
        position: absolute;
        left: 50%;
        top: -14%;
        transform: translateX(-50%) rotate(25deg);
    }
}

.arrows {
    display: grid;
    grid-template-columns: repeat(3, 40px);
    gap: 2px;
}

.arrow {
    width: 40px;
    height: 40px;
    background: var(--bcg-color-2);
    border-radius: var(--border-radius-5);
    border: 2px solid var(--border-color);
    box-shadow: inset 0px 0px 15px 1px #1c325b71;
    transition: background 250ms ease;

    &:active {
        transition: background 50ms ease;
        background: var(--bcg-color-2-pressed);
    }
}
.arrow:nth-child(1),
.arrow:nth-child(3) {
    border: none;
    background: none;
    box-shadow: none;
}

.arrow.up {
    background-image: url("./images/arrow_upward.svg");
    background-size: contain;
}
.arrow.down {
    background-image: url("./images/arrow_downward.svg");
    background-size: contain;
}
.arrow.left {
    background-image: url("./images/arrow_backward.svg");
    background-size: contain;
}
.arrow.right {
    background-image: url("./images/arrow_forward.svg");
    background-size: contain;
}

.pressed {
    transition: background 50ms ease;
    background: var(--bcg-color-2-pressed);
}

@keyframes explode {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    30% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

@media (max-width: 620px) {
    :root {
        --baloon-main-size: 36px;
        --font-size-base: 10px;
    }

    h1 {
        font-size: 24px;
    }
    .container {
        width: 320px;
        height: 320px;
        padding: 10px;
        gap: 10px;
    }

    .box {
        width: 130px;
        height: 130px;

        &::before {
            width: 20px;
            height: 20px;
            top: -10%;
        }
    }

    .arrows {
        grid-template-columns: repeat(3, 30px);
    }

    .arrow {
        width: 30px;
        height: 30px;
    }
}
