/* CamCrimTrack - Custom Styles */

/* Dark Theme Enhancements */
:root {
    --bs-body-bg: #0f172a;
    --bs-body-color: #e2e8f0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.15);
}

/* Navigation Enhancements */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #3b82f6 !important;
    transform: translateY(-1px);
}

/* Button Animations */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Loading Animations */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #475569;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pulse Animation for Alerts */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0);
    }
}

/* Map Container */
.leaflet-container {
    background: #1e293b;
    border-radius: 8px;
}

.leaflet-popup-content-wrapper {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #334155;
}

.leaflet-popup-tip {
    background: #1e293b;
}

/* Chart Styling */
.chart-container {
    position: relative;
    height: 100%;
    width: 100%;
}

/* Form Enhancements */
.form-control {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #e2e8f0 !important;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: #1e293b !important;
    border-color: #3b82f6 !important;
    color: #e2e8f0 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-select {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #e2e8f0 !important;
}

.form-select:focus {
    background-color: #1e293b !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Badge Animations */
.badge {
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.05);
}

/* Progress Bar Custom Styling */
.progress {
    background-color: #334155;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transition: width 0.6s ease;
}

/* Modal Enhancements */
.modal-content {
    border-radius: 12px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #334155;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid #334155;
    border-radius: 0 0 12px 12px;
}

/* Alert Styling */
.alert {
    border: none;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.05));
    border-left: 4px solid #dc2626;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.1), rgba(217, 119, 6, 0.05));
    border-left: 4px solid #d97706;
}

.alert-success {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(5, 150, 105, 0.05));
    border-left: 4px solid #059669;
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    border-left: 4px solid #3b82f6;
}

/* List Group Styling */
.list-group-item {
    background-color: transparent;
    border-color: #334155;
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.list-group-item:hover {
    background-color: #1e293b;
    color: #3b82f6;
    transform: translateX(5px);
}

/* Dropdown Menu Styling */
.dropdown-menu {
    background-color: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    color: #e2e8f0;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #334155;
    color: #3b82f6;
}


/* Custom Utilities */
.text-gradient {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #059669, #047857);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #d97706, #b45309);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border-width: 2px;
    }

    .btn {
        border-width: 2px;
    }

    .form-control {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .dropdown {
        display: none !important;
    }

    .card {
        border: 1px solid #000;
        box-shadow: none;
    }

    body {
        background: white;
        color: black;
    }
}
