@import url('https://fonts.googleapis.com/css2?family=Anton&family=Pacifico&family=Roboto+Condensed:wght@400;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #000; font-family: 'Roboto Condensed', Arial, sans-serif; color: #fff; user-select: none; }
#game { position: fixed; inset: 0; }
#game canvas { display: block; transition: filter .6s; }
.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#topRight { position: absolute; top: 18px; right: 26px; text-align: right; text-shadow: 2px 2px 0 #000, 0 0 6px #000; }
#mpStatus { font-size: 13px; letter-spacing: 1px; color: #3dff8a; font-weight: bold; }
#chatLog { position: absolute; left: 260px; bottom: 32px; display: flex; flex-direction: column; gap: 3px; font-size: 15px; text-shadow: 1px 1px 0 #000; }
#chatLog div { background: rgba(0,0,0,.55); padding: 3px 8px; border-left: 3px solid #3dff8a; }
#chatInput { position: fixed; left: 260px; bottom: 8px; width: 320px; padding: 6px 10px; background: rgba(0,0,0,.85); border: 1px solid #ff4fbf; color: #fff; font-family: inherit; pointer-events: auto; }
#mpName { font-family: 'Anton'; font-size: 20px; text-align: center; padding: 8px 18px; width: 260px; background: rgba(0,0,0,.6); border: 2px solid #6ff3ff; color: #fff; letter-spacing: 2px; }
#clock { font-size: 20px; opacity: .9; }
#weaponBox { margin-top: 4px; }
#weaponName { font-family: 'Anton', sans-serif; font-size: 22px; letter-spacing: 1px; }
#ammo { font-size: 18px; color: #ddd; }
#money { font-family: 'Anton', sans-serif; font-size: 34px; color: #7dff8a; margin-top: 2px; }
#bank { font-size: 15px; color: #9fd; }
#stars { font-size: 30px; letter-spacing: 2px; margin-top: 2px; min-height: 36px; }
#stars .on { color: #fff; }
#stars .off { color: rgba(255,255,255,.18); }
#stars.flash .on { animation: starflash .5s infinite; }
@keyframes starflash { 50% { color: #4cf; } }

#minimapWrap { position: absolute; left: 24px; bottom: 24px; width: 220px; }
#minimap { width: 220px; height: 220px; border-radius: 8px; border: 3px solid rgba(0,0,0,.7); background: #1d4a5e; box-shadow: 0 0 12px rgba(0,0,0,.6); }
#bars { display: flex; gap: 4px; margin-top: 4px; }
.bar { flex: 1; height: 8px; background: rgba(0,0,0,.6); border: 1px solid rgba(0,0,0,.8); }
.bar div { height: 100%; width: 100%; transition: width .2s; }
#hpBar { background: #4bd05b; }
#armorBar { background: #3ea6ff; }
#staminaBar { background: #ffd23e; }
.bar.small { display: inline-block; width: 90px; height: 7px; vertical-align: middle; }
#fuelBar { background: #ff9d2e; }

#vehicleHud { position: absolute; right: 26px; bottom: 30px; text-align: right; text-shadow: 2px 2px 0 #000; }
#speedo { font-family: 'Anton', sans-serif; font-size: 44px; }
#speedo span { font-size: 18px; }
#fuelWrap { font-size: 14px; }
#radioName { font-size: 16px; color: #ff6ad5; margin-top: 4px; }

#charTag { position: absolute; left: 24px; bottom: 268px; font-family: 'Anton'; font-size: 18px; letter-spacing: 2px; text-shadow: 2px 2px 0 #000; }

#crosshair { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -52%); font-size: 26px; color: #fff; text-shadow: 0 0 3px #000; display: none; }
#crosshair.on { display: block; }
#crosshair.hit { color: #ff4040; }

#objective { position: absolute; bottom: 120px; width: 100%; text-align: center; font-size: 24px; text-shadow: 2px 2px 0 #000, 0 0 8px #000; }
#objective b { color: #ffd23e; }
#subtitle { position: absolute; bottom: 70px; width: 100%; text-align: center; font-size: 22px; text-shadow: 2px 2px 0 #000, 0 0 8px #000; }
#subtitle .who { font-weight: bold; }

#helpBox { position: absolute; top: 18px; left: 24px; max-width: 360px; background: rgba(0,0,0,.75); padding: 12px 16px; font-size: 17px; line-height: 1.35; border-radius: 4px; display: none; }
#helpBox.on { display: block; }
#helpBox kbd { background: #eee; color: #000; padding: 0 6px; border-radius: 3px; font-weight: bold; }

#regionName { position: absolute; right: 30px; bottom: 150px; font-family: 'Pacifico', cursive; font-size: 40px; color: #ffcf5c; text-shadow: 3px 3px 0 #000; opacity: 0; transition: opacity 1s; text-align: right; }
#regionName small { display: block; font-family: 'Roboto Condensed'; font-size: 18px; color: #fff; }
#regionName.on { opacity: 1; }

#notify { position: absolute; top: 200px; left: 24px; display: flex; flex-direction: column; gap: 6px; }
#notify .n { background: rgba(0,0,0,.78); padding: 8px 12px; border-left: 4px solid #ff4fbf; max-width: 330px; font-size: 15px; animation: nin .3s; }
@keyframes nin { from { transform: translateX(-30px); opacity: 0; } }

#robMeter { position: absolute; top: 40%; left: 50%; transform: translateX(-50%); width: 260px; height: 22px; background: rgba(0,0,0,.7); border: 2px solid #fff; }
#robFill { height: 100%; width: 0; background: #7dff8a; }
#robMeter span { position: absolute; inset: 0; text-align: center; font-weight: bold; line-height: 18px; color: #000; mix-blend-mode: difference; filter: invert(1); }

#bigText { position: absolute; top: 38%; width: 100%; text-align: center; font-family: 'Anton', sans-serif; font-size: 84px; letter-spacing: 4px; opacity: 0; transition: opacity .6s; text-shadow: 4px 4px 0 #000; }
#bigText.on { opacity: 1; }
#bigText.wasted { color: #c72020; }
#bigText.busted { color: #3d8bff; }
#bigText.passed { color: #ffd23e; }
#bigText small { display: block; font-family: 'Roboto Condensed'; font-size: 26px; color: #fff; letter-spacing: 1px; }

/* ---------- PHONE ---------- */
#phone { position: fixed; right: 40px; bottom: 30px; width: 320px; height: 560px; background: #0d0d14; border: 10px solid #222; border-radius: 34px; box-shadow: 0 0 30px rgba(0,0,0,.8); display: flex; flex-direction: column; overflow: hidden; }
.phoneTop { display: flex; justify-content: space-between; padding: 8px 18px; font-size: 13px; background: linear-gradient(90deg, #ff4fbf, #6a5cff); }
#phoneTabs { display: flex; }
#phoneTabs button { flex: 1; background: #1b1b28; color: #fff; border: none; padding: 8px 0; font-family: inherit; font-weight: bold; cursor: pointer; }
#phoneTabs button.active { background: #ff4fbf; }
#phoneBody { flex: 1; overflow-y: auto; padding: 10px; font-size: 14px; }
.post { background: #1b1b28; border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; }
.post .h { color: #ff8ad8; font-weight: bold; }
.post .t { color: #888; font-size: 11px; float: right; }
.post .likes { color: #888; font-size: 12px; margin-top: 4px; }
.job { background: #1b1b28; border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; }
.job.done { opacity: .45; }
.job b { color: #ffd23e; }
#phoneBody button { width: 100%; padding: 10px; margin-bottom: 8px; border: none; border-radius: 8px; background: #6a5cff; color: #fff; font-family: inherit; font-weight: bold; cursor: pointer; }
.phoneHint { text-align: center; font-size: 11px; color: #666; padding: 6px; }
.statRow { display: flex; justify-content: space-between; margin: 6px 0; }
.statBar { width: 120px; height: 8px; background: #333; margin-top: 5px; }
.statBar div { height: 100%; background: #ffd23e; }

/* ---------- MAP ---------- */
#bigMap { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; flex-direction: column; align-items: center; justify-content: center; }
#mapCanvas { height: 88vh; width: 88vh; border: 3px solid #333; cursor: crosshair; }
.mapHint { margin-top: 8px; color: #aaa; }

/* ---------- SHOP ---------- */
#shop { position: fixed; left: 40px; top: 80px; width: 380px; background: rgba(8,8,14,.92); border-top: 5px solid #ff4fbf; padding: 16px; }
#shop h2 { font-family: 'Anton'; letter-spacing: 2px; margin-bottom: 10px; }
.shopItem { display: flex; justify-content: space-between; padding: 9px 10px; margin-bottom: 4px; background: #1b1b28; cursor: pointer; }
.shopItem:hover { background: #ff4fbf; }
.shopItem.owned { opacity: .5; }
.shopHint { margin-top: 10px; color: #888; font-size: 13px; }

/* ---------- PAUSE ---------- */
#pause { position: fixed; inset: 0; background: rgba(5,0,20,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
#pause h1 { font-family: 'Anton'; font-size: 64px; letter-spacing: 6px; color: #ff4fbf; }
.controls { max-width: 720px; text-align: center; color: #ddd; line-height: 1.6; margin-bottom: 14px; }
.controls h3 { color: #ffd23e; margin-top: 8px; }
#pause button, #titleButtons button { font-family: 'Anton'; font-size: 22px; letter-spacing: 2px; padding: 10px 40px; min-width: 260px; background: transparent; border: 2px solid #fff; color: #fff; cursor: pointer; }
#pause button:hover, #titleButtons button:hover { background: #ff4fbf; border-color: #ff4fbf; }

/* ---------- TITLE ---------- */
#title { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #12002a; }
.sunset { position: absolute; inset: 0; background: linear-gradient(180deg, #12002a 0%, #4a0b5e 35%, #e0407a 60%, #ff9a3c 75%, #ffd36b 80%, #0b2a4a 80.5%, #04121f 100%); }
.sunset::after { content: ''; position: absolute; left: 50%; top: 50%; width: 360px; height: 360px; transform: translate(-50%, -40%); border-radius: 50%; background: repeating-linear-gradient(180deg, #ffe46b 0 18px, transparent 18px 26px); opacity: .85; mask-image: linear-gradient(#000 40%, transparent 85%); -webkit-mask-image: linear-gradient(#000 40%, transparent 85%); }
.titleInner { position: relative; text-align: center; }
.logo { font-family: 'Pacifico', cursive; font-size: 150px; color: #fff; text-shadow: 0 0 10px #ff4fbf, 0 0 30px #ff4fbf, 0 0 60px #ff4fbf, 6px 6px 0 #6a1b9a; line-height: 1.1; }
.sub { font-family: 'Anton'; font-size: 44px; letter-spacing: 22px; color: #6ff3ff; text-shadow: 0 0 12px #00e1ff; }
.tag { margin-top: 14px; font-size: 20px; letter-spacing: 3px; color: #ffe; }
#loadingText { margin-top: 40px; font-size: 18px; color: #ffd; }
#titleButtons { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.disclaimer { margin-top: 50px; font-size: 12px; color: rgba(255,255,255,.55); }

#fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .5s; }
#fade.on { opacity: 1; }
