html, body {
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  background-color: black;
  position: relative;
  overflow: hidden;
  font-family: 'Cardo', serif;
}

canvas {
  position: fixed !important;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

#dream-text-container {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

#dream-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: min(820px, 92vw);
}

#dream-text {
  max-width: 60ch;    
  text-align: center;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  padding-left: 0.2em;
  padding-right: 0.2em;
  line-height: 1.6;
  color: white;
  text-shadow: 0 0 8px rgba(0,0,0,1);
}

#footer {
  position: absolute;
  bottom: 2.2rem;
  left: 1.6rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

#footer a {
  color: inherit;
  font-size: 14px;
  text-shadow: 0 0 10px rgba(0,0,0,0.25);
}

#footer a:hover {
  opacity: 1;
}

#dream-controls {
  position: fixed;
  left: 50%;
  top: calc(50% + 12rem);
  transform: translateX(-50%);

  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;

  padding: 1rem 1.25rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  z-index: 5;
}

#hallucination-control {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: rgb(255,255,255);
  width: min(320px, 92vw);
}

.hallucination-title {
  font-size: 0.85rem;
  opacity: 0.65;
  margin-bottom: 0.75rem;
}

.hallucination-scale-wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 1rem;
  width: 100%;
}

.hallucination-label {
  font-size: 0.75rem;
  opacity: 0.55;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hallucination-label.left {
  justify-self: end;
  text-align: right;
}

.hallucination-label.right {
  justify-self: start;
  text-align: left;
}

.hallucination-scale {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  justify-self: center;
}

.hallucination-scale input[type="radio"] {
  display: none;
}

.hallucination-scale label {
  cursor: pointer;
  display: flex;
  align-items: center;
}

.hallucination-scale label span {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hallucination-scale input[type="radio"]:checked + span {
  background: rgba(255, 190, 230, 0.92);
  box-shadow:
    0 0 7px rgba(255, 180, 230, 0.8),
    0 0 18px rgba(200, 170, 255, 0.45);
  transform: scale(1.15);
}

.hallucination-scale label:hover span {
  background: rgba(255,255,255,0.36);
}

#refresh-dream {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.42);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.75);
  padding: 0.55rem 0.8rem;
  font-size: 14px;
  font-family: 'Cardo', serif;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

#refresh-dream:hover {
  border-color: rgba(255,190,230,0.7);
  color: rgba(255,190,230,0.95);
  background: rgba(0,0,0,0.28);
}

#refresh-dream .material-symbols-outlined {
  font-size: 18px;
  opacity: 0.9;
}

#music-button {
  display: flex;
  align-items: center;
  position: fixed;
  font-size: 14px;
  top: 1.5rem;
  z-index: 10;
  right: 1.5rem;
  color: white;
  cursor: pointer;
}

#music-button span:nth-child(2){
  text-decoration: underline;
}