/* Custom styles for AI Prompt Generator */

/* Smooth transitions */
.transition {
    transition: all 0.3s ease;
}

/* Card hover effects */
.prompt-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prompt-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Button animations */
.copy-btn {
    position: relative;
    overflow: hidden;
}

.copy-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.4s ease;
}

.copy-btn:active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 0;
}

/* Animation for category selection */
.category-btn {
    transition: all 0.2s ease;
}

.category-btn:hover {
    transform: translateY(-2px);
}

/* Generate button shine effect */
#generate-btn {
    position: relative;
    overflow: hidden;
}

#generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 100%);
    transform: skewX(-25deg);
    transition: all 0.75s;
}

#generate-btn:hover::before {
    animation: shine 1.5s infinite;
}

@keyframes shine {
    0% {
        left: -75%;
    }
    100% {
        left: 125%;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a3a3a3;
}

/* Fade-in animation for prompt cards */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* Recent searches animations */
#recent-searches button {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: calc(var(--index, 0) * 0.05s);
    opacity: 0;
}

/* Loading animation */
.loading {
    position: relative;
}

.loading::after {
    content: "...";
    position: absolute;
    right: -20px;
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% {
        content: ".";
    }
    40%, 60% {
        content: "..";
    }
    80%, 100% {
        content: "...";
    }
}

/* Mobile menu animation */
.mobile-menu {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(-10px);
    opacity: 0;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
}

/* Testimonial hover effects */
.bg-white.p-6.rounded-xl {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-white.p-6.rounded-xl:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Features hover effects */
.features-section .bg-white {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.features-section .bg-white:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.features-section .w-12 {
    transition: transform 0.3s ease;
}

.features-section .bg-white:hover .w-12 {
    transform: scale(1.1);
}

/* Keyword suggestions */
#suggestions {
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f3f4f6;
}

.suggestion-item .popularity {
    font-size: 0.75rem;
    color: #6b7280;
    margin-left: 4px;
}

/* Trending topics */
#trending-topics {
    min-height: 36px;
}

#trending-topics button {
    animation: fadeIn 0.5s ease forwards;
    animation-delay: calc(var(--index, 0) * 0.05s);
    opacity: 0;
}

.trending-loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Toggle Switch */
#quick-questions-toggle:checked + .block {
    background-color: #4F46E5;
}

#quick-questions-toggle:checked ~ .dot {
    transform: translateX(100%);
}

#quick-questions-toggle:focus + .block {
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
}

.dot {
    transition: all 0.3s ease;
    transform: translateX(0);
}

/* Quick Questions Mode */
.question-prompt-card {
    border-left: 4px solid #4F46E5;
}

/* Like button animation */
.liked i {
    color: #ef4444;
    animation: heartbeat 0.5s ease;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

.floating-heart {
    position: absolute;
    font-size: 20px;
    animation: float-up 1s ease-out forwards;
    opacity: 1;
    pointer-events: none;
}

@keyframes float-up {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-50px);
        opacity: 0;
    }
}

/* Share options */
.share-options {
    min-width: 140px;
}

.share-options button {
    text-align: left;
    white-space: nowrap;
} 