/* Professional Nikon-Style DSLR HUD Camera Screen Styling - LiveCam Studio */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&display=swap');

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #000;
  touch-action: manipulation;
  position: fixed;
  inset: 0;
  font-family: 'Roboto Mono', 'Courier New', Courier, monospace;
}

.camera-wrapper {
  position: fixed;
  inset: 0;
  width: 100dvw;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000;
  transition: border-color 0.2s ease;
  overflow: hidden;
  background: #000;
}

/* Nikon-style Tally Borders (thin, clean, high-visibility line) */
.camera-wrapper.tally-live {
  border-color: #ef4444;
}

.camera-wrapper.tally-preview {
  border-color: #eab308;
}

.camera-wrapper.tally-off {
  border-color: #111317;
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(1);
}

.camera-video.flipped {
  transform: scaleX(-1);
}

/* Rule of Thirds Grid Overlay */
.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  display: none; /* Controlled by Javascript */
}

.grid-overlay.active {
  display: block;
}

.grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.18);
}

.grid-h1 {
  top: 33.33%;
  left: 0;
  right: 0;
  height: 1px;
}

.grid-h2 {
  top: 66.66%;
  left: 0;
  right: 0;
  height: 1px;
}

.grid-v1 {
  left: 33.33%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.grid-v2 {
  left: 66.66%;
  top: 0;
  bottom: 0;
  width: 1px;
}

/* Tally HUD Lamp (Top Center) */
.tally-banner {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 16px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 10;
  background: #000;
  border: 1px solid #2a303d;
  color: #a0aec0;
  font-family: 'Roboto Mono', monospace;
  transition: all 0.2s ease;
}

.tally-banner.state-live {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.tally-banner.state-preview {
  background: #eab308;
  color: #000;
  border-color: #eab308;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.5);
}

.tally-banner.state-off {
  background: #111317;
  color: #4b5563;
  border-color: #2a303d;
}

/* Nikon Viewfinder Info Overlays (Top Left & Top Right) */
.info-overlay, .hud-top-right {
  position: absolute;
  top: 16px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.7);
  padding: 6px 12px;
  border: 1px solid #1f242e;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a0aec0;
}

.info-overlay {
  left: 16px;
}

.hud-top-right {
  right: 16px;
}

.hud-label {
  color: #6b7280;
  font-weight: 700;
}

.hud-value {
  color: #fff;
  font-weight: 500;
}

.hud-separator {
  color: #2a303d;
}

/* Nikon vertical VU meter (Viewfinder style) */
.vu-overlay {
  position: absolute;
  left: 16px;
  bottom: 24px;
  width: 6px;
  height: 140px;
  background: #08090b;
  border: 1px solid #1f242e;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  z-index: 10;
}

.vu-overlay-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(0deg, #22c55e 60%, #eab308 85%, #ef4444 100%);
  transition: height 0.08s ease-out;
}

/* Minimalist Controls Bar at Bottom */
.controls-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  background: rgba(8, 9, 11, 0.9);
  border: 1px solid #1f242e;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.control-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #1f242e;
  background: #111317;
  color: #a0aec0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.control-btn:hover {
  color: #fff;
  background: #1c1f26;
  border-color: #2d3748;
}

.control-btn:active {
  transform: scale(0.95);
}

.control-btn.active {
  background: #2a303d;
  color: #fff;
  border-color: #4a5568;
}

.control-btn.muted {
  background: #7f1d1d;
  color: #fca5a5;
  border-color: #b91c1c;
}

/* Modal Settings styling */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  width: 90%;
  max-width: 380px;
  padding: 24px;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal-box {
  transform: scale(1);
}
