:root {
  --bg0: #1a0f2e;
  --bg1: #2b1248;

  --card: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.12);

  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.68);
  --muted2: rgba(255, 255, 255, 0.52);

  /* tone sesuai magenta ↔ violet */
  --accent: #ff2fb3;
  --accent2: #7b3cff;

  --shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
  --radius: 22px;

  --play: running;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Noto Sans",
    "Helvetica Neue",
    sans-serif;
  color: var(--text);

  background:
    radial-gradient(
      900px 600px at 70% 20%,
      rgba(255, 47, 179, 0.25),
      transparent 60%
    ),
    radial-gradient(
      800px 500px at 20% 80%,
      rgba(123, 60, 255, 0.25),
      transparent 60%
    ),
    linear-gradient(160deg, #2b1248, #1a0f2e);

  overflow: hidden;
}

/* background */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
#stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.bg-grid {
  position: absolute;
  inset: -2px;
  background:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(
    closest-side,
    rgba(0, 0, 0, 0.92),
    transparent 70%
  );
  opacity: 0.28;
}
.bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      700px 500px at 65% 30%,
      rgba(255, 47, 179, 0.2),
      transparent 60%
    ),
    radial-gradient(
      600px 450px at 30% 70%,
      rgba(123, 60, 255, 0.18),
      transparent 60%
    );
  filter: blur(12px);
  opacity: 0.95;
}

/* moving streak lines */
.streaks {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0.85;
}
.streak {
  position: absolute;
  left: -40%;
  width: 140%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 47, 179, 0) 30%,
    rgba(255, 47, 179, 0.22) 45%,
    rgba(123, 60, 255, 0.18) 55%,
    rgba(255, 47, 179, 0) 70%,
    transparent 100%
  );
  filter: blur(0.2px);
  transform: rotate(-12deg);
  animation: streakMove 6.5s linear infinite;
  animation-play-state: var(--play);
}
.s1 {
  top: 18%;
  animation-duration: 7.2s;
  opacity: 0.48;
}
.s2 {
  top: 30%;
  animation-duration: 6.4s;
  opacity: 0.3;
  height: 1px;
}
.s3 {
  top: 52%;
  animation-duration: 8.4s;
  opacity: 0.34;
}
.s4 {
  top: 66%;
  animation-duration: 7.8s;
  opacity: 0.24;
  height: 1px;
}
.s5 {
  top: 78%;
  animation-duration: 9.2s;
  opacity: 0.2;
}

@keyframes streakMove {
  from {
    transform: translateX(-20%) rotate(-12deg);
  }
  to {
    transform: translateX(20%) rotate(-12deg);
  }
}

/* layout */
.wrap {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
}

.card {
  width: min(760px, 92vw);
  padding: 40px 34px 26px;
  border-radius: var(--radius);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.085),
    rgba(255, 255, 255, 0.05)
  );
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: relative;
  overflow: hidden;

  /* hanya header logo + bar + footer */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

/* subtle animated border */
.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: conic-gradient(
    from 180deg,
    transparent,
    rgba(255, 47, 179, 0.18),
    transparent,
    rgba(123, 60, 255, 0.16),
    transparent
  );
  opacity: 0.28;
  filter: blur(12px);
  animation: spin 12s linear infinite;
  animation-play-state: var(--play);
}
.card::after {
  content: "";
  position: absolute;
  inset: 1px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.34));
  border-radius: calc(var(--radius) - 2px);
}
.card > * {
  position: relative;
  z-index: 2;
}

/* header logo */
.card-header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 2px;
  margin-bottom: 25px;
}
.logo-header {
  width: 30%;
  height: auto;
  opacity: 0.96;
  filter: drop-shadow(0 0 22px rgba(255, 47, 179, 0.28));
  transition:
    transform 0.45s ease,
    filter 0.45s ease;
}
.logo-header:hover {
  transform: translateY(-2px) scale(1.04);
  filter: drop-shadow(0 0 32px rgba(255, 47, 179, 0.42));
}

.card-content {
  margin-top: 40px;
  margin-bottom: 40px;
}

.equalizer {
  width: 320px;
  height: 80px;
  position: relative;
}

#waveBar {
  width: 100%;
  height: 100%;
}

.maintenance-text {
  max-width: 420px;
  margin-top: 18px;

  text-align: center;

  color: rgba(255, 255, 255, 0.65);
  font-size: 14px;
  line-height: 1.6;

  letter-spacing: 0.3px;
}

/* glow ambient tipis */
.loading-bar::before {
  content: "";
  position: absolute;
  inset: -12px;
  background: radial-gradient(
    160px 50px at 50% 50%,
    rgba(255, 47, 179, 0.18),
    rgba(123, 60, 255, 0.14),
    transparent 70%
  );
  filter: blur(12px);
  opacity: 0.55;
  pointer-events: none;
}

/* cahaya lewat (shine sweep) */
.loading-bar::after {
  content: "";
  position: absolute;
  top: -160%;
  left: -45%;
  width: 55%;
  height: 420%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.45),
    rgba(255, 47, 179, 0.22),
    transparent
  );
  transform: rotate(22deg);
  filter: blur(1px);
  opacity: 0.75;
  animation: shineSweep 2.2s linear infinite;
  animation-play-state: var(--play);
  pointer-events: none;
}

@keyframes shineSweep {
  0% {
    left: -55%;
    opacity: 0;
  }
  10% {
    opacity: 0.75;
  }
  55% {
    opacity: 0.75;
  }
  100% {
    left: 120%;
    opacity: 0;
  }
}

/* footer */
.foot {
  display: block;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 12.5px;
  letter-spacing: 0.45px;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  z-index: 20;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0px);
}
.toast-inner {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  gap: 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}
.toast-inner strong {
  color: rgba(255, 47, 179, 0.95);
  font-weight: 780;
}

/* misc animations */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  .card::before,
  .streak,
  .loading-bar::after {
    animation: none !important;
  }
}
