.nexus-run-app { max-width: 900px; margin: 0 auto; font-family: Arial, Helvetica, sans-serif; color:#f4f4f4; }
.nexus-run-app * { box-sizing:border-box; }
.nexus-run-app .nr-grid { display:grid; grid-template-columns:minmax(0, 1.5fr) minmax(240px,.7fr); gap:18px; }
.nexus-run-app .nr-card { background:#11141b; border:1px solid #323846; border-radius:18px; padding:16px; }
.nexus-run-app .nr-hud { display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; margin-bottom:10px; color:#c7ccd6; font-size:14px; }
.nexus-run-app .nr-game { position:relative; overflow:hidden; height:320px; border-radius:16px; background:#080515; touch-action:manipulation; outline:none; isolation:isolate; }
.nexus-run-app .nr-skyline { position:absolute; inset:0; z-index:0; background-image:url("assets/background.png"); background-repeat:repeat-x; background-position:0 50%; background-size:auto 100%; will-change:background-position; pointer-events:none; }
.nexus-run-app .nr-ground { position:absolute; z-index:1; left:0; right:0; bottom:0; height:54px; border-top:1px solid rgba(192,120,255,.5); background:linear-gradient(to bottom,rgba(37,15,70,.08),rgba(6,4,14,.30)); pointer-events:none; }
.nexus-run-app .nr-player { position:absolute; z-index:4; left:46px; bottom:54px; width:44px; height:48px; border-radius:0; background:url("assets/player-13.svg") center bottom / contain no-repeat; user-select:none; pointer-events:none; }
.nexus-run-app .nr-player:before { content:none; }
.nexus-run-app .nr-obstacle { position:absolute; z-index:3; bottom:54px; background-position:center bottom; background-repeat:no-repeat; background-size:contain; pointer-events:none; will-change:left; }
.nexus-run-app .nr-obstacle--tree { background-image:url("assets/tree.png"); }
.nexus-run-app .nr-obstacle--d20 { background-image:url("assets/d20.png"); }
.nexus-run-app .nr-obstacle--mimic { background-image:url("assets/mimic.png"); }
.nexus-run-app .nr-obstacle--drone { background-image:url("assets/drone.png"); bottom:62px; }
.nexus-run-app .nr-coin { position:absolute; z-index:3; width:21px; height:21px; border-radius:50%; background:#35d07f; color:#0c0f12; display:grid; place-items:center; font-size:11px; font-weight:800; box-shadow:0 0 12px rgba(53,208,127,.6); }
.nexus-run-app .nr-overlay { position:absolute; z-index:8; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(8,5,20,.78); backdrop-filter:blur(2px); padding:18px; text-align:center; }
.nexus-run-app .nr-hidden { display:none !important; }
.nexus-run-app h2, .nexus-run-app h3 { margin:0 0 10px; }
.nexus-run-app p { color:#c7ccd6; }
.nexus-run-app button { min-height:44px; border:1px solid #4b4f59; border-radius:12px; padding:0 16px; background:#d6a733; color:#111; font-weight:800; cursor:pointer; }
.nexus-run-app input { width:100%; min-height:44px; border:1px solid #454b58; border-radius:10px; background:#0d1016; color:#fff; padding:0 12px; font-size:16px; }
.nexus-run-app .nr-actions { display:flex; justify-content:center; gap:10px; flex-wrap:wrap; margin-top:12px; }
.nexus-run-app .nr-namebox { display:grid; gap:10px; text-align:left; margin-top:14px; }
.nexus-run-app ol { margin:0; padding-left:24px; }
.nexus-run-app li { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid #262b35; }
.nexus-run-app .nr-msg { min-height:22px; margin-top:8px; color:#d7dbe3; font-size:13px; }
.nexus-run-app .nr-over { align-items:flex-start; overflow-y:auto; overscroll-behavior:contain; }
.nexus-run-app .nr-over > div { margin:auto; flex-shrink:0; }
.nexus-run-app .nr-over p { margin:0 0 8px; }
.nexus-run-app .nr-over .nr-actions { margin:0 0 10px; }
.nexus-run-app .nr-over .nr-restart-btn { width:100%; }
.nexus-run-app .nr-over .nr-namebox { margin-top:8px; gap:8px; }
.nexus-run-app .nr-over .nr-msg:empty { display:none; }
@media(max-width:760px){
  .nexus-run-app .nr-grid { grid-template-columns:1fr; }
  .nexus-run-app .nr-game { height:280px; }
  .nexus-run-app .nr-player { left:28px; width:42px; height:46px; }
}

/* Animation is inside the player, so jump physics and collision bounds stay stable. */
.nexus-run-app .nr-player { background:none; }
.nexus-run-app .nr-character { position:absolute; bottom:0; left:0; width:100%; height:auto; overflow:visible; transform-origin:50% 100%; }
.nexus-run-app .nr-wing { transform-box:view-box; transform-origin:51% 39%; }
.nexus-run-app .nr-player.nr-airborne .nr-wing { animation:nr-wing-flap .24s ease-in-out infinite; }
.nexus-run-app .nr-player.nr-airborne .nr-character { transform:rotate(-5deg); }
.nexus-run-app .nr-player.nr-landing .nr-character { animation:nr-land .18s ease-out both; }
@keyframes nr-wing-flap { 0%,100% { transform:rotate(0deg) scaleX(1); } 50% { transform:rotate(-12deg) scaleX(.58); } }
@keyframes nr-land { 0% { transform:scale(1.10,.86); } 65% { transform:scale(.98,1.03); } 100% { transform:scale(1); } }
@media(prefers-reduced-motion:reduce) { .nexus-run-app .nr-player .nr-wing, .nexus-run-app .nr-player .nr-character { animation:none !important; transform:none !important; } }
