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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #a8edea 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    border-radius: 30px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    max-width: 500px;
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.container::before {
    content: '😂';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 4rem;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b6b, #ffa500, #ff9a9e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 2;
}

#btn {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #ffecd2 100%);
    color: #fff;
    border: none;
    padding: 20px 50px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    box-shadow: 
        0 15px 35px rgba(255, 154, 158, 0.4),
        0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

#btn::before {
    content: '🎲';
    margin-right: 10px;
    display: inline-block;
    transition: all 0.3s ease;
}

#btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 25px 50px rgba(255, 154, 158, 0.6),
        0 10px 25px rgba(0, 0, 0, 0.15);
}

#btn:active {
    transform: translateY(-4px) scale(1.02);
}

#btn.loading {
    background: linear-gradient(90deg, #ffecd2, #fcb69f, #ffecd2);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
    cursor: not-allowed;
}

#btn.loading::before {
    content: '⏳';
    margin-right: 10px;
}

#result {
    font-size: 1.4rem;
    font-weight: 500;
    color: #444;
    line-height: 1.6;
    padding: 30px 25px;
    background: linear-gradient(135deg, #f8f9ff, #e8f4fd);
    border-radius: 25px;
    border: 3px solid #e1e8ff;
    box-shadow: 
        0 15px 40px rgba(102, 126, 234, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

#result.loading {
    background: linear-gradient(90deg, #ffecd2, #fcb69f, #a8edea);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-style: italic;
    animation: shimmerText 1.5s infinite;
    border-color: #ff9a9e;
}

#result.error {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
    color: #d63031;
    border-color: #fdcb6e;
    font-weight: 600;
}

#result.joke {
    background: linear-gradient(135deg, #a8e6cf, #dcedc1, #ffd3a5);
    color: #2d3436;
    border-color: #74b9ff;
    transform: scale(1.02);
}

/* Animations */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

@keyframes loadingShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes shimmerText {
    0% { background-position: 200% 50%; }
    100% { background-position: -200% 50%; }
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 40px 25px;
        margin: 10px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    #btn {
        padding: 18px 40px;
        font-size: 1.1rem;
    }
    
    #result {
        font-size: 1.2rem;
        padding: 25px 20px;
    }
}