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


main {

    width: 100%;
    height: 170vh;
    background-image: radial-gradient(circle, rgba(63, 94, 251, 1) 0%, rgba(252, 70, 107, 1) 100%);
    display: flex;
    justify-content: center;



    >section {
        width: 620px;
        height: 570px;
        background-color: #fff;
        display: flex;
        margin-top: 250px;
        position: relative;
        border-radius: 20px;
        padding: 20px;
        transform-style: preserve-3d;


        >form {
            width: 100%;
            position: relative;
            top: 125px;


            .card-number,
            .card-holder {
                width: 100%;
                display: flex;
                flex-direction: column;
                flex-wrap: wrap;
                margin-block: 40px;

                >label {
                    font-size: 18px;
                    padding-bottom: 4px;
                }

                >input {
                    width: 100%;
                    height: 40px;
                    border-radius: 5px;
                    outline: none;
                    border: .5px solid black;
                    padding: 2%;
                    outline: none;
                    transition: .4s;

                    &:focus {
                        border-color: #631418;
                        box-shadow: 0 0 8px #1605ff55;
                        background-color: #fff;
                    }
                }
            }

            .expiration-date {
                width: 100%;
                display: flex;
                flex-direction: column;
                flex-wrap: wrap;
                margin-block: 40px;

                >label {
                    font-size: 18px;
                    margin-bottom: 5px;
                }

                >div {
                    display: flex;
                    justify-content: space-between;

                    >label {
                        font-size: 18px;
                        padding-bottom: 4px;
                    }

                    >input,
                    select {
                        width: 30%;
                        height: 40px;
                        border-radius: 5px;
                        outline: none;
                        border: .5px solid black;
                        padding: 2%;
                    }

                    >input{
                         outline: none;
                    transition: .4s;

                    &:focus {
                        border-color: #631418;
                        box-shadow: 0 0 8px #1605ff55;
                        background-color: #fff;
                    }
                    }

                }

            }

            >input {
                width: 80%;
                height: 40px;
                display: block;
                margin: auto;
                background-image: linear-gradient(to right, #94202f, #2a5298);
                color: #fff;
                padding: 12px 24px;
                font-size: 1rem;
                font-weight: 600;
                border: none;
                border-radius: 10px;
                cursor: pointer;
                transition: all 0.3s ease;
                box-shadow: 0 6px 15px rgba(30, 60, 114, 0.3);
            }


        }

        .card-box {
            width: 480px;
            height: 280px;
            position: absolute;
            z-index: 999;
            background-color: black;
            border-radius: 20px;
            display: flex;
            justify-content: space-around;
            align-items: center;
            flex-direction: column;
            transition: 2s;
            backface-visibility: hidden;
            background-image: linear-gradient(to top, rgba(55, 0, 255, 0.438), transparent);
            background-image: url(img/25.jpeg);
            object-fit: cover;





            >div {
                width: 93%;
                height: 25%;
                display: flex;

                &:nth-of-type(1) {
                    justify-content: space-between;
                    align-items: center;
                    width: 90%;

                    >img {
                        width: 110px;
                        height: 60px;

                        &:nth-of-type(1) {
                            width: 80px;
                        }
                    }
                }

                &:nth-of-type(2) {
                    justify-content: space-around;

                    >input {
                        border: none;
                        width: 23%;
                        border-radius: 15px;
                        height: 80%;
                        background-color: rgba(255, 255, 255, 0.298);
                        color: white;
                        font-size: 24px;
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        text-align: center;
                    }
                }

                &:nth-of-type(3) {
                    justify-content: space-between;


                    >div {

                        &:first-of-type {
                            width: 80%;
                            /* border: 2px solid white; */
                            display: flex;
                            flex-direction: column;
                            justify-content: space-evenly;
                            color: white;

                            >strong {}

                            >span {}
                        }

                        &:last-of-type {
                            display: flex;
                            flex-direction: column;
                            justify-content: space-evenly;
                            width: 20%;
                            color: white;
                        }

                    }
                }
            }


        }

        .card-back {
            transform: rotateY(180deg);
            z-index: 1;


            >div {
                &:nth-of-type(1) {
                    width: 100% !important;
                    height: 50px;
                    background-color: #000000;
                    color: white;
                    font-size: 24px;
                    position: relative;
                    top: 10px;
                }

                &:nth-of-type(2) {
                    width: 90%;
                    display: flex;
                    flex-direction: column;
                    align-items: center;

                    >span {
                        align-self: flex-end;
                    }

                    >p {
                        width: 100%;
                        height: 80px;
                        background-color: white;
                        border-radius: 5px;
                        color: black;
                        text-align: center;
                        padding: 5px;
                    }

                    color: white;
                    font-size: 24px;
                }

                &:nth-of-type(3) {
                    width: 150%;
                    scale: .6;
                    opacity: .5;
                }
            }
        }
    }
}

.showBack {
    transform: rotateY(180deg);
}

.showBack2 {
    transform: rotateY(-180deg);
}

.z {
    z-index: 100000;
}






.card-container {
    position: absolute;
    top: -145px;
    left: 70px;
    perspective: 1000px;
}


.card-front {
    z-index: 2;
    transform: rotateY(0deg);
}

.card-container.flipped .card-front {
    transform: rotateY(180deg);
}

.card-container.flipped .card-back {
    transform: rotateY(360deg);
}