html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  font-family: var(--ps-font-family, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif);
  color: var(--ps-text, rgba(255,255,255,0.95));
}

:root{
  --ps-accent: #22c55e;
  --ps-panel-scale: 1;
  --ps-bg-alpha: 0.35;
  /*
    Safe padding that adapts if a streamer uses a smaller Browser Source size
    than 1920x1080 (prevents the panel drifting "off to the right").
  */
  --ps-pad-x: clamp(12px, 3vw, 72px);
  --ps-pad-y: clamp(12px, 4vh, 80px);
  --ps-pad-bottom: clamp(12px, 3vh, 64px);
}

#wrap {
  position: absolute;
  left: var(--ps-pad-x);
  top: var(--ps-pad-y);
  width: 540px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgb(var(--ps-panel-bg-rgb, 17 24 39) / var(--ps-panel-bg-alpha, var(--ps-bg-alpha, 0.35)));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25), 0 0 0 1px var(--ps-accent) inset;
  transform: scale(var(--ps-panel-scale));
  transform-origin: left top;
}

#title {
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 6px;
  text-shadow: 0 0 0 rgba(0,0,0,0), 0 0 18px rgba(0,0,0,0.35);
}

#title::after{
  content:"";
  display:block;
  height:2px;
  width:54px;
  margin-top:8px;
  border-radius:2px;
  background: var(--ps-accent);
  opacity:0.85;
}

#prize {
  font-size: 17px;
  font-weight: 800;
  color: var(--ps-accent);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#prize:empty { display: none; }

#count {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.72;
  margin-bottom: 2px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#count:empty { display: none; }

#subtitle {
  font-size: 14px;
  opacity: 0.88;
  margin-bottom: 12px;
}

#list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 1;
  transition: opacity 350ms ease;
}

#list.out { opacity: 0; }
#list.in  { opacity: 1; }

.line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  font-size: 16px;
}

.who {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.meta {
  opacity: 0.92;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Winner row — accent background, full opacity */
.line.winner {
  background: rgba(var(--ps-panel-bg-rgb, 17 24 39) / 0.0);
  background-color: color-mix(in srgb, var(--ps-accent) 18%, transparent);
  border-radius: 8px;
  padding: 3px 6px;
  margin: 0 -6px;
}

.line.winner .who {
  color: var(--ps-accent);
  font-weight: 900;
}

.line.winner .meta {
  color: var(--ps-accent);
  opacity: 0.9;
}

body.hidden {
  opacity: 0;
}

/* Admin preview mode centers the panel so the full design is visible */
body.preview #wrap{
  left: 50%;
  top: 50%;
  transform-origin: center;
  transform: translate(-50%, -50%) scale(var(--ps-panel-scale));
}
