/* PARTY MODE: lobby panel, HUD chip in a running game, standings and podium on the results screen. All classes are .pt-* */

/* ---------- lobby panel ---------- */
.pt-panel { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255, 190, 90, .35); background: linear-gradient(135deg, rgba(255, 90, 170, .12), rgba(110, 80, 255, .14)); display: flex; flex-direction: column; gap: 10px; }
.pt-panel.on { border-color: rgba(255, 209, 102, .75); box-shadow: 0 0 24px rgba(255, 150, 90, .16); }
.pt-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pt-badge { font-size: 12px; font-weight: 900; letter-spacing: .5px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 209, 102, .2); color: var(--accent2); }
.pt-sub { font-size: 12.5px; line-height: 1.4; }
.pt-body { display: flex; flex-direction: column; gap: 10px; }
.pt-sizerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pt-lab { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.pt-gcs { display: flex; flex-wrap: wrap; gap: 6px; }
.pt-gc { --gc: #ff5470; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 800; color: var(--text); cursor: pointer; border: 2px solid var(--line); background: rgba(8, 5, 28, .55); transition: border-color .15s, background .15s, opacity .15s, transform .1s; }
.pt-gc:disabled { cursor: default; }
.pt-gc:hover:not(:disabled) { transform: translateY(-1px); }
.pt-gc.on { border-color: var(--gc); background: color-mix(in srgb, var(--gc) 24%, rgba(8, 5, 28, .6)); }
.pt-gc.off { opacity: .55; }
.pt-gc.off .pt-gc-nm { text-decoration: line-through; text-decoration-thickness: 1px; }
.pt-gc.bad { opacity: .4; filter: grayscale(.8); border-style: dashed; }
.pt-gc.bad .pt-gc-nm { text-decoration: none; }
.pt-gc-why { font-size: 10.5px; font-weight: 800; color: var(--muted); letter-spacing: .3px; }
.pt-gc-why:empty { display: none; }
.pt-countline { font-size: 13px; font-weight: 700; color: var(--ok); }
.pt-countline.warn { color: var(--accent2); }
.pt-note { margin: 0 0 12px; font-size: 12.5px; line-height: 1.4; color: var(--accent2); padding: 8px 12px; border-radius: 10px; background: rgba(255, 209, 102, .09); border: 1px dashed rgba(255, 209, 102, .4); }
.pt-mode.games { opacity: .82; }
.pt-mode.rules-box { border-style: dashed; }

/* ---------- HUD chip while a party game runs ---------- */
.pt-chip { position: absolute; top: 8px; left: 8px; z-index: 30; max-width: calc(100vw - 110px); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.3; color: #fff; background: rgba(12, 8, 34, .55); border: 1px solid rgba(255, 209, 102, .35); opacity: .78; pointer-events: none; user-select: none; -webkit-user-select: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }

/* ---------- results screen ---------- */
.results.pt-on { max-width: 640px; position: relative; }
.pt-top { position: relative; margin: 0 0 18px; padding-top: 6px; overflow: hidden; border-radius: 16px; }
.pt-kicker { font-size: 13px; font-weight: 900; letter-spacing: 3px; text-transform: uppercase; color: var(--accent2); }
.pt-champ { font-family: var(--display); font-size: clamp(26px, 7vw, 40px); line-height: 1.1; margin: 4px 0 6px; overflow-wrap: anywhere; background: linear-gradient(180deg, #fff3c4, #ffb347); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 16px rgba(255, 190, 80, .45)); }
.pt-podium { display: flex; align-items: flex-end; justify-content: center; gap: clamp(6px, 2vw, 14px); margin: 14px 0 8px; min-height: 230px; }
.pt-pod { flex: 1 1 0; max-width: 150px; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pt-pod .pt-av { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.pt-pod-name { max-width: 100%; font-weight: 900; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-pod-pts { font-size: 12px; font-weight: 800; color: var(--muted); }
.pt-pod.me .pt-pod-name { color: var(--accent2); }
.pt-step { width: 100%; display: grid; place-items: start center; padding-top: 8px; border-radius: 12px 12px 0 0; font-family: var(--display); font-size: 26px; color: rgba(0, 0, 0, .5); }
.pt-pod.p1 .pt-step { height: 110px; background: linear-gradient(180deg, #ffe49a, #f0a830); box-shadow: 0 0 28px rgba(255, 190, 80, .35); }
.pt-pod.p2 .pt-step { height: 78px; background: linear-gradient(180deg, #e6ecf5, #9aa7ba); }
.pt-pod.p3 .pt-step { height: 56px; background: linear-gradient(180deg, #e9b384, #b0702f); }
.pt-crown { font-size: 34px; line-height: 1; filter: drop-shadow(0 0 12px rgba(255, 209, 102, .8)); }
.pt-anim .pt-crown { animation: ptCrown 1.6s ease-in-out infinite; }
.pt-anim .pt-pod { animation: ptRise .7s cubic-bezier(.2, .9, .3, 1.2) both; }
.pt-anim .pt-pod.p3 { animation-delay: .1s; }
.pt-anim .pt-pod.p2 { animation-delay: .5s; }
.pt-anim .pt-pod.p1 { animation-delay: 1s; }
.pt-bonus { display: inline-block; margin: 6px 0 0; padding: 6px 14px; border-radius: 999px; font-weight: 900; font-size: 13px; color: var(--ok); background: rgba(6, 214, 160, .13); border: 1px solid rgba(6, 214, 160, .5); }
@keyframes ptCrown { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-6px) rotate(6deg); } }
@keyframes ptRise { from { opacity: 0; transform: translateY(60px) scale(.9); } }

.pt-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.pt-confetti i { position: absolute; top: -14px; width: 8px; height: 14px; border-radius: 2px; opacity: 0; animation: ptFall linear 2 both; }
.pt-top > :not(.pt-confetti) { position: relative; z-index: 1; }
@keyframes ptFall { 0% { opacity: 1; top: -14px; } 85% { opacity: 1; } 100% { opacity: 0; top: 105%; margin-left: 24px; } }

.pt-res { margin: 18px 0 22px; padding: 14px 14px 16px; border-radius: 16px; text-align: left; background: linear-gradient(160deg, rgba(255, 90, 170, .1), rgba(110, 80, 255, .12)); border: 1px solid rgba(255, 190, 90, .4); display: flex; flex-direction: column; gap: 12px; }
.pt-res.final { border-color: rgba(255, 209, 102, .7); }
.pt-res-title { font-family: var(--display); font-size: 18px; letter-spacing: .8px; color: var(--accent2); }
.pt-playlist { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pt-pl { --gc: #ff5470; width: 38px; height: 38px; display: grid; place-items: center; font-size: 20px; border-radius: 50%; border: 2px dashed var(--line); background: rgba(8, 5, 28, .5); opacity: .5; }
.pt-pl.done { opacity: 1; border-style: solid; border-color: var(--gc); background: color-mix(in srgb, var(--gc) 22%, rgba(8, 5, 28, .6)); }
.pt-pl.next { opacity: 1; border-style: solid; border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(255, 209, 102, .28); animation: ptPulse 1s ease-in-out infinite alternate; }
@keyframes ptPulse { to { transform: scale(1.12); } }
.pt-next { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: rgba(8, 5, 28, .55); border: 1px solid var(--line); font-weight: 800; }
.pt-next-lab { color: var(--muted); font-size: 13px; }
.pt-next-game { color: var(--text); font-size: 15px; }
.pt-cd { margin-left: auto; font-family: var(--display); font-size: 18px; color: var(--accent2); font-variant-numeric: tabular-nums; }
.pt-cd.hot { color: var(--accent); }

.pt-table { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pt-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 12px; background: rgba(8, 5, 28, .5); border: 1px solid var(--line); font-weight: 800; min-width: 0; }
.pt-anim .pt-row { animation: rise .4s both; animation-delay: calc(var(--i, 0) * 60ms); }
.pt-row.me { border-color: rgba(255, 209, 102, .7); background: rgba(255, 209, 102, .08); }
.pt-row.left { opacity: .6; }
.pt-rank { width: 26px; flex: none; color: var(--muted); font-family: var(--display); }
.pt-rank.r1 { color: #ffd166; } .pt-rank.r2 { color: #cfd8e6; } .pt-rank.r3 { color: #e0a070; }
.pt-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.pt-nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pt-tag { flex: none; font-size: 10.5px; font-weight: 900; color: var(--muted); padding: 1px 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.pt-gain { flex: none; font-size: 13px; font-weight: 900; color: var(--ok); }
.pt-anim .pt-gain { animation: ptPop .5s .3s cubic-bezier(.2, .9, .3, 1.5) both; }
@keyframes ptPop { from { opacity: 0; transform: translateY(8px) scale(.6); } }
.pt-pts { flex: none; min-width: 34px; text-align: right; font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; }
.pt-unit { flex: none; font-size: 10.5px; color: var(--muted); font-weight: 800; margin-left: -4px; }
.pt-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.pt-wait { text-align: center; font-size: 12.5px; }
.pt-empty { text-align: center; }

@media (max-width: 480px) {
  .pt-row { padding: 6px 8px; gap: 7px; }
  .pt-pts { font-size: 17px; }
  .pt-podium { min-height: 200px; }
  .pt-pod.p1 .pt-step { height: 90px; }
  .pt-pl { width: 34px; height: 34px; font-size: 18px; }
  .pt-cd { margin-left: 0; }
  .pt-actions .btn.big { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-confetti { display: none; }
  .pt-anim .pt-pod, .pt-anim .pt-row, .pt-anim .pt-gain, .pt-anim .pt-crown, .pt-pl.next { animation: none !important; }
}
