body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #0e0e0e;
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.1'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
    margin: 0;
}

.meme-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
    border-radius: 15px;
    overflow: hidden;
}

#meme-image {
    width: 100%;
    display: block;
    transition: transform 0.5s ease-in-out;
}

.meme-text {
    position: absolute;
    top: 50vh;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 5rem;
    font-weight: bold;
    font-family: 'Impact', Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    text-shadow: 2px 2px 0 #000, 
                 -2px -2px 0 #000, 
                 2px -2px 0 #000, 
                 -2px 2px 0 #000, 
                 0 0 10px rgba(0,0,0,0.5);
}

/* Animations */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes flip {
    from { transform: scaleX(1); }
    to { transform: scaleX(-1); }
}

@keyframes dance {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(20px, -20px) rotate(10deg); }
    50% { transform: translate(-20px, 20px) rotate(-10deg); }
    75% { transform: translate(10px, -10px) rotate(5deg); }
}

.rotate {
    animation: rotate 1s ease-in-out;
}

.flip {
    animation: flip 0.8s ease-in-out;
}

.dance {
    animation: dance 1.5s ease-in-out;
}

@media (max-width: 600px) {
    .meme-text {
        font-size: 3rem;
    }
}
