/* Custom syntax highlighting for code preview */
.syntax-highlight {
    line-height: 1.6;
}

.syntax-highlight code {
    color: #e5e7eb;
}

/* Simulate syntax highlighting with CSS */
.syntax-highlight code::before {
    content: "";
    display: inline;
}

/* Custom scrollbar */
.syntax-highlight::-webkit-scrollbar,
.max-h-40::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.syntax-highlight::-webkit-scrollbar-track,
.max-h-40::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 4px;
}

.syntax-highlight::-webkit-scrollbar-thumb,
.max-h-40::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

.syntax-highlight::-webkit-scrollbar-thumb:hover,
.max-h-40::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Smooth transitions */
* {
    transition: all 0.2s ease-in-out;
}

button:active {
    transform: translateY(1px);
}

/* Glass morphism effect */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
}

/* Custom animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Drag and drop styles */
.border-dashed {
    border-style: dashed;
}

/* Better focus states */
input:focus, select:focus, textarea:focus, button:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Code block styling */
pre code {
    font-family: 'JetBrains Mono', 'Monaco', 'Consolas', monospace;
    font-size: 14px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Loading state */
.loading::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #4b5563;
    border-radius: 50%;
    border-top-color: #8b5cf6;
    animation: spin 1s ease-in-out infinite;
}

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

/* Enhanced gradient text */
.bg-gradient-to-r.from-pink-400.to-purple-400 {
    background: linear-gradient(90deg, #f472b6, #a855f7);
}

/* Button hover effects */
button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Select dropdown styling */
select option {
    background-color: #1f2937;
    color: #e5e7eb;
}

/* File upload zone hover effect */
.cursor-pointer:hover {
    background-color: rgba(107, 114, 128, 0.1);
}

/* Processing log styling */
.max-h-40 {
    scrollbar-width: thin;
    scrollbar-color: #4b5563 #1f2937;
}

/* Cover art image styling */
img {
    object-fit: cover;
    max-width: 100%;
    height: auto;
}

/* Responsive design improvements */
@media (max-width: 1024px) {
    .grid.lg\\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
}

@media (max-width: 640px) {
    .p-4 {
        padding: 1rem;
    }
    
    .p-6 {
        padding: 1rem;
    }
    
    .gap-6 {
        gap: 1rem;
    }
    
    .flex-wrap {
        flex-wrap: wrap;
    }
}

/* Status indicator animations */
@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: statusPulse 2s ease-in-out infinite;
}

/* Truncate text for long filenames */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Grid improvements for smaller screens */
.grid.grid-cols-2 {
    gap: 1rem;
}

@media (max-width: 640px) {
    .grid.grid-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* Custom checkbox/radio styling */
input[type="checkbox"], input[type="radio"] {
    accent-color: #8b5cf6;
}

/* File input hidden styling */
.hidden {
    display: none !important;
}

/* Improved accessibility */
button:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Status badges */
.rounded-full {
    border-radius: 9999px;
}

/* Log color coding */
.text-red-300 {
    color: #fca5a5;
}

.text-green-300 {
    color: #86efac;
}

.text-yellow-300 {
    color: #fde047;
}

.text-blue-300 {
    color: #93c5fd;
}