
  /* The Overlay Background */
  .webcam-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex; justify-content: center; align-items: center;
    z-index: 99999; /* Ensure it stays completely above the Ruffle canvas */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  }
  /* The Popup Box */
  .webcam-modal {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    max-width: 640px; width: 90%;
  }
  /* Video Stream Viewport */
  .webcam-video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background: #000;
    transform: scaleX(-1); /* Mirrors the video for a natural preview experience */
  }
  /* Action Buttons Container */
  .webcam-controls {
    margin-top: 15px;
    display: flex; justify-content: center; gap: 12px;
  }
  .webcam-btn {
    padding: 10px 20px; border: none; border-radius: 6px;
    font-size: 14px; font-weight: bold; cursor: pointer;
    transition: background 0.2s;
  }
  .btn-capture { background: #00cc66; color: #fff; }
  .btn-capture:hover { background: #00aa55; }
  .btn-close { background: #ff3333; color: #fff; }
  .btn-close:hover { background: #cc0000; }
