  body {
      font-family: Arial, sans-serif;
      margin: 0;
      background: #fafafa;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
  }

  header {
      background: #6200ee;
      color: white;
      padding: 15px;
      text-align: center;
      font-size: 20px;
  }

  main {
      flex: 1;
      padding: 10px;
      overflow-y: auto;
  }

  #collection {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 10px;
      justify-items: center;
  }

  .card-item {
      cursor: pointer;
  }

  .card-item img {
      width: 100%;
      height: auto;
      display: block;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
      border-radius: 5px;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .card-item:hover img {
      transform: translateY(-5px);
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  }

  .card-item.zoomed {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      /* center */
      z-index: 1000;
  }

  .card-item.zoomed img {
      width: auto;
      /* preserve original aspect ratio */
      height: auto;
      max-width: 90vw;
      /* never exceed 90% of viewport width */
      max-height: 90vh;
      /* never exceed 90% of viewport height */
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
      /* optional stronger shadow */
  }

  .fab {
      position: fixed;
      right: 20px;
      bottom: 20px;
      width: 56px;
      height: 56px;
      border-radius: 50%;
      background-color: #6200ee;
      color: white;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 32px;
      cursor: pointer;
      box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
      z-index: 1100;
  }

  #camera-container {
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(255, 255, 255, 0.95);
      z-index: 1000;
  }

  video {
      width: 100%;
      max-width: 400px;
      background: black;
      border-radius: 0;
  }

  #camera-buttons {
      margin-top: 10px;
      display: flex;
      gap: 10px;
  }

  #camera-buttons button {
      padding: 10px 20px;
      font-size: 16px;
      border-radius: 6px;
      cursor: pointer;
      border: none;
      background-color: #6200ee;
      color: white;
      transition: background 0.2s ease;
  }

  #camera-buttons button:hover {
      background-color: #4500b5;
  }

  #toast {
      visibility: hidden;
      min-width: 200px;
      background-color: #f44336;
      color: white;
      text-align: center;
      border-radius: 4px;
      padding: 12px;
      position: fixed;
      z-index: 2000;
      left: 50%;
      bottom: 30px;
      transform: translateX(-50%);
      font-size: 15px;
  }

  #toast.show {
      visibility: visible;
      animation: fadein 0.5s, fadeout 0.5s 2.5s;
  }

  @keyframes fadein {
      from {
          bottom: 0;
          opacity: 0;
      }

      to {
          bottom: 30px;
          opacity: 1;
      }
  }

  @keyframes fadeout {
      from {
          bottom: 30px;
          opacity: 1;
      }

      to {
          bottom: 0;
          opacity: 0;
      }
  }