:root{
  --bg: #0b0f1a;
  --card: #111827;
  --muted: #9ca3af;
  --text: #e5e7eb;
  --green: #00A445;
  --border: rgba(255,255,255,0.08);

  /* Option colors (Kahoot-ish) */
  --opt1: #ff4d4d; /* red */
  --opt2: #3b82f6; /* blue */
  --opt3: #f59e0b; /* amber */
  --opt4: #22c55e; /* green */
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: var(--bg);
  color: var(--text);
}

/* TOP BAR */
.topbar{
  background: var(--green);
  padding: 18px 24px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.topbar-inner{
  max-width: 1100px;
  margin: 0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}
.title{
  color: white;
  font-weight: 900;
  letter-spacing: 0.6px;
  font-size: 20px;
}
.topbar-logo{
  height: 34px;
  width: auto;
  opacity: 0.98;
}

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px;
}

.card{
  background: rgba(17,24,39,0.92);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.muted{ color: var(--muted); }
.hidden{ display:none !important; }

.row{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn{
  appearance:none;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  letter-spacing: 0.2px;
  cursor:pointer;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover{
  background: rgba(255,255,255,0.12);
}
.btn:active{
  transform: translateY(1px);
}
.btn:disabled{
  opacity: 0.55;
  cursor:not-allowed;
}
.btn.secondary{
  background: rgba(255,255,255,0.06);
}
.btn.secondary:hover{
  background: rgba(255,255,255,0.10);
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}

.leaderboard{
  display:flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.lbRow{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}
.lbLeft{
  display:flex;
  align-items:center;
  gap: 10px;
}
.lbRank{
  width: 28px;
  height: 28px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-weight: 900;
}
.lbName{
  font-weight: 900;
}
.lbScore{
  font-weight: 900;
  color: rgba(255,255,255,0.92);
}

/* Host layout extras */
.hostCard{ padding: 14px; }
.hostHeader{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.hostLabel{
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.8px;
}
.roomCodeBig{
  font-size: 44px;
  font-weight: 1000;
  letter-spacing: 1px;
  line-height: 1;
  margin-top: 4px;
}
.roundBig{
  font-size: 20px;
  font-weight: 900;
}
.timerBig{
  font-size: 32px;
  font-weight: 1000;
  line-height: 1;
}
.timerPulse{
  animation: pulse 0.7s ease-in-out infinite;
}
@keyframes pulse{
  0%{ transform: scale(1); }
  50%{ transform: scale(1.08); }
  100%{ transform: scale(1); }
}

.hostControls{
  margin-top: 6px;
  margin-bottom: 10px;
}
.nextBig{
  padding: 12px 16px;
  border-radius: 16px;
}

.clueWrap{
  margin-top: 10px;
}

.feetWrap{
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  position: relative;
}
.feetImg{
  width: 100%;
  height: auto;
  display:block;
}
.waitingOverlay{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 1000;
  letter-spacing: 0.3px;
  background: rgba(0,0,0,0.32);
  color: rgba(255,255,255,0.94);
  text-shadow: 0 8px 22px rgba(0,0,0,0.6);
}

/* Results */
.betweenWrap{
  margin-top: 12px;
}
.betweenHeader{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.pillRow{
  display:flex;
  align-items:center;
  gap: 8px;
}
.votesBox{
  margin-top: 10px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
}
.votesTitle{
  font-weight: 1000;
  margin-bottom: 10px;
}
.voteSplit{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}
.voteCol{
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  display:flex;
  flex-direction: column;
  min-height: 180px;
}
.voteBarCol{
  flex: 1;
  display:flex;
  align-items:flex-end;
  justify-content: stretch;
  padding: 10px;
}
.voteFill{
  width: 100%;
  border-radius: 12px;
  height: 20%;
  background: rgba(255,255,255,0.25);
}
.voteMeta{
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.voteCountBig{
  font-weight: 1000;
  font-size: 22px;
  line-height: 1.1;
}
.voteNameSmall{
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  font-weight: 900;
  letter-spacing: 0.2px;
}
.voteCol.correct{
  box-shadow: 0 0 0 2px rgba(0,255,140,0.25) inset;
}

.voteCol.opt1 .voteFill{ background: color-mix(in srgb, var(--opt1) 75%, transparent); }
.voteCol.opt2 .voteFill{ background: color-mix(in srgb, var(--opt2) 75%, transparent); }
.voteCol.opt3 .voteFill{ background: color-mix(in srgb, var(--opt3) 75%, transparent); }
.voteCol.opt4 .voteFill{ background: color-mix(in srgb, var(--opt4) 75%, transparent); }

/* =========================
   Donate cropping UI
   ========================= */
.donateCard .donateForm { margin-top: 12px; }

.grid2{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px){
  .grid2{ grid-template-columns: 1fr 1fr; }
}

.field{ display:block; margin: 10px 0; }
.fieldLabel{ font-weight: 900; margin-bottom: 6px; }
.fieldHelp{ font-size: 13px; margin-top: 6px; }

.previewRow{
  display:flex;
  align-items:center;
  gap: 12px;
  margin-top: 10px;
}
.imgPreview{
  width: 84px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: none;
}
.imgPreview.hasImg{ display:block; }

.previewMeta{
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.statusPill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 13px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
}
.statusPill.ok{
  background: rgba(0,255,140,0.10);
  border-color: rgba(0,255,140,0.22);
}

.checkboxField{
  display:flex;
  align-items:flex-start;
  gap: 10px;
  padding: 10px 0;
}

.donateActions{ gap: 10px; align-items:center; }
.errorText{ color: #ff8a8a; font-weight: 700; }

/* =========================
   Cropper modal (donate page only)
   ========================= */
.donatePage .cropModal{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.70);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 12px;
}
.donatePage .cropModal.hidden{ display:none; }

.donatePage .cropPanel{
  width: min(960px, 100%);
  background: rgba(12,12,16,0.98);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
}

.donatePage .cropHeader, 
.donatePage .cropFooter{
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  gap: 10px;
}

.donatePage .cropTitle{
  font-weight: 900;
  letter-spacing: 0.3px;
}
.donatePage .cropSubtitle{ font-size: 13px; }

/* =========================
   FIX Cropper interaction (donate page only)
   ========================= */
.donatePage .cropBody{
  height: min(72vh, 640px);
  max-height: none;
  background: #000;

  /* iPhone fix: do not force the image to 100% height; let CropperJS control sizing */
  display: flex;
  align-items: center;
  justify-content: center;
}

.donatePage #cropImage{
  max-width: 100%;
  height: auto;
  display: block;
}

.donatePage .cropBody,
.donatePage .cropBody *{
  touch-action: none;
}

.donatePage .cropHeader, 
.donatePage .cropFooter{
  touch-action: manipulation;
}
.donatePage .cropHeader *, 
.donatePage .cropFooter *{
  pointer-events: auto;
}

.donatePage .cropper-container{
  width: 100% !important;
  height: 100% !important;
}

/* =========================
   Donate bottom bar
   ========================= */
.donateBar{
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 10px 14px;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.65),
    rgba(0,0,0,0.25)
  );
  backdrop-filter: blur(8px);

  border-top: 1px solid rgba(255,255,255,0.12);
  z-index: 40;

  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.donateText{
  color: rgba(255,255,255,0.85);
}

.donateCta{
  color: var(--green);
  text-decoration: none;
  font-weight: 1000;
  padding: 6px 10px;
  border-radius: 999px;

  background: rgba(0,164,69,0.12);
  border: 1px solid rgba(0,164,69,0.35);

  transition:
    background 0.15s ease,
    transform 0.08s ease,
    box-shadow 0.15s ease;
}

.donateCta:hover{
  background: rgba(0,164,69,0.22);
  box-shadow: 0 0 0 2px rgba(0,164,69,0.15);
}

.donateCta:active{
  transform: translateY(1px);
}

/* Make sure content never hides behind the bar */
body{
  padding-bottom: 52px;
}

/* =========================
   Player UI (join + answers)
   ========================= */

.label{
  display:block;
  font-weight: 900;
  margin-top: 10px;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.9);
}

.input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.95);
  outline: none;
}
.input::placeholder{ color: rgba(255,255,255,0.45); }
.input:focus{
  border-color: rgba(0,164,69,0.55);
  box-shadow: 0 0 0 3px rgba(0,164,69,0.18);
}

.error{
  margin-top: 10px;
  color: #ff8a8a;
  font-weight: 800;
}

.playerPrompt{
  margin-top: 10px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.optionsList{
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.optCard{
  position: relative;
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.95);
  padding: 12px 12px 12px 52px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
}

.optCard:hover{
  background: rgba(255,255,255,0.10);
}

.optCard:active{
  transform: translateY(1px);
}

.optCard:disabled{
  opacity: 0.65;
  cursor: not-allowed;
}

.optBadge{
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 1000;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
}

.optThumb{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  flex: 0 0 auto;
}

.optText{
  display:flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.optName{
  font-weight: 1000;
  font-size: 18px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.optSub{
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  font-weight: 800;
}

.opt1{ border-left: 6px solid var(--opt1); }
.opt2{ border-left: 6px solid var(--opt2); }
.opt3{ border-left: 6px solid var(--opt3); }
.opt4{ border-left: 6px solid var(--opt4); }

.ack{
  margin-top: 10px;
  font-weight: 1000;
  font-size: 20px;
}
.ack.ok{ color: rgba(120,255,190,0.95); }
.ack.bad{ color: #ff8a8a; }

.reveal{
  margin-top: 10px;
}

.revealBox{
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}
.revealTitle{
  font-weight: 1000;
  margin-bottom: 10px;
}
.revealImg{
  width: 96px;
  height: 96px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  display:block;
  margin-bottom: 8px;
}

/* =========================
   HOST widescreen layout
   ========================= */

.hostPage .container.hostContainerWide{
  max-width: 100%;
  padding: 12px 12px;
}

/* Make the host card fit the visible area (no scrolling on TV) */
.hostCardWide{
  height: calc(100vh - 76px - 52px - 24px); /* topbar ~76, donatebar ~52, margins */
  overflow: hidden;
}

.hostWideGrid{
  height: 100%;
  display: grid;
  grid-template-columns: 360px 1fr 520px;
  gap: 12px;
  align-items: stretch;
}

/* Stack columns on smaller screens */
@media (max-width: 1100px){
  .hostWideGrid{
    grid-template-columns: 1fr;
    height: auto;
  }
  .hostCardWide{
    height: auto;
    overflow: visible;
  }
}

.hostLeftCol,
.hostMiddleCol,
.hostRightCol{
  min-height: 0; /* IMPORTANT for internal scroll areas */
}

.hostSideCard{
  height: 100%;
  display:flex;
  flex-direction: column;
  gap: 12px;
}

.hostSideTop{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.hostSideStats{
  display:flex;
  flex-direction: column;
  gap: 8px;
}

.hostSideActions{
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.musicControlsWide{
  margin-top: auto; /* push music controls to bottom of left column */
}

/* Middle: make feet image fill available height without overflowing */
.hostStageCard{
  height: 100%;
  display:flex;
  flex-direction: column;
  gap: 10px;
}

.hostFeetWide{
  flex: 1;
  min-height: 0;
}

.hostFeetWide .feetImg{
  width: 100%;
  height: 100%;
  object-fit: contain; /* keeps full feet image visible */
}

/* Right column: internal layout */
.hostRightCard{
  height: 100%;
  display:flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.hostRightDivider{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 6px 0;
}

/* Leaderboard scroll inside right card (no page scroll) */
.hostLeaderboardScroll{
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

/* Results should not blow up the page */
.hostBetweenWide{
  margin-top: 8px;
}

/* =========================
   HOST: strict 2x2 options grid
   ========================= */

.hostOptionsGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Each option is a fixed aspect tile that cannot overflow */
.hostOptCard{
  position: relative;
  border-radius: 16px;
  overflow: hidden; /* THIS prevents images spilling out */
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  min-height: 0;
}

.hostOptImg{
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10; /* widescreen-friendly tile */
  object-fit: cover;     /* fill tile without stretching */
  display:block;
  max-width: 100%;
}

.hostOptName{
  position:absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.16);
  font-weight: 1000;
  font-size: 16px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 6px 16px rgba(0,0,0,0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hostOptBadge{
  position:absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 1000;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
}

/* Correct highlight */
.hostOptCard.correct{
  box-shadow: 0 0 0 3px rgba(0,255,140,0.25) inset;
}

/* =========================
   Host widescreen stage row
   ========================= */
.hostStageRow{
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}

.hostStageCol{
  min-width: 0;
}

@media (max-width: 980px){
  .hostStageRow{
    grid-template-columns: 1fr;
  }
}

/* =========================
   Host 2x2 choices grid
   ========================= */
.hostOptionsGrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hostOptCard{
  position: relative;
  border-radius: 16px;
  overflow: hidden; /* CRITICAL: prevents spill */
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
}

/* fixed tile height and predictable crop */
.hostOptImg{
  width: 100%;
  height: 160px;          /* keeps the grid compact on TV */
  object-fit: cover;
  display: block;
}

/* name overlay inside the tile */
.hostOptName{
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.16);
  font-weight: 1000;
  font-size: 14px;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hostOptBadge{
  position: absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 1000;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
}

.hostOptCard.correct{
  box-shadow: 0 0 0 3px rgba(0,255,140,0.25) inset;
}

/* =========================
   HOST widescreen layout (TV-friendly)
   ========================= */

.hostPageWide .container.hostContainerWide{
  max-width: 100%;
  margin: 10px auto;
  padding: 0 12px;
}

/* Make host fit screen height (no browser scrolling) */
.hostPageWide .hostCardWide{
  height: calc(100vh - 76px - 52px - 18px); /* topbar + donateBar + margins */
  overflow: hidden;
}

/* 3 columns: controls | feet | choices/results/leaderboard */
.hostWideGrid{
  height: 100%;
  display: grid;
  grid-template-columns: 330px 1fr 520px;
  gap: 12px;
  align-items: stretch;
}

/* fall back to stacked on narrow screens */
@media (max-width: 1100px){
  .hostPageWide .hostCardWide{
    height: auto;
    overflow: visible;
  }
  .hostWideGrid{
    grid-template-columns: 1fr;
    height: auto;
  }
}

.hostLeft, .hostMiddle, .hostRight{ min-height: 0; }

.hostPanel{
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  padding: 12px;
}

.hostPanelFill{
  height: 100%;
  display:flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.hostPaneTitle{
  font-weight: 1000;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.95);
}

.hostStatRow{
  display:flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.hostBtnCol{
  display:flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.musicControlsWide{
  margin-top: auto; /* keep music controls at bottom */
}

/* Middle feet area fills available height */
.clueWrapWide{ flex: 1; min-height: 0; }

.hostFeetWide{
  height: 100%;
  min-height: 0;
  display:flex;
  align-items:center;
  justify-content:center;
}

.feetImgWide{
  width: 100%;
  height: 100%;
  object-fit: contain; /* always visible */
}

/* Right panel scroll: leaderboard only (page itself doesn’t scroll) */
.hostRightPanel{ min-height: 0; }

.hostDivider{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 6px 0;
}

.hostLeaderboardScroll{
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

/* Results should not force page scrolling */
.hostBetweenWide{
  margin-top: 6px;
}

/* =========================
   Host 2×2 Choices — SQUARE like donate crop (1:1)
   ========================= */

.hostOptionsGridWide{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Each tile is square */
.hostOptCardWide{
  position: relative;
  border-radius: 16px;
  overflow: hidden; /* prevents spill */
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.12);
  aspect-ratio: 1 / 1;     /* ✅ square tile */
}

/* Image fills the square tile */
.hostOptImgWide{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* ✅ same “cropped square” feel */
  display: block;
}

/* badge */
.hostOptBadgeWide{
  position:absolute;
  top: 10px;
  left: 10px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 1000;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.18);
}

/* name overlay */
.hostOptNameWide{
  position:absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.16);
  font-weight: 1000;
  font-size: 14px;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hostOptCardWide.correct{
  box-shadow: 0 0 0 3px rgba(0,255,140,0.25) inset;
}




/* =========================================================
   HOST: more space for leaderboard (compact music controls)
   Only affects host page.
   ========================================================= */

@media (min-width: 900px){
  /* Make the music block take less vertical space */
  body.hostPageWide .musicControlsWide .musicPill{
    padding: 8px 10px;
    gap: 8px;
  }

  /* Tighten text + optionally hide the label to save space */
  body.hostPageWide .musicControlsWide .musicLabel{ display:none; }
  body.hostPageWide .musicControlsWide .musicStatus{ font-size: 12px; }

  /* Smaller buttons */
  body.hostPageWide .musicControlsWide .musicBtn{
    padding: 6px 10px;
    font-size: 13px;
  }

  /* Narrower volume control */
  body.hostPageWide .musicControlsWide .musicVolWrap{
    gap: 6px;
  }
  body.hostPageWide .musicControlsWide .musicVolText{ display:none; }
  body.hostPageWide .musicControlsWide .musicSlider{
    width: 110px;
  }

  /* Reduce extra hint spacing */
  body.hostPageWide .musicControlsWide .musicHint{
    margin-top: 6px;
    font-size: 12px;
  }
}

/* =========================================================
   Leaderboard medals (restore)
   Applies to BOTH left leaderboard and final leaderboard
   ========================================================= */

.lbRow.medal-gold{
  border: 2px solid rgba(255, 215, 0, 0.95);
  background: linear-gradient(90deg, rgba(255,215,0,0.16), rgba(255,215,0,0.06));
  box-shadow: 0 0 14px rgba(255,215,0,0.18);
}

.lbRow.medal-silver{
  border: 2px solid rgba(192, 192, 192, 0.95);
  background: linear-gradient(90deg, rgba(192,192,192,0.14), rgba(192,192,192,0.05));
  box-shadow: 0 0 14px rgba(192,192,192,0.16);
}

.lbRow.medal-bronze{
  border: 2px solid rgba(205, 127, 50, 0.95);
  background: linear-gradient(90deg, rgba(205,127,50,0.14), rgba(205,127,50,0.05));
  box-shadow: 0 0 14px rgba(205,127,50,0.14);
}

/* Make the rank badge match the medal color */
.lbRow.medal-gold .lbRank{
  background: rgba(255,215,0,0.95);
  color: #1b1b1b;
  font-weight: 800;
}

.lbRow.medal-silver .lbRank{
  background: rgba(192,192,192,0.95);
  color: #1b1b1b;
  font-weight: 800;
}

.lbRow.medal-bronze .lbRank{
  background: rgba(205,127,50,0.95);
  color: #1b1b1b;
  font-weight: 800;
}

/* =========================
   Index Leaderboard Button
   ========================= */
.leaderboardBtn{
  grid-column: 1 / -1;
  margin-top: 6px;
  width: 100%;
  text-align: center;

  padding: 14px 16px;
  font-size: 16px;
  font-weight: 1000;

  border: 1px solid rgba(0,164,69,0.55);
  background: rgba(0,164,69,0.18);
  box-shadow: 0 0 0 2px rgba(0,164,69,0.10) inset;

  color: rgba(230,255,242,0.98);

  /* subtle pulse */
  animation: leaderboardPulse 3.2s ease-in-out infinite;
}

.leaderboardBtn:hover{
  background: rgba(0,164,69,0.30);
  font-size: 17px; /* slightly larger on hover */
  box-shadow:
    0 0 0 2px rgba(0,164,69,0.18) inset,
    0 0 20px rgba(0,164,69,0.18);
}

/* Pulse animation */
@keyframes leaderboardPulse{
  0%{
    box-shadow: 0 0 0 2px rgba(0,164,69,0.10) inset;
  }
  50%{
    box-shadow:
      0 0 0 2px rgba(0,164,69,0.18) inset,
      0 0 16px rgba(0,164,69,0.12);
  }
  100%{
    box-shadow: 0 0 0 2px rgba(0,164,69,0.10) inset;
  }
}

/* =========================
   Button Pulse + Grow Effect
   ========================= */

/* Apply to ALL main buttons on index */
.grid2 .btn,
.leaderboardBtn{
  animation: btnPulse 4s ease-in-out infinite;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    font-size 0.15s ease,
    background 0.15s ease;
}

/* Hover grow */
.grid2 .btn:hover,
.leaderboardBtn:hover{
  transform: scale(1.03);
  font-size: 17px;
}

/* Softer pulse than leaderboard-only version */
@keyframes btnPulse{
  0%{
    box-shadow: 0 0 0 0 rgba(0,164,69,0.0);
  }
  50%{
    box-shadow: 0 0 14px rgba(0,164,69,0.14);
  }
  100%{
    box-shadow: 0 0 0 0 rgba(0,164,69,0.0);
  }
}

/* =========================
   Topbar Home Link
   ========================= */
.topbar-link{
  text-decoration: none;
  color: inherit;
  display: block;
}

.topbar-link:hover .title{
  text-decoration: underline;
}

.topbar-link:hover .topbar-logo{
  transform: scale(1.05);
}

.topbar-logo{
  transition: transform 0.15s ease;
}

