Replace the linear forest walk with an open area of real western Mashhad built from OpenStreetMap data, starting at Park Mellat. A father and child, guided by the Robot Market robot, find vending machines at a park, school, universities, a metro station and a mall, on foot or by car. - Iran province briefing map; only Mashhad is unlocked - Third-person camera, building collision, arcade car and ambient traffic - Minimap and full city map with addresses, opening hours and A* routing - Purchase scoring, missions with cash rewards, ranks and an end screen - Map data build script (OSM + Natural Earth) and new logic tests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
278 lines
14 KiB
CSS
278 lines
14 KiB
CSS
:root {
|
|
--hud: rgba(236, 242, 238, .92);
|
|
--dim: rgba(200, 214, 207, .65);
|
|
--panel: rgba(10, 16, 14, .62);
|
|
--panel-solid: rgba(10, 16, 14, .9);
|
|
--line: rgba(220, 235, 228, .2);
|
|
--gold: #f2c94c;
|
|
--teal: #3ee0c9;
|
|
--red: #ff6b5e;
|
|
--font: 'Vazirmatn', Tahoma, sans-serif;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body {
|
|
margin: 0;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
background: #0d1412;
|
|
color: var(--hud);
|
|
font-family: var(--font);
|
|
-webkit-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
button { font: inherit; cursor: pointer; }
|
|
|
|
#world { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
|
|
|
|
#loading {
|
|
position: fixed; inset: 0; display: grid; place-items: center; z-index: 50;
|
|
background: #0d1412; color: var(--teal); font-size: 18px; letter-spacing: .5px;
|
|
}
|
|
|
|
/* ---------- Briefing ---------- */
|
|
#briefing {
|
|
position: fixed; inset: 0; z-index: 40; display: grid; grid-template-columns: 1.3fr 1fr;
|
|
background: radial-gradient(circle at 30% 40%, #16231f 0%, #070b0a 75%);
|
|
}
|
|
#briefing[hidden] { display: none; }
|
|
.brief-map { position: relative; }
|
|
.brief-map::after {
|
|
content: ''; position: absolute; inset: 0; pointer-events: none;
|
|
background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 4px);
|
|
}
|
|
#iran { width: 100%; height: 100%; display: block; }
|
|
.brief-panel {
|
|
align-self: center; margin: 24px; padding: 28px; max-width: 520px;
|
|
background: var(--panel); border: 1px solid var(--line); border-inline-start: 3px solid var(--gold);
|
|
}
|
|
.tag { color: var(--gold); letter-spacing: 1px; font-weight: 600; }
|
|
.brief-panel h1 { margin: 6px 0 0; font-size: clamp(32px, 5vw, 52px); font-weight: 800; }
|
|
.sub { margin: 0 0 18px; color: var(--teal); }
|
|
#brief-text {
|
|
min-height: 190px; margin: 0 0 20px; white-space: pre-wrap; font-family: var(--font);
|
|
font-size: 15px; line-height: 1.9; color: var(--hud);
|
|
}
|
|
#start-mission {
|
|
width: 100%; padding: 14px; border: 0; background: var(--gold); color: #1b1406;
|
|
font-size: 18px; font-weight: 800; letter-spacing: .5px;
|
|
}
|
|
#start-mission:hover { filter: brightness(1.08); }
|
|
.keys { color: var(--dim); font-size: 12px; line-height: 1.8; margin-bottom: 0; }
|
|
|
|
/* ---------- HUD ---------- */
|
|
#hud[hidden] { display: none; }
|
|
#hud > * { position: fixed; z-index: 10; }
|
|
#compass {
|
|
top: 14px; left: 50%; transform: translateX(-50%); width: min(560px, 80vw); height: 44px;
|
|
pointer-events: none;
|
|
}
|
|
#minimap-button {
|
|
top: 18px; left: 18px; width: 220px; height: 220px; padding: 0; border: 0; border-radius: 50%;
|
|
background: transparent;
|
|
}
|
|
#minimap { width: 220px; height: 220px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(0, 0, 0, .35); }
|
|
.map-hint {
|
|
position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); padding: 2px 10px;
|
|
background: var(--panel-solid); color: var(--dim); font-size: 11px; border: 1px solid var(--line);
|
|
}
|
|
#location { top: 252px; left: 18px; width: 220px; text-align: center; text-shadow: 0 1px 3px #000; }
|
|
#street { display: block; font-weight: 600; font-size: 14px; }
|
|
#mode-label { color: var(--teal); }
|
|
|
|
#objectives {
|
|
top: 18px; right: 18px; width: min(330px, 40vw); padding: 12px 14px;
|
|
background: linear-gradient(270deg, var(--panel) 60%, transparent);
|
|
border-inline-start: 3px solid var(--gold);
|
|
}
|
|
#objectives h2 { margin: 0 0 6px; font-size: 13px; color: var(--gold); letter-spacing: 1px; }
|
|
#mission-list { margin: 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.7; }
|
|
#mission-list li { color: var(--dim); }
|
|
#mission-list li.active { color: var(--hud); font-weight: 600; }
|
|
#mission-list li.active::before { content: '◆ '; color: var(--gold); }
|
|
#mission-list li.done { text-decoration: line-through; opacity: .55; }
|
|
#mission-list li.done::before { content: '✓ '; color: var(--teal); }
|
|
#mission-list li.hidden { display: none; }
|
|
|
|
#waypoint {
|
|
transform: translate(-50%, -100%); display: grid; justify-items: center; gap: 2px;
|
|
pointer-events: none; text-shadow: 0 1px 3px #000; white-space: nowrap;
|
|
}
|
|
#waypoint[hidden] { display: none; }
|
|
#waypoint i { width: 16px; height: 16px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 10px rgba(242, 201, 76, .8); }
|
|
#waypoint b { font-size: 12px; }
|
|
#waypoint span { font-size: 12px; color: var(--gold); }
|
|
|
|
#crosshair {
|
|
top: 50%; left: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%;
|
|
background: rgba(255, 255, 255, .7); pointer-events: none;
|
|
}
|
|
|
|
#prompt {
|
|
bottom: 28%; left: 50%; transform: translateX(-50%); padding: 8px 18px;
|
|
background: var(--panel-solid); border: 1px solid var(--line); font-weight: 600; white-space: nowrap;
|
|
}
|
|
#prompt kbd {
|
|
display: inline-block; min-width: 26px; margin-inline-end: 8px; padding: 1px 6px; text-align: center;
|
|
background: var(--hud); color: #111; border-radius: 3px; font-family: var(--font); font-weight: 800;
|
|
}
|
|
#subtitle {
|
|
bottom: 12%; left: 50%; transform: translateX(-50%); max-width: min(720px, 90vw); padding: 8px 16px;
|
|
background: rgba(0, 0, 0, .55); text-align: center; font-size: 16px; line-height: 1.7;
|
|
}
|
|
#subtitle b { margin-inline-end: 8px; }
|
|
#subtitle b.robot { color: var(--teal); }
|
|
#subtitle b.father { color: var(--gold); }
|
|
#subtitle b.child { color: #ff9f7a; }
|
|
|
|
#awards {
|
|
top: 36%; left: 50%; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px;
|
|
pointer-events: none; text-shadow: 0 2px 4px #000;
|
|
}
|
|
#awards .total { font-size: 34px; font-weight: 800; color: var(--gold); animation: pop .35s ease-out; }
|
|
#awards .line { font-size: 14px; font-weight: 600; animation: slide .4s ease-out backwards; }
|
|
#awards .line b { color: var(--gold); margin-inline-start: 6px; }
|
|
@keyframes pop { from { transform: scale(1.6); opacity: 0; } }
|
|
@keyframes slide { from { transform: translateY(8px); opacity: 0; } }
|
|
|
|
#banner {
|
|
top: 22%; left: 0; right: 0; padding: 14px; text-align: center; pointer-events: none;
|
|
background: linear-gradient(90deg, transparent, rgba(10, 16, 14, .82) 25%, rgba(10, 16, 14, .82) 75%, transparent);
|
|
animation: pop .4s ease-out;
|
|
}
|
|
#banner small { display: block; color: var(--gold); letter-spacing: 2px; font-weight: 600; }
|
|
#banner strong { font-size: 22px; }
|
|
#banner span { display: block; color: var(--teal); font-size: 14px; }
|
|
|
|
#status { bottom: 18px; right: 18px; display: flex; gap: 10px; }
|
|
.stat {
|
|
min-width: 96px; padding: 6px 12px; background: var(--panel); border-bottom: 2px solid var(--teal);
|
|
display: grid; line-height: 1.3;
|
|
}
|
|
.stat small { color: var(--dim); font-size: 11px; }
|
|
.stat strong { font-size: 22px; font-weight: 800; }
|
|
.stat span { font-size: 11px; color: var(--dim); }
|
|
.stat[hidden] { display: none; }
|
|
|
|
#rank { bottom: 18px; left: 50%; transform: translateX(-50%); width: min(380px, 50vw); padding: 4px 10px; text-align: center; font-size: 12px; background: var(--panel); }
|
|
#rank b { color: var(--gold); margin-inline-end: 8px; }
|
|
#rank span { color: var(--dim); }
|
|
#rank .bar { height: 4px; margin-top: 4px; background: rgba(255, 255, 255, .15); }
|
|
#rank .bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .6s; }
|
|
|
|
#toolbar { bottom: 18px; left: 18px; display: flex; gap: 6px; }
|
|
#toolbar button, .ghost {
|
|
padding: 6px 12px; background: var(--panel); color: var(--hud); border: 1px solid var(--line); font-size: 12px;
|
|
}
|
|
#attribution { bottom: 2px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--dim); }
|
|
|
|
/* ---------- Payment ---------- */
|
|
#payment {
|
|
position: fixed; z-index: 20; bottom: 18%; right: 50%; transform: translateX(50%); width: min(380px, 92vw);
|
|
padding: 16px 18px; background: var(--panel-solid); border: 1px solid var(--line); border-top: 3px solid var(--teal);
|
|
}
|
|
#payment[hidden] { display: none; }
|
|
#payment small { color: var(--teal); }
|
|
#payment h2 { margin: 4px 0; font-size: 18px; }
|
|
#payment p { margin: 0 0 12px; color: var(--dim); }
|
|
.actions { display: flex; gap: 8px; }
|
|
#swipe, #again, #route-button {
|
|
flex: 1; padding: 10px; border: 0; background: var(--teal); color: #04201b; font-weight: 800;
|
|
}
|
|
#swipe:disabled { opacity: .45; cursor: wait; }
|
|
|
|
/* ---------- Dialogs ---------- */
|
|
dialog {
|
|
color: var(--hud); background: var(--panel-solid); border: 1px solid var(--line); padding: 0;
|
|
font-family: var(--font); backdrop-filter: blur(6px);
|
|
}
|
|
dialog::backdrop { background: rgba(0, 0, 0, .45); }
|
|
dialog header { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
|
|
.close { width: 34px; height: 34px; background: transparent; color: var(--hud); border: 1px solid var(--line); }
|
|
|
|
#map-dialog { width: min(1180px, 96vw); height: min(760px, 92vh); }
|
|
#map-dialog[open] { display: flex; flex-direction: column; }
|
|
.tabs { display: flex; gap: 4px; }
|
|
.tabs button { padding: 6px 14px; background: transparent; color: var(--dim); border: 1px solid var(--line); }
|
|
.tabs button[aria-selected='true'] { color: #1b1406; background: var(--gold); border-color: var(--gold); font-weight: 600; }
|
|
.map-body { flex: 1; display: grid; grid-template-columns: 1fr 320px; min-height: 0; }
|
|
.map-view { position: relative; min-height: 0; }
|
|
#fullmap, #iran-map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
|
|
#fullmap[hidden], #iran-map[hidden] { display: none; }
|
|
.map-help { position: absolute; bottom: 6px; right: 10px; margin: 0; font-size: 11px; color: var(--dim); pointer-events: none; }
|
|
.map-side { overflow: auto; padding: 14px; border-inline-start: 1px solid var(--line); }
|
|
.map-side h3 { margin: 0 0 10px; font-size: 14px; color: var(--gold); }
|
|
#machine-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
|
|
#machine-list button {
|
|
width: 100%; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; text-align: right;
|
|
padding: 8px; background: rgba(255, 255, 255, .04); color: var(--hud); border: 1px solid transparent;
|
|
}
|
|
#machine-list button.selected { border-color: var(--gold); }
|
|
#machine-list button.locked { opacity: .45; cursor: default; }
|
|
#machine-list .meta { display: block; color: var(--dim); font-size: 11px; }
|
|
#machine-list .dist { color: var(--gold); font-size: 12px; white-space: nowrap; }
|
|
#machine-detail { margin-bottom: 12px; padding: 12px; background: rgba(255, 255, 255, .05); border-top: 2px solid var(--gold); }
|
|
#machine-detail h4 { margin: 0 0 6px; }
|
|
#machine-detail p { margin: 0 0 8px; font-size: 13px; color: var(--dim); line-height: 1.7; }
|
|
#route-button { width: 100%; }
|
|
|
|
#shop { width: min(620px, 94vw); }
|
|
#shop small { color: var(--teal); }
|
|
#shop h2 { margin: 2px 0; }
|
|
#shop header p { margin: 0; color: var(--dim); font-size: 13px; }
|
|
#shop-note { margin: 10px 18px 0; color: var(--gold); font-size: 13px; }
|
|
#products { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; padding: 14px 18px; }
|
|
#products button {
|
|
display: grid; gap: 2px; justify-items: center; padding: 12px 8px; color: var(--hud);
|
|
background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
|
|
}
|
|
#products button:hover:not(:disabled) { border-color: var(--teal); background: rgba(62, 224, 201, .1); }
|
|
#products button:disabled { opacity: .4; cursor: not-allowed; }
|
|
#products .icon { font-size: 30px; }
|
|
#products .price { color: var(--gold); font-weight: 600; }
|
|
#products s { color: var(--dim); font-size: 11px; }
|
|
.rate { margin: 0; padding: 0 18px 14px; font-size: 11px; color: var(--dim); }
|
|
|
|
#end { width: min(480px, 92vw); padding: 24px; text-align: center; border-top: 3px solid var(--gold); }
|
|
#end small { color: var(--gold); letter-spacing: 1px; }
|
|
#end h2 { margin: 6px 0; font-size: 28px; }
|
|
#end-stats { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 4px; }
|
|
#end-stats li { display: flex; justify-content: space-between; padding: 6px 10px; background: rgba(255, 255, 255, .05); }
|
|
|
|
/* ---------- Touch ---------- */
|
|
#touch[hidden] { display: none; }
|
|
#touch { inset: auto 0 90px 0; display: flex; justify-content: space-between; padding: 0 24px; pointer-events: none; }
|
|
#stick {
|
|
width: 130px; height: 130px; border-radius: 50%; border: 2px solid var(--line); background: rgba(0, 0, 0, .25);
|
|
position: relative; pointer-events: auto; touch-action: none; order: 2;
|
|
}
|
|
#stick i { position: absolute; left: 40px; top: 40px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
|
|
.touch-buttons { display: grid; gap: 10px; pointer-events: auto; align-content: end; }
|
|
.touch-buttons button {
|
|
width: 64px; height: 64px; border-radius: 50%; background: var(--panel); color: var(--hud); border: 1px solid var(--line); font-weight: 800;
|
|
}
|
|
.touch-buttons button.on { background: var(--teal); color: #04201b; }
|
|
|
|
@media (max-width: 760px) {
|
|
#briefing { grid-template-columns: 1fr; grid-template-rows: 38vh 1fr; }
|
|
.brief-panel { margin: 0 16px 16px; padding: 18px; align-self: start; }
|
|
#brief-text { min-height: 150px; font-size: 13px; }
|
|
#minimap-button, #minimap { width: 130px; height: 130px; }
|
|
#minimap-button { top: 62px; left: 12px; }
|
|
#location { top: 198px; left: 12px; width: 130px; }
|
|
#objectives { top: 62px; right: 12px; width: 52vw; padding: 8px; }
|
|
#mission-list li:not(.active) { display: none; }
|
|
#status { right: 12px; bottom: 12px; }
|
|
.stat { min-width: 70px; padding: 4px 8px; }
|
|
.stat strong { font-size: 16px; }
|
|
#rank { bottom: auto; top: 6px; width: 70vw; }
|
|
#compass { top: 30px; }
|
|
#toolbar { left: 12px; bottom: 12px; }
|
|
#toolbar button { padding: 4px 8px; font-size: 11px; }
|
|
#crosshair { display: none; }
|
|
.map-body { grid-template-columns: 1fr; grid-template-rows: 1fr 40%; }
|
|
.map-side { border-inline-start: 0; border-top: 1px solid var(--line); }
|
|
}
|