@import url('https://fonts.googleapis.com/css?family=Poppins:100,200,300,400,500,600,700,800,900');



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}


body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* background: linear-gradient(0deg, rgb(46,0,75), rgb(64, 0, 105)); */
    width: 100%;
    height: 100%;
    /* how much space is on the left and right of the game */
    padding-left: 500px;
    padding-right: 500px;

    margin-bottom: 100px;
    margin-top: 100px;
    z-index: 0;
    
    background-image: repeating-linear-gradient(
            315deg,
        rgb(46,0,75) -15px,
        rgb(52, 0, 85)  30px,
        rgb(46,0,75) 55px
    );
    animation: moveStripes 5s linear infinite;
}

@keyframes moveStripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -200px -200px; /* Adjust as needed based on padding-left */
    }
}



.container {
    position: relative;
    display: flex;
    justify-content: center;
    width: 580px;
    height: 0%;
    align-items: center;
    flex-direction: column;
    gap: 30px;
    background: linear-gradient(0deg, rgb(61,0,99), rgb(75, 0, 121));
    padding: 100px 70px;
    margin: 100px;
    margin-right: 200px;
    margin-left: 200px;
    border-radius: 100px;
    box-shadow: 0px 20px 5px rgba(10, 0, 26, 0.097);
    transition: color 0.1s ease-out, transform 0.1s ease;
    animation: backgroundChange 0.9s ease forwards;
    opacity: 1;
    
}

@keyframes backgroundChange {
    0% {
        opacity: 0.5;
        width: 530px;
    }
    40% {
        opacity: 1;
        width: 580px;
    }
    70% {
        opacity: 1;
        width: 580px;
    }
    100% {
        opacity: 1;
        width: 580px;
    }
}






h2 {
    font-size: 3em;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0em;

}
.reset {
    position: relative;
    padding: 15px 35px;
    color: rgb(170, 34, 255);
    background: rgb(99, 0, 160);
    border:none;
    font-size: 1.5em;
    letter-spacing: 0em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 40px;
    font-weight: 900;
    text-shadow: -5px 5px 10px rgba(35, 0, 57, 0.633);
    box-shadow: -5px 5px 10px rgba(35, 0, 57, 0.633);
    /* height of the reset/play again button */
    margin-top: 70px;
    margin-bottom: -120px;
}

.reset:focus {
    color: rgb(122, 0, 198);
    background-color: rgb(83, 0, 135);

}

.reset:hover {
    color: rgba(254, 169, 124, 0.695);
    background-color: rgb(90, 0, 145);

}








.music {
    position: relative;
    padding: 15px 35px;
    color: rgb(170, 34, 255);
    background: rgb(99, 0, 160);
    border:none;
    font-size: 1.5em;
    letter-spacing: 0em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 40px;
    font-weight: 900;
    text-shadow: -5px 5px 10px rgba(35, 0, 57, 0.633);
    box-shadow: -5px 5px 10px rgba(35, 0, 57, 0.633);
    /* height of the reset/play again button */
    transform: translate(0px, -670px);
    margin: 0;
    margin-bottom: -70px;

}

.music:focus {
    color: rgb(122, 0, 198);
    background-color: rgb(83, 0, 135);

}

.music:hover {
    color: rgba(254, 169, 124, 0.695);
    background-color: rgb(90, 0, 145);

}








.game {
    width: 430px;
    height: 430px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    transform-style: preserve-3d;
    perspective: 500px;

}

.item {
    margin-top: 35px;
    position: relative;
    width: 100px;
    height: 75px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3em;
    color: rgb(199, 109, 255);
    /* background: rgb(99, 0, 160); */
    background: rgb(90, 0, 146);
    color: rgba(254, 169, 124, 0.695);
    transform: rotateY(180deg);
    transition: 0.2s;
    border-radius: 30px;
    /* determines how much of the top of the cards are shown */
    padding-bottom: 55px;
    text-shadow: 4px 4px 9px rgba(246, 121, 37, 0.609);;
    box-shadow: 5px 5px 10px rgba(35, 0, 57, 0.633);
    /* border-top-left-radius: 25px;
    border-top-right-radius: 25px; */
    z-index: 2;
}

.item.boxOpen {
    transform: rotateY(15deg);
    
    
}


.item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgb(81, 0, 131);
    /* if u want to cheat: */
    
    transition: 0.25s;
    transform: rotateY(0deg);
    backface-visibility: hidden;
    border-radius: 30px;
    /* border-top-left-radius: 25px;
    border-top-right-radius: 25px; */
    animation: animateItem 1.5s ease-in-out;
    z-index: 2;
    
}

@keyframes animateItem {
    0% {
        opacity: 0;
        
    }
    80% {
      opacity: 0;
        
    }
    100% {
        opacity: 1;
        
    }
}

.item:hover::after {
    background: rgba(89, 0, 145, 0.979); /* Adjust the opacity or color as needed */
    transition: color 0.5s ease-in-out; /* Add smooth transitions */
}


.boxOpen::after ,
.boxMatch:after
{
    transform: rotateY(180deg);
}









/* change ur memory text */


.content h3 {
        position: absolute;
        text-transform: uppercase;
        text-align: center;
        font-size: 1em;
        margin-left: 410px;
        /* margin-left: 357px; */
        margin-top: -280px;
        cursor: pointer;
        font-weight: 900;
        color: rgb(145, 0, 235);
        padding: 30px;
        transition: transform 0.3s ease;
        z-index: 5;
        white-space: nowrap;
        letter-spacing: 0px;
        text-shadow: -3px 3px 5px rgb(48, 0, 78);
        animation: animateTitle 0.5s ease-in-out;
        opacity: 1;
        transition: opacity 100s; 
        transition: color 0.3s ease, size 0.3s ease-in-out, transform 0.3s ease; /* Add smooth transitions */
}



