/* ===== BASE ===== */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #e9dec9;
}

/* ===== CANVASES ===== */
canvas {
  position: fixed;
  inset: 0;
  display: block;
}

/* WebGL layer */
#canvas {
  z-index: 0;
}

/* Overlay layer (glyphs) */
#overlay {
  z-index: 1;
  pointer-events: none;
  background: transparent;
}

/* ===== VIGNETTE ===== */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;

  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.25) 100%
  );
}

/* ===== COUNTDOWN ===== */
#countdown {
  position: fixed;
  bottom: 24px;
  right: 32px;
  z-index: 3;

  font-family: sans-serif;
  font-size: 14px;
  letter-spacing: 0.05em;

  color: rgba(0, 0, 0, 0.7);

  pointer-events: none;
  user-select: none;
}

#code-entry input {
  width: calc((100% - 24px) / 5);  /* 5 slots, 6px gap each side */

  height: 36px;

  text-align: center;
  font-size: 18px;

  background: transparent;

  border: none;
  border-bottom: 2px solid;

  outline: none;
  color: black;

  pointer-events: auto;
}

#code-entry .slots {
  display: flex;
  gap: 6px;
  width: 100%;

  margin-bottom: 14px;   /* ← spacing lives here */
}

#code-entry {
  position: fixed;

  top: 32px;
  right: 32px;

  width: calc(18vmin);
  margin-top: calc(18vmin + 12px);

  display: flex;
  flex-direction: column;   /* ← key change */
  align-items: stretch;     /* makes children full width */

  z-index: 2;

  pointer-events: none;
}

/* colour mapping */
#code-entry input:nth-child(1) { border-color: #ff3b3b; }
#code-entry input:nth-child(2) { border-color: #d93eff; }
#code-entry input:nth-child(3) { border-color: #2ecc71; }
#code-entry input:nth-child(4) { border-color: #1adee2; }
#code-entry input:nth-child(5) { border-color: #ffbc00; }

#code-entry[hidden] {
  display: none !important;
}

#code-submit {
  display: none;

  width: 100%;
  padding: 6px 0;

  background: transparent;
  border: none;

  border-top: 1px solid rgba(0,0,0,0.15);

  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;

  color: rgba(0,0,0,0.6);

  cursor: pointer;
  pointer-events: auto;

  transition: color 0.15s ease, border-color 0.15s ease;
}

#code-submit:hover {
  color: rgba(0,0,0,0.85);
  border-color: rgba(0,0,0,0.35);
}

#code-submit:active {
  color: rgba(0,0,0,1);
}

#code-submit:hover {
  background: rgba(0,0,0,0.14);
}

#code-submit {
  display: none;

  margin-top: 10px;
  width: 100%;

  padding: 8px 0;

  background: rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 4px;

  font-size: 14px;
  letter-spacing: 0.05em;

  cursor: pointer;
  pointer-events: auto;

  transition: background 0.15s ease, transform 0.1s ease;
}

#code-submit:hover {
  background: rgba(0,0,0,0.14);
}

#code-submit:active {
  transform: translateY(1px);
}

#code-submit {
  display: none;
}


/* ===== VOLUME SLIDER (VISIBLE BUT CLEAN) ===== */

#volume {
  -webkit-appearance: none;
  appearance: none;

  width: 140px;
  height: 3px;

  background: rgba(255,255,255,0.5); /* stronger base */
  border-radius: 2px;
  outline: none;

  transition: background 0.2s ease, box-shadow 0.2s ease;
}

#volume:hover {
  background: rgba(255,255,255,0.75);
  box-shadow: 0 0 6px rgba(255,255,255,0.4);
}

#volume::-webkit-slider-thumb {
  -webkit-appearance: none;

  width: 12px;
  height: 12px;
  border-radius: 50%;

  background: rgba(255,255,255,0.95);
  border: none;

  cursor: pointer;

  box-shadow: 0 0 6px rgba(255,255,255,0.5);

  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

#volume:hover::-webkit-slider-thumb {
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
}

#volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;

  background: rgba(255,255,255,0.95);
  border: none;

  box-shadow: 0 0 6px rgba(255,255,255,0.5);

  cursor: pointer;
}
