/* Lagos Traffic: the look of everything made of HTML (dialogs, the start screen, the in-game cards).
   Dark screens, rounded dark-grey cards, bold italic headings, quiet grey text, one strong amber for
   the button you should press. The canvas game draws its own menus; this is for the HTML on top. */
:root {
  --lt-bg: #0e0e10;
  --lt-card: #1c1c1f;
  --lt-card-2: #27272c;
  --lt-line: rgba(255, 255, 255, 0.08);
  --lt-amber: #f7b500;
  --lt-amber-deep: #c98d00;
  --lt-ink: #121212;
  --lt-text: #ffffff;
  --lt-muted: #9c9ca3;
  --lt-red: #ff453a;
  --lt-green: #32d74b;
  --lt-blue: #3d8bff;
  --lt-font: 'Poppins', 'Exo 2', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --lt-radius: 18px;
}

/* a box over the game (sign in, pick your progress, an offer) */
.lt-modal {
  position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(0, 0, 0, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  font-family: var(--lt-font); animation: lt-fade 0.2s ease both;
}
.lt-card {
  width: 100%; max-width: 380px; box-sizing: border-box; padding: 24px 22px 20px;
  background: var(--lt-card); color: var(--lt-text); border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55); animation: lt-rise 0.28s cubic-bezier(.2, 1.2, .4, 1) both;
}
.lt-h { margin: 0 0 6px; font: italic 800 25px/1.12 var(--lt-font); letter-spacing: -0.3px; color: var(--lt-text); }
.lt-p { margin: 0 0 14px; font: 500 14px/1.5 var(--lt-font); color: var(--lt-muted); }
.lt-p b, .lt-p strong { color: var(--lt-text); font-weight: 700; }
.lt-row { display: flex; gap: 10px; margin-top: 10px; }
.lt-err { min-height: 18px; margin-top: 8px; font: 500 13px var(--lt-font); color: var(--lt-red); }
.lt-input {
  width: 100%; box-sizing: border-box; padding: 14px 16px; border-radius: 14px; outline: none;
  border: 1.5px solid var(--lt-line); background: var(--lt-card-2); color: var(--lt-text); font: 500 16px var(--lt-font);
}
.lt-input:focus { border-color: var(--lt-amber); }
.lt-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font: 500 13px/1.4 var(--lt-font); color: var(--lt-muted); cursor: pointer; }
.lt-check input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--lt-amber); }
/* the button to press: amber, dark italic text, a firm edge under it */
.lt-btn {
  flex: 1; padding: 15px 14px; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--lt-amber); color: var(--lt-ink); font: italic 800 17px var(--lt-font);
  box-shadow: 0 4px 0 var(--lt-amber-deep); transition: transform 0.06s, box-shadow 0.06s;
}
.lt-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--lt-amber-deep); }
.lt-btn:disabled { opacity: 0.6; }
.lt-btn small { display: block; margin-top: 2px; font: 600 11px var(--lt-font); font-style: normal; opacity: 0.75; }
/* the quiet choice */
.lt-btn-ghost { flex: 1; padding: 15px 10px; border: 0; border-radius: 16px; cursor: pointer; background: transparent; color: #d4d4d9; font: 600 15px var(--lt-font); }
.lt-btn-dark { flex: 1; padding: 15px 10px; border: 0; border-radius: 16px; cursor: pointer; background: var(--lt-card-2); color: var(--lt-text); font: 700 15px var(--lt-font); }
.lt-link { margin-top: 12px; padding: 0; border: 0; background: none; color: var(--lt-amber); font: 600 13px var(--lt-font); cursor: pointer; }
/* a choice card (which progress to keep) */
.lt-option {
  display: block; width: 100%; margin-top: 10px; padding: 14px 16px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--lt-line); border-radius: 16px; background: var(--lt-card-2); color: var(--lt-text); font-family: var(--lt-font);
}
.lt-option:hover, .lt-option:focus { border-color: var(--lt-amber); outline: none; }
.lt-option b { display: block; font: italic 800 15px var(--lt-font); }
.lt-option span { display: block; margin-top: 3px; font: 500 13px var(--lt-font); color: var(--lt-muted); }
.lt-amber { color: var(--lt-amber); }
.lt-green { color: var(--lt-green); }
@keyframes lt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lt-rise { from { opacity: 0; transform: translateY(18px) scale(0.98); } to { opacity: 1; transform: none; } }

