html, body {
  margin: 0;
  padding: 0;
  background-color: rgb(28, 28, 28);
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: scale(.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-fade-in {
  animation: fade-in .6s ease-out forwards;
}

.imgbox {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 16px;
  background-color: transparent;
  box-shadow: none;
}

.speech {
  background-color: #3b4a3e;
  color: #f3f3f3;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.4);
}

@media (prefers-color-scheme: dark) {
  html, body {
    background-color: rgb(28, 28, 28);
  }
  .speech {
    background-color: #2d3a2e;
    color: #e9e9e9;
  }
  .imgbox {
    border-color: rgb(255, 255, 255);
    background-color: #253326;
  }
}

:root {
  --green-dark: #2e402f;
  --green: #3b4a3e;
  --text-light: #f3f3f3;
}

.clothes-panel {
  background-color: var(--green);
  color: var(--text-light);
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.45);
  box-shadow: 0 6px 24px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.25);
}

.clothes-panel .text-sm {
  color: var(--text-light) !important;
}

.clothes-panel .text-xs {
  color: rgba(255,255,255,.85) !important;
}

.clothes-panel .imgbox {
  background-color: var(--green-dark);
  border-color: rgba(255,255,255,.18);
  box-shadow: inset 0 0 8px rgba(0,0,0,.35);
}

.btn-primary {
  background-color: var(--green-dark);
  color: #fff;
  transition: filter .15s ease, transform .04s ease;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(1px);
}

/* ===== "KLAR!"-effekter ===== */

@keyframes troll-bounce {
  0%   { transform: scale(1) translateY(0); }
  35%  { transform: scale(1.04) translateY(-6px); }
  70%  { transform: scale(1.01) translateY(2px); }
  100% { transform: scale(1) translateY(0); }
}

.troll-celebrate {
  animation: troll-bounce 600ms ease-out;
}

@keyframes confetti-fall {
  0%   { transform: translate3d(0,-10px,0) rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate3d(0,420px,0) rotate(520deg); opacity: 0; }
}

.confetti-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: 0;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  animation: confetti-fall 1200ms ease-out forwards;
}
