/* "Naija Runs" theme: the look of the game logo carried through the whole interface.
   Chunky Lilita One display type, Naija green + taxi yellow + white on near-black, sticker-style buttons with a solid 3D edge,
   a sunburst + Lagos skyline motif on the loading screen and the menu. Loaded last: it only overrides tokens and components. */

:root {
  --font-display: 'Lilita One', 'Baloo 2', 'Archivo', system-ui, sans-serif;
  --nr-green: #12a150; --nr-green-d: #0b6b35; --nr-green-dd: #063d1f; --nr-yellow: #ffc81e; --nr-yellow-d: #d99a00; --nr-ink: #070a08;
  --accent-300: #5fe08f; --accent-400: #22c060; --accent-500: #12a150; --accent-600: #0f8a44; --accent-650: #0b6b35;
  --gold-300: #ffd84d; --gold-400: #ffc81e; --gold-500: #e8a800;
  --surface-0: #070b09; --surface-1: #0c120f; --surface-2: #121b16; --surface-3: #18241d;
  --r-3: 18px; --r-4: 26px;
}

/* ---------------------------------------------------------------- buttons: stickers with a 3D edge */
.btn { font-weight: 700; letter-spacing: .01em; transition: transform .08s ease, box-shadow .12s ease, background-color .15s; }
.btn.alt { --bc: var(--nr-green); --bh: #15b45a; --bfg: #fff; box-shadow: 0 4px 0 var(--nr-green-dd), 0 10px 22px -8px rgba(18, 161, 80, .7), inset 0 1px 0 rgba(255, 255, 255, .25); text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.btn.alt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--nr-green-dd), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn:not(.ghost):not(.alt):not(.quiet):not(.x-btn) { --bc: var(--nr-yellow); --bh: #ffd54d; --bfg: #1a1300; box-shadow: 0 4px 0 var(--nr-yellow-d), 0 10px 22px -10px rgba(255, 200, 30, .6), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn:not(.ghost):not(.alt):not(.quiet):not(.x-btn):active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--nr-yellow-d); }
.btn.ghost { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .12); }
.btn.ghost:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--accent-400); }

