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

body {
    font-family: Arial, Helvetica, sans-serif;
    display: grid;
    place-content: center;
    min-height: 100dvh;
    overflow: hidden;
    user-select: none;
    background: #2d2b3d;
    zoom: 0.9;
}

main {
    background: url(./photos/iphone.webp) no-repeat;
    width: 320px;
    height: 640px;
    background-size: contain;
    display: flex;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.3));
}

section {
    background-color: #1e1c2e;
    width: 100%;
    border-radius: 32px;
    display: flex;
    gap: 24px;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    padding: 16px 6px;
    margin: 24px;
}

header{
    display: flex;
    justify-content: center;

    & img {
        width: 24px;
        height: 24px;
    }
}

footer{
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 0 24px;
    justify-content: center;
    align-items: center;

    & button {
        background: url(./photos/tinder-icons.webp) no-repeat;
        background-position:0px 0px ;
        background-size: 175px;
        height: 32px;
        width: 32px;
        border-radius: 50%;
        border: 0px solid #ccc;
        cursor: pointer;
        transition: scale 0.3s ease;

        &:hover {
            scale: 1.4;
        }

        &.is-big{
            background-size: 250px;
            width: 48px;
            height: 48px;
        }

        &.is-undo{
            background-position: -140px 0;
        }

        &.is-remove{
            background-position: -150px 0;
        }

        &.is-fav{
            background-position: -50px 0;
        }
        &.is-star{
            background-position: -70px 0;
        }
    }
}

.cards {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 auto;

    & > span {
        display: grid;
        place-content: center;
        color: #a89cc8;
        font-size: 14px;
        text-align: center;
        height: 100%;
        z-index: -1;
    }

    & article {
        border-radius: 8px;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
        cursor: grab;
        overflow: hidden;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        z-index: 2;
        will-change: transform rotate;

        & .choice {
            color: black;
            border: 3px solid;
            z-index: 99;
            position: absolute;
            top: 32px;
            right: 16px;
            padding: 4px 8px;
            font-size: 24px;
            font-weight: bold;
            text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
            opacity: 0;
            transition: opacity .3s ease;

            &.nope {
                border-color: #f06292;
                color: #f06292;
                transform: rotate(30deg);
            }
            
            &.like {
                width: fit-content;
                border-color: #9c74e8;
                left: 16px;
                color: #9c74e8;
                transform: rotate(-30deg);
            }
        }


        &.go-left {
            transform: translateX(-150%) rotate(-30deg) !important;
        };
        
        &.go-right {            
            transform: translateX(150%) rotate(30deg) !important;
        }

        &.go-left, &.go-right {
            transition: transform .3s ease, rotate .3s ease;
        }

        &.reset {
            transition: transform .3s ease;
            transform: translateX(0) !important;
        }

        & img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        & h2 {
            color: white;
            position: absolute;
            inset: 0;
            display: flex;
            align-items: flex-end;
            height: 100%;
            width: 100%;
            padding: 16px;
            z-index: 3;
            background: linear-gradient(to top, #00000088 20%, transparent 40%);
        }

        & span{
            margin-left: 4px;
            font-size: 18px;
            line-height: 1.4;
            font-weight: 4000;
        }
    }
}