:root {
  --text-primary: #ffffff;
  --text-secondary: #a1a1a6;
}

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

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  color: var(--text-primary);
  font-family:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* Canvas for the hyperspace warp effect */
#warp-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
}

/* Frosted Glass Panel (VisionOS/macOS style) */
.glass-panel {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
  padding: 4rem 3rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8);
  max-width: 540px;
  width: 90%;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

/* Text element with a smooth fade transition */
#loading-text {
  color: var(--text-secondary);
  font-size: clamp(1.1rem, 3vw, 1.25rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 400px;
  line-height: 1.5;
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
  min-height: 3em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Continuous Rainbow Loading Animation */
.loader-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
  margin-top: 0.5rem;
}

.rainbow-spinner {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    #ff4b4b,
    #ff8f00,
    #f9df16,
    #34c759,
    #00c7be,
    #32ade6,
    #af52de,
    #ff4b4b
  );
  animation: spin 1.5s linear infinite;
  padding: 3px;
}

.rainbow-spinner::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: #080808;
  border-radius: 50%;
}

.rainbow-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    #ff4b4b,
    #ff8f00,
    #f9df16,
    #34c759,
    #00c7be,
    #32ade6,
    #af52de,
    #ff4b4b
  );
  filter: blur(12px);
  opacity: 0.8;
  animation: spin 1.5s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
