/* ============================================================
   iSecure — Live Camera Feed Simulation
   Animated CCTV grid with scan lines, REC indicator, detection
   ============================================================ */

.live-feed-section {
  padding: var(--space-20) var(--space-6);
  background: linear-gradient(180deg, rgba(3,7,18,0.95) 0%, rgba(6,182,212,0.03) 50%, rgba(3,7,18,0.95) 100%);
  position: relative;
  overflow: hidden;
}
.live-feed-section .section-top {
  text-align: center; max-width: 600px; margin: 0 auto var(--space-12);
}
.live-feed-section .section-top h2 {
  font-size: var(--text-3xl); font-weight: 800; margin-bottom: var(--space-4);
}
.live-feed-section .section-top p { color: var(--text-secondary); }

/* Camera Grid */
.cam-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 2px solid rgba(6,182,212,0.2);
  box-shadow: 0 0 40px rgba(6,182,212,0.08), 0 20px 60px rgba(0,0,0,0.4);
  background: #000;
}

.cam-feed { position: relative; }
.cam-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: #0a0a0a;
}
.cam-img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.82;
  filter: saturate(0.75) contrast(1.05) brightness(0.9);
  animation: camFlicker 8s ease-in-out infinite;
}

/* Scan line effect */
.cam-scanline {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  z-index: 2;
}
.cam-scanline::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(6,182,212,0.3), transparent);
  animation: scanMove 4s linear infinite;
  z-index: 3;
}

/* Camera overlay (REC + label) */
.cam-overlay {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px 12px;
  z-index: 4;
}
.cam-rec {
  display: flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  color: #34d399;
  text-shadow: 0 0 6px rgba(52,211,153,0.5);
}
.cam-rec-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #34d399;
  animation: recBlink 1s ease-in-out infinite;
  box-shadow: 0 0 6px rgba(52,211,153,0.6);
}
.cam-label {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.05em;
}

/* Timestamp */
.cam-timestamp {
  position: absolute; bottom: 10px; right: 12px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: rgba(6,182,212,0.8);
  z-index: 4;
  text-shadow: 0 0 4px rgba(6,182,212,0.3);
}

/* Face detection boxes */
.cam-detect-box {
  position: absolute;
  border: 1.5px solid rgba(52,211,153,0.7);
  border-radius: 3px;
  z-index: 5;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(52,211,153,0.2);
}
.cam-detect-box::before {
  content: 'VERIFIED';
  position: absolute;
  top: -16px; left: 0;
  font-family: var(--font-mono);
  font-size: 8px; font-weight: 600;
  color: var(--accent-400);
  letter-spacing: 0.1em;
  text-shadow: 0 0 4px rgba(52,211,153,0.4);
}
.cam-detect-box::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(52,211,153,0.04);
  animation: detectPulse 2s ease-in-out infinite;
}

/* Detection box positions */
.cam-detect-1 {
  top: 25%; left: 30%; width: 55px; height: 65px;
  animation: detectDrift1 6s ease-in-out infinite;
}
.cam-detect-2 {
  top: 35%; left: 60%; width: 45px; height: 55px;
  animation: detectDrift2 7s ease-in-out infinite;
}
.cam-detect-3 {
  top: 30%; left: 45%; width: 50px; height: 60px;
  animation: detectDrift3 5s ease-in-out infinite;
}
.cam-detect-4 {
  top: 20%; left: 35%; width: 48px; height: 58px;
  animation: detectDrift1 8s ease-in-out infinite;
}

/* Footer text */
.cam-footer-text {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.cam-footer-text span {
  color: var(--primary-400);
  font-weight: 600;
}

/* === Animations === */
@keyframes scanMove {
  0% { top: -3px; }
  100% { top: 100%; }
}
@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}
@keyframes camFlicker {
  0%, 100% { opacity: 0.82; filter: saturate(0.75) contrast(1.05) brightness(0.9); }
  3% { opacity: 0.78; filter: saturate(0.7) contrast(1.08) brightness(0.87); }
  6% { opacity: 0.83; }
  50% { opacity: 0.85; filter: saturate(0.8) contrast(1.03) brightness(0.92); }
  80% { opacity: 0.8; }
}
@keyframes detectPulse {
  0%, 100% { background: rgba(52,211,153,0.04); }
  50% { background: rgba(52,211,153,0.08); }
}
@keyframes detectDrift1 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(4px, 2px); }
  50% { transform: translate(-2px, 5px); }
  75% { transform: translate(3px, -2px); }
}
@keyframes detectDrift2 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(-5px, 3px); }
  66% { transform: translate(3px, -4px); }
}
@keyframes detectDrift3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(6px, -3px); }
}

/* Corner brackets on detection boxes */
.cam-detect-box {
  background: transparent;
}
/* Fancy corner brackets using gradients */
.cam-detect-1::after,
.cam-detect-2::after,
.cam-detect-3::after,
.cam-detect-4::after {
  border-radius: 2px;
}

/* Responsive */
@media (max-width: 768px) {
  .cam-grid { grid-template-columns: 1fr; }
  .cam-screen { aspect-ratio: 16/9; }
}
