@font-face {
    font-family: "Blockletter";
    src: url("./Blockletter.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: "Blockletter", sans-serif;
  overflow: hidden;
}

.hidden {
    display: none; !important;
}

/* Vanta attaches to this element */
#background {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #05061d;
}

/* Overlay that holds canvas + UI */
#overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Canvas */

#circlesCanvas {
  width: 100%;   /* bigger canvas */
  height: 100%;
  display: block;

  /* remove circular clipping so the full canvas is visible */
  border-radius: 0;

  /* allow click detection */
  pointer-events: auto;

  /* ensure it sits above VANTA */
  position: relative;
  z-index: 5;
}


/* Single simple control in corner */
.corner-btn {
  position: absolute;
  padding: 8px 16px;
  border-radius: 100%;
  border: none;
  background: rgba(8, 16, 48, 0.86);
  color: #f6f7ff;
  font-size: 22px;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  transition: background 0.12s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

.corner-btn:hover {
  background: rgba(40, 64, 124, 0.96);
  box-shadow: 0 0 18px rgba(100, 140, 255, 0.55);
}

.corner-btn:active {
  transform: translateY(1px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

/* About button in bottom-right */
#aboutBtn {
  right: 16px;
  bottom: 16px;
}

/* Music button in bottom-left */
.music-btn {
  left: 16px;
  bottom: 16px;
}

/* ------------------------- */
/* MODAL */
/* ------------------------- */

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 20;
}

.modal-content {
  background: rgba(18,22,40,0.95);
  padding: 40px 60px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.45);
}

.modal-content h1 {
  font-size: 48px;
  margin-bottom: 18px;
}

.modal-content p {
  font-size: 26px;
  line-height: 1.4;
  margin-bottom: 30px;
}

.modal-reset-btn,
.modal-close-btn {
  font-family: "Blockletter";
  font-size: 26px;
  padding: 10px 30px;
  margin: 10px;
  border: none;
  cursor: pointer;
}

.modal-reset-btn {
  background: #ff5c5c;
  color: white;
}

.modal-close-btn {
  background: #4a89ff;
  color: white;
}

.sc-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* MUSIC SLIDER */

.music-slider {
    position: absolute;
    left: 16px;
    bottom: 16px;
    width: 150px;
    height: 40px;
    background: rgba(8, 16, 48, 0.86);
    border-radius: 18px;
    box-shadow: 0 0 12px rgba(0,0,0,0.5);
    pointer-events: auto;
    display: flex;
    align-items: center;
    padding: 0 10px;
    cursor: pointer;
    z-index: 1000;
}

.music-slider-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.15);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* key change: width driven by --fillWidth */
.music-slider-track::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--fillWidth, 0%);
    background: rgba(100,140,255,0.85);
    border-radius: 3px;
    transition: width 0.1s linear;
}

.music-slider-thumb {
    width: 28px;
    height: 28px;
    margin-left: 10px;
    background: rgba(8, 16, 48, 0.86);
    border-radius: 100%;
    color: #f6f7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 0 12px rgba(0,0,0,0.5);
    transition: background 0.12s ease, transform 0.08s ease, box-shadow 0.12s ease;
}

.music-slider-thumb:hover {
    background: rgba(40, 64, 124, 0.96);
    box-shadow: 0 0 18px rgba(100, 140, 255, 0.55);
}

.music-muted {
    position: relative;
}

.music-muted::after {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 50%;
    height: 2px;
    background: #f6f7ff;
    transform: translateY(-50%) rotate(-20deg);
    pointer-events: none;
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f6f6ff;
  z-index: 20;
}

/* About panel styled like the tooltip card */
.modal-content.about-panel {
  background: rgba(10, 10, 20, 0.95);
  padding: 28px 32px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(200, 230, 255, 0.98);
  text-align: left;
  font-family: "Blockletter", sans-serif;
}

/* Title and text hierarchy similar to tooltip aesthetics */
.about-title {
  font-size: 32px;
  margin-bottom: 10px;
  letter-spacing: 1px;
  color: #f6f6ff;
}

.about-subtitle {
  font-size: 18px;
  margin-bottom: 12px;
  color: #d0d0ff;
}

.about-text {
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 10px;
  color: #f6f6ff;
}

.about-music {
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 18px;
  color: #d0d0ff;
}

.about-music a {
  color: #ffd2ff;
  text-decoration: underline;
}

.about-music a:hover {
  color: #ffffff;
}

/* Buttons row layout */
.about-buttons-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 4px;
}

/* Button base style, matching tooltip border / color logic */
.modal-reset-btn,
.modal-close-btn,
.about-btn {
  font-family: "Blockletter", sans-serif;
  font-size: 18px;
  padding: 8px 20px;
  border: 1px solid rgba(200, 230, 255, 0.8);
  cursor: pointer;
  background: rgba(15, 20, 40, 0.98);
  color: #f6f6ff;
  transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}

.about-btn:hover {
  background: rgba(40, 64, 124, 0.96);
  box-shadow: 0 0 14px rgba(100, 140, 255, 0.7);
}

.about-btn:active {
  transform: translateY(1px);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

/* Variant buttons */
.about-btn.primary {
  background: rgba(40, 64, 124, 0.96);
  border-color: rgba(200, 230, 255, 0.95);
}

.about-btn.danger {
  background: rgba(120, 30, 40, 0.95);
  border-color: rgba(255, 140, 160, 0.9);
}

.about-btn.danger:hover {
  background: rgba(160, 40, 52, 0.98);
  box-shadow: 0 0 16px rgba(255, 140, 160, 0.8);
}

.about-toggle-row {
  margin: 1.5rem 0 0.75rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.about-toggle-text {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* Simple switch-style toggle */

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(112, 255, 163, 0.7);
  box-shadow: 0 0 10px rgba(112, 255, 163, 0.8);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.dev-hud {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 12px;
    color: #f6f7ff;
    font-size: 18px;
    box-shadow: 0 0 12px rgba(0,0,0,0.5);
    z-index: 1000;
    pointer-events: none;
    user-select: none;
}

