/* SecuAI Modern UI Styles with Dark Theme Support */
:root {
    /* Light theme colors */
    --background: 0 0% 100%;
    --foreground: 240 10% 4%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 4%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 4%;
    --primary: 142 86% 28%;
    --primary-foreground: 356 29% 98%;
    --secondary: 240 5% 96%;
    --secondary-foreground: 240 6% 10%;
    --muted: 240 5% 96%;
    --muted-foreground: 240 4% 46%;
    --accent: 240 5% 96%;
    --accent-foreground: 240 6% 10%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 6% 90%;
    --input: 240 6% 90%;
    --ring: 142 86% 28%;
    --radius: 0.5rem;
    
    /* Status colors */
    --success: 142 86% 28%;
    --warning: 45 93% 47%;
    --danger: 0 84% 60%;
    --info: 200 95% 40%;
}

/* Force dark theme as default */
:root, [data-theme="dark"] {
    /* Pure black background theme */
    --background: 0 0% 0%;
    --foreground: 0 0% 98%;
    --card: 0 0% 3%;
    --card-foreground: 0 0% 98%;
    --popover: 0 0% 3%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 0 0% 9%;
    --secondary: 0 0% 9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 0 0% 9%;
    --muted-foreground: 0 0% 65%;
    --accent: 0 0% 9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 15%;
    --input: 0 0% 9%;
    --ring: 142 86% 28%;
}

* {
    border-color: hsl(var(--border));
}

body {
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Modern Card Styling */
.card {
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease-in-out;
    margin-bottom: 1.5rem;
}

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

.card-header {
    background-color: hsl(var(--muted));
    border-bottom: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
    font-weight: 600;
}

/* Statistics Cards */
.card.bg-primary,
.card.bg-danger,
.card.bg-warning,
.card.bg-info {
    transition: var(--transition);
}

.card.bg-primary:hover,
.card.bg-danger:hover,
.card.bg-warning:hover,
.card.bg-info:hover {
    transform: scale(1.02);
}

/* Button Enhancements */
.btn {
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-group .btn {
    margin-right: 2px;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: rgba(255, 193, 7, 0.1);
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: rgba(23, 162, 184, 0.1);
}

/* Table Enhancements */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    background-color: var(--light-color);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem 0.75rem;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.005);
}

.table-responsive {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Badge Enhancements */
.badge {
    font-size: 0.75em;
    padding: 0.5em 0.75em;
    border-radius: 50px;
    font-weight: 500;
}

/* Progress Bar Styles */
.progress {
    border-radius: 50px;
    background-color: rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    border-radius: 50px;
    transition: var(--transition);
}

/* Form Enhancements */
.form-control,
.form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
    padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Navigation Enhancements */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    transform: translateY(-1px);
}

/* Modal Enhancements */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    border: none;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* Code Blocks */
pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1rem;
    font-size: 0.875rem;
    overflow-x: auto;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

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

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

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

.pulse {
    animation: pulse 2s infinite;
}

/* Status Indicators */
.status-online {
    color: var(--success-color);
}

.status-offline {
    color: var(--danger-color);
}

.status-warning {
    color: var(--warning-color);
}

/* IP Address Styling */
.ip-address {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

/* Confidence Levels */
.confidence-high {
    color: var(--danger-color);
    font-weight: 600;
}

.confidence-medium {
    color: var(--warning-color);
    font-weight: 600;
}

.confidence-low {
    color: var(--info-color);
    font-weight: 600;
}

/* Honeypot Styling */
.honeypot-entry {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 87, 34, 0.1));
    border-left: 4px solid #ff5722;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.honeypot-entry:hover {
    transform: translateX(5px);
    box-shadow: var(--box-shadow);
}

