/* Home hub MOCK-UP (hub.js; preview with ?hub=1). Built from each theme's tokens, so it works in every theme.
   Game lettering: Lilita One with a dark outline and a drop, for the hub's own words. */
.hub { overflow: clip;   /* the spotlights must not poke out below and make the page scroll */ width: 100%; max-width: 32rem; margin: 0 auto; flex: 1; display: flex; flex-direction: column; gap: .8rem; padding: .6rem 0 .4rem; min-height: 0; }   /* fills the screen through #app; a fixed height made it scroll a little */
.hub :is(.hmain-t, .hbub b, .hside span, .hudtxt b, .hudcoin b, .hudlvl em) {
  font-family: 'Lilita One', 'Outfit', sans-serif; font-weight: 400; letter-spacing: .02em;
  -webkit-text-stroke: 1.2px rgba(0, 0, 0, .45); paint-order: stroke fill; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); color: #fff; }

/* the status bar: you (level + XP) and coins. Both are theme buttons, so they wear the theme's decorations
   (snow, slime, vines…) like every other button; there's no settings button, Profile has it. */
.hudbar { display: flex; align-items: center; gap: .5rem; padding-top: .9rem; }
/* no snow / slime / vines on the profile button: it covered the name (user, 2 Nov) */
.hub .btn.hudme::before, .hub .btn.hudme::after { display: none; }
.hub .btn.hudme { flex: 1; min-width: 0; display: flex; align-items: center; gap: .55rem; padding: .3rem .8rem .3rem .3rem; border-radius: 99px;
  font: inherit; text-transform: none; letter-spacing: 0; }
