* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: Arial, sans-serif;
  padding: 1em;
  margin: 0;
  background: #f5f5f5;
  color: #333;
}
h1, h2 { text-align: center; }
section { margin-bottom: 2em; }
#galleryList button {
  margin: 5px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}
#galleryList button:hover { background: #f0f0f0; }
#status { text-align: center; color: #0a7; }

.fullscreen-mode h1,
.fullscreen-mode #upload,
.fullscreen-mode #modelGallery,
.fullscreen-mode #viewer > h2,
.fullscreen-mode #status {
  display: none !important;
}

#arContainer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 9990;
  display: none;
}

#closeViewerBtn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  font-size: 2rem;
  line-height: 1;
  padding: 4px 14px 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  border: 1px solid #444;
  border-radius: 8px;
  cursor: pointer;
  display: none;
}

#arContainer video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

#arContainer model-viewer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: transparent;
}

.fullscreen-mode #arContainer { display: block; }
.fullscreen-mode #closeViewerBtn { display: inline-block; }
