#camera-view {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  overflow: hidden;
  background: #000;
}

#viewfinder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#top-ui {
  position: absolute;
  top: env(safe-area-inset-top, 20px);
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}

#mode-status-container {
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px 24px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: auto;
  box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

#mode-indicator {
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.icon-btn {
  position: absolute;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.3);
}

#controls-layer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: env(safe-area-in-bottom, 30px);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  z-index: 30;
}

#bottom-ui {
  width: 100%;
  max-width: 500px;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 24px;
}

.mode-selection-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.mode-option {
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mode-option svg {
  width: 28px;
  height: 28px;
  stroke: rgba(255, 255, 255, 0.4);
  fill: none;
  transition: stroke 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.mode-option.active svg {
  stroke: #ffffff;
  opacity: 1;
}

.mode-option.active {
    transform: scale(1.25);
}

.shutter-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 4px solid #ffffff;
  background: transparent;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.2s ease;
}

.shutter-btn::after {
  content: "";
  width: 60px;
  height: 60px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.shutter-btn.recording::after {
  width: 36px;
  height: 36px;
  background-color: #ff3b30;
  border-radius: 6px;
}

#timer-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 12px; /* Increased height for modern neon look */
  background: rgba(255, 255, 255, 0.1);
  z-index: 31;
  overflow: hidden;
}

#timer-progress {
  height: 100%;
  width: 0%;
  background: #ff3b30; /* Neon Red Base */
  transition: width 0.1s linear, box-shadow 0.1s linear, filter 0.1s linear;
}

#timer-progress.is-recording {
    animation: pulse-glow 1.5s infinite ease-in-out;
}

@keyframes pulse-glow {
    0% { opacity: 0.8; filter: brightness(1); }
    50% { opacity: 1; filter: brightness(1.5); }
    100% { opacity: 0.8; filter: brightness(1); }
}

.capture-flash-overlay {
    position: fixed;
    inset: 0;
    background-color: white;
    z-index: 9999;
    animation: capture-flash-anim 0.15s ease-out forwards;
    pointer-events: none;
}

@keyframes capture-flash-anim {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
