/**
 * AI Vibe Coding - Custom CSS Styles
 * Enhances Tailwind with custom animations and branding
 */

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* Animation classes */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom gradient backgrounds */
.gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-creative {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
}

/* Dark theme with green primary adjustments */
.text-primary {
    color: rgb(69, 204, 170);
}

.bg-primary {
    background-color: rgb(69, 204, 170);
}

.border-primary {
    border-color: rgb(69, 204, 170);
}

.hover\:bg-secondary:hover {
    background-color: rgb(16, 185, 129);
}

.hover\:text-secondary:hover {
    color: rgb(16, 185, 129);
}

.hover\:border-primary:hover {
    border-color: rgb(69, 204, 170);
}

/* Dark theme backgrounds */
.bg-dark-50 {
    background-color: #18181b;
}

.bg-dark-100 {
    background-color: #27272a;
}

.bg-dark-200 {
    background-color: #3f3f46;
}

/* Form enhancements */
.form-error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

input:focus, select:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Loading button state */
button.loading {
    position: relative;
    color: transparent;
}

button.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Message interface styling */
.message-interface {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.message-sent {
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
    margin-left: auto;
    max-width: 70%;
    word-wrap: break-word;
}

.message-received {
    background: #F3F4F6;
    color: #374151;
    margin-right: auto;
    max-width: 80%;
    word-wrap: break-word;
}

/* Pricing card enhancements */
.pricing-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    transition: left 0.5s;
}

.pricing-card:hover::before {
    left: 100%;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Feature card hover effects */
.feature-card {
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Use case cards with gradients */
.use-case-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.use-case-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.use-case-card:hover::after {
    opacity: 0.1;
}

.use-case-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15);
}

/* Beta badge styling */
.beta-badge {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive messaging interface */
@media (max-width: 768px) {
    .message-sent {
        max-width: 85%;
    }
    
    .message-received {
        max-width: 90%;
    }
    
    .pricing-card {
        margin-bottom: 1.5rem;
    }
    
    /* Improved touch targets */
    button, a, input, select {
        min-height: 44px;
    }
    
    /* Better mobile navigation */
    .nav-menu {
        font-size: 16px;
    }
    
    /* Mobile form improvements */
    input[type="email"], select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Hero section mobile adjustments */
    .hero-section {
        min-height: 80vh;
    }
    
    /* Card spacing improvements */
    .feature-card, .use-case-card {
        margin-bottom: 1rem;
    }
    
    /* Better mobile messaging interface */
    .message-interface {
        padding: 1rem;
        margin: 0 -1rem;
    }
    
    /* Mobile-specific animations */
    .pricing-card:hover,
    .feature-card:hover,
    .use-case-card:hover {
        transform: none; /* Disable hover animations on mobile */
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
button:focus,
input:focus,
select:focus,
a:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* Touch-friendly button states */
@media (hover: none) and (pointer: coarse) {
    button:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
    
    .cta-button:active {
        background-color: rgb(16, 185, 129);
    }
}

/* Loading states */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Creative code syntax highlighting */
.code-snippet {
    background: #1F2937;
    color: #F9FAFB;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

.code-snippet .string {
    color: #34D399;
}

.code-snippet .keyword {
    color: #8B5CF6;
}

.code-snippet .comment {
    color: #6B7280;
    font-style: italic;
}

/* Toast notifications */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    max-width: 400px;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background: #10B981;
    color: white;
}

.toast-error {
    background: #EF4444;
    color: white;
}

.toast-info {
    background: #3B82F6;
    color: white;
}

/* Section spacing improvements */
section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

section.animate-fadeInUp {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile section optimizations */
@media (max-width: 768px) {
    section {
        transform: translateY(20px);
        transition: all 0.4s ease;
    }
    
    /* Reduce motion for mobile users who prefer it */
    @media (prefers-reduced-motion: reduce) {
        section {
            transform: none;
            transition: opacity 0.3s ease;
        }
    }
}

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

::-webkit-scrollbar-track {
    background: #F3F4F6;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #7C3AED;
}

/* Mobile scrollbar adjustments */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 4px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .bg-primary,
    .bg-secondary {
        background: white !important;
        color: black !important;
        border: 1px solid black;
    }
}