/* Main CSS for Lyric & Subtitle Format Converter */

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceSubtle {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Utility classes */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.animate-slide-up {
    animation: slideUp 0.3s ease-out;
}

.animate-bounce-subtle {
    animation: bounceSubtle 0.6s ease-in-out;
}

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

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

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

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

.dark ::-webkit-scrollbar-thumb {
    background: #64748b;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Tab button styles */
.tab-button.active {
    border-color: #3b82f6;
    color: #3b82f6;
}

.dark .tab-button.active {
    color: #60a5fa;
}

/* Drop zone styles */
#drop-zone.dragover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.dark #drop-zone.dragover {
    background-color: #1e3a8a;
}

/* File item styles */
.file-item {
    transition: all 0.2s ease-in-out;
}

.file-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Toast notification styles */
.toast {
    min-width: 300px;
    max-width: 500px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
    transform: translateX(100%);
    opacity: 0;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

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

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

.toast.warning {
    background-color: #f59e0b;
    color: white;
}

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

/* Loading spinner */
.spinner {
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Form focus styles */
.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dark .form-input:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

/* Code block styles */
.code-block {
    background-color: #1f2937;
    color: #f9fafb;
    border-radius: 8px;
    padding: 16px;
    font-family: 'JetBrains Mono', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
}

.dark .code-block {
    background-color: #111827;
}

/* Responsive design adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-6xl {
        font-size: 3rem;
    }
    
    .grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .text-xl {
        font-size: 1.125rem;
    }
    
    .text-2xl {
        font-size: 1.25rem;
    }
    
    .text-3xl {
        font-size: 1.5rem;
    }
    
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .space-x-8 {
        gap: 16px;
    }
    
    .px-8 {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .py-8 {
        padding-top: 16px;
        padding-bottom: 16px;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-gray-50,
    .bg-gray-100,
    .bg-gray-800,
    .bg-gray-900 {
        background: white !important;
    }
    
    .text-white,
    .text-gray-100,
    .text-gray-200,
    .text-gray-300 {
        color: black !important;
    }
    
    .border,
    .border-t,
    .border-b {
        border-color: #e5e7eb !important;
    }
    
    .shadow-lg,
    .shadow-xl {
        box-shadow: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #374151;
    }
    
    .text-gray-500 {
        color: #4b5563;
    }
    
    .border-gray-300 {
        border-color: #6b7280;
    }
    
    .bg-gray-100 {
        background-color: #f3f4f6;
    }
    
    .bg-gray-50 {
        background-color: #f9fafb;
    }
}