/* ---------------------------------------------------------------- cards + modals */
.card { background: radial-gradient(120% 80% at 0% 0%, rgba(18, 161, 80, .10), transparent 55%), linear-gradient(180deg, #0f1712, #0a0f0c); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), inset 0 0 0 1.5px rgba(95, 224, 143, .14); }
.card > .head { position: relative; font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; letter-spacing: .01em; background: linear-gradient(90deg, rgba(18, 161, 80, .22), rgba(18, 161, 80, 0) 70%); border-bottom: 0; }
.card > .head::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--nr-green) 0 33%, #fff 33% 66%, var(--nr-yellow) 66%); opacity: .9; }
.card > .head > .head-ico { width: 42px; height: 42px; border-radius: 14px; background: var(--nr-yellow); box-shadow: 0 3px 0 var(--nr-yellow-d); }
.card > .head > .head-ico .ico-svg { color: #1a1300; }
.card > .head > .head-title { text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }

/* ---------------------------------------------------------------- Manage: side tabs, chips, cards */
.tabs { background: linear-gradient(180deg, #08100b, #060a08); }
.tab { min-height: 44px; border-radius: 14px; font-weight: 600; }
.tab:hover { background: rgba(18, 161, 80, .14); }
.tab.on { background: var(--nr-yellow); color: #1a1300; font-weight: 800; box-shadow: 0 3px 0 var(--nr-yellow-d); }
.tab.on .t-ico, .tab.on .ico-svg { color: #1a1300 !important; }
.tab.on::before { display: none; }
.tab .badge, .tab .count { background: var(--nr-green); color: #fff; }
.cat-chip { min-height: 38px; font-weight: 600; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .1); }
.cat-chip.on { background: var(--nr-green); color: #fff; box-shadow: 0 3px 0 var(--nr-green-dd); }
.cat-chip.on .ico-svg { color: #fff; }
.section-title { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; letter-spacing: .01em; }
.up-card { background: linear-gradient(180deg, #142019, #0f1813); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .07); overflow: hidden; }
.up-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: rgba(255, 255, 255, .08); }
.up-card.ready::before { background: var(--nr-yellow); }
.up-card.owned::before { background: var(--nr-green); }
.up-card.owned { box-shadow: inset 0 0 0 1.5px rgba(34, 192, 96, .35); }
.up-card h4 { font-family: var(--font-display); font-weight: 400; font-size: 1.12rem; letter-spacing: .01em; }
.up-card .cost, .slot-cost { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; color: var(--nr-yellow); }
.banner { border-radius: 16px; }
.pill { font-weight: 700; }

/* ---------------------------------------------------------------- HUD accents */
.money-box .amt, .clock-box .time { font-family: var(--font-display); font-weight: 400; letter-spacing: .02em; }
.money-box .coin { background: radial-gradient(circle at 35% 30%, #fff1a8, var(--nr-yellow) 55%, var(--nr-yellow-d)); }
.hud-btns .manage-btn { --bc: var(--nr-green); box-shadow: 0 4px 0 var(--nr-green-dd), 0 8px 18px -6px rgba(18, 161, 80, .6); }
.lvl-badge { background: var(--nr-yellow); color: #1a1300; box-shadow: none; }

/* ---------------------------------------------------------------- the logo (image, or the type-only fallback) */
.nr-logo { position: relative; display: inline-block; }
.nr-logo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .55)); }
.nr-logo .nr-type { display: none; }
.nr-logo.noimg img { display: none; }
.nr-logo.noimg .nr-type { display: flex; flex-direction: column; align-items: center; line-height: .85; transform: rotate(-3deg); }
.nr-type .t1 { font-family: var(--font-display); font-size: clamp(64px, 11vw, 150px); color: var(--nr-green); -webkit-text-stroke: 3px #0a3d1e; text-shadow: 0 6px 0 #063d1f, 0 0 40px rgba(18, 161, 80, .45); }
.nr-type .t1 b { color: #fff; font-weight: 400; -webkit-text-stroke: 3px #3a4a40; }
.nr-type .t2 { font-family: var(--font-display); font-size: clamp(30px, 5.4vw, 72px); color: var(--nr-yellow); -webkit-text-stroke: 2px #6a4a00; text-shadow: 0 5px 0 #6a4a00; transform: skewX(-8deg); margin-top: 4px; }
.nr-type .t3 { font-family: var(--font-display); font-size: clamp(30px, 5vw, 66px); color: #fff; font-style: italic; text-shadow: 0 5px 0 #222, 8px 0 0 rgba(255, 200, 30, .35); transform: skewX(-10deg); }

/* ---------------------------------------------------------------- loading screen */
/* calm on purpose: logo, one slim bar with a percentage, a status line and a tip. Everything that moves (bar fill, shimmer, logo float)
   animates transform/opacity only, so it keeps moving on the compositor even while the main thread is busy building the 3D street. */
#loading.loading { background: radial-gradient(55% 45% at 50% 38%, #0e2617 0%, #07110b 55%, #030604 100%); overflow: hidden; gap: 0; transition: opacity .45s ease-out; }
#loading.out { opacity: 0; }
#loading .ld-center { display: flex; flex-direction: column; align-items: center; gap: clamp(20px, 5vh, 44px); width: min(440px, 100%); }
#loading .nr-logo { width: min(400px, 78vw, 44vh); animation: nrFade .6s ease-out both, nrFloat 5s .6s ease-in-out infinite; will-change: transform; }
#loading .ld-foot { width: min(340px, 100%); display: flex; flex-direction: column; gap: 10px; }
#loading .ld-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .9rem; font-weight: 600; letter-spacing: .01em; }
#loading .ld-msg { color: #e6f2ea; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#loading .ld-pct { color: var(--nr-yellow); font-variant-numeric: tabular-nums; }
#loading .ld-bar { position: relative; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
#loading .ld-bar > i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--nr-green), var(--accent-300)); transition: transform .4s ease-out; will-change: transform; }
#loading .ld-bar::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 35%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .28), transparent); animation: nrShimmer 1.6s ease-in-out infinite; will-change: transform; }
#loading .ld-tip { min-height: 2.9em; margin-top: 8px; color: #93ab9c; font-size: .85rem; line-height: 1.45; text-align: center; transition: opacity .25s; }
#loading .ld-tip b { color: #cfe3d6; }
#loading .ld-slow { color: var(--nr-yellow); font-size: .8rem; text-align: center; opacity: .85; }
.menu-scr .sunburst { position: absolute; left: 50%; top: 42%; width: 160vmax; height: 160vmax; transform: translate(-50%, -50%); pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 200, 30, .07) 0 6deg, transparent 6deg 15deg); -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 55%); mask: radial-gradient(circle, #000 0 18%, transparent 55%); animation: nrSpin 60s linear infinite; }
.menu-scr .skyline { position: absolute; left: 0; right: 0; bottom: 0; height: 26vh; min-height: 140px; pointer-events: none; color: #0b6b35; opacity: .85; }
.menu-scr .skyline svg { width: 100%; height: 100%; display: block; }
@keyframes nrSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes nrDrop { from { opacity: 0; transform: translateY(-40px) scale(.85) rotate(-4deg); } to { opacity: 1; transform: none; } }
@keyframes nrFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes nrFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes nrShimmer { from { transform: translateX(-100%); } to { transform: translateX(300%); } }

/* ---------------------------------------------------------------- main menu */
.menu-scr { background: linear-gradient(90deg, rgba(3, 8, 5, .94) 0%, rgba(3, 8, 5, .82) 34%, rgba(3, 8, 5, .25) 62%, rgba(3, 8, 5, 0) 80%); }
.menu-scr .sunburst { left: 22%; top: 30%; opacity: .9; }
.menu-scr .skyline { height: 18vh; opacity: .55; }
.menu-wrap { gap: 28px; z-index: 1; padding-left: clamp(16px, 6vw, 90px) !important; }
.menu-wrap .nr-logo { width: min(440px, 80vw); animation: nrDrop .7s cubic-bezier(.2, 1.4, .4, 1) both; transform-origin: 30% 60%; }
.menu-list { gap: 12px; width: min(380px, 100%); }
.menu-list .btn { min-height: 58px; font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; letter-spacing: .02em; border-radius: 16px; transform: skewX(-6deg); animation: nrSlide .45s cubic-bezier(.2, 1.2, .4, 1) both; }
.menu-list .btn > * { transform: skewX(6deg); }
.menu-list .btn:nth-child(1) { animation-delay: .15s; } .menu-list .btn:nth-child(2) { animation-delay: .22s; } .menu-list .btn:nth-child(3) { animation-delay: .29s; } .menu-list .btn:nth-child(4) { animation-delay: .36s; } .menu-list .btn:nth-child(5) { animation-delay: .43s; } .menu-list .btn:nth-child(6) { animation-delay: .5s; }
.menu-list .btn.ghost { --bc: rgba(8, 14, 10, .78); --bh: rgba(18, 161, 80, .3); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14), 0 4px 0 rgba(0, 0, 0, .5); }
.menu-list .btn.ghost:hover:not(:disabled) { box-shadow: inset 0 0 0 2px var(--nr-yellow), 0 4px 0 rgba(0, 0, 0, .5); transform: skewX(-6deg) translateX(6px); }
.menu-list .btn.ghost .ico-svg { color: var(--nr-yellow); }
.menu-list .btn.alt { transform: skewX(-6deg) scale(1.02); }
.menu-list .continue .c2 { font-family: var(--font-ui); font-size: .8rem; font-weight: 600; opacity: .85; }
.menu-ticker { position: absolute; left: 0; right: 0; bottom: 0; height: 38px; z-index: 2; overflow: hidden; background: linear-gradient(90deg, var(--nr-green-d), var(--nr-green)); box-shadow: 0 -3px 0 var(--nr-yellow); display: flex; align-items: center; }
.menu-ticker .lbl { flex: none; height: 100%; display: flex; align-items: center; padding: 0 14px; background: var(--nr-yellow); color: #1a1300; font-family: var(--font-display); font-size: 1rem; z-index: 1; }
.menu-ticker .run { white-space: nowrap; color: #fff; font-weight: 700; font-size: .92rem; animation: nrTicker 60s linear infinite; padding-left: 100%; }
.menu-foot { bottom: 46px !important; }
@keyframes nrSlide { from { opacity: 0; transform: skewX(-6deg) translateX(-40px); } to { opacity: 1; transform: skewX(-6deg); } }
@keyframes nrTicker { to { transform: translateX(-100%); } }
@media (max-width: 760px) {
  .menu-scr { background: linear-gradient(180deg, rgba(3, 8, 5, .7) 0%, rgba(3, 8, 5, .9) 55%); }
  .menu-wrap { align-items: center; padding: 0 16px !important; gap: 18px; }
  .menu-wrap .nr-logo { width: min(320px, 78vw); }
  .menu-list { width: 100%; }
  .menu-list .btn { min-height: 52px; font-size: 1.2rem; }
  .menu-ticker { height: 32px; } .menu-ticker .run { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) { .menu-scr .sunburst, #loading .nr-logo, #loading .ld-bar::after, .menu-ticker .run { animation: none !important; } }

#splash .nr-logo { width: min(560px, 82vw); animation: nrDrop .8s cubic-bezier(.2, 1.4, .4, 1) both, nrFloat 4s 1s ease-in-out infinite; }
@media (max-width: 760px) {
  .menu-wrap { justify-content: flex-end !important; padding-bottom: 48px !important; overflow-y: auto; gap: 12px; }
  .menu-wrap .nr-logo { width: min(260px, 66vw); }
  .menu-list { gap: 8px; }
  .menu-list .btn { min-height: 46px; font-size: 1.1rem; }
  .menu-scr .menu-foot { display: none !important; }
  .menu-scr .sunburst { top: 62%; left: 50%; }
}
/* desktop: logo, buttons and gaps all scale with the window height so the menu fits from ~580px tall up (no scrollbar), and the
   bottom padding keeps the last button clear of the version line and the news ticker. It can still scroll on tiny windows, without a bar. */
@media (min-width: 761px) {
  .menu-wrap { justify-content: center !important; padding-top: 18px !important; padding-bottom: 70px !important; gap: clamp(10px, 2.2vh, 18px); overflow-y: auto; }
  .menu-wrap .nr-logo { width: min(400px, 31vh); }      /* the logo is square: its height = this width */
  .menu-list { gap: clamp(6px, 1.1vh, 12px); }
  .menu-list .btn { min-height: clamp(38px, 6.4vh, 56px); }
}
.menu-wrap { scrollbar-width: none; }
.menu-wrap::-webkit-scrollbar { display: none; }
@media (max-height: 520px) { .menu-wrap .nr-logo { width: min(240px, 30vw); } .menu-list .btn { min-height: 42px; } .menu-wrap { gap: 10px; padding-bottom: 44px !important; } }
