/* Robot World page. The shell, type and colour come from /site-shell.css. */

.world-actions { display: flex; align-items: center; gap: 14px 26px; flex-wrap: wrap; margin-top: 34px; }

.world-stage { margin-top: 64px; }
.world-stage-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.world-player-actions { display: flex; gap: 8px; }
/* the footer's robot, hung beside the heading; on the light page it keeps its own dark silhouette */
.world-stage-title { display: flex; align-items: flex-end; gap: 14px; }
.rle-shell .world-stage-robot { margin-bottom: 2px; opacity: .85; }
.rle-shell .world-stage-robot img { width: 44px; height: 44px; filter: none; }

/* the walkthrough: a dark stage with the status laid over its lower left corner */
.world-player { position: relative; margin-top: 30px; overflow: hidden; border-radius: var(--r); background: var(--night); isolation: isolate; }
#world-frame { display: block; width: 100%; height: clamp(420px, 68vh, 850px); border: 0; background: var(--night); }
.world-status { position: absolute; left: 16px; bottom: 16px; z-index: 2; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 32px); padding: 9px 12px 8px; border-radius: 4px; background: rgba(29,29,31,.72); color: #f5f5f7; font-size: 13px; line-height: 1.35; pointer-events: none; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity .4s; }
.world-status[data-loading="true"]::before { content: ""; flex: none; width: 12px; height: 12px; border: 1px solid rgba(245,245,247,.3); border-top-color: #f5f5f7; border-radius: 50%; animation: rle-spin .9s linear infinite; }
/* once the world is ready the note steps back; it stays while loading and on an error */
.world-status[data-phase="ready"] { opacity: 0; }
.world-player:hover .world-status[data-phase="ready"], .world-player:focus-within .world-status[data-phase="ready"] { opacity: 1; }

.world-player:fullscreen { display: flex; flex-direction: column; width: 100%; height: 100%; border-radius: 0; }
.world-player:fullscreen #world-frame { flex: 1; min-height: 0; height: 100%; }

/* controls: the leaderboard's four-column notes */
.world-notes dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 40px; margin: 40px 0 0; }
.world-notes dl > div { padding-top: 20px; border-top: 1px solid var(--rule); }
.world-notes dt { margin-bottom: 12px; font: 500 13px/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.world-notes dd { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

@media (max-width: 900px) {
  .world-stage { margin-top: 44px; }
  .world-notes dl { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
  #world-frame { height: clamp(320px, 60vh, 640px); }
}
@media (max-width: 520px) { .world-notes dl { grid-template-columns: 1fr; } }
