:root {
  --bg-deep: #07090f;
  --card-bg: rgba(13, 17, 28, 0.62);
  --card-border: rgba(255, 255, 255, 0.14);
  --text-main: #f3f6ff;
  --text-muted: #9aa7c7;
  --accent-cyan: #38f2ff;
  --accent-violet: #9d6bff;
  --accent-mint: #4af2a1;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#gl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* Subtle film grain for depth */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.045;
  background-image: radial-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 0);
  background-size: 24px 24px;
}

.stage {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.card {
  width: 100%;
  max-width: 540px;
  padding: 2.4rem 2.2rem;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  animation: card-float 7s ease-in-out infinite, card-enter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes card-float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-7px);
  }
}

/* Status Pill */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: rgba(56, 242, 255, 0.09);
  border: 1px solid rgba(56, 242, 255, 0.28);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-mint);
  box-shadow: 0 0 10px var(--accent-mint);
  animation: dot-pulse 1.8s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.35);
    opacity: 1;
  }
}

/* Title with subtle kinetic shimmer */
.glitch-title {
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.85rem;
  background: linear-gradient(120deg, #ffffff 15%, var(--accent-cyan) 50%, var(--accent-violet) 85%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: text-shimmer 6s linear infinite;
}

@keyframes text-shimmer {
  to {
    background-position: 200% center;
  }
}

.subtitle {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

/* Progress Bar */
.build-tracker {
  background: rgba(6, 9, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 0.95rem 1.05rem;
  margin-bottom: 1.4rem;
}

.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  color: #cbd5f0;
  margin-bottom: 0.6rem;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  width: 72%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet), var(--accent-mint));
  background-size: 200% 100%;
  animation: bar-flow 3s linear infinite;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes bar-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Status Chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
}

.chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.74rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #d6e0fa;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.chip:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 242, 255, 0.45);
}

/* Footer & Interactive Button */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.pill-btn {
  cursor: pointer;
  border: 1px solid rgba(56, 242, 255, 0.45);
  background: rgba(56, 242, 255, 0.12);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.pill-btn:hover {
  background: rgba(56, 242, 255, 0.24);
  box-shadow: 0 0 20px rgba(56, 242, 255, 0.35);
  transform: translateY(-1px);
}

.pill-btn:active {
  transform: scale(0.96);
}

@media (max-width: 480px) {
  .card {
    padding: 1.75rem 1.4rem;
  }
  .card-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