.content h3:hover {
    color: rgba(254, 169, 124, 0.695);
    transform: scale(1.03);
    
}



@keyframes animateTitle {
    0% {
        text-align: center;
        margin-left: 410px;
        margin-top: -280px;
        transform: translate(0, 10px);
        opacity: 0;
    }
    50% {
        margin-left: 410px;
        margin-top: -280px;
        transform: translate(0, 10px);
        opacity: 0;
    }
    100% {
        margin-left: 410px;
        margin-top: -280px;
        transform: translate(0, 0px);
        opacity: 1;
    }
}








/* by kevin11 */

.content h5 {
        position: absolute;
        text-transform: uppercase;
        font-size: 1em;
        margin-left: 408px;
        margin-top: 500px;
        cursor: pointer;
        font-weight: 900;
        color: rgb(145, 0, 235);
        padding: 30px;
        transition: transform 0.3s ease;
        z-index: 5;
        white-space: nowrap;
        letter-spacing: 0px;
        text-shadow: -3px 3px 5px rgb(48, 0, 78);
        animation: animateTitle 0.5s ease-in-out;
        opacity: 1;
        transition: opacity 100s; 
        transition: color 0.3s ease, size 0.3s ease-in-out, transform 0.3s ease; /* Add smooth transitions */
}




.content h5:hover {
    color: rgba(254, 169, 124, 0.695);
    transform: scale(1.03);
    
}












/* mahjong mania text */

.content h2 {
    position: absolute;
    text-transform: uppercase;
    text-align: center;
    font-size: 2em;
    margin-top: -315px;
    margin-left: 332px;
    cursor: pointer;
    font-weight: 900;       
    color: rgb(145, 0, 235);
    animation: rotateText 10s infinite;
    /* animation: animateTitle 0.5s ease-in-out; */
    transition: transform 0.3s ease;
    z-index: 5;
    letter-spacing: 0px;
    white-space: nowrap;
    text-shadow: -5px 5px 5px rgba(35, 0, 57, 0.691);
    /* transform: translate(20%, -325%); */
    
}


.content h2:hover {
    color: rgba(254, 169, 124, 0.695);
    /* text-shadow: 0 0 10px rgb(145, 0, 235);  */
    transform: scale(1.1); /* Scale up the text */
    transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease; /* Add smooth transitions */
}






@keyframes rotateText {
    0% {
        text-align: center;
    
    margin-top: -315px;
    margin-left: 332px;
        transform: rotateX(0deg);
    }
    5% {
        transform: rotateX(180deg);
    }
    10% {
        transform: rotateX(0deg);
    }
    100% {
        transform: rotateX(0deg);
    }
}


.overlay {
    position: absolute;
    top: 0;
    left: 1200px;
    
    width: 25%;
    height: 12%;
    
    background: linear-gradient(0deg, rgb(60, 0, 97),rgb(63, 0, 103));
    opacity: 1; /* Start with full opacity */
    z-index: 10; /* Make sure it's above everything else */
    display: none; /* Initially hidden */
    transition: opacity 100s; /* Smooth transition for opacity change */
    /* animation: animate 0.3s ease-in; */
    margin-top: 270px;
    /* margin-bottom: 2000px; */
    opacity: 0;
    border-radius: 100px;
}


@keyframes animate {
    0% {
        opacity: 0; 
        
    }
    100% {
        opacity: 0;
        
    }
}

.overlay2 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.503); /* Start with a white background */
    opacity: 1; /* Start with full opacity */
    z-index: 10; /* Make sure it's above everything else */
    display: none; /* Initially hidden */
    transition: opacity 0.3s; /* Smooth transition for opacity change */
}



.great {
    position: absolute;
    
    width: 100%;
    height: 100%;
    margin-top: 0px;
    margin-left: 0px;
    background-color: rgba(185, 35, 35, 0);
    display: none;
    z-index: 100; /* Make sure it's above everything else */
    font-size: 1.5em;
    text-align: center;
}

/* GREAT */

.great h4 {
    /* display flex and the following 2 lines ensure the text shows in the middle regardless of screen size */
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    width: 100%;
    height: 100%;
    /* margin-top: 470px; */
    /* margin-left: 1350px;  */
    
    text-transform: uppercase;
    text-align: center;
    font-size: 1.5em;
    
    font-weight: 900;       
    color: rgb(145, 0, 235);
    animation: increase-size 1s infinite;
    transition: transform 0.3s ease;
    z-index: 100;
    letter-spacing: 0px;
    white-space: nowrap;
    text-shadow: 0px 0px 30px rgb(0, 0, 0);
    
}

@keyframes increase-size {
    0% {
        font-size: 1.1em; 
        transform: translate(0px, 40px);
        opacity: 1;
        z-index: 100;
    }
    30% {
        font-size: 1.5em;
        /* horizontal then vertical */
        transform: translate(0px, 40px);
        opacity: 1;
        z-index: 100;
    }
    50% {
        font-size: 1.5em;
        /* horizontal then vertical */
        transform: translate(0px, 40px);
        opacity: 1;
        z-index: 100;
    }
    80% {
        font-size: 1.5em;
        /* horizontal then vertical */
        transform: translate(0px, 40px);
        opacity: 1;
        z-index: 100;
    }
    100% {
        font-size: 1.5em;
        /* horizontal then vertical */
        transform: translate(0px, -300px);
        opacity: 0;
        z-index: 100;
    }
}