html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: #000;
  color: #fff;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex-shrink: 0;
  z-index: 10;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.fullscreen-active header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

body.fullscreen-active header.hidden-in-fullscreen {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

header h1 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.05em;
  color: #ddd;
}

.photo-label {
  font-size: 13px;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 6px;
}

.photo-label select {
  background: #222;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
}

.photo-label select:hover {
  border-color: #888;
}

.load-status {
  font-size: 12px;
  color: #888;
  font-style: italic;
}

.toolbar-button {
  background: #222;
  color: #fff;
  border: 1px solid #555;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
}

.toolbar-button:hover {
  border-color: #888;
}

.toolbar-button-active {
  background: rgba(200, 200, 200, 0.9);
  color: #000;
  border-color: rgba(255, 255, 255, 0.95);
}

.toolbar-button:disabled {
  opacity: 0.5;
  cursor: default;
}

.source-link {
  margin-left: auto;
  color: #8f8f8f;
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.source-link:hover {
  color: #cfcfcf;
  text-decoration: underline;
}

main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

#glcanvas {
  flex: 1 1 auto;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  background: #111;
}

#glcanvas:active {
  cursor: grabbing;
}

/* "Drag to look around" hint — fades out after first interaction */
.hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: #ccc;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 20px;
  pointer-events: none;
  transition: opacity 0.5s;
  z-index: 50;
}

.hint.hidden {
  opacity: 0;
}

/* VR button */
#vrButtonContainer {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  pointer-events: auto;
}

.vr-button {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.vr-button:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
}

.vr-button-active {
  background: rgba(180, 40, 40, 0.9);
  border-color: rgba(255, 120, 120, 0.8);
}

.vr-button-active:hover {
  background: rgba(220, 60, 60, 0.95);
  color: #fff;
}
