/* Prop Hunt's loading screen. Same contract as /loading.css: Chrome 86,
   nothing clickable, one entrance and then only the tip swap and the stepped
   bar move. The scene is the side picker's: the hunter render on the left
   aiming across at the props on the right, in their side colours, over a soft
   wash of the map being loaded. Sizes are rem against screen height / 67.5. */

:root {
  --void: #08090d;
  --ink: #0c0d11;
  --text: #f2f2f5;
  --muted: rgba(255, 255, 255, 0.72);
  --faint: rgba(255, 255, 255, 0.5);
  --hunters: rgb(150, 205, 255);
  --props: rgb(255, 60, 60);
  --bar: rgb(232, 52, 56);

  --font: 'Barlow', 'Segoe UI', system-ui, sans-serif;
  --font-game: 'Board Condensed', 'Barlow', 'Segoe UI', sans-serif;
  --enter: cubic-bezier(0.05, 0.7, 0.1, 1);
  --u: min(1vh, 0.5625vw);
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: block;
  src: url(/fonts/barlow-500-f40f5762.woff2) format('woff2');
}

@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600 700;
  font-display: block;
  src: url(/fonts/barlow-600-39ffacd3.woff2) format('woff2');
}

@font-face {
  font-family: 'Board Condensed';
  font-style: italic;
  font-weight: 800;
  font-display: block;
  src: url(/fonts/board-800i-2e41c365.woff2) format('woff2');
}

* {
  box-sizing: border-box;
}

html {
  font-size: calc(max(720px, 100vh) / 67.5);
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.45;
  cursor: default;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

p,
h1,
h2 {
  margin: 0;
}

.g {
  font-family: var(--font-game);
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ── The scene ───────────────────────────────────────────────── */

.stage,
.stage > div {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.wash {
  background-color: var(--void);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.wash.is-live {
  opacity: 0.6;
}

.light {
  background:
    radial-gradient(ellipse 60% 40% at 50% 16%, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0) 100%),
    radial-gradient(ellipse 90% 80% at 50% 45%, rgba(8, 9, 13, 0.15), rgba(8, 9, 13, 0.85) 100%);
}

.glow-h {
  background: radial-gradient(ellipse 34% 46% at 40% 54%, rgba(70, 120, 175, 0.26), rgba(70, 120, 175, 0) 100%);
}

.glow-p {
  background: radial-gradient(ellipse 34% 46% at 77% 60%, rgba(200, 40, 48, 0.24), rgba(200, 40, 48, 0) 100%);
}

.stage > .art {
  top: auto;
  right: auto;
  left: auto;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center bottom;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 78%, transparent 100%);
  opacity: 0;
  will-change: transform, opacity;
}

.stage > .art-h {
  left: calc(50% - 48 * var(--u));
  bottom: 12vh;
  width: calc(61 * var(--u));
  height: calc(73 * var(--u));
  background-image: url(https://cdn.kordu.net/games/gmod/prophunt/ui/sides/v1/hunters.webp);
  animation: from-left 1.1s 0.1s var(--enter) forwards;
}

.stage > .art-p {
  left: calc(50% + 3.5 * var(--u));
  bottom: 12vh;
  width: calc(80 * var(--u));
  height: calc(59 * var(--u));
  background-image: url(https://cdn.kordu.net/games/gmod/prophunt/ui/sides/v1/props.webp);
  animation: from-right 1.1s 0.2s var(--enter) forwards;
}

.floorshade {
  background:
    linear-gradient(180deg, rgba(8, 9, 13, 0) 52%, rgba(8, 9, 13, 0.72) 76%, rgba(8, 9, 13, 0.96) 100%),
    linear-gradient(90deg, rgba(8, 9, 13, 0.7) 0%, rgba(8, 9, 13, 0) 42%);
}

@keyframes from-left {
  from { opacity: 0; transform: translateX(-3rem); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes from-right {
  from { opacity: 0; transform: translateX(3rem); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Top: brand and who is joining ───────────────────────────── */

.top {
  position: fixed;
  top: 3rem;
  right: 4rem;
  left: 4rem;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mark {
  width: 13.5rem;
  height: auto;
  display: block;
}

.mode {
  margin: 0.125rem 0 0 2.77rem;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: 0.205em;
  color: var(--props);
}

.preview {
  display: none;
  margin: 0.75rem 0 0 2.77rem;
  padding: 0.0625rem 0.5rem;
  font-size: 0.75rem;
  color: var(--ink);
  background: var(--text);
}

.preview.is-live {
  display: inline-block;
}

.who {
  display: none;
  align-items: center;
  gap: 0.875rem;
}

.who.is-live {
  display: flex;
}

.who-text {
  text-align: right;
}

.who-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.who-name {
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.125rem;
  font-weight: 700;
}

.who-avatar {
  width: 3.5rem;
  height: 3.5rem;
  display: block;
  border: 0.125rem solid rgba(255, 255, 255, 0.85);
}

.top,
.floor {
  opacity: 0;
  animation: rise 0.7s 0.35s var(--enter) forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Bottom left: where, one tip, how far ────────────────────── */

.floor {
  position: fixed;
  left: 4rem;
  bottom: 3rem;
  z-index: 2;
  max-width: 46rem;
}

.eyebrow {
  font-size: 1rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.title {
  margin-top: 0.125rem;
  font-size: 7.5rem;
  line-height: 0.9;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-shadow: 0 0.125rem 1.5rem rgba(0, 0, 0, 0.45);
}

.title.is-long {
  font-size: 5.75rem;
}

.tip {
  max-width: 36rem;
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 0.1875rem solid rgba(255, 255, 255, 0.85);
  transition: opacity 0.25s ease;
  will-change: opacity;
}

.tip.is-swapping {
  opacity: 0;
}

.tip.h {
  border-left-color: var(--hunters);
}

.tip.p {
  border-left-color: var(--props);
}

.tip-label {
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  color: var(--faint);
}

.tip.h .tip-label {
  color: var(--hunters);
}

.tip.p .tip-label {
  color: var(--props);
}

.tip-title {
  margin-top: 0.25rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
}

.tip-body {
  margin-top: 0.25rem;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
}

.key {
  display: inline-block;
  min-width: 1.5rem;
  height: 1.5rem;
  margin: 0 0.125rem;
  padding: 0 0.375rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.375rem;
  text-align: center;
  vertical-align: 0.0625rem;
  color: var(--ink);
  background: var(--text);
  border-radius: 0.1875rem;
  box-shadow: 0 0.125rem 0 rgba(0, 0, 0, 0.55);
}

.dock {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 2rem;
  white-space: nowrap;
  will-change: transform;
}

.dock-status {
  font-size: 1.25rem;
}

.dock-count {
  display: none;
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.6);
}

.dock-count.is-live {
  display: block;
}

/* ── The bar: segmented, along the bottom edge, under GMod's dialog ── */

.rail {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  height: 0.375rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: repeating-linear-gradient(90deg, rgba(8, 9, 13, 0) 0, rgba(8, 9, 13, 0) 1.375rem, var(--void) 1.375rem, var(--void) 1.625rem);
}

.rail-fill {
  width: 100%;
  height: 100%;
  background: var(--bar);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

.rail.is-indeterminate .rail-fill {
  width: 12.5%;
  transform: none;
  animation: sweep 2s steps(8, end) infinite;
}

@keyframes sweep {
  from { transform: translateX(0); }
  to { transform: translateX(800%); }
}