.hudav { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #fff, #dfe4ef);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2), 0 0 0 2.5px #fff, 0 3px 6px rgba(0, 0, 0, .35); padding: .15rem; }
.hudav svg { width: 100%; height: 100%; }
.hudtxt { min-width: 0; flex: 1; display: grid; gap: .15rem; text-align: left; }
.hudtxt b { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hudlvl { display: flex; align-items: center; gap: .35rem; }
.hudlvl em { font-style: normal; font-size: .8rem; display: grid; place-items: center; min-width: 1.5rem; height: 1.5rem; padding: 0 .3rem; border-radius: 7px; transform: rotate(-4deg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 55%, #fff), var(--gold)); box-shadow: 0 2px 0 color-mix(in srgb, var(--gold) 55%, black); }
.hudxp { flex: 1; height: .55rem; border-radius: 99px; background: rgba(0, 0, 0, .3); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); overflow: hidden; }
.hudxp i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(180deg, #fff, #dfe9ff); }
.hub .btn.hudcoin { flex: none; display: flex; align-items: center; gap: .35rem; padding: 1rem .5rem .45rem .55rem; border-radius: 26px;
  font: inherit; text-transform: none; letter-spacing: 0; }
.hudcoin .ic { width: 1.5rem; height: 1.5rem; color: #ffd23d; }
.hudcoin b { font-size: 1.1rem; min-width: 1.2rem; }
.hudcoin > i { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; font: 900 1rem var(--body); font-style: normal; color: #fff;
  background: linear-gradient(180deg, #5fe08f, #22a35a); box-shadow: 0 2px 0 #157a40; }

/* the stage: your character on a lit podium under two spotlights, with the event bubbles either side */
.hubstage { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr) minmax(0, 1fr); align-items: center; }
.hbeam { position: absolute; top: -1rem; width: 9rem; height: 120%; pointer-events: none; filter: blur(2px);
  background: linear-gradient(180deg, color-mix(in srgb, var(--cool) 40%, transparent), transparent 85%); clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%); opacity: .5; }
.hbeam.l { left: 12%; transform: rotate(-14deg); } .hbeam.r { right: 12%; transform: rotate(14deg); background: linear-gradient(180deg, color-mix(in srgb, var(--hot) 45%, transparent), transparent 85%); }
.hstar { position: relative; z-index: 1; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 0; background: none; cursor: pointer; padding: 0; }
.hchar { width: min(14rem, 44vw, 29vh); aspect-ratio: 1; animation: hbob 3.2s ease-in-out infinite; position: relative; z-index: 2; }
.hchar svg, .hchar .h3d { width: 100%; height: 100%; display: block; }   /* .h3d: the real 3D character (spworld3d.js portrait) */
@keyframes hbob { 50% { transform: translateY(-8px); } }
.hpod { width: min(14rem, 46vw, 30vh); height: min(3rem, 5vh); margin-top: min(-1.2rem, -3vh); border-radius: 50%; position: relative; z-index: 1;
  background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--hot) 45%, #fff), var(--hot) 55%, color-mix(in srgb, var(--hot) 60%, black));
  box-shadow: 0 .6rem 0 color-mix(in srgb, var(--hot) 45%, black), 0 1.4rem 1.6rem -.4rem rgba(0, 0, 0, .55), 0 0 2.4rem color-mix(in srgb, var(--hot) 45%, transparent); }
.hname { margin-top: clamp(.3rem, 2vh, 1.2rem); display: grid; justify-items: center; gap: .1rem; font-size: 1.15rem; font-weight: 900; color: var(--ink); text-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
/* coloured names (gradients clipped to the text) went murky under the dark text-shadow: drop the shadow, light them up,
   and give them a crisp dark edge instead (light themes keep their own edge, theme-3d.css / theme-wonderland.css) */
.hname .pname[style] { text-shadow: none; filter: brightness(1.2) saturate(1.25) drop-shadow(0 0 1px rgba(0, 0, 0, .95)) drop-shadow(0 0 1px rgba(0, 0, 0, .8)) drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.hsp { position: absolute; width: .8rem; height: .8rem; background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: htw 2.4s ease-in-out infinite; z-index: 3; }
.hsp.s1 { top: 14%; left: 18%; } .hsp.s2 { top: 26%; right: 16%; animation-delay: -.8s; width: .6rem; height: .6rem; } .hsp.s3 { top: 52%; left: 12%; animation-delay: -1.6s; width: .5rem; height: .5rem; }
@keyframes htw { 0%, 100% { transform: scale(.4); opacity: .3; } 50% { transform: scale(1); opacity: 1; } }

/* event bubbles: glossy balls with a label and a timer */
.hcol { position: relative; z-index: 2; display: grid; gap: clamp(.4rem, 2.2vh, 1.2rem); justify-items: center; }
.hbub { display: grid; justify-items: center; gap: .2rem; border: 0; background: none; cursor: pointer; padding: 0; width: 100%; min-width: 0; }
.hbub-ball { position: relative; width: clamp(2.5rem, min(15vw, 8.5vh), 4rem); height: clamp(2.5rem, min(15vw, 8.5vh), 4rem); display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--hot) 40%, #fff), var(--hot) 55%, color-mix(in srgb, var(--hot) 60%, black));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45), 0 0 0 3px #fff, 0 5px 0 3px rgba(0, 0, 0, .25), 0 10px 18px -4px rgba(0, 0, 0, .5);
  animation: hpulse 3s ease-in-out infinite; }
#hubLeague .hbub-ball, #hubSolo .hbub-ball { --hot: var(--cool); animation-delay: -1.5s; }
#hubPass .hbub-ball { --hot: var(--gold); }
.hbub-ball .ic { width: 52%; height: 52%; color: #fff; }
@keyframes hpulse { 50% { transform: scale(1.05); } }
.hbub b { font-size: clamp(.68rem, 3.3vw, .85rem); max-width: 100%; line-height: 1.05; text-align: center; }
.hbub small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font: 800 clamp(.58rem, 2.8vw, .68rem) var(--body); color: #fff; padding: .1rem .45rem; border-radius: 99px; background: rgba(0, 0, 0, .45); white-space: nowrap; }
.hbub-ring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; }
.hbub-ring circle { fill: none; stroke-width: 3; stroke: rgba(0, 0, 0, .35); }
.hbub-ring circle + circle { stroke: #fff; stroke-linecap: round; }

/* the Play row: one big Party button, Head to Head and Quiz Royale either side. They're theme buttons too (glossy,
   pressable, with the theme's snow / slime / vines on top); the shine sweeping across Party runs inside the button. */
.hubplay { display: grid; grid-template-columns: 1fr 1.7fr 1fr; gap: .5rem; align-items: stretch; padding-top: .5rem;
  margin-bottom: clamp(3.4rem, 15.5vh, 8.5rem); }   /* where they sat when the ad was there: the theme's village shows below */
.hub .btn:is(.hmain, .hside) { border-radius: 18px; color: #fff; display: grid; place-items: center; align-content: center; gap: .15rem;
  text-transform: none; letter-spacing: 0; font: inherit; }
.hub .btn.hmain { --hot: var(--gold); padding: clamp(.55rem, 1.9vh, 1rem) .5rem; }
.hmain-t { font-size: clamp(1.6rem, 8.5vw, 2.2rem); line-height: 1; }
.hmain small { font: 800 .72rem var(--body); color: rgba(255, 255, 255, .95); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); position: relative; }
.hshine { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.hshine::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: hshine 3.6s ease-in-out infinite; }
@keyframes hshine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.hub .btn.hside { padding: clamp(.4rem, 1.4vh, .6rem) .3rem; }
.hub .btn.hside.alt { --hot: var(--cool); }
.hside .ic { width: 2rem; height: 2rem; color: #fff; }
.hside span { font-size: clamp(.7rem, 3.4vw, .85rem); line-height: 1.05; text-align: center; }
.hside .badge-dot { top: .3rem; right: .3rem; }
.hbub:active { transform: translateY(3px) scale(.98); }

@media (prefers-reduced-motion: reduce) { .hchar, .hsp, .hbub-ball, .hshine::after { animation: none; } }

/* light themes: the bubble labels in the theme's ink, without the white game outline */
:is([data-theme="clean"], [data-theme="daylight"], [data-theme="blossom"]) .hbub b { color: var(--ink); -webkit-text-stroke: 0; text-shadow: none; }
/* the solid 3D icons sit a little lower on their buttons, with a soft shadow */
.hub .ic3d { filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .35)); }

/* short screens (old small phones): tighter spacing so everything fits above the bottom bar without scrolling */
@media (max-height: 680px) {
  .hub { gap: .45rem; padding-top: .2rem; }
  .hudbar { padding-top: .5rem; }
  .hbub small { display: none; }
  .hubplay { padding-top: .3rem; }
  .hmain-t { font-size: 1.6rem; }
  .hside .ic, .hside .ic3d { width: 1.6rem; height: 1.6rem; }
}

/* themed full-colour icons (look3d.js themedIcon) on the hub: bigger, with a soft shadow, inside light bubble balls */
.hub .tic { filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .35)); }
.hbub-ball .tic { width: 68%; height: 68%; }
.hbub-ball { background: radial-gradient(circle at 35% 28%, #ffffff, color-mix(in srgb, var(--hot) 22%, #fff) 60%, color-mix(in srgb, var(--hot) 45%, #d9dce8)); }
.hside .tic { width: 2.6rem; height: 2.6rem; }
.hudcoin .tic { width: 1.6rem; height: 1.6rem; }

/* while the Home hub is showing the page can't scroll (it always fits the screen) */
html.noscroll, html.noscroll body { overflow: hidden; overscroll-behavior: none; height: 100%; }
