/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0f172a;
}

::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Glassmorphism Utilities */
.glass {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-panel {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Video Container Styles */
.video-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    background: #020617;
    overflow: hidden;
}

.video-element {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Control Overlays */
.controls-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-wrapper:hover .controls-overlay {
    opacity: 1;
}

/* PTZ Controls */
.ptz-btn {
    transition: all 0.2s ease;
}

.ptz-btn:active {
    transform: scale(0.95);
    background: rgba(99, 102, 241, 0.3);
}

/* Recording Pulse */
@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

/* Stream Status Dot */
.status-dot {
    box-shadow: 0 0 8px currentColor;
}

/* Range Slider Styling */
input[type=range] {
    -webkit-appearance: none;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    margin-top: -5px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: #334155;
    border-radius: 2px;
}

/* Connection Status Badge */
.status-connected {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
    border: 1px solid rgba(20, 184, 166, 0.3);
}

.status-disconnected {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-connecting {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-left-color: #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 6px;
}

.tooltip:hover::after {
    opacity: 1;
}