/* ---- the start screen (the design reference): the poster in full, choose your route, PLAY, the shortcuts ---- */
#ltSplash, #ltSplash * { box-sizing: border-box; }
#ltSplash {
  position: absolute; inset: 0; z-index: 6; overflow: hidden; background: var(--lt-bg);
  font-family: var(--lt-font); color: var(--lt-text); user-select: none; -webkit-user-select: none;
}
#ltSplash.hide { display: none; }
/* the poster, blurred, fills everything behind the column (the sides on a laptop) */
#ltSplash .blur { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(26px) brightness(0.32); }
#ltSplash .col {
  position: absolute; inset: 0; margin: 0 auto; width: 100%; max-width: 480px; display: flex; flex-direction: column;
  padding: max(12px, env(safe-area-inset-top)) 18px max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(14,14,16,0.15) 0%, rgba(14,14,16,0.55) 45%, var(--lt-bg) 62%);
}
#ltSplash .top { display: flex; justify-content: space-between; align-items: center; flex: none; }
#ltSplash .icon { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(39,39,44,0.9); color: var(--lt-text); display: grid; place-items: center; cursor: pointer; }
#ltSplash .wallet { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 5px 0 14px; border-radius: 999px; border: 0; background: rgba(39,39,44,0.9); color: var(--lt-text); cursor: pointer; }
#ltSplash .wallet b { font: italic 800 16px var(--lt-font); }
#ltSplash .wallet i { width: 30px; height: 30px; border-radius: 50%; background: var(--lt-amber); color: #141414; font: 800 20px/30px var(--lt-font); font-style: normal; }
#ltSplash svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* the poster, whole (never cropped) */
/* the poster across the column's full width (cropped top and bottom to fit, its title and the danfo kept) */
#ltSplash .hero { position: relative; flex: 1 1 auto; min-height: 120px; padding: 6px 0; }
#ltSplash .poster { position: absolute; inset: 6px 0; width: 100%; height: calc(100% - 12px); object-fit: cover; object-position: 50% 88%; border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,0.55); }
#ltSplash .ready { display: none; flex-direction: column; gap: 12px; flex: none; }
#ltSplash.is-ready .ready { display: flex; animation: lt-rise 0.3s both; }
#ltSplash.is-ready .load { display: none; }
#ltSplash .install { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 16px; background: rgba(39,39,44,0.96); border: 1px solid rgba(247,181,0,0.45); }
#ltSplash .install[hidden], #ltSplash .install-how[hidden] { display: none; }
#ltSplash .install .ic { font-size: 22px; }
#ltSplash .install .tx { flex: 1; min-width: 0; }
#ltSplash .install .tx b { display: block; font: italic 800 15px var(--lt-font); color: var(--lt-text); }
#ltSplash .install .tx span { display: block; font: 500 12px var(--lt-font); color: var(--lt-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ltSplash .install .go { border: 0; border-radius: 12px; padding: 9px 16px; background: var(--lt-amber); color: #141414; font: italic 800 14px var(--lt-font); cursor: pointer; }
#ltSplash .install .x { border: 0; background: transparent; color: var(--lt-muted); font-size: 16px; padding: 6px; cursor: pointer; }
#ltSplash .install-how { padding: 10px 14px; border-radius: 14px; background: rgba(28,28,31,0.96); font: 500 13px/1.45 var(--lt-font); color: #e2e2e6; }
#ltSplash .pickhead { font: 600 14px var(--lt-font); color: #d4d4d9; }
#ltSplash .routes { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 2px; scrollbar-width: none; touch-action: pan-x; }
#ltSplash .routes::-webkit-scrollbar { display: none; }
#ltSplash .routes button {
  flex: 0 0 auto; min-width: 168px; scroll-snap-align: start; text-align: left; padding: 12px 14px; border-radius: 16px; cursor: pointer;
  background: rgba(39,39,44,0.95); border: 2px solid transparent; color: var(--lt-text);
}
#ltSplash .routes button.on { border-color: var(--lt-amber); background: rgba(52,42,14,0.95); }
#ltSplash .routes button.locked { opacity: 0.5; cursor: default; }
#ltSplash .routes button.all { background: rgba(28,28,31,0.95); border-style: dashed; border-color: rgba(255,255,255,0.18); }
#ltSplash .routes b { display: block; font: italic 800 16px var(--lt-font); white-space: nowrap; }
#ltSplash .routes span { display: block; margin-top: 3px; font: 500 12px var(--lt-font); color: var(--lt-muted); white-space: nowrap; }
#ltSplash .hint { display: flex; justify-content: center; align-items: center; gap: 8px; font: 500 13px var(--lt-font); color: #c8c8ce; }
#ltSplash .hint i { display: grid; color: var(--lt-text); }
#ltSplash .play { width: 100%; padding: 15px 14px 12px; font-size: 28px; }
#ltSplash .play small { font-size: 12px; }
#ltSplash .nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#ltSplash .nav button {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 9px; border-radius: 16px; border: 0;
  background: rgba(39,39,44,0.95); color: var(--lt-text); font: 600 13px var(--lt-font); cursor: pointer;
}
#ltSplash .nav em { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e5252a; color: #fff; font: 700 11px/18px var(--lt-font); font-style: normal; }
/* loading: the bar where PLAY will be */
#ltSplash .load { flex: none; padding: 8px 2px 6px; }
#ltSplash .load .row { display: flex; justify-content: space-between; align-items: baseline; font: 600 13px var(--lt-font); color: #d8d8dd; }
#ltSplash .load .row b { font: italic 800 15px var(--lt-font); color: var(--lt-text); }
#ltSplash .track { height: 6px; margin-top: 8px; border-radius: 6px; background: rgba(255,255,255,0.12); overflow: hidden; }
#ltSplash .track i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--lt-amber); transition: width 0.25s ease; }
#ltSplash .track.busy i { width: 35% !important; animation: lt-slide 1.1s ease-in-out infinite; }
@keyframes lt-slide { from { transform: translateX(-110%); } to { transform: translateX(310%); } }
#ltSplash .tip { margin-top: 8px; font: 500 12px/1.4 var(--lt-font); color: var(--lt-muted); text-align: center; }
/* a sideways phone (short): the poster on the left, everything else on the right */
@media (orientation: landscape) and (max-height: 560px) {
  #ltSplash .col { max-width: none; display: grid; grid-template-columns: 1fr minmax(300px, 46%); grid-template-rows: auto 1fr; column-gap: 18px;
    padding-left: max(14px, env(safe-area-inset-left)); padding-right: max(14px, env(safe-area-inset-right));
    background: linear-gradient(90deg, rgba(14,14,16,0.1) 0%, rgba(14,14,16,0.6) 50%, var(--lt-bg) 62%); }
  #ltSplash .top { grid-column: 1 / 3; }
  #ltSplash .hero { grid-row: 2; min-height: 0; }
  #ltSplash .ready, #ltSplash .load { grid-column: 2; grid-row: 2; align-self: center; gap: 8px; }
  #ltSplash .play { padding: 10px 12px 8px; font-size: 22px; }
  #ltSplash .nav button { padding: 7px 4px 6px; }
  #ltSplash .hint { display: none; }
}
