/* 1. Global Reset & Full Screen Centering */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    
    /* This centers the container perfectly in the middle of the viewport */
    min-height: 100vh;
    display: flex;
    justify-content: center; 
    align-items: center;
}

/* 2. Main Glassmorphism Container */
.container {
    width: 90%;
    max-width: 800px;
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px); /* Optional: adds a nice blur effect */
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 3. Typography */
h1 {
    font-size: clamp(2rem, 8vw, 3.5rem); /* Responsive font size */
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 40px;
    font-style: italic;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

/* 4. The Joke Box (The magic centering happens here) */
#joke-box {
    width: 100%;
    min-height: 250px; /* Keeps the container stable during transitions */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 5. Individual Joke Text */
.joke {
    font-size: clamp(1.5rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    padding: 0 20px;
    display: none; /* Controlled by your JS */
    
    /* Animation for that smooth feel */
    animation: fadeIn 0.6s ease-out;
}

/* 6. Smooth Entry Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}