/* Custom styles for ToolkitOS CSVeez */

:root {
    --toolkit-primary: #007bff;
    --toolkit-success: #28a745;
    --toolkit-warning: #ffc107;
    --toolkit-danger: #dc3545;
    --toolkit-info: #17a2b8;
}

/* Main layout improvements */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.125);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* File input styling */
.form-control[type="file"] {
    padding: 0.6rem 0.75rem;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s ease;
}

.form-control[type="file"]:hover {
    border-color: var(--bs-primary);
    background-color: rgba(0, 123, 255, 0.05);
}

.form-control[type="file"]:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Loading Bar Animations */
.loading-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-bar-progress {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--bs-primary) 0%, 
        var(--bs-info) 50%, 
        var(--bs-primary) 100%);
    background-size: 200% 100%;
    animation: loading-shimmer 2s infinite;
    border-radius: 2px;
    transition: width 0.3s ease;
}

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

.loading-pulse {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

/* File Upload Loading States */
.upload-loading {
    position: relative;
    overflow: hidden;
}

.upload-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    animation: upload-sweep 2s infinite;
}

@keyframes upload-sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Processing Animation */
.processing-dots::after {
    content: '';
    animation: processing-dots 1.5s infinite;
}

@keyframes processing-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Circular Progress */
.circular-progress {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--bs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Step Progress Indicator */
.step-progress {
    display: flex;
    align-items: center;
    margin: 1rem 0;
}

.step-progress-item {
    display: flex;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-progress-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-50%);
    z-index: 0;
}

.step-progress-item.active::after {
    background: linear-gradient(90deg, var(--bs-success) 0%, rgba(255, 255, 255, 0.1) 100%);
    animation: progress-fill 0.5s ease;
}

.step-progress-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.step-progress-item.active .step-progress-icon {
    background-color: var(--bs-success);
    color: white;
    transform: scale(1.1);
}

.step-progress-item.loading .step-progress-icon {
    background-color: var(--bs-primary);
    color: white;
    animation: pulse-glow 1.5s infinite;
}

@keyframes progress-fill {
    0% { background: linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.1) 100%); }
    100% { background: linear-gradient(90deg, var(--bs-success) 0%, rgba(255, 255, 255, 0.1) 100%); }
}

/* Button improvements */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
}

.btn-lg {
    padding: 0.75rem 2rem;
}

/* Progress bar animations */
.progress-bar {
    transition: width 0.8s ease-in-out;
}

/* Alert improvements */
.alert {
    border-radius: 0.75rem;
    border: none;
}

/* Navigation styling */
.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.025em;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Loading states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* File upload drop zone styling */
.file-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.02);
}

.file-drop-zone.dragover {
    border-color: var(--bs-primary);
    background-color: rgba(0, 123, 255, 0.1);
}

/* Statistics cards */
.stats-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Icon styling */
.fa-tools, .fa-file-csv {
    background: linear-gradient(45deg, #007bff, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    .display-6 {
        font-size: 2rem;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Processing status indicators */
.processing-step {
    position: relative;
    padding-left: 2rem;
}

.processing-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--bs-success);
}

.processing-step.active::before {
    background-color: var(--bs-primary);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
