/* ==========================================================================
   CAMERA VIEWFINDER HUD & INTERACTIVE SHUTTER OVERLAY
   Simulates a Professional Hasselblad / Sony Alpha Viewfinder
   ========================================================================== */

.camera-viewfinder-hud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.camera-viewfinder-hud.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Outer Viewfinder Frame & Crop Corner Marks */
.hud-corner {
  position: absolute;
  width: 45px;
  height: 45px;
  border-color: rgba(255, 255, 255, 0.45);
  border-style: solid;
  pointer-events: none;
}

.hud-corner.top-left {
  top: 25px;
  left: 25px;
  border-width: 2px 0 0 2px;
}

.hud-corner.top-right {
  top: 25px;
  right: 25px;
  border-width: 2px 2px 0 0;
}

.hud-corner.bottom-left {
  bottom: 25px;
  left: 25px;
  border-width: 0 0 2px 2px;
}

.hud-corner.bottom-right {
  bottom: 25px;
  right: 25px;
  border-width: 0 2px 2px 0;
}

/* 3x3 Rule-of-Thirds Grid */
.hud-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  pointer-events: none;
  opacity: 0.25;
}

.hud-grid-line-v1 {
  position: absolute;
  left: 33.33%;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
}

.hud-grid-line-v2 {
  position: absolute;
  left: 66.66%;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
}

.hud-grid-line-h1 {
  position: absolute;
  top: 33.33%;
  left: 0;
  height: 1px;
  width: 100%;
  background: rgba(255, 255, 255, 0.4);
}

.hud-grid-line-h2 {
  position: absolute;
  top: 66.66%;
  left: 0;
  height: 1px;
  width: 100%;
  background: rgba(255, 255, 255, 0.4);
}

/* Center AF Focus Box & Crosshairs */
.hud-af-box {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  transform: translate(-50%, -50%);
  border: 1.5px solid var(--cyan-accent);
  box-shadow: 0 0 15px var(--cyan-glow);
  pointer-events: none;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.hud-af-box::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--cyan-accent);
}

.hud-af-box.focus-locked {
  border-color: #4eed78;
  transform: translate(-50%, -50%) scale(0.92);
  box-shadow: 0 0 25px rgba(78, 237, 120, 0.6);
}

/* Horizon Level Indicator */
.hud-level-bar {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 1.5px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.hud-level-center {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 2px;
  height: 10px;
  transform: translateX(-50%);
  background: var(--cyan-accent);
}

/* Live Viewfinder Telemetry Header */
.hud-top-bar {
  position: absolute;
  top: 35px;
  left: 50px;
  right: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: #fff;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hud-top-left, .hud-top-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hud-badge-rec {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 75, 100, 0.25);
  border: 1px solid var(--coral-accent);
  color: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-weight: 700;
}

.hud-battery {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Live Viewfinder Telemetry Footer (Aperture, Shutter Speed, ISO, WB) */
.hud-bottom-bar {
  position: absolute;
  bottom: 35px;
  left: 50px;
  right: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #fff;
  pointer-events: auto;
}

.hud-telemetry {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: rgba(12, 16, 24, 0.7);
  padding: 0.75rem 1.75rem;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
}

.hud-telemetry-val {
  color: var(--cyan-accent);
  font-weight: 700;
}

/* Camera Physical Shutter Trigger Button */
.hud-shutter-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  pointer-events: auto;
}

.hud-shutter-btn::after {
  content: '';
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #000;
}

.hud-shutter-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.85);
}

.hud-shutter-btn:active {
  transform: scale(0.92);
}

/* Shutter Curtain Flash Effect */
.shutter-flash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
}

@keyframes shutter-snap {
  0% { opacity: 0; }
  15% { opacity: 0.95; }
  100% { opacity: 0; }
}

.shutter-flash-overlay.snap {
  animation: shutter-snap 0.35s ease-out;
}
