:root {
    --lummus-primary: #1E3A5F;
    --lummus-accent: #00D9FF;
    --lummus-secondary: #00FF88;
    --lummus-success: #00FF88;
    --lummus-warning: #F59E0B;
    --lummus-danger: #EF4444;
    --lummus-dark: #0B1426;
    --lummus-light: #F8FAFC;
    --lummus-gray: #64748B;
    --lummus-purple: #8B5CF6;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--lummus-dark) 0%, var(--lummus-primary) 100%);
    min-height: 100vh;
    color: var(--lummus-light);
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 217, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 136, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(139, 92, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: backgroundShift 20s ease-in-out infinite alternate;
}

@keyframes backgroundShift {
    0% { transform: translateX(0) translateY(0) scale(1); }
    100% { transform: translateX(-20px) translateY(-10px) scale(1.02); }
}

.main-container {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Tighter horizontal padding specifically for chat page container */
.tight-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Smooth scroll behavior for chat thread */
.chat-thread {
    scroll-behavior: smooth;
}

/* Themed scrollbars (WebKit/Blink) */
.chat-thread::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.chat-thread::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.chat-thread::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--lummus-accent), var(--lummus-secondary));
    border-radius: 10px;
    border: 2px solid rgba(11, 20, 38, 0.85);
}

.chat-thread::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--lummus-secondary), var(--lummus-accent));
}

/* Firefox scrollbar theming */
.chat-thread,
body {
    scrollbar-width: thin;
    scrollbar-color: var(--lummus-accent) rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--lummus-accent), transparent);
    opacity: 0.6;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 217, 255, 0.3);
}

.glow-button {
    background: linear-gradient(45deg, var(--lummus-accent), var(--lummus-secondary));
    border: none;
    border-radius: 12px;
    color: var(--lummus-dark);
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(0, 217, 255, 0.3),
        0 0 30px rgba(0, 217, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.glow-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.glow-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 217, 255, 0.4),
        0 0 50px rgba(0, 217, 255, 0.2);
}

.glow-button:hover::before {
    animation: shimmer 0.6s ease-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); opacity: 0; }
}

.section-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 0.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--lummus-accent), transparent);
    transition: left 0.5s ease;
}

.section-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--lummus-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.1);
}

.section-card:hover::before {
    left: 100%;
}

.progress-ring {
    transform: rotate(-90deg);
    filter: drop-shadow(0 0 10px var(--lummus-accent));
}

.progress-ring-circle {
    stroke: var(--lummus-accent);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
    animation: progressGlow 2s ease-in-out infinite alternate;
}

@keyframes progressGlow {
    0% { filter: drop-shadow(0 0 5px var(--lummus-accent)); }
    100% { filter: drop-shadow(0 0 20px var(--lummus-accent)); }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--lummus-accent), var(--lummus-secondary), var(--lummus-purple));
    background-size: 200% 200%;
    text-align: center;
    margin-bottom: 1rem;
    animation: gradientShift 4s ease-in-out infinite;
    display: inline-block;
    
    /* Modern browsers with background-clip support */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    /* Fallback color for older browsers - this will be overridden by background-clip if supported */
    color: var(--lummus-accent);
}

/* Enhanced fallback with better browser detection */
@supports not (-webkit-background-clip: text) {
    .hero-title {
        color: var(--lummus-accent) !important;
        background: none !important;
        text-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
        -webkit-text-fill-color: var(--lummus-accent) !important;
    }
}

