:root{
  --ui-bg: rgba(10, 12, 20, 0.55);
  --ui-border: rgba(255,255,255,0.10);
  --ui-text: rgba(255,255,255,0.90);
  --ui-muted: rgba(255,255,255,0.65);
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #05060a;
  font-family: system-ui, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ui-text);
}

#stars {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

#space {
  position: fixed;
  inset: 0;
  z-index: 1;
}

/* Topbar */
.topbar{
  position: fixed;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  z-index: 10;
}

.logo{
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: block;
}

.meta{
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.title{
  font-weight: 750;
  letter-spacing: 0.4px;
}

.subtitle{
  font-size: 12px;
  color: var(--ui-muted);
}

/* Astronauten */
.astronaut {
  position: absolute;
  width: var(--size);
  height: var(--h);
  transform: translate(-50%, -50%);
  will-change: transform, left, top;
  filter:
    drop-shadow(0 18px 28px rgba(0,0,0,0.60))
    drop-shadow(0 0 18px rgba(120,190,255,0.10));
  animation: drift var(--driftDur) ease-in-out infinite;
}

@keyframes drift {
  0%   { transform: translate(-50%, -50%) translate3d(0, 0, 0) rotate(-2deg); }
  50%  { transform: translate(-50%, -50%) translate3d(var(--dx), var(--dy), 0) rotate(2deg); }
  100% { transform: translate(-50%, -50%) translate3d(0, 0, 0) rotate(-2deg); }
}

/* Avatar sitzt im Visorbereich */
.portrait {
  position: absolute;
  left: 22%;
  right: 22%;
  top: 9%;
  height: 34%;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.22);
  background: rgba(0,0,0,0.28);
  z-index: 1; /* wichtig: unter Suit */
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
}

/* Suit overlay */
.suit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2; /* wichtig: über Avatar */
}

.suit svg{
  width: 100%;
  height: 100%;
  display: block;
}
