* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(45deg, #8460ed, #ff1252);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 40px 0;
}

.container {
    position: relative;
    width: 90vw;
    max-width: 1200px;
    min-height: fit-content;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 20px;
    margin: auto;
}

.card {
    position: relative;
    width: clamp(280px, 30vw, 350px);
    min-height: 400px;
    height: auto;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: 0.5s;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-20px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.card .content {
    padding: 20px;
    text-align: center;
    transform: translateY(100px);
    opacity: 0;
    transition: 0.5s;
}

.card:hover .content {
    transform: translateY(0px);
    opacity: 1;
}

.card .content h2 {
    color: #fff;
    font-size: clamp(1.5rem, 2vw, 2rem);
    margin-bottom: 15px;
}

.card .content p {
    color: #fff;
    margin-bottom: 20px;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    line-height: 1.6;
}

.card .content a {
    position: relative;
    display: inline-block;
    padding: 8px 20px;
    background: #fff;
    color: #000;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.card .content a:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
}

.game-section {
    width: 100%;
    text-align: center;
    margin-top: 50px;
    color: white;
}

.game-container {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.memory-game {
    display: grid;
    gap: 15px;
    padding: 20px;
    margin: 0 auto;
}

.memory-card {
    position: relative;
    height: 100px;
    cursor: pointer;
    transform-style: preserve-3d;
    transform: scale(1);
    transition: transform 0.5s;
}

.memory-card.flip {
    transform: rotateY(180deg);
}

.front-face,
.back-face {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.front-face {
    transform: rotateY(180deg);
}

.floating-shapes div {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: animate 10s linear infinite;
    backdrop-filter: blur(5px);
}

@keyframes animate {
    0% {
        transform: translateY(100vh) rotate(0deg);
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
        gap: 15px;
    }

    .card {
        width: 90%;
        height: auto;
        min-height: 300px;
    }

    .memory-card {
        height: 80px;
    }
}