/* Additional fallback for Firefox */
@-moz-document url-prefix() {
    .hero-title {
        color: var(--lummus-accent);
        background: linear-gradient(45deg, var(--lummus-accent), var(--lummus-secondary), var(--lummus-purple));
        background-size: 200% 200%;
        -moz-background-clip: text;
        -moz-text-fill-color: transparent;
    }
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Welcome text cutout effect */
.welcome-text {
    font-size: 1.5rem;
    font-weight: 900;
    text-align: center;
    background: linear-gradient(135deg, var(--lummus-dark) 0%, var(--lummus-primary) 100%);
    background-size: 200% 200%;
    background-attachment: fixed;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    position: relative;
    animation: gradientShift 4s ease-in-out infinite;
}

/* Fallback for browsers that don't support background-clip */
@supports not (-webkit-background-clip: text) {
    .welcome-text {
        color: var(--lummus-primary) !important;
        background: none !important;
        font-weight: 900;
        text-shadow: 0 0 20px rgba(30, 58, 95, 0.3);
        -webkit-text-fill-color: var(--lummus-primary) !important;
    }
}

.subtitle {
    font-size: 1.3rem;
    color: var(--lummus-gray);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 300;
    letter-spacing: 0.5px;
}

.input-field {
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    color: var(--lummus-light);
    padding: 14px 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.input-field:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--lummus-accent);
    box-shadow: 
        0 0 0 3px rgba(0, 217, 255, 0.1),
        0 0 20px rgba(0, 217, 255, 0.1);
    color: var(--lummus-light);
    -webkit-text-fill-color: var(--lummus-light);
    font-weight: 600;
    transform: scale(1.02);
}

.input-field::placeholder {
    color: rgba(248, 250, 252, 0.5);
}

.upload-zone {
    border: 2px dashed rgba(0, 217, 255, 0.4);
    border-radius: 16px;
    padding: 4rem 3rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
}

.upload-zone::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(0, 217, 255, 0.05), transparent);
    animation: rotate 10s linear infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.upload-zone:hover::before {
    opacity: 1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upload-zone:hover {
    border-color: var(--lummus-accent);
    background: rgba(255, 255, 255, 0.08);
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.1);
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.status-pending { 
    background-color: #64748B;
    box-shadow: 0 0 5px rgba(100, 116, 139, 0.3);
}

.status-active { 
    background-color: var(--lummus-accent); 
    animation: statusPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 15px var(--lummus-accent);
}

.status-completed { 
    background-color: var(--lummus-secondary);
    box-shadow: 0 0 10px var(--lummus-secondary);
    animation: completedGlow 0.5s ease-out;
}

@keyframes statusPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 15px var(--lummus-accent);
    }
    50% { 
        transform: scale(1.2);
        box-shadow: 0 0 25px var(--lummus-accent);
    }
}

@keyframes completedGlow {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

/* Loading animations */
.loading-dots {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 20px;
}

.loading-dots div {
    position: absolute;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lummus-accent);
    animation: loadingDots 1.2s linear infinite;
}

.loading-dots div:nth-child(1) { left: 8px; animation-delay: 0s; }
.loading-dots div:nth-child(2) { left: 32px; animation-delay: -0.4s; }
.loading-dots div:nth-child(3) { left: 56px; animation-delay: -0.8s; }

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Success celebration animation */
.celebration {
    animation: celebrate 0.6s ease-out;
}

@keyframes celebrate {
    0% { transform: scale(0.8) rotate(-10deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Error handling styles */
.error-container {
    padding: 2rem;
    text-align: center;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 12px;
    margin: 2rem 0;
}

.error-icon {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ef4444;
}

.error-message {
    color: var(--lummus-gray);
    margin-bottom: 1.5rem;
}

.retry-button {
    background: linear-gradient(45deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 20, 38, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(8px);
}

.loading-content {
    text-align: center;
    color: var(--lummus-light);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 217, 255, 0.3);
    border-top: 4px solid var(--lummus-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.loading-subtext {
    font-size: 0.9rem;
    color: var(--lummus-gray);
}

/* Connection status indicator */
.connection-status {
    position: fixed;
    bottom: 4.5rem;
    right: 1rem;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 1000;
    transition: all 0.3s ease;
}

.connection-online {
    background: rgba(0, 255, 136, 0.2);
    color: var(--lummus-secondary);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.connection-offline {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Warning styles */
.warning-container {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.warning-title {
    color: #f59e0b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.warning-message {
    color: var(--lummus-gray);
}

/* Progress visualization styles */
.progress-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: conic-gradient(var(--lummus-accent) 0deg, var(--lummus-gray) 0deg);
    transition: all 0.3s ease;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    background: var(--lummus-dark);
    border-radius: 50%;
    z-index: 1;
}

.progress-percentage {
    position: relative;
    z-index: 2;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--lummus-light);
}

/* Container for centering the progress circle */
#progress-circle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
}

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.section-card.completed {
    border-color: var(--lummus-secondary);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 217, 255, 0.05) 100%);
}

.section-card.completed .fas {
    color: var(--lummus-secondary) !important;
}

.section-card.processing {
    border-color: var(--lummus-warning);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.05) 100%);
    animation: processingPulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.section-card.processing::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(245, 158, 11, 0.1), transparent);
    animation: processingShimmer 3s linear infinite;
}

