/* Random Joke Generator Styles */

/* Main Container - Full Page Layout */
.joke-generator-tool {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 0;
    margin: 0;
}

.joke-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Tool Header */
.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: rgb(27, 26, 26);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tool-description {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Main Joke Display Section */
.joke-display-section {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.current-joke-display {
    margin-bottom: 2rem;
}

.joke-content {
    margin-bottom: 1.5rem;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.joke-setup {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    text-align: center;
    max-width: 700px;
}

.joke-punchline {
    font-size: 1.375rem;
    font-weight: 500;
    color: var(--primary-color);
    line-height: 1.4;
    text-align: center;
    max-width: 700px;
    font-style: italic;
}

.joke-oneliner {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
    text-align: center;
    max-width: 700px;
}

.joke-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
    font-style: italic;
}

.joke-loading i {
    font-size: 2rem;
    color: var(--primary-color);
}

.joke-loading p {
    margin: 0;
    font-size: 1.125rem;
}

.joke-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #dc2626;
    text-align: center;
}

.joke-error i {
    font-size: 2rem;
    color: #dc2626;
}

.joke-error p {
    margin: 0;
    font-size: 1.125rem;
    max-width: 400px;
}

.retry-btn {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.retry-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.joke-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.joke-category {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.joke-type {
    background: var(--bg-light);
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Action Buttons */
.joke-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.generate-btn, .copy-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.generate-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--white);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(50, 146, 109, 0.3);
}

.copy-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: var(--white);
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

/* Category Filter Section */
.filter-section {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.filter-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.category-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.category-btn {
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    background: var(--white);
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 50px;
}

.category-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(50, 146, 109, 0.3);
}

/* Recent Jokes Section */
.recent-section {
    background: var(--white);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.recent-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.recent-jokes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 80px;
    align-items: center;
}

.recent-empty {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.recent-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.recent-joke {
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 600px;
    text-align: left;
}

.recent-joke:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(50, 146, 109, 0.3);
}

.recent-joke-content {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.recent-joke-category {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 500;
}

/* Copy Success Message */
.copy-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #10b981, #059669);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-message.show {
    opacity: 1;
    visibility: visible;
}

/* Loading Animation */
.generate-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.generate-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.mr-2 { margin-right: 0.5rem; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.text-center { text-align: center; }

/* Enhanced Hover Effects */
.generate-btn:active, .copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.recent-joke:active {
    transform: translateY(0);
}

/* Improved Focus States for Accessibility */
.generate-btn:focus, .copy-btn:focus, .category-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.recent-joke:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Enhanced Animation for Joke Display */
.joke-content.animate {
    animation: jokeFadeIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes jokeFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved Copy Message Animation */
.copy-message {
    animation-duration: 0.3s;
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.copy-message.show {
    animation-name: copyMessageShow;
}

@keyframes copyMessageShow {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .joke-container {
        padding: 1rem;
    }

    .tool-header h1 {
        font-size: 2rem;
    }

    .joke-display-section {
        padding: 2rem 1.5rem;
    }

    .joke-setup {
        font-size: 1.25rem;
    }

    .joke-punchline {
        font-size: 1.125rem;
    }

    .joke-oneliner {
        font-size: 1.25rem;
    }

    .joke-actions {
        flex-direction: column;
        align-items: center;
    }

    .generate-btn, .copy-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .category-filters {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .category-btn {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    .filter-section, .recent-section {
        padding: 1.5rem;
    }

    .joke-info {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .tool-header h1 {
        font-size: 1.75rem;
    }

    .tool-description {
        font-size: 1rem;
    }

    .joke-setup {
        font-size: 1.125rem;
    }

    .joke-punchline {
        font-size: 1rem;
    }

    .joke-oneliner {
        font-size: 1.125rem;
    }

    .copy-message {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .joke-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .joke-generator-tool {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    }

    .joke-display-section, .filter-section, .recent-section {
        background: #2d3748;
        color: #e2e8f0;
    }

    .joke-setup, .joke-oneliner {
        color: #e2e8f0;
    }

    .joke-type {
        background: #4a5568;
        color: #e2e8f0;
    }

    .category-btn {
        background: #4a5568;
        border-color: #4a5568;
        color: #e2e8f0;
    }

    .category-btn:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
    }

    .recent-joke {
        background: #4a5568;
        color: #e2e8f0;
    }

    .recent-joke:hover {
        background: var(--primary-color);
        color: var(--white);
    }
}
