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

    body {
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      background: rgba(128, 128, 128, 0.151);
      min-height: 100vh;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 20px;
    }

    .container {
      background: rgba(255, 255, 255, 0.95);
      border-radius: 20px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
      padding: 40px;
      max-width: 800px;
      width: 100%;
      backdrop-filter: blur(10px);
    }

    .title-qr {
      text-align: center;
      color: #333;
      margin-bottom: 30px;
      font-size: 3.5em;
      background: gray;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .video-container {
      position: relative;
      width: 100%;
      max-width: 640px;
      min-height: 300px;
      margin: 0 auto 20px;
      border-radius: 15px;
      overflow: hidden;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
      display: flex;
      align-items: center;
      justify-content: center;
      background: #000;
    }

    #video {
      width: 100%;
      height: auto;
      display: block;
      background: #000;
      object-fit: contain;
      transform: scale(2);
      transform-origin: center center;
    }

    #canvas {
      display: none;
    }

    .controls {
      display: flex;
      gap: 15px;
      justify-content: center;
      margin-bottom: 30px;
      flex-wrap: wrap;
    }

    button {
      padding: 15px 30px;
      font-size: 16px;
      font-weight: 600;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    button:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    button:active {
      transform: translateY(0);
    }

    #startBtn {
      background: green;
      color: white;
    }

    #stopBtn {
      background: red;
      color: white;
    }

    #stopBtn:disabled,
    #startBtn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
    }

    .status {
      text-align: center;
      padding: 15px;
      border-radius: 10px;
      margin-top: 20px;
      font-weight: 500;
      transition: all 0.3s ease;
    }

    .status.info {
      background: #e3f2fd;
      color: #1976d2;
    }

    .status.success {
      background: #e8f5e9;
      color: #388e3c;
    }

    .status.error {
      background: #ffebee;
      color: #d32f2f;
    }

    .status.scanning {
      background: #fff3e0;
      color: #f57c00;
      animation: pulse 2s infinite;
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1;
      }

      50% {
        opacity: 0.7;
      }
    }

    .loader {
      display: inline-block;
      width: 20px;
      height: 20px;
      border: 3px solid rgba(255, 255, 255, 0.3);
      border-radius: 50%;
      border-top-color: #667eea;
      animation: spin 1s linear infinite;
      margin-right: 10px;
    }

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



    .camera-selector {
      margin: 0 auto 20px;
      max-width: 640px;
      padding: 15px 20px;
      background: rgba(0, 0, 255, 0.363);
      border-radius: 15px;
    }

    .camera-selector label {
      display: block;
      font-weight: 600;
      color: #555;
      margin-bottom: 8px;
      font-size: 14px;
    }

    .camera-selector select {
      width: 100%;
      padding: 12px 15px;
      border: 2px solid #667eea;
      border-radius: 10px;
      font-size: 15px;
      background: white;
      color: #333;
      cursor: pointer;
      transition: all 0.3s ease;
    }

    .camera-selector select:hover {
      border-color: #764ba2;
      box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
    }

    .camera-selector select:focus {
      outline: none;
      border-color: #764ba2;
      box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
    }

    @media (max-width: 600px) {
      .container {
        padding: 15px;
      }

      h1 {
        font-size: 1.5em;
        margin-bottom: 20px;
      }

      .video-container {
        max-width: 100%;
        min-height: 200px;
        max-height: 40vh;
        margin-bottom: 15px;
      }

      #video {
        width: 100%;
        height: 100%;
        max-height: 40vh;
        object-fit: cover;
      }

      .controls {
        gap: 10px;
      }

      button {
        padding: 10px 20px;
        font-size: 14px;
        width: 45%;
      }
    }

    .swal-text-wrap {
      word-wrap: break-word;
      word-break: break-all;
      white-space: pre-wrap;
      font-family: 'Courier New', monospace;
      text-align: left !important;
    }