:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --danger-gradient: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    --warning-gradient: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    --info-gradient: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.hero-section {
    background: var(--primary-gradient);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,0 1000,0 1000,100 0,80"/></svg>');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: bottom;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.upload-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    margin: -50px auto 3rem;
    position: relative;
    z-index: 3;
    max-width: 800px;
}

.dropzone {
    border: 3px dashed #e9ecef;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.dropzone:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.dropzone.dragover {
    border-color: #28a745;
    background: #f0fff4;
    box-shadow: 0 0 30px rgba(40, 167, 69, 0.2);
}

.dropzone-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.dropzone:hover .dropzone-icon {
    color: #667eea;
    transform: scale(1.1);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.document-type-card {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Hover effect */
.document-type-card:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Selected state */
.document-type-card.selected {
    border-color: #28a745;
    background: #f0fff4;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
    transform: translateY(-5px) scale(1.02);
}

/* Add a checkmark badge in the corner */
.document-type-card.selected::after {
    content: "\f00c"; /* Font Awesome check icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 8px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}


.document-type-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.processing-section {
    display: none;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 800px;
}

.processing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.processing-steps {
    margin: 2rem 0;
}

.processing-step {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.processing-step:last-child {
    border-bottom: none;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
    color: white;
}

.step-icon.pending {
    background: #6c757d;
}

.step-icon.processing {
    background: var(--info-gradient);
    animation: pulse 2s infinite;
}

.step-icon.completed {
    background: var(--success-gradient);
}

.step-icon.failed {
    background: var(--danger-gradient);
}

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

.progress-custom {
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f0f0;
}

.progress-bar-custom {
    background: var(--primary-gradient);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar-custom::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.results-section {
    display: none;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 1000px;
}

.results-tabs .nav-link {
    border-radius: 10px;
    margin-right: 0.5rem;
    border: 2px solid transparent;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

.results-tabs .nav-link.active {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

.results-content {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    min-height: 300px;
    margin-top: 1rem;
}

.code-block {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 10px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.btn-gradient {
    background: var(--primary-gradient);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-success-gradient {
    background: var(--success-gradient);
    border: none;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.btn-success-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
    color: white;
}

.stats-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid #f0f0f0;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.floating-action {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    border: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    color: white;
}

.alert-custom {
    border: none;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    font-weight: 500;
}

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

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

.spinner-custom {
    width: 2rem;
    height: 2rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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