/* Threat Level Indicators */
.threat-critical {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.threat-high {
    background: linear-gradient(135deg, #fd7e14, #e8590c);
    color: white;
}

.threat-medium {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
}

.threat-low {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

/* Admin Panel Specific */
.admin-card {
    border-left: 4px solid var(--primary-color);
}

.audit-log-entry {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    background-color: rgba(0, 0, 0, 0.02);
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

/* Configuration Panel */
.config-section {
    background: rgba(102, 126, 234, 0.05);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.config-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
}

/* Footer */
footer {
    margin-top: 3rem;
    background: linear-gradient(135deg, var(--dark-color), #495057) !important;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
    }
    
    .btn-group .btn {
        margin-right: 0;
        margin-bottom: 0.25rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .alert,
    footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .table {
        font-size: 0.8rem;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #495057;
        --dark-color: #f8f9fa;
    }
    
    body {
        background-color: #2c3e50;
        color: #ecf0f1;
    }
    
    .card {
        background-color: #34495e;
        color: #ecf0f1;
    }
    
    .table {
        color: #ecf0f1;
    }
    
    .form-control {
        background-color: #34495e;
        border-color: #495057;
        color: #ecf0f1;
    }
}

/* Utility Classes */
.text-monospace {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
}

.shadow-sm {
    box-shadow: var(--box-shadow) !important;
}

.rounded-lg {
    border-radius: var(--border-radius) !important;
}

.gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.gradient-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.gradient-danger {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
}

.gradient-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
}

.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-left-danger {
    border-left: 4px solid var(--danger-color) !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-color) !important;
}

/* Force Pure Black Theme Bootstrap Overrides */
body {
    background-color: #000000 !important;
}

.navbar-dark {
    background-color: #000000 !important;
    border-bottom: 1px solid #333333;
}

.bg-dark {
    background-color: #000000 !important;
}

.bg-secondary {
    background-color: #0a0a0a !important;
}

.bg-light {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

.text-muted {
    color: #888888 !important;
}

/* Container backgrounds */
.container-fluid {
    background-color: #000000 !important;
}

.container {
    background-color: #000000 !important;
}

.card {
    background-color: #0a0a0a !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.card-header {
    background-color: #000000 !important;
    border-bottom-color: #333333 !important;
    color: #ffffff !important;
}

.table-dark {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.table-dark th,
.table-dark td {
    border-color: #333333 !important;
}

.form-control {
    background-color: #1a1a1a !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.form-control:focus {
    background-color: #1a1a1a !important;
    border-color: #555555 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
}

.modal-content {
    background-color: #0a0a0a !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.modal-header {
    border-bottom-color: #333333 !important;
}

.modal-footer {
    border-top-color: #333333 !important;
}

.alert {
    border-color: #333333 !important;
}

.alert-info {
    background-color: #1a1a1a !important;
    border-color: #0066cc !important;
    color: #ffffff !important;
}

.alert-success {
    background-color: #1a1a1a !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
}

.alert-danger {
    background-color: #1a1a1a !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.alert-warning {
    background-color: #1a1a1a !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(10, 10, 10, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    transform: scale(1.1);
}

/* Footer styling */
footer {
    background: linear-gradient(135deg, #000000, #0a0a0a) !important;
    border-top: 1px solid #333333;
}

/* Badge enhancements */
.badge {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.4em 0.8em;
}

.badge.bg-success {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    color: #000000 !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
}

/* Navbar brand enhancement */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* System Overview Cards */
.system-overview .card {
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a) !important;
    border: 1px solid #333333 !important;
}

/* API Demo Section */
.api-demo .card {
    background: linear-gradient(135deg, #000000, #0a0a0a) !important;
    border: 1px solid #333333 !important;
}

/* Pre/Code blocks */
pre {
    background-color: #0a0a0a !important;
    border: 1px solid #333333 !important;
    color: #ffffff !important;
}

code {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #22c55e !important;
    padding: 0.2em 0.4em;
    border-radius: 4px;
}

/* Dropdown menus */
.dropdown-menu {
    background-color: #0a0a0a !important;
    border: 1px solid #333333 !important;
}

.dropdown-item {
    color: #ffffff !important;
}

.dropdown-item:hover {
    background-color: #1a1a1a !important;
    color: #22c55e !important;
}

/* Modal enhancements */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.8) !important;
}

/* List groups */
.list-group-item {
    background-color: #0a0a0a !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.list-group-item:hover {
    background-color: #1a1a1a !important;
}

/* Pagination */
.page-link {
    background-color: #0a0a0a !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.page-link:hover {
    background-color: #1a1a1a !important;
    border-color: #22c55e !important;
    color: #22c55e !important;
}

.page-item.active .page-link {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: #0a0a0a !important;
}

.breadcrumb-item a {
    color: #22c55e !important;
}

/* Tooltips */
.tooltip-inner {
    background-color: #0a0a0a !important;
    border: 1px solid #333333 !important;
}

/* Progress bars */
.progress {
    background-color: #1a1a1a !important;
}

/* Accordion */
.accordion-item {
    background-color: #0a0a0a !important;
    border-color: #333333 !important;
}

.accordion-button {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
    border-color: #333333 !important;
}

.accordion-button:not(.collapsed) {
    background-color: #1a1a1a !important;
    color: #22c55e !important;
}

.accordion-body {
    background-color: #000000 !important;
    color: #ffffff !important;
}