.section-card.processing .fas {
    color: var(--lummus-warning) !important;
    position: relative;
    z-index: 1;
}

@keyframes processingPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
    }
}

@keyframes processingShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.section-card.error {
    border-color: var(--lummus-danger);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
}

.section-card.error .fas {
    color: var(--lummus-danger) !important;
}

.section-card.pending {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

.section-card.pending .fas {
    color: var(--lummus-gray) !important;
}

/* Footer styles */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(11, 20, 38, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    z-index: 100;
    transition: all 0.3s ease;
}

.app-footer:hover {
    background: rgba(11, 20, 38, 0.95);
    border-top-color: rgba(0, 217, 255, 0.2);
}

/* Input page uses Card structure for proper alignment */
/* Header and form now use identical Card/CardBody structure */
/* IMPORTANT: Clear browser cache (Ctrl+Shift+R) if changes don't appear */

/* Page-specific styles */
.login-page, .input-page, .validation-page, .progress-page, .results-page, .error-page {
    min-height: calc(100vh - 120px); /* Account for footer height */
    padding-bottom: 80px; /* Add space for fixed footer and connection status */
}

/* Utility classes */
.text-center {
    text-align: center;
}

/* Header styles */
.header-row {
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

/* Input content styling */
.input-content {
    margin: 1rem 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .glass-card {
        margin: 1rem;
        border-radius: 16px;
    }
    
    .upload-zone {
        padding: 2rem 1.5rem;
    }
    
    .loading-overlay {
        padding: 2rem;
    }
    
    .error-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Document Scanning Animation */
.document-scanner {
    position: relative;
    width: 120px;
    height: 160px;
    margin: 0 auto 1.5rem;
}

.doc-icon {
    width: 100%;
    height: 100%;
    border: 2px solid var(--lummus-accent);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    background: rgba(0, 217, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-icon i {
    color: var(--lummus-accent);
    z-index: 1;
    position: relative;
}

.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--lummus-accent), 
        var(--lummus-secondary), 
        transparent);
    box-shadow: 0 0 20px var(--lummus-accent);
    animation: scanning 2s linear infinite;
    z-index: 2;
}

@keyframes scanning {
    0% { 
        top: 0; 
        opacity: 0;
        transform: scaleX(0.3);
    }
    10% { 
        opacity: 1;
        transform: scaleX(1);
    }
    90% { 
        opacity: 1;
        transform: scaleX(1);
    }
    100% { 
        top: calc(100% - 2px); 
        opacity: 0;
        transform: scaleX(0.3);
    }
}

.scanning-text {
    text-align: center;
    margin-top: 1rem;
}

.scanning-text h5 {
    color: var(--lummus-accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.scanning-text p {
    color: var(--lummus-gray);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Pulse animation for scanning status */
.scanning-pulse {
    animation: scanningPulse 2s ease-in-out infinite;
}

@keyframes scanningPulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Success Checkmark Animation Styles */
.success-checkmark {
    filter: drop-shadow(0 0 20px var(--lummus-success));
    animation: successCheckIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes successCheckIn {
    0% { 
        transform: scale(0.3) rotate(-45deg);
        opacity: 0;
        filter: drop-shadow(0 0 0px var(--lummus-success));
    }
    50% { 
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
        filter: drop-shadow(0 0 25px var(--lummus-success));
    }
    100% { 
        transform: scale(1) rotate(0deg);
        opacity: 1;
        filter: drop-shadow(0 0 20px var(--lummus-success));
    }
}

.success-checkmark:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px var(--lummus-success));
    animation: successPulse 1.5s ease-in-out infinite;
}

@keyframes successPulse {
    0%, 100% { 
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px var(--lummus-success));
    }
    50% { 
        transform: scale(1.15);
        filter: drop-shadow(0 0 40px var(--lummus-success));
    }
}

/* ===== INTERACTIVE RESULTS PAGE STYLES ===== */

/* Results Dashboard Styles */
.summary-dashboard {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-title {
    font-weight: 700;
    background: linear-gradient(135deg, var(--lummus-accent), var(--lummus-secondary));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--lummus-accent), var(--lummus-secondary), var(--lummus-accent));
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 217, 255, 0.2);
}

.stat-card:hover::before {
    opacity: 0.3;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--lummus-light);
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--lummus-gray);
    margin: 0;
    font-weight: 500;
}

.distribution-section {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dist-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1rem;
}

.dist-count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dist-count.excellent { color: var(--lummus-success); }
.dist-count.good { color: var(--lummus-warning); }
.dist-count.needs-improvement { color: var(--lummus-danger); }

.dist-label {
    font-size: 0.8rem;
    color: var(--lummus-gray);
    text-align: center;
}

/* Candidate Card Styles */
.candidate-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
    position: relative;
    overflow: hidden;
}

.candidate-card:nth-child(1) { animation-delay: 0.1s; }
.candidate-card:nth-child(2) { animation-delay: 0.2s; }
.candidate-card:nth-child(3) { animation-delay: 0.3s; }
.candidate-card:nth-child(4) { animation-delay: 0.4s; }
.candidate-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.candidate-card:hover {
    transform: translateY(-6px);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(0, 217, 255, 0.4);
}

.candidate-header {
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
}

.rank-badge {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    text-shadow: none;
}

.candidate-name {
    color: var(--lummus-light);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Score Circle Styles */
.score-circle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.score-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Background will be set inline for better browser compatibility */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.score-circle::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: var(--lummus-dark);
    border-radius: 50%;
    z-index: 1;
}

.score-text {
    position: relative;
    z-index: 2;
    font-weight: 700;
    color: var(--lummus-light);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Score circle sizes */
.score-circle-large {
    width: 120px;
    height: 120px;
}

.score-circle-medium {
    width: 80px;
    height: 80px;
}

.score-circle-small {
    width: 60px;
    height: 60px;
}

.score-text.score-circle-large {
    font-size: 1.8rem;
}

.score-text.score-circle-medium {
    font-size: 1.4rem;
}

.score-text.score-circle-small {
    font-size: 1rem;
}

/* Score color variants */
.score-circle.score-excellent {
    --score-color: var(--lummus-success);
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 0.3));
}

.score-circle.score-good {
    --score-color: var(--lummus-warning);
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.3));
}

.score-circle.score-needs-improvement {
    --score-color: var(--lummus-danger);
    filter: drop-shadow(0 0 20px rgba(239, 68, 68, 0.3));
}

.score-circle:hover {
    transform: scale(1.1);
    filter: brightness(1.2) drop-shadow(0 0 30px var(--score-color));
}

/* Mini Bar Chart Styles */
.mini-bar-chart {
    margin-bottom: 1rem;
}

.bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.bar-label {
    font-size: 0.8rem;
    color: var(--lummus-gray);
    font-weight: 500;
}

.bar-score {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--lummus-light);
}

.bar-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bar-container:hover {
    transform: scaleY(1.5);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fillBar 1.5s ease-out;
    position: relative;
    overflow: hidden;
}

.bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmerBar 2s ease-out;
}

@keyframes fillBar {
    from { width: 0%; }
    to { width: var(--bar-width, 100%); }
}

@keyframes shimmerBar {
    0% { left: -100%; }
    100% { left: 100%; }
}

.bar-fill.bar-excellent {
    background: linear-gradient(90deg, var(--lummus-success), rgba(0, 255, 136, 0.8));
}

.bar-fill.bar-good {
    background: linear-gradient(90deg, var(--lummus-warning), rgba(245, 158, 11, 0.8));
}

.bar-fill.bar-needs-improvement {
    background: linear-gradient(90deg, var(--lummus-danger), rgba(239, 68, 68, 0.8));
}

/* Expand/Collapse Button Styles */
.expand-button {
    color: var(--lummus-accent) !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none !important;
}

.expand-button:hover {
    color: var(--lummus-secondary) !important;
    transform: translateX(5px);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.expand-button i {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Detail Content Styles */
.detail-content {
    animation: slideDown 0.4s ease-out;
    padding-top: 1rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.detail-header {
    color: var(--lummus-accent);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.8rem;
    position: relative;
}

.detail-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--lummus-accent), transparent);
    border-radius: 1px;
}

.summary-text, .flags-text {
    color: var(--lummus-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Tooltip Styles */
.score-tooltip, .summary-tooltip {
    background: rgba(11, 20, 38, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 217, 255, 0.3) !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4) !important;
    color: var(--lummus-light) !important;
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    max-width: 300px !important;
    padding: 1rem !important;
}

.summary-tooltip {
    max-width: 400px !important;
}

/* Filter Controls */
.filter-controls {
    animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.control-buttons .btn {
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.control-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Candidates Grid */
.candidates-grid {
    animation: staggerIn 0.8s ease-out;
}

@keyframes staggerIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Search Input */
.search-input {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 25px !important;
    color: var(--lummus-light) !important;
    padding: 12px 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--lummus-accent) !important;
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1) !important;
    transform: scale(1.02);
}

.search-input::placeholder {
    color: rgba(248, 250, 252, 0.5) !important;
}

/* Responsive Design for Results */
@media (max-width: 768px) {
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .score-circle-medium {
        width: 60px;
        height: 60px;
    }
    
    .score-text.score-circle-medium {
        font-size: 1rem;
    }
    
    .candidate-header {
        padding: 1rem;
    }
    
    .rank-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .candidate-name {
        font-size: 1rem;
    }
}

/* Loading Animation for Score Circles */
.score-circle[data-score] {
    animation: scoreReveal 2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes scoreReveal {
    from {
        background: conic-gradient(
            from 0deg,
            rgba(255, 255, 255, 0.1) 0deg,
            rgba(255, 255, 255, 0.1) 360deg
        );
    }
    to {
        background: conic-gradient(
            from 0deg,
            var(--score-color, var(--lummus-accent)) 0deg,
            var(--score-color, var(--lummus-accent)) calc(var(--score-percentage, 0%) * 3.6deg),
            rgba(255, 255, 255, 0.1) calc(var(--score-percentage, 0%) * 3.6deg),
            rgba(255, 255, 255, 0.1) 360deg
        );
    }
}

/* AI-themed holographic animations */
@keyframes holographicShimmer {
    0% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.6)) brightness(1.1) hue-rotate(0deg);
    }
    50% {
        background-position: 100% 50%;
        filter: drop-shadow(0 0 40px rgba(0, 217, 255, 0.8)) brightness(1.3) hue-rotate(15deg);
    }
    100% {
        background-position: 0% 50%;
        filter: drop-shadow(0 0 30px rgba(0, 255, 136, 0.6)) brightness(1.1) hue-rotate(0deg);
    }
}

@keyframes shimmerMove {
    0% {
        background-position: -200% 0;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        background-position: 200% 0;
        opacity: 0;
    }
}

@keyframes numberGlow {
    0% {
        text-shadow: 0 0 15px rgba(0, 255, 136, 0.6), 0 0 30px currentColor;
    }
    100% {
        text-shadow: 0 0 20px rgba(0, 255, 136, 1), 0 0 40px currentColor, 0 0 60px currentColor;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* AI theme classes */
.ai-theme {
    position: relative;
}

.ai-holographic {
    position: relative;
    overflow: visible;
}

.ai-holographic::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
    z-index: -1;
}

/* Resume Grid Processing UI Styles */
.resume-grid-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 1rem;
}

.resume-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.grid-title {
    color: var(--lummus-light);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.grid-stats {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.grid-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.grid-stat-icon {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.grid-stat-icon.waiting { background-color: rgba(100, 116, 139, 0.6); }
.grid-stat-icon.processing { background-color: var(--lummus-accent); }
.grid-stat-icon.completed { background-color: var(--lummus-success); }
.grid-stat-icon.failed { background-color: var(--lummus-danger); }

.grid-stat-text {
    color: var(--lummus-gray);
    font-weight: 500;
}

.grid-stat-count {
    color: var(--lummus-light);
    font-weight: 700;
}

.resume-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    gap: 8px;
    max-width: 100%;
    animation: fadeIn 0.6s ease-out;
}

@media (min-width: 576px) {
    .resume-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 10px;
    }
}

@media (min-width: 768px) {
    .resume-grid {
        grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
        gap: 12px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.resume-tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    border: 2px solid transparent;
    overflow: hidden;
}

.resume-tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 6px;
    background: inherit;
    opacity: 0.8;
    z-index: -1;
}

.resume-tile:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.resume-tile-number {
    position: relative;
    z-index: 2;
    color: var(--lummus-light);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    font-size: 0.75rem;
}

/* Status-specific styles */
.resume-tile.status-waiting {
    background: rgba(100, 116, 139, 0.3);
    border-color: rgba(100, 116, 139, 0.4);
    animation: waitingPulse 3s ease-in-out infinite;
}

.resume-tile.status-processing {
    background: linear-gradient(45deg, var(--lummus-accent), rgba(0, 217, 255, 0.7));
    border-color: var(--lummus-accent);
    animation: processingGlow 1.5s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.4);
}

.resume-tile.status-completed {
    background: linear-gradient(45deg, var(--lummus-success), rgba(0, 255, 136, 0.7));
    border-color: var(--lummus-success);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
    animation: completedFlash 0.6s ease-out;
}

.resume-tile.status-failed {
    background: linear-gradient(45deg, var(--lummus-danger), rgba(239, 68, 68, 0.7));
    border-color: var(--lummus-danger);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

@keyframes waitingPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}

@keyframes processingGlow {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(0, 217, 255, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 25px rgba(0, 217, 255, 0.6);
        transform: scale(1.02);
    }
}

@keyframes completedFlash {
    0% { 
        background: linear-gradient(45deg, rgba(0, 255, 136, 0.3), rgba(0, 255, 136, 0.5));
        transform: scale(1);
    }
    50% { 
        background: linear-gradient(45deg, var(--lummus-success), rgba(0, 255, 136, 0.9));
        transform: scale(1.1);
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.6);
    }
    100% { 
        background: linear-gradient(45deg, var(--lummus-success), rgba(0, 255, 136, 0.7));
        transform: scale(1);
    }
}

.resume-tile.status-processing::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 10px;
    background: linear-gradient(45deg, transparent, var(--lummus-accent), transparent);
    animation: borderSweep 2s linear infinite;
    z-index: -1;
}

@keyframes borderSweep {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Processing workers indicator */
.workers-status {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.worker-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.4);
    transition: all 0.3s ease;
}

.worker-indicator.active {
    background: var(--lummus-accent);
    box-shadow: 0 0 8px rgba(0, 217, 255, 0.5);
    animation: workerPulse 1s ease-in-out infinite;
}

@keyframes workerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Neural network connection effect */
.grid-connections {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.grid-connection-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 255, 0.3), transparent);
    animation: connectionFlow 3s ease-in-out infinite;
}

@keyframes connectionFlow {
    0%, 100% { opacity: 0; transform: scaleX(0); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* Progress summary */
.progress-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-text {
    color: var(--lummus-gray);
    font-size: 0.9rem;
}

.progress-percentage {
    color: var(--lummus-accent);
    font-weight: 700;
    font-size: 1.1rem;
}

.eta-text {
    color: var(--lummus-light);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Tooltip for resume tiles */
.resume-tile-tooltip {
    background: rgba(11, 20, 38, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 217, 255, 0.3) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
    color: var(--lummus-light) !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    padding: 0.5rem 0.75rem !important;
    max-width: 200px !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 480px) {
    .resume-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 6px;
    }
    
    .resume-tile-number {
        font-size: 0.65rem;
    }
    
    .grid-stats {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .resume-grid-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Stagger animation for tiles */
.resume-tile {
    animation: tileAppear 0.4s ease-out both;
}

.resume-tile:nth-child(n) {
    animation-delay: calc(var(--tile-index, 0) * 0.02s);
}

@keyframes tileAppear {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
