/* Global Theme - Dark Mode */
:root {
    --bg-dark: #0f1419;
    --bg-panel: #161d29;
    --bg-header: #121822;
    /* Slightly different for header */
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --border-color: #2c3e50;

    /* Accents */
    --color-green: #2ecc71;
    --color-yellow: #f1c40f;
    --color-red: #e74c3c;
    --color-blue: #3498db;
}

body {
    background-color: var(--bg-dark) !important;
    color: var(--text-primary) !important;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    overflow-x: hidden;
}

/* Utilities */
.bg-dark-theme {
    background-color: var(--bg-dark) !important;
}

.bg-header {
    background-color: var(--bg-header) !important;
}

.bg-panel {
    background-color: var(--bg-panel) !important;
}

.bg-dark-item {
    background-color: rgba(0, 0, 0, 0.2) !important;
}

.bg-dark-header {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

.text-green {
    color: var(--color-green) !important;
}

.text-yellow {
    color: var(--color-yellow) !important;
}

.text-red {
    color: var(--color-red) !important;
}

.text-blue {
    color: var(--color-blue) !important;
}

.tracking-wider {
    letter-spacing: 0.1em;
}

.font-sans {
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.hover-text-white:hover {
    color: #fff !important;
}

.hover-bg-light-dark:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.hover-scale:hover {
    transform: scale(1.02);
    transition: transform 0.2s;
}

/* Stat Cards */
.stat-card {
    background: var(--bg-panel);
    border-left: 5px solid transparent;
    border-radius: 8px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.4);
}

.stat-card.border-green {
    border-left-color: var(--color-green);
}

.stat-card.border-yellow {
    border-left-color: var(--color-yellow);
}

.stat-card.border-red {
    border-left-color: var(--color-red);
}

.stat-card.border-blue {
    border-left-color: var(--color-blue);
}

.stat-icon {
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    font-size: 2.5rem;
    opacity: 0.15;
}

.stat-icon.bottom-right {
    top: auto;
    bottom: 1rem;
    transform: none;
}

/* Video Containers */
.main-video-container {
    background-color: #000;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
}

.camera-thumbnail {
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #000;
}

.camera-thumbnail:hover {
    transform: scale(1.02);
    z-index: 10;
}

.active-cam {
    border-color: var(--color-blue);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

/* Activity List */
.recent-activity-panel {
    background: var(--bg-panel);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.activity-item {
    transition: background 0.2s;
}

.activity-item:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Scrollbar */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 10px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Modal Backdrop */
.modal-backdrop.show {
    opacity: 0.8 !important;
}

/* Animations */
.animate-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.blink-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: red;
    animation: blink 1s infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}