.profile-card {
    width: 400px;
    height: 400px;
    perspective: 1000px;
    margin: 0 auto;
    margin-bottom: 4rem;
    position: relative;
}

.profile-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.profile-card:hover .profile-card-inner {
    transform: rotateY(180deg);
}

.profile-card-front, .profile-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    overflow: hidden;
}

.profile-card-front {
    background-color: transparent;
}

.profile-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-card-back {
    background: white;
    transform: rotateY(180deg);
    display: flex;
    justify-content: center;
    align-items: center;
    color: black;
    position: relative;
    border: 3px solid #000;
}

.building-text {
    position: absolute;
    top: 20%;
    right: 15%;
    font-size: 1.4rem;
    background: white;
    color: black;
    padding: 12px 24px;
    border-radius: 25px;
    border: 2px solid #000;
    z-index: 2;
    animation: float 3s ease-in-out infinite;
}

.emoji-container {
    width: 200px;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8rem;
    animation: float 3s ease-in-out infinite;
}

/* Cloud thought bubble effect */
.building-text::before,
.building-text::after {
    content: "☁️";
    position: absolute;
    font-size: 1.2rem;
}

.building-text::before {
    bottom: -15px;
    right: 15px;
    transform: scale(0.6);
}

.building-text::after {
    bottom: -25px;
    right: 25px;
    transform: scale(0.4);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* Media query for smaller screens */
@media screen and (max-width: 768px) {
    .profile-card {
        width: 260px;
        height: 260px;
        margin-bottom: 6rem;
    }
    
    .building-text {
        font-size: 1rem;
        padding: 8px 16px;
        top: 15%;
        right: 10%;
    }
    
    .emoji-container {
        width: 120px;
        height: 120px;
        font-size: 4.5rem;
    }

    /* Adjust cloud emoji size for mobile */
    .building-text::before,
    .building-text::after {
        font-size: 1rem;
    }
}

/* Additional media query for very small screens */
@media screen and (max-width: 480px) {
    .profile-card {
        width: 220px;
        height: 220px;
        margin-bottom: 8rem;
    }
    
    .emoji-container {
        width: 100px;
        height: 100px;
        font-size: 4rem;
    }
    
    .building-text {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}
