
:root {
  --primary: #022e5c;
  --secondary: #00c5ff;
}

html, body {
  margin: 0;
  overscroll-behavior: none;
  height: 100dvh;
  overflow: clip; /* avoids scrollbars without layout jank */
  transition: background 0.3s;
  background: var(--primary);
}

/*
Main content is set to take the entire screen and overlay the 
background container effects. Also makes html more readable in
development
*/
#content {
  position: relative;
  z-index: 1;
  color: white;
  text-align: center;
  font-family: sans-serif;
  height:100%;
  width: 100%;
}

/*
Universal glass panels
*/
.panel{
  box-shadow: 0 0 20px rgba(0, 197, 255, 0.1);
  backdrop-filter: blur(13px) saturate(200%);
  -webkit-backdrop-filter: blur(13px) saturate(200%);
  background-color: rgba(17, 25, 40, 0);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.125);
}


/*
Universal icons and images
*/

/*LOADING ICON & ANIMATION*/
.loading-icon {
  width: 25px;
  height: 25px;
  background-color: black;

  /* mask (both prefixes) */
  -webkit-mask: url("/icons/loading-icon.svg") center / contain no-repeat;
  mask: url("/icons/loading-icon.svg") center / contain no-repeat;

  /* valid animation shorthand: name duration timing-function iteration-count */
  animation: spinner-rotate 1s linear infinite;
  display: inline-block;
  will-change: transform;
}

.checkmark {
  width: 25px;
  height: 25px;
  background-color: black;

  /* mask (both prefixes) */
  -webkit-mask: url("/icons/loading-icon.svg") center / contain no-repeat;
  mask: url("/icons/loading-icon.svg") center / contain no-repeat;

  /* valid animation shorthand: name duration timing-function iteration-count */
  display: inline-block;
  will-change: transform;
}

@keyframes spinner-rotate { to { transform: rotate(360deg); } }

/*NOTIFICATIONS*/
/* === Toast (notification) overlays === */
:root {
  --ok:    #00e2a9;
  --error: #ff4d6d;
}

/* Host that pins to top; clicks pass through except the toasts themselves */
#toast-host {
  position: fixed;
  z-index: 9999;
  inset: 8px 8px auto 8px;      /* top:8px; left/right:8px */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

/* Each toast reuses your glass .panel + .fade; add layout + animation */
.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 12px;

  max-width: min(720px, 100%);
  width: max-content;
  padding: 10px 12px;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,0.25);

  /* slide/fade in (pairs with your .fade/.fade.show) */
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  background: linear-gradient(
    135deg,
    rgba(17,25,40,0.45),
    rgba(17,25,40,0.25)
  ); /* keep the “glass” feel over your backdrop-filter */
}

/* when .show is added (you already have .fade/.fade.show defined) */
.toast.show {
  transform: translateY(0);
}

/* subtle accent line and border color based on state */
.toast-ok {
  border-color: color-mix(in srgb, var(--secondary) 50%, #ffffff 50%);
  box-shadow:
    0 0 20px rgba(0, 197, 255, 0.10),
    0 0 0 3px color-mix(in srgb, var(--secondary) 25%, transparent 75%) inset;
}

.toast-error {
  border-color: color-mix(in srgb, var(--error) 60%, #ffffff 40%);
  box-shadow:
    0 0 24px color-mix(in srgb, var(--error) 30%, transparent 70%),
    0 0 0 3px color-mix(in srgb, var(--error) 25%, transparent 75%) inset;
}

/* message text cell */
.toast .toast-text {
  justify-self: start;
  white-space: pre-wrap;
}

/* close button */
.toast .toast-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 8px;
  opacity: 0.9;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.toast .toast-close:hover {
  opacity: 1;
  transform: scale(1.05);
  background: rgba(255,255,255,0.06);
}


/*
Universal Effects
*/
.fade {
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.fade.show {
  opacity: 1;
}


/*
Background
*/
#background-container {
  z-index: 0;
  position: absolute;
  height: 100%;
  width: 100%;
}

.background-beam {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
  width: 150px;
  height: 150px;
  opacity: 0;
  animation: beam-fade 8s infinite alternate;
  transition: background 0.3s;
  pointer-events: none;
}

@keyframes beam-fade {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(0);
    filter: blur(20px);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.2) translateY(-100px);
    filter: blur(50px);
  }
  100% {
    opacity: 0;
    transform: scale(1) translateY(0);
    filter: blur(20px);
  }
}


