* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

#map {
  position: absolute;
  inset: 0;
  background: #FAFAF8;
}

#search-bar {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  width: min(480px, calc(100vw - 32px));
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

#search-input {
  flex-grow: 1;
  padding: 10px 14px;
  font-size: 15px;
  border: none;
  outline: none;
  background: #fff;
  color: #222;
}

#search-input::placeholder {
  color: #999;
}

#search-btn {
  padding: 10px 18px;
  font-size: 15px;
  border: none;
  cursor: pointer;
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  transition: background 0.15s;
}

#search-btn:hover {
  background: #1d4ed8;
}

#camera-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: none;
  background: #000;
  color: #fff;
  z-index: 2000;
  padding: 0;
}

#camera-modal[open] {
  display: block;
}

#camera-modal::backdrop {
  background: transparent;
}

#modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  z-index: 1;
  border-radius: 4px;
  padding: 4px 8px;
}

#modal-body {
  position: relative;
  width: 100%;
  height: 100%;
}

#modal-body video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

#video-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#video-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#video-caption {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1rem;
  font-family: monospace;
}

#video-status {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  font-family: monospace;
  min-height: 1.4em;
}
