/* CCTV Simulator Styles */
.cctv-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cctv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}

.cctv-camera-card {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}

.cctv-camera-card:hover {
  transform: scale(1.02);
}

.cctv-camera-card.active {
  box-shadow: 0 0 0 3px #22c55e;
}

.cctv-canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
}

.cctv-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.cctv-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.cctv-timestamp {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #22c55e;
  font-family: monospace;
  font-size: 14px;
  background: rgba(0,0,0,0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

.cctv-camera-id {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #22c55e;
  font-family: monospace;
  font-size: 14px;
  background: rgba(0,0,0,0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

.cctv-rec-indicator {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ef4444;
  font-family: monospace;
  font-size: 12px;
  background: rgba(0,0,0,0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

.cctv-rec-dot {
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  animation: rec-pulse 1s infinite;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.cctv-camera-name {
  position: absolute;
  bottom: 10px;
  right: 10px;
  color: #22c55e;
  font-family: monospace;
  font-size: 12px;
  background: rgba(0,0,0,0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

/* CCTV Playback Controls */
.cctv-controls {
  background: #1a1a1a;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cctv-controls-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.cctv-buttons {
  display: flex;
  gap: 8px;
}

.cctv-btn {
  background: #333;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-family: monospace;
  font-size: 14px;
  transition: background 0.2s;
}

.cctv-btn:hover {
  background: #444;
}

.cctv-btn.active {
  background: #22c55e;
}

.cctv-speed-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cctv-speed-control label {
  color: #ccc;
  font-family: monospace;
  font-size: 14px;
}

.cctv-speed-control select {
  background: #333;
  color: #fff;
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-family: monospace;
}

.cctv-progress-bar {
  width: 100%;
  height: 8px;
  background: #333;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.cctv-progress-fill {
  height: 100%;
  background: #22c55e;
  width: 0%;
  transition: width 0.1s linear;
}

.cctv-time-display {
  display: flex;
  justify-content: space-between;
  color: #ccc;
  font-family: monospace;
  font-size: 12px;
}

/* Modal for Fullscreen Camera View */
.cctv-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 24px;
}

.cctv-modal-overlay.active {
  display: flex;
}

.cctv-modal-content {
  width: 100%;
  max-width: 1000px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.cctv-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #333;
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 1001;
}

.cctv-modal-close:hover {
  background: #444;
}
