/* Animisha Vibes — fullscreen Milkdrop / runic vision HUD */

html.vibes-root,
html.vibes-root body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #020108;
}

.vibes-page {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #020108;
  color: #c8f7ff;
  font-family: "Orbitron", "Segoe UI", system-ui, sans-serif;
}

#vibes-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.vibes-hud {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.5rem;
  max-width: min(98vw, 900px);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: rgba(4, 8, 18, 0.78);
  border: 1px solid rgba(0, 245, 212, 0.35);
  box-shadow:
    0 0 24px rgba(0, 245, 212, 0.12),
    inset 0 0 20px rgba(120, 60, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.vibes-auto-hint {
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(0, 245, 212, 0.75);
  flex-shrink: 0;
}

.vibes-auto-hint.is-off {
  color: rgba(200, 247, 255, 0.45);
}

.vibes-hud__brand {
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(200, 247, 255, 0.75);
  padding-right: 0.4rem;
  margin-right: 0.1rem;
  border-right: 1px solid rgba(0, 245, 212, 0.22);
  flex-shrink: 0;
  white-space: nowrap;
}

.vibes-hud button {
  font-family: inherit;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e8fffe;
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.4);
  border-radius: 999px;
  padding: 0.38rem 0.62rem;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
  white-space: nowrap;
}

.vibes-hud button:hover,
.vibes-hud button:focus-visible {
  background: rgba(0, 245, 212, 0.18);
  box-shadow: 0 0 14px rgba(0, 245, 212, 0.25);
  outline: none;
}

.vibes-hud button[aria-pressed="true"] {
  background: rgba(255, 100, 200, 0.2);
  border-color: rgba(255, 120, 220, 0.55);
}

#vibes-preset-hold[aria-pressed="true"] {
  background: rgba(255, 180, 80, 0.22);
  border-color: rgba(255, 200, 120, 0.55);
}

body.wave-needs-gesture #vibes-wave-toggle,
body.wave-needs-gesture #radio-toggle {
  animation: vibes-wave-pulse 1.6s ease-in-out infinite;
  border-color: rgba(120, 255, 220, 0.75);
}

@keyframes vibes-wave-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(120, 255, 220, 0.35); }
  50% { box-shadow: 0 0 14px 3px rgba(120, 255, 220, 0.45); }
}

.vibes-preset-label {
  font-size: 0.54rem;
  letter-spacing: 0.05em;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 34vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(200, 247, 255, 0.65);
  text-align: center;
}

.vibes-preset-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 1, 8, 0.55);
}

.vibes-preset-overlay[hidden] {
  display: none !important;
}

.vibes-preset-overlay__panel {
  width: min(96vw, 480px);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(0, 245, 212, 0.35);
  background: rgba(4, 8, 18, 0.92);
  box-shadow: 0 0 30px rgba(0, 245, 212, 0.15);
}

.vibes-preset-overlay__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.vibes-preset-overlay__close {
  font-family: inherit;
  font-size: 0.75rem;
  color: #e8fffe;
  background: transparent;
  border: 1px solid rgba(0, 245, 212, 0.35);
  border-radius: 999px;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
}

.vibes-preset-search {
  width: 100%;
  font-family: inherit;
  font-size: 0.72rem;
  color: #e8fffe;
  background: rgba(0, 245, 212, 0.06);
  border: 1px solid rgba(0, 245, 212, 0.28);
  border-radius: 0.65rem;
  padding: 0.45rem 0.65rem;
}

.vibes-preset-listbox {
  overflow: auto;
  display: grid;
  gap: 0.35rem;
  padding-right: 0.15rem;
}

.vibes-preset-pick {
  font-family: inherit;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-align: left;
  color: rgba(232, 255, 254, 0.9);
  background: rgba(0, 245, 212, 0.06);
  border: 1px solid rgba(0, 245, 212, 0.22);
  border-radius: 0.55rem;
  padding: 0.42rem 0.55rem;
  cursor: pointer;
}

.vibes-preset-pick:hover,
.vibes-preset-pick:focus-visible {
  background: rgba(0, 245, 212, 0.16);
  outline: none;
}

.vibes-status {
  position: fixed;
  top: max(0.85rem, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: none;
  color: rgba(200, 247, 255, 0.82);
  pointer-events: none;
  max-width: min(96vw, 720px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.vibes-exit {
  position: fixed;
  top: max(0.75rem, env(safe-area-inset-top));
  left: max(0.75rem, env(safe-area-inset-left));
  z-index: 11;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(200, 247, 255, 0.8);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 245, 212, 0.28);
  background: rgba(4, 8, 18, 0.45);
}

.vibes-exit:hover {
  color: #fff;
  border-color: rgba(0, 245, 212, 0.55);
}

/* Fullscreen chrome autohide — 5s idle, mouse/touch reveals */
.vibes-hud,
.vibes-status,
.vibes-exit {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

body.vibes-fs-chrome-hidden .vibes-hud {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(0.65rem);
}

body.vibes-fs-chrome-hidden .vibes-status,
body.vibes-fs-chrome-hidden .vibes-exit {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Reveal chrome while hidden class is removed (mousemove / touch / key) */
body:not(.vibes-fs-chrome-hidden) .vibes-hud,
body:not(.vibes-fs-chrome-hidden) .vibes-status,
body:not(.vibes-fs-chrome-hidden) .vibes-exit {
  visibility: visible;
}

/* Hidden wave-player chrome — HUD drives WAVE */
.vibes-page .radio-bar,
.vibes-page .radio-bar-wrap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
}

@media (max-width: 640px) {
  .vibes-hud {
    flex-wrap: wrap;
    width: min(96vw, 400px);
    border-radius: 1rem;
    justify-content: center;
  }
  .vibes-hud__brand {
    width: 100%;
    text-align: center;
    border-right: none;
    padding-right: 0;
    margin-right: 0;
  }
}
