:root {
    --primary: #FFD93D;
    --primary-dark: #FFC107;
    --secondary: #6BCB77;
    --accent: #FF6B6B;
    --text: #2D3436;
    --text-light: #636E72;
    --white: #FFFFFF;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --card-radius: 24px;
}

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

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text);
    background-color: #FFF5F5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.app-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 1;
}

/* Background styling */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FFD93D 0%, #FF6B6B 100%);
    opacity: 0.15;
    z-index: -1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.logo i {
    font-size: 2.5rem;
}

.logo h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -1px;
    color: var(--text);
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Joke Card */
.joke-card {
    background: var(--white);
    border-radius: var(--card-radius);
    padding: 3rem 2rem;
    width: 100%;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.joke-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.joke-content {
    margin-bottom: 2rem;
    width: 100%;
}

.setup {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    color: var(--text);
}

.punchline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    padding: 1rem;
    background: #FFF0F0;
    border-radius: 12px;
    display: inline-block;
    transition: all 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.punchline.hidden {
    opacity: 0;
    transform: translateY(10px);
    visibility: hidden;
}

/* Actions */
.joke-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.action-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--text);
    opacity: 1;
}

/* Main Button */
.primary-btn {
    background: var(--text);
    color: var(--white);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 15px rgba(45, 52, 54, 0.2);
}

.primary-btn:hover {
    transform: scale(1.05);
    background: var(--primary-dark);
    color: var(--text);
    box-shadow: 0 8px 25px rgba(255, 217, 61, 0.4);
}

.primary-btn:active {
    transform: scale(0.95);
}

.primary-btn i {
    transition: transform 0.5s ease;
}

.primary-btn:hover i {
    transform: rotate(180deg);
}

/* Footer */
footer {
    margin-top: auto;
    padding-top: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.beat {
    animation: heartbeat 1.5s infinite;
    color: var(--accent);
    display: inline-block;
}

/* Animations */
@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.3); }
    30% { transform: scale(1); }
    45% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.hidden {
    opacity: 0;
    transform: translate(-50%, 20px);
    pointer-events: none;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 2rem;
    }
    
    .joke-card {
        padding: 2rem 1.5rem;
    }
    
    .setup {
        font-size: 1.25rem;
    }
}