html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: url("assets/wood-bg.jpg") center / cover no-repeat;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}

/* Canvas always behind UI */
canvas {
  position: absolute;
  inset: 0;
}

/* Top banner */
.topbar {
  position: absolute;
  top: 0;
  width: 100%;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;

  font-size: 16px;
  letter-spacing: 0.5px;

  z-index: 5;
  pointer-events: none;
}

.topbar .title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.topbar .version {
  position: absolute;
  right: 12px;
  font-size: 12px;
  opacity: 0.75;
}

/* Control bar */
.controls {
  position: absolute;
  bottom: 20px;
  width: 100%;
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 12px;
  box-sizing: border-box;
}

/* Labels */
.controls label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #ffffff;
  text-align: center;
}

/* Spinners */
.controls select {
  margin-top: 4px;
  padding: 4px 6px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.controls select option {
  background: #1a1a1a;
  color: #ffffff;
}

/* Buttons */
.controls button {
  padding: 6px 12px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  cursor: pointer;
}

.controls button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ---------- MODALS ---------- */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modalContent {
  background: #1a1a1a;
  color: #ffffff;
  max-width: 90%;
  width: 400px;
  max-height: 80vh;

  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 8px;
  box-sizing: border-box;
}

.modalContent h2 {
  margin-top: 0;
}

.modalContent pre {
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.5;
  overflow-y: auto;
  flex: 1;
  padding-right: 4px;
}

.modalContent video {
  width: 100%;
  max-height: 50vh;
  margin-top: 12px;
  background: black;
  border-radius: 6px;
}

.modalContent button {
  margin-top: 12px;
  width: 100%;
}

/* ---------- Creator credit ---------- */

.creator {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
}

.creator-label {
  font-size: 12px;
  opacity: 0.7;
}

.creator-name {
  font-size: 14px;
  margin-top: 4px;
}
