/* Bit City - a comedy crowd sandbox. Uses the sitewide tokens. */

.bc-tagline { max-width: 56ch; }
.bc-note { color: var(--muted-2); font-size: 0.9em; }

.bc-app {
  max-width: 760px;
  margin: 0 auto;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.bc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 0.5rem;
}
.bc-chaos { display: flex; align-items: center; gap: 0.6rem; flex: 1; max-width: 60%; }
.bc-chaos-label {
  font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2);
}
.bc-chaos-track {
  flex: 1; height: 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); overflow: hidden;
}
.bc-chaos-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--spray-mint), var(--spray-yellow), var(--spray-orange), var(--spray-pink));
  background-size: 300% 100%;
  transition: width 0.2s ease;
}
.bc-scenename {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--paper);
  text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.bc-stage {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  background: var(--ink);
  touch-action: none;
  aspect-ratio: 16 / 10;
}
.bc-canvas { display: block; width: 100%; height: 100%; touch-action: none; }

/* -- loading overlay while the AI builds the crowd -- */
.bc-loading {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem;
  background: rgba(10, 9, 16, 0.8); backdrop-filter: blur(3px);
}
.bc-loading[hidden] { display: none; }
.bc-loading-dots { display: flex; gap: 8px; }
.bc-loading-dots span {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--graffiti-gradient); background-size: 200% 100%;
  animation: bc-bounce 0.9s ease-in-out infinite;
}
.bc-loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.bc-loading-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bc-bounce { 0%, 100% { transform: translateY(0); opacity: 0.5; } 50% { transform: translateY(-10px); opacity: 1; } }
.bc-loading-msg { margin: 0; color: var(--muted); font-size: 0.9rem; }
@media (prefers-reduced-motion: reduce) { .bc-loading-dots span { animation: none; } }

/* -- theme box -- */
.bc-build {
  display: flex; flex-direction: column; gap: 0.55rem;
  max-width: 34rem; margin: 0.9rem auto 0;
}
.bc-build-row { display: flex; gap: 0.5rem; }
.bc-generate { flex: 1; }
.bc-surprise { white-space: nowrap; }
.bc-theme-input {
  width: 100%; min-width: 0;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius, 12px);
  color: var(--paper); padding: 0.55rem 0.9rem;
  /* >= 16px so iOS Safari doesn't auto-zoom the page on focus */
  font-size: 16px;
}
.bc-theme-input::placeholder { color: var(--muted-2); }
.bc-status { text-align: center; margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--spray-yellow); }
.bc-status[hidden] { display: none; }
.bc-examples-label { text-align: center; margin: 1rem 0 0; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-2); }

.bc-row { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin: 0.5rem 0 0; }

.bc-chip {
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--paper);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bc-chip:active { transform: translateY(1px); }
.bc-chip.is-active { border-color: var(--spray-cyan); color: var(--spray-cyan); background: rgba(47, 209, 255, 0.12); }

.bc-event {
  font-size: 0.9rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 210, 63, 0.4);
  background: rgba(255, 210, 63, 0.08);
  color: var(--spray-yellow);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem;
  -webkit-tap-highlight-color: transparent;
}
.bc-event:active { transform: translateY(1px); background: rgba(255, 210, 63, 0.2); }
.bc-event .bc-ev-icon { font-size: 1.1rem; }

.bc-hint {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-2);
  margin: 0.85rem 0 0;
}
