/* app/static/css/style.css */
/* Base Styles */
body {
    background: linear-gradient(to bottom right, #000000, #1a0000);
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.5);
}

/* Upload Zone Styles */
.drag-over {
    @apply border-red-500 bg-red-500/5;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Cards Hover Effect */
.analysis-card {
    transition: all 0.2s ease;
}

.analysis-card:hover {
    transform: translateY(-2px);
}

/* Monospace Font for Technical Data */
.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Animations */
@keyframes pulse-red {
    0%, 100% {
        background-color: rgba(239, 68, 68, 0.1);
    }
    50% {
        background-color: rgba(239, 68, 68, 0.2);
    }
}

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

/* Loading Spinner */
.loading-spinner {
    border: 3px solid rgba(239, 68, 68, 0.1);
    border-top-color: rgb(239, 68, 68);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Form Controls Dark Theme Override */
select,
input {
    background-color: rgb(17 24 39 / 0.3) !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Custom Select Dropdown Arrow */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.logo-wrapper {
    display: flex;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo-wrapper:hover {
    opacity: 0.8;
}

/* Autofill Style Override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgb(17 24 39 / 0.3) inset !important;
    -webkit-text-fill-color: rgb(209 213 219) !important;
}
        /* Simple fade animation for popover */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .fade-in {
            animation: fadeIn 0.2s ease-out;
        }
        
        /* Sidebar Variables */
        :root {
            --sidebar-width-expanded: 250px;
            --sidebar-width-collapsed: 72px;
            --transition-speed: 0.3s;
        }
        
        /* Sidebar Base Styles */
        .app-sidebar {
            width: var(--sidebar-width-expanded);
            transition: width var(--transition-speed) ease-in-out;
            position: fixed;
            top: 0;
            left: 0;
            height: 100vh;
            z-index: 50;
        }
        
        .app-sidebar.collapsed {
            width: var(--sidebar-width-collapsed);
        }
        
        /* Main Content */
        .app-content {
            margin-left: var(--sidebar-width-expanded);
            transition: margin-left var(--transition-speed) ease-in-out;
        }
        
        .app-content.sidebar-collapsed {
            margin-left: var(--sidebar-width-collapsed);
        }
        
        /* Top Bar */
        .app-topbar {
            left: var(--sidebar-width-expanded);
            transition: left var(--transition-speed) ease-in-out;
        }
        
        .app-topbar.sidebar-collapsed {
            left: var(--sidebar-width-collapsed);
        }
        
        /* Sidebar Content Sections */
        .sidebar-header {
            padding: 1rem 1.25rem 0.5rem;
        }
        
        .app-sidebar.collapsed .sidebar-header {
            padding: 1rem 0.5rem;
        }
        
        .sidebar-nav {
            padding: 0 1.5rem;
            transition: padding var(--transition-speed) ease-in-out;
        }
        
        .app-sidebar.collapsed .sidebar-nav {
            padding: 0 0.5rem;
        }
        
        .sidebar-footer {
            padding: 1rem 1.5rem;
            transition: padding var(--transition-speed) ease-in-out;
        }
        
        .app-sidebar.collapsed .sidebar-footer {
            padding: 1rem 0.5rem;
        }
        
        /* Logo Section */
        .logo-wrapper {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 0.5rem;
        }
        
        .app-sidebar.collapsed .logo-wrapper {
            justify-content: center;
            gap: 0;
        }
        
        .logo-text {
            transition: opacity var(--transition-speed) ease-in-out;
        }
        
        .app-sidebar.collapsed .logo-text {
            opacity: 0;
            width: 0;
            overflow: hidden;
        }
        
        .logo-icon {
            flex-shrink: 0;
        }
        
        /* Navigation Items */
        .nav-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            margin-bottom: 0.5rem;
            border-radius: 0.5rem;
            transition: all 0.2s ease;
            position: relative;
            cursor: pointer;
        }
        
        .app-sidebar.collapsed .nav-item {
            justify-content: center;
            padding: 0.75rem;
            gap: 0;
        }
        
        .nav-icon {
            width: 1.25rem;
            height: 1.25rem;
            flex-shrink: 0;
        }
        
        .nav-text {
            font-weight: 500;
            transition: opacity var(--transition-speed) ease-in-out;
            white-space: nowrap;
        }
        
        .app-sidebar.collapsed .nav-text {
            opacity: 0;
            width: 0;
            overflow: hidden;
        }
        
        /* Tooltips for collapsed state */
        .nav-tooltip {
            position: absolute;
            left: calc(100% + 0.5rem);
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0, 0, 0, 0.9);
            color: white;
            padding: 0.5rem 0.75rem;
            border-radius: 0.375rem;
            font-size: 0.875rem;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s, visibility 0.2s;
            z-index: 1000;
            border: 1px solid rgba(55, 65, 81, 0.5);
            pointer-events: none;
        }
        
        .app-sidebar.collapsed .nav-item:hover .nav-tooltip {
            opacity: 1;
            visibility: visible;
        }
        
        /* Toggle Button */
        .sidebar-toggle {
            position: absolute;
            top: 1rem;
            right: -0.75rem;
            width: 1.5rem;
            height: 1.5rem;
            background: rgba(0, 0, 0, 0.8);
            border: 1px solid rgba(55, 65, 81, 0.5);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            z-index: 60;
        }
        
        .sidebar-toggle:hover {
            background: rgba(239, 68, 68, 0.2);
            border-color: rgba(239, 68, 68, 0.3);
        }
        
        .sidebar-toggle svg {
            width: 0.75rem;
            height: 0.75rem;
            transition: transform var(--transition-speed) ease;
        }
        
        .app-sidebar.collapsed .sidebar-toggle svg {
            transform: rotate(180deg);
        }
        
        /* Status Section */
        .status-wrapper {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .app-sidebar.collapsed .status-wrapper {
            justify-content: center;
            gap: 0;
        }
        
        .status-indicator {
            width: 0.75rem;
            height: 0.75rem;
            border-radius: 50%;
            flex-shrink: 0;
        }
        
        .status-text {
            font-size: 0.875rem;
            transition: opacity var(--transition-speed) ease-in-out;
            white-space: nowrap;
        }
        
        .app-sidebar.collapsed .status-text {
            opacity: 0;
            width: 0;
            overflow: hidden;
        }
        
        /* Hover Effects */
        .nav-item:hover {
            background-color: rgba(239, 68, 68, 0.1);
            color: white;
        }
        
        .nav-item:hover .nav-icon {
            color: white;
        }