:root {
  --pc-content-max-width: 980px;
}

body.demo-page {
  min-height: 100vh;
  background: #1a1a2e;
  color: #fff;
  overflow-x: hidden;
}

body.demo-page #topBar {
  --topbar-bg: #16213e;
  background: #16213e;
}

body.demo-page .topbar-event {
  font-size: inherit;
  font-weight: 900;
}

body.demo-page .topbar-player-right .restart_icon {
  color: #fff;
  font-size: 25px;
}

body.demo-page .topbar-player-right .icon-text {
  display: block !important;
  color: #fff;
  font-size: 8px;
}

.demo-sound-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 8px 0 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  outline: none;
}

.demo-sound-toggle:hover {
  background: transparent;
}

.demo-sound-toggle:focus {
  outline: none;
}

.demo-sound-toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .45);
}

.demo-sound-toggle i {
  font-size: 24px;
  line-height: 1;
}

.demo-sound-toggle.is-muted {
  opacity: .78;
}

body.demo-page #messageBar {
  --countdown-slot-width: clamp(72px, 11vw, 112px);
  display: grid;
  grid-template-columns: var(--countdown-slot-width) minmax(0, 1fr) var(--countdown-slot-width);
  align-items: center;
  gap: 12px;
  width: 92%;
  max-width: var(--pc-content-max-width);
  margin: 4px auto 0;
}

body.demo-page #msgArea {
  min-width: 0;
  font-size: clamp(1.65rem, 4.5vw, 2.2rem);
  font-weight: 800;
  text-align: center;
}

body.demo-page #closeCountdown {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  visibility: hidden;
  opacity: 0;
}

body.demo-page #closeCountdown.is-visible {
  visibility: visible;
  opacity: 1;
}

body.demo-page #question-box {
  min-height: 96px;
  box-sizing: border-box;
}

body.demo-page #question-text {
  line-height: 1.35;
}

body.demo-page .choice-button {
  min-height: 74px;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

body.demo-page .choice-button .text {
  min-width: 0;
  overflow-wrap: anywhere;
}

body.demo-page .choice-button:disabled {
  cursor: default;
}

body.demo-page .choice-button.selected {
  border-color: #ff9800 !important;
}

body.demo-page .choice-button.correct {
  background: #ffd84d !important;
  color: #1f2937 !important;
}

body.demo-page .choice-button.wrong {
  background: #27354d !important;
  color: #eef2ff !important;
}

body.demo-page #resultArea {
  display: none;
}

body.demo-page #resultArea.is-time-only #totalAnswers,
body.demo-page #resultArea.is-time-only .action-buttons {
  display: none;
}

.demo-result-message {
  display: none;
}

body.demo-page #reactionStream {
  width: 92%;
  max-width: var(--pc-content-max-width);
  min-height: 52px;
  box-sizing: border-box;
  margin: 10px auto 0;
  padding: 6px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5px;
  overflow: visible;
  white-space: normal;
  opacity: 0;
  transition: opacity .15s ease;
}

body.demo-page #reactionStream.is-active {
  opacity: 1;
}

body.demo-page .reaction-chip {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 54px;
  border-radius: 999px;
  background: transparent;
  color: #1d4ed8;
  font-size: 1.35rem;
  box-shadow: none;
  transform: translateY(0) scale(1);
  animation: reactionPop .2s ease-out;
  gap: 1px;
}

body.demo-page .reaction-chip img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}

body.demo-page .reaction-name {
  width: 100%;
  min-height: 1.1em;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .75);
  opacity: 1;
  transition: opacity .18s ease;
}

body.demo-page .reaction-name.is-hidden {
  opacity: 0;
}

body.demo-page .reaction-chip.is-removing {
  opacity: 0;
  transform: translateY(-8px) scale(.88);
  transition: opacity .18s ease, transform .18s ease;
}

body.demo-page .reaction-controls {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 6px;
  padding: 4px 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

body.demo-page .reaction-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: pointer;
  box-shadow: none;
  transition: transform .12s ease, opacity .12s ease;
  padding: 0;
}

body.demo-page .reaction-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

body.demo-page .reaction-btn:hover {
  transform: translateY(-1px);
}

body.demo-page .reaction-btn:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

@keyframes reactionPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.7);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.demo-page .action-buttons {
  margin-top: 18px;
}

body.demo-page .screen-nav-btn {
  cursor: pointer;
}

body.demo-page .demo-signup-btn {
  background: #f97316;
}

body.demo-page .demo-signup-btn:hover {
  background: #ea580c;
}

@media (max-width: 760px) {
  body.demo-page .topbar-user-mini {
    display: none;
  }

  body.demo-page .topbar-player-right {
    gap: 4px;
  }

  .demo-sound-toggle {
    width: 42px;
    height: 42px;
  }

  .demo-sound-toggle i {
    font-size: 22px;
  }

  body.demo-page #messageBar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 0 10px 0 20px;
    box-sizing: border-box;
  }

  body.demo-page #messageBarSpacer {
    display: none;
  }

  body.demo-page #msgArea {
    grid-column: 1;
    text-align: left;
  }

  body.demo-page #closeCountdown {
    grid-column: 2;
    width: auto;
    min-width: 44px;
  }

  body.demo-page #question-box {
    margin-top: 8px;
    padding: 18px;
    font-size: 1.75em;
  }

  body.demo-page .grid {
    gap: 12px;
    margin-top: 12px;
  }

  body.demo-page .grid.choices-4 {
    grid-template-columns: 1fr;
  }

  body.demo-page .choice-button {
    min-height: 62px;
    padding: 14px;
    font-size: 1.45em;
  }

  body.demo-page #resultArea {
    font-size: 1.25em;
  }

  body.demo-page #reactionStream {
    min-height: 46px;
    margin-top: 6px;
  }

  body.demo-page .reaction-chip {
    width: 38px;
    min-height: 48px;
  }

  body.demo-page .reaction-chip img {
    width: 34px;
    height: 34px;
  }

  body.demo-page .action-buttons {
    flex-direction: column;
  }

  body.demo-page .reaction-controls {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    margin-left: 0;
    box-sizing: border-box;
  }

  body.demo-page .screen-nav-btn {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}
