hughe update

This commit is contained in:
2026-11-15 17:08:11 +01:00
parent 7a69651b6d
commit 319436a5f9
50 changed files with 1987 additions and 313 deletions

View File

@@ -6,26 +6,53 @@
<title>Robot Clash</title>
<link rel="icon" href="assets/Sprites/icon.png">
<style>
/* Headline font, shipped with the game so it also works offline / in the exe.
Russo One (c) 2011-2012 Jovanny Lemonad - SIL Open Font License 1.1 (assets/Fonts/OFL.txt).
build-web.mjs turns the url() into a data: URI for the single-file release. */
@font-face { font-family: "Russo One"; font-style: normal; font-weight: 400;
src: url('assets/Fonts/RussoOne-Regular.ttf') format('truetype'); font-display: swap; }
:root {
--bg: #090b10; --panel: #151920; --panel2: #1c212b; --line: #2d3442; --text: #e8ebf2; --dim: #8d95a8;
--accent: #ff7a1a; --good: #6dff9e; --warn: #ff5a4a; --blue: #4fa8ff; --gold: #ffc940;
--head: "Russo One", "Segoe UI Black", "Arial Black", Impact, sans-serif;
/* shared look: soft metal sheen, 1px top highlight, chamfered corners, hazard tape */
--r1: 4px; --r2: 8px; --r3: 12px;
--steel: linear-gradient(#242a35, #1a1f28);
--sheen: linear-gradient(rgba(255,255,255,.04), rgba(0,0,0,.07));
--hl: inset 0 1px 0 rgba(255,255,255,.07);
--chamfer: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
--hazard: repeating-linear-gradient(45deg, var(--accent) 0 6px, #1a1008 6px 12px);
}
* { box-sizing: border-box; }
/* never show a scrollbar - screens are built to fit; overflow stays reachable by wheel/touch */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
font: 15px/1.35 "Segoe UI", system-ui, sans-serif; user-select: none; -webkit-user-select: none; touch-action: none; }
body { display: flex; align-items: center; justify-content: center;
background: radial-gradient(circle at 50% 25%, #1d1f26 0%, var(--bg) 70%); }
body { display: flex; align-items: center; justify-content: center; background: #05060a; }
/* fixed design size, scaled to the window by Kit.fit */
#app { position: relative; width: 960px; display: flex; flex-direction: column; gap: 8px; }
#hud { display: flex; gap: 8px; align-items: center; height: 38px; }
#app { position: relative; width: 1280px; display: flex; flex-direction: column; }
/* HUD lives INSIDE the stage (full-screen game look), above the overlay so menus keep it reachable */
#hud { position: absolute; left: 0; right: 0; top: 0; z-index: 7; display: flex; gap: 8px; align-items: center;
height: 44px; padding: 0 12px; pointer-events: none;
background: linear-gradient(rgba(6,8,12,.9) 35%, rgba(6,8,12,0)); }
#hud > * { pointer-events: auto; }
#hud button { min-height: 34px; padding: 4px 10px; }
#hud .icobtn { width: 36px; height: 34px; padding: 0; font-size: 15px; }
/* per screen: title has its own menu, the fight only keeps pause + sound under the health box */
body[data-mode="intro"] #hud, body[data-mode="title"] #hud, body[data-mode="account"] #hud { display: none; }
body[data-mode="fight"] #hud, body[data-mode="pause"] #hud { top: 92px; height: 36px; background: none; }
body[data-mode="fight"] #hud > *, body[data-mode="pause"] #hud > * { display: none; }
body[data-mode="fight"] #hud > .icobtn, body[data-mode="pause"] #hud > .icobtn { display: block; }
.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; display: flex; align-items: center; gap: 6px; }
.chip b { color: var(--accent); font-variant-numeric: tabular-nums; }
.chip .pic { width: 22px; height: 22px; }
.grow { flex: 1; }
.logo { font-family: var(--head); letter-spacing: .06em; color: var(--accent); font-size: 20px; padding: 0 6px; }
#stage { position: relative; width: 960px; height: 540px; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; background: #000; }
#stage { position: relative; width: 1280px; height: 720px; overflow: hidden; background: #000; }
#stage::after { content: ''; position: absolute; inset: 0; z-index: 8; pointer-events: none;
background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(0,0,0,.3) 100%); }
#stage > canvas { position: absolute; left: 0; top: 0; display: block; }
#cv { pointer-events: none; z-index: 2; }
#gl { z-index: 1; }
@@ -38,27 +65,52 @@
.pic img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.pic img.missing { visibility: hidden; }
button { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line);
border-radius: 8px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { background: linear-gradient(#ff8f3a, #e8650a); color: #1a0c02; border-color: #ffa25a; font-weight: 700; padding: 10px 24px; font-family: var(--head); letter-spacing: .04em; box-shadow: 0 3px 0 #7a3000; }
button.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 #7a3000; }
button:disabled { opacity: .4; cursor: default; }
button:disabled:hover { border-color: var(--line); }
button.link { background: none; border: none; color: var(--accent); padding: 2px 4px; text-decoration: underline; }
button { font: inherit; color: var(--text); background: var(--steel); border: 1px solid var(--line);
border-radius: var(--r2); padding: 6px 12px; min-height: 34px; cursor: pointer; box-shadow: var(--hl);
transition: border-color .1s, filter .1s, transform .06s; }
button:active { transform: translateY(1px); }
@media (hover: hover) { button:hover { border-color: var(--accent); filter: brightness(1.12); } }
/* main action: chamfered, hazard-orange, with a solid edge instead of a blurred shadow (clip-path cuts shadows) */
button.primary { background: linear-gradient(#ff8f3a, #e8650a); color: #1a0c02; border: 1px solid #ffa25a;
border-bottom: 3px solid #7a3000; font-weight: 700; padding: 8px 20px; min-height: 42px;
font-family: var(--head); letter-spacing: .05em; text-transform: uppercase; clip-path: var(--chamfer); box-shadow: none; }
button.primary:active { transform: translateY(2px); border-bottom-width: 1px; }
button:disabled { opacity: .4; cursor: default; filter: none; }
button:disabled:hover { border-color: var(--line); filter: none; }
button.link { background: none; border: none; color: var(--accent); padding: 2px 4px; min-height: 0;
text-decoration: underline; box-shadow: none; }
input[type=text], input[type=password], input[type=email] { font: inherit; width: 100%; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line);
background: #0b0e14; color: var(--text); }
input:focus { outline: none; border-color: var(--accent); }
/* menus fade in once per screen (#overlay.enter is removed again, so live lists do not flicker) */
@keyframes cardIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
#overlay.enter > * { animation: cardIn .14s ease-out; }
.tab, .item, .fitted .frow, .rroom, .prow { transition: border-color .1s, background-color .1s, transform .1s; }
@media (hover: hover) { .item:hover { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation: none !important; transition: none !important; }
}
/* every panel shares the same sheen + top highlight */
.card, .fbox, #detail, .item, .prow, .hmrow, .rroom, .opp, .stats, .chip, .tab, .fitted .frow {
background-image: var(--sheen); box-shadow: var(--hl); }
/* overlays (menus) */
#overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
#overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-top: 40px;
background: rgba(5, 6, 10, .62) center / cover no-repeat; z-index: 6; }
#overlay::before { content: ''; position: absolute; inset: 0; pointer-events: none;
background: radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(0,0,0,.55) 100%); }
body[data-mode="title"] #overlay, body[data-mode="intro"] #overlay { padding-top: 0; }
#overlay.hide { display: none; }
#overlay.clear { background-color: transparent; }
.card { background: rgba(21, 25, 32, .94); border: 1px solid var(--line); border-radius: 14px; padding: 22px 30px;
min-width: 380px; max-width: 760px; max-height: 520px; overflow-y: auto; text-align: center; box-shadow: 0 20px 60px #000a; }
min-width: 380px; max-width: 760px; max-height: 600px; overflow-y: auto; text-align: center; box-shadow: 0 20px 60px #000a; }
.card h1 { margin: 0 0 6px; font: 44px var(--head); letter-spacing: .05em; color: var(--accent); text-shadow: 0 3px 0 #5a2600; }
.card h2 { margin: 0 0 8px; font: 26px var(--head); letter-spacing: .04em; color: var(--accent); }
.card h2 { margin: 0 0 10px; padding-bottom: 8px; font: 26px var(--head); letter-spacing: .04em; color: var(--accent);
position: relative; }
.card h2::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
width: 84px; height: 4px; border-radius: 2px; background: var(--hazard); opacity: .85; }
.card h3 { margin: 12px 0 6px; font: 14px var(--head); letter-spacing: .06em; color: var(--dim); text-align: left; }
.card p { color: var(--dim); margin: 6px 0 14px; }
.board { list-style: none; padding: 0; margin: 14px 0 0; text-align: left; font-variant-numeric: tabular-nums; max-height: 150px; overflow: auto; }
@@ -73,13 +125,22 @@
.keys b { color: var(--text); }
.err { color: var(--warn); font-size: 13px; min-height: 18px; margin: 6px 0; }
/* title screen */
.title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 38px;
background: linear-gradient(180deg, rgba(4,5,8,0) 30%, rgba(4,5,8,.85) 100%); }
.title .big { font: 76px var(--head); letter-spacing: .06em; color: var(--accent); text-shadow: 0 5px 0 #5a2600, 0 0 40px rgba(255,122,26,.5); line-height: 1; }
.title .tag { color: #c9cfdc; margin: 6px 0 18px; text-shadow: 0 2px 4px #000; }
.title .row { margin-top: 8px; }
.title .credits { margin-top: 18px; }
/* title screen: menu column on the left, the 3D camera ride stays visible on the right */
.title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-start;
background: linear-gradient(90deg, rgba(4,5,8,.93) 0%, rgba(4,5,8,.8) 30%, rgba(4,5,8,0) 62%); }
.tpanel { width: 420px; padding: 0 20px 0 44px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.tlogoimg { width: 100%; max-height: 170px; object-fit: contain; object-position: left center;
filter: drop-shadow(0 6px 18px #000); animation: logoglow 3.6s ease-in-out infinite; }
@keyframes logoglow { 50% { filter: drop-shadow(0 6px 18px #000) drop-shadow(0 0 14px rgba(255,122,26,.45)); } }
.title .big { font: 62px var(--head); letter-spacing: .05em; color: var(--accent); line-height: .98;
text-shadow: 0 5px 0 #5a2600, 0 0 40px rgba(255,122,26,.5); }
.title .tag { color: #c9cfdc; margin: 0; text-shadow: 0 2px 4px #000; }
.hazbar { height: 5px; border-radius: 3px; background: var(--hazard); opacity: .9; }
.tmenu { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.tmenu button { min-height: 48px; width: 100%; }
.trow2 { display: flex; gap: 6px; flex-wrap: wrap; }
.trow2 button { flex: 1 1 auto; font-size: 13px; min-height: 36px; padding: 4px 10px; }
.title .credits { margin-top: 10px; }
.skip { position: absolute; right: 16px; bottom: 12px; font-size: 12px; color: rgba(255,255,255,.55); }
.form { width: 320px; margin: 0 auto; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.form label { font-size: 13px; color: var(--dim); }
@@ -90,13 +151,13 @@
/* settings */
.set { display: grid; grid-template-columns: 150px 1fr; gap: 10px 14px; align-items: center; text-align: left; min-width: 460px; }
.set input[type=range] { width: 100%; accent-color: var(--accent); }
.seg { display: flex; gap: 4px; }
.seg button { flex: 1; padding: 5px 8px; font-size: 13px; }
.seg { display: flex; gap: 4px; flex-wrap: wrap; }
.seg button { flex: 1 1 56px; padding: 5px 8px; font-size: 13px; }
.seg button.on { background: var(--accent); color: #1a0c02; border-color: var(--accent); font-weight: 700; }
/* compact settings: two columns of label + control */
.set2 { display: grid; grid-template-columns: 96px 1fr 96px 1fr; gap: 7px 12px; align-items: center; text-align: left; min-width: 680px; }
.set2 .sl, .setacc .sl { font-size: 13px; color: var(--dim); }
.set2 .seg button { padding: 6px 4px; font-size: 12px; min-height: 32px; }
.set2 .seg button { padding: 6px 4px; font-size: 12px; min-height: 34px; }
.set2 input[type=range] { width: 100%; accent-color: var(--accent); height: 28px; }
.setacc { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; text-align: left; margin-top: 12px;
padding-top: 10px; border-top: 1px solid var(--line); }
@@ -122,14 +183,24 @@
.res .plus { color: var(--good); } .res .minus { color: var(--warn); }
/* shop */
#shop { position: absolute; inset: 0; display: grid; grid-template-columns: 340px 1fr; z-index: 3; pointer-events: none; }
#shop { position: absolute; inset: 44px 0 0; display: grid; grid-template-columns: 340px 1fr; z-index: 3; pointer-events: none; }
#shop.hide, #fightHud.hide { display: none; }
#shop > * { pointer-events: auto; }
#sLeft { display: flex; flex-direction: column; padding: 12px; gap: 8px; pointer-events: none; }
#sLeft > * { pointer-events: auto; }
#rname { width: 100%; font: 24px var(--head); letter-spacing: .04em; background: transparent; border: 1px solid transparent;
border-radius: 6px; color: var(--text); padding: 2px 6px; text-shadow: 0 2px 6px #000; }
#rname:hover, #rname:focus { border-color: var(--line); outline: none; background: rgba(11,14,20,.8); }
/* hangar: robot slots at the top of the shop */
.hangar { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 4px; }
.hslot { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; font-size: 12px; max-width: 120px; }
.hslot .hn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hslot.on { background: var(--accent); color: #1a0c02; border-color: var(--accent); font-weight: 700; }
.hslot .hdel { font-size: 11px; opacity: .7; padding: 0 2px; border-radius: 4px; }
.hslot .hdel:hover { background: rgba(0,0,0,.25); opacity: 1; }
.hadd { padding: 4px 11px; font-size: 15px; font-weight: 700; color: var(--accent); }
/* name plate riveted to the robot, always readable (not only on hover) */
#rname { width: 100%; font: 24px var(--head); letter-spacing: .04em; background: rgba(11,14,20,.82);
border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r2);
color: var(--text); padding: 4px 10px; text-shadow: 0 2px 6px #000; box-shadow: var(--hl); }
#rname:hover, #rname:focus { border-color: var(--accent); outline: none; }
.mech { display: flex; gap: 8px; align-items: flex-end; }
.mech .pic { width: 50px; height: 60px; font-size: 34px; border-radius: 8px; overflow: hidden; background: rgba(0,0,0,.35); border: 1px solid var(--line); }
.mech .bubble { background: rgba(250,246,238,.95); color: #1b1d22; border-radius: 10px 10px 10px 2px; padding: 5px 8px; font-size: 12px; max-width: 262px; box-shadow: 0 4px 14px #0008; }
@@ -148,37 +219,100 @@
.paint span.sw.on { border-color: #fff; }
.paint .lb { width: 46px; }
#sRight { background: rgba(14,16,22,.9); border-left: 1px solid var(--line); display: flex; flex-direction: column; padding: 10px 12px; gap: 8px; min-height: 0; }
.tabs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.tab { background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 4px 2px 3px; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; cursor: pointer; }
.tab .pic { width: 34px; height: 34px; font-size: 26px; }
.tab:hover { border-color: var(--accent); }
.tab.on { background: linear-gradient(#3a2414, #241710); border-color: var(--accent); color: var(--accent); font-weight: 700; }
#buildView { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
#buildView.hide, #paintView.hide, #hangarView.hide { display: none; }
#paintView, #hangarView { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
/* top mode tabs (Parts / Paint / Hangar) */
.shoptabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.shoptabs button { padding: 6px 4px; font: 12.5px var(--head); letter-spacing: .03em; }
.shoptabs button.on { background: var(--accent); color: #1a0c02; border-color: var(--accent); }
/* zoom bar under the preview */
.zoombar { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 12px; color: var(--dim); margin-bottom: 2px; }
.zoombar button { width: 30px; height: 26px; padding: 0; font-size: 16px; font-weight: 700; }
/* fitted parts strip (bottom of the parts view): 7 compact chips, does not cover the robot preview */
.fittedwrap { border-top: 1px solid var(--line); padding-top: 5px; }
.flabel { font: 10.5px var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 4px; }
.fitted { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.fitted .frow { display: flex; flex-direction: column; align-items: center; gap: 1px; background: rgba(8,10,14,.75);
border: 1px solid #262c36; border-radius: var(--r1); padding: 3px 3px 2px; font-size: 11.5px; cursor: pointer;
position: relative; min-width: 0; box-shadow: none; }
@media (hover: hover) { .fitted .frow:hover { border-color: var(--accent); } }
.fitted .frow .pic { width: 18px; height: 18px; font-size: 14px; }
.fitted .frow .fn { width: 100%; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fitted .frow .fn.empty { color: var(--dim); }
.fitted .frow .frm { position: absolute; top: -5px; right: -4px; font-size: 11px; color: #fff; background: var(--warn);
width: 15px; height: 15px; border-radius: 50%; display: flex; align-items: center; justify-content: center; line-height: 1; }
/* hangar management (top-tab Hangar) */
.hmgr { display: flex; flex-direction: column; gap: 6px; }
.hmrow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; background: var(--panel2);
border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.hmrow.on { border-color: var(--accent); background: #2a1c10; }
.hmrow .hmn { font: 15px var(--head); letter-spacing: .02em; }
.hmrow .hmw { font-size: 12px; color: var(--dim); }
/* category tabs: a strip of folder tabs sitting ON the card panel - clearly navigation, not parts */
.tabs { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; border-bottom: 2px solid var(--line); }
.tab { background: #141922; border: 1px solid var(--line); border-bottom: none;
border-radius: var(--r2) var(--r2) 0 0; margin-bottom: -2px; padding: 3px 2px 5px;
display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer;
font-size: 11.5px; letter-spacing: .02em; color: var(--dim); }
.tab .pic { width: 24px; height: 24px; font-size: 19px; }
@media (hover: hover) { .tab:hover { border-color: var(--accent); } }
.tab.on { background: linear-gradient(#3a2414, #1d1410); border-color: var(--accent); color: var(--accent);
font-weight: 700; border-bottom: 2px solid #1d1410; } /* open tab merges into the panel below */
.tab.miss { border-color: var(--warn); }
#cards { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; align-content: start; padding: 2px; }
.item { background: linear-gradient(#20252f, #181c24); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 5px; cursor: pointer; text-align: center; position: relative; }
.item:hover { border-color: #5a6478; }
#cards { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
align-content: start; padding: 9px; background: rgba(0,0,0,.26); border: 1px solid var(--line); border-top: none;
border-radius: 0 0 var(--r2) var(--r2); }
.item { background: linear-gradient(#252b37, #171b23); border: 1px solid #39414f; border-radius: var(--r2);
padding: 5px 5px 4px; cursor: pointer; text-align: center; position: relative;
box-shadow: var(--hl), 0 2px 0 rgba(0,0,0,.45); }
@media (hover: hover) { .item:hover { border-color: #5a6478; } }
.item.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,122,26,.3); }
.item > .pic { width: 100%; height: 62px; font-size: 42px; }
.item > .pic { width: 100%; height: 52px; font-size: 38px; }
.item .nm { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .pr { font-size: 12px; color: var(--gold); display: flex; gap: 3px; justify-content: center; align-items: center; font-variant-numeric: tabular-nums; }
.item .pr { font-size: 12px; color: var(--gold); display: flex; gap: 3px; justify-content: center; align-items: center;
font-variant-numeric: tabular-nums; background: rgba(0,0,0,.3); border-radius: var(--r1); padding: 0 4px; margin: 2px auto 0; width: fit-content; }
.item .pr .pic { width: 14px; height: 14px; }
.item .pr.no { color: var(--warn); }
.item .badge { position: absolute; top: 5px; left: 5px; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--accent); color: #1a0c02; }
.item .badge.own { background: #3c4556; color: var(--text); }
#detail { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center; min-height: 110px; }
#detail > .pic { width: 92px; height: 92px; font-size: 60px; }
#detail { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; display: grid; grid-template-columns: 76px 1fr auto; gap: 10px; align-items: center; min-height: 86px; }
#detail > .pic { width: 76px; height: 76px; font-size: 52px; }
#detail .nm { font: 17px var(--head); letter-spacing: .03em; }
#detail .ds { font-size: 12.5px; color: var(--dim); margin: 2px 0 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chips span { background: #0f1218; border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 11.5px; display: inline-flex; gap: 3px; align-items: center; font-variant-numeric: tabular-nums; }
.chips span .pic { width: 13px; height: 13px; font-size: 11px; }
.chips span.up { color: var(--good); border-color: #2e5a3e; } .chips span.down { color: var(--warn); border-color: #5a2e2e; }
.chips span.key { color: var(--accent); border-color: #5a3a18; background: #1d1409; font-weight: 700; }
#detail .act { display: flex; flex-direction: column; gap: 6px; min-width: 120px; }
#detail .act button { padding: 8px 10px; }
#detail .act button { padding: 8px 10px; min-height: 40px; }
#detail .act .primary { min-height: 44px; font-size: 15px; }
.gbar { display: flex; gap: 6px; align-items: center; }
.gbar .err { flex: 1; margin: 0; font-size: 12px; text-align: left; }
.gbar .primary { padding: 9px 26px; }
/* paint tab: proper colour chips instead of tiny dots */
#paintView { gap: 10px; }
.psec h4 { margin: 0 0 6px; font: 12px var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.pgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 7px; }
.pgrid.wide { grid-template-columns: repeat(8, 1fr); }
.pgrid .sw { position: relative; height: 40px; border-radius: var(--r2); border: 2px solid #000a;
cursor: pointer; box-shadow: var(--hl), 0 2px 0 rgba(0,0,0,.4); transition: transform .1s; }
@media (hover: hover) { .pgrid .sw:hover { transform: translateY(-2px); } }
.pgrid .sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.pgrid .sw.on::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center;
justify-content: center; color: #fff; font-size: 19px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.pgrid .duo { display: flex; overflow: hidden; }
.pgrid .duo i { flex: 1; }
.pcustom { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
background: var(--panel2); background-image: var(--sheen); border: 1px solid var(--line);
border-left: 3px solid var(--accent); border-radius: var(--r3); padding: 12px 14px; box-shadow: var(--hl); }
.pcustom .pct { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.pcustom .pct b { font: 16px var(--head); letter-spacing: .03em; }
.pcustom .pct .muted { font-size: 12.5px; }
.pcustom .primary { font-size: 22px; padding: 10px 22px; }
/* paint booth (painter.js) */
#painter { grid-column: 2; grid-row: 1; background: rgba(14,16,22,.94); border-left: 1px solid var(--line); display: flex; flex-direction: column; padding: 10px 12px; gap: 7px; }
.pt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
@@ -228,20 +362,34 @@
.fl-KR { background: radial-gradient(circle, #cd2e3a 0 14%, #0047a0 15% 28%, transparent 29%), #fff; }
.fl-XX { background: repeating-linear-gradient(45deg, #5a6272 0 5px, #454c5a 5px 10px); }
.flag.on { background: var(--accent); border-color: var(--accent); }
.plist { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.prow { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center;
background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.prow .pf { line-height: 0; } .prow .pn { font: 16px var(--head); letter-spacing: .02em; text-align: left; }
.prow .pfame { color: var(--gold); font-size: 13px; font-variant-numeric: tabular-nums; }
.prow .chal { padding: 8px 16px; background: var(--accent); color: #1a0c02; border-color: var(--accent); font-weight: 700; }
.prow .pbusy { color: var(--dim); font-size: 13px; padding: 8px 10px; }
/* two-pane lobby: country rooms left, player list right (own style) */
.lobbyfull { display: grid; grid-template-columns: 318px 1fr; gap: 12px; width: 1040px; height: 560px;
background: rgba(21, 25, 32, .95); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 20px 60px #000a; }
.lobbyL, .lobbyR { display: flex; flex-direction: column; min-height: 0; }
.lobbyLh { font: 15px var(--head); letter-spacing: .05em; color: var(--accent); margin-bottom: 8px; }
.roomlist { flex: 1; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-content: start; padding-right: 2px; }
.roomlist .rroom:first-child { grid-column: 1 / -1; }
.rroom { display: grid; grid-template-columns: 22px 1fr auto; gap: 6px; align-items: center; padding: 5px 8px; text-align: left; font-size: 12.5px; background: var(--panel2); }
.rroom .rfl { line-height: 0; } .rroom .rfl .fl { width: 22px; height: 14px; }
.rroom .rn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rroom .cnt { font-variant-numeric: tabular-nums; color: var(--dim); font-size: 12px; min-width: 16px; text-align: right; }
.rroom .cnt.live { color: var(--good); font-weight: 700; }
.rroom.on { background: var(--accent); color: #1a0c02; border-color: var(--accent); font-weight: 700; }
.rroom.on .cnt { color: #1a0c02; }
.lobbyRh { display: flex; align-items: center; gap: 8px; font: 18px var(--head); letter-spacing: .03em; margin-bottom: 8px; }
.lobbyRh .grow { flex: 1; }
.lobbyRh .flagpick { font: 12px "Segoe UI", sans-serif; color: var(--dim); display: flex; gap: 6px; align-items: center; }
.lobbyRh select { font: inherit; font-size: 13px; color: var(--text); background: #0b0e14; border: 1px solid var(--line); border-radius: 7px; padding: 5px 8px; cursor: pointer; }
.lobbyR .plist { flex: 1; max-height: none; }
.plist { max-height: 316px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 4px 0; min-width: 440px; }
.prow { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 9px; align-items: center;
background: var(--panel2); border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; }
.prow .pf { line-height: 0; } .prow .pn { font-size: 13px; font-weight: 700; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prow .pfame { color: var(--gold); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.prow .chal { padding: 5px 14px; font-size: 13px; background: var(--accent); color: #1a0c02; border-color: var(--accent); font-weight: 700; }
.prow .pbusy { color: var(--dim); font-size: 12px; padding: 5px 8px; }
.prow.me { border-color: var(--accent); background: #2a1c10; }
/* country rooms */
.rooms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
.room { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 10px 12px; min-height: 48px; text-align: left; }
.room .rn { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.room .rc { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.room.live .rc { color: var(--good); font-weight: 700; }
.prow .pf .fl { width: 26px; height: 17px; }
/* fight HUD */
#fightHud { position: absolute; left: 0; right: 0; top: 0; padding: 10px 14px; display: grid; grid-template-columns: 1fr 150px 1fr;
@@ -249,21 +397,71 @@
.fbox { background: rgba(10, 12, 16, .78); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.fbox .fn { font: 16px var(--head); letter-spacing: .04em; display: flex; justify-content: space-between; }
.fbox .fn small { font: 12px "Segoe UI", sans-serif; color: var(--dim); }
.hp { height: 12px; background: #0b0e14; border-radius: 6px; overflow: hidden; margin-top: 4px; border: 1px solid #000; }
.hp i { display: block; height: 100%; transition: width .15s; }
.fsub { display: flex; gap: 8px; align-items: center; margin-top: 4px; font-size: 11.5px; color: var(--dim);
font-variant-numeric: tabular-nums; min-height: 15px; }
#fRight .fsub { flex-direction: row-reverse; }
.fsub .lost { color: var(--warn); font-weight: 700; }
.fsub .hpn { font-weight: 700; color: var(--text); }
.fsub .pts { display: flex; gap: 5px; }
.fsub .pt { position: relative; line-height: 0; }
.fsub .pt .pic { width: 17px; height: 17px; font-size: 13px; }
.fsub .pt.gone { opacity: .45; }
.fsub .pt.gone::after { content: '✕'; position: absolute; inset: 0; display: flex; align-items: center;
justify-content: center; color: var(--warn); font-size: 15px; font-weight: 700; line-height: 1; }
.hp { position: relative; height: 16px; background: #0b0e14; border-radius: 3px; overflow: hidden;
margin-top: 5px; border: 1px solid #000; transform: skewX(-12deg); }
.hp i { position: absolute; left: 0; top: 0; bottom: 0; transition: width .15s; }
.hp i.g { background: #8d2018; transition: width .55s ease .2s; } /* damage trail */
.hp::after { content: ''; position: absolute; inset: 0; pointer-events: none;
background: repeating-linear-gradient(90deg, transparent 0 17px, rgba(0,0,0,.55) 17px 19px); }
.fbox.hurt { border-color: var(--warn); animation: lowhp 1s infinite; }
@keyframes lowhp { 50% { border-color: var(--line); } }
.fbox.hit { background-color: rgba(255,90,74,.3); }
#fRight { text-align: right; } #fRight .fn { flex-direction: row-reverse; }
#fMid { text-align: center; }
#fTime { font: 34px var(--head); line-height: 1; letter-spacing: .04em; }
#fTime.low { color: var(--warn); }
#fTime.low { color: var(--warn); animation: tick 1s steps(2) infinite; }
@keyframes tick { 50% { opacity: .45; } }
#fState { font-size: 12px; color: var(--accent); min-height: 16px; font-weight: 700; letter-spacing: .05em; }
/* cooldown chips: ring empties while the part recharges */
#fCds { position: absolute; left: 50%; transform: translateX(-50%); bottom: 58px; z-index: 4; display: none;
gap: 14px; pointer-events: none; }
body[data-mode="fight"] #fCds, body[data-mode="pause"] #fCds { display: flex; }
.cdchip { --p: 0; position: relative; width: 52px; height: 52px; border-radius: 50%; padding: 3px;
background: conic-gradient(#2b3240 calc(var(--p) * 360deg), var(--accent) 0); }
.cdchip .in { width: 100%; height: 100%; border-radius: 50%; background: #0d1016; border: 1px solid #000;
display: flex; align-items: center; justify-content: center; }
.cdchip .pic { width: 32px; height: 32px; font-size: 22px; }
.cdchip.on { box-shadow: 0 0 0 2px var(--accent); }
.cdchip.spent { opacity: .45; }
.cdchip.broke { background: #3a2020; opacity: .8; }
.cdchip.broke .in { border-color: var(--warn); }
.cdchip.broke::after { content: '✕'; position: absolute; inset: 0; display: flex; align-items: center;
justify-content: center; color: var(--warn); font-size: 30px; font-weight: 700; text-shadow: 0 2px 4px #000; }
.cdchip .k { position: absolute; left: 0; right: 0; bottom: -15px; text-align: center; font-size: 11px;
color: var(--dim); font-weight: 700; }
.cdchip .n { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; border-radius: 9px;
background: var(--accent); color: #1a0c02; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
/* on touch the pad owns the bottom edge, so the chips move above it */
@media (pointer: coarse) { .cdchip .k { display: none; } #fCds { bottom: 110px; } }
body.forcetouch #fCds { bottom: 110px; }
/* own damage: the screen edge glows red the closer you are to being wrecked */
#dmgvig { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .25s;
background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(190,20,10,.75) 100%); }
/* touch pad: only on touch screens */
#pad { position: absolute; left: 14px; right: 14px; bottom: 14px; display: none; justify-content: space-between; pointer-events: none; z-index: 5; }
#pad > div { display: grid; grid-template-columns: repeat(3, 60px); gap: 6px; pointer-events: auto; }
#pad button { height: 60px; font-size: 20px; opacity: .7; padding: 0; }
#pad .fire { grid-template-columns: repeat(2, 74px); }
#pad .fire button { height: 74px; font-size: 14px; font-weight: 700; }
#pad button { height: 60px; font-size: 20px; opacity: .75; padding: 0; border-radius: var(--r3);
background: rgba(18,22,30,.72); }
#pad .fire { grid-template-columns: repeat(3, 74px); }
#pad .fire button { height: 74px; font-size: 13px; font-weight: 700; border-radius: 50%; }
#padGadget { --p: 0; background:
conic-gradient(rgba(18,22,30,.72) calc(var(--p) * 360deg), rgba(255,122,26,.5) 0); }
@media (pointer: coarse) { body.fighting #pad { display: flex; } }
body.forcetouch.fighting #pad { display: flex; } /* dev: &touch */
/* tablets / phones held upright: ask to rotate (the stage is 16:9) */
#rotate { display: none; position: fixed; left: 0; right: 0; bottom: 12%; text-align: center; z-index: 20; font: 20px var(--head); color: var(--accent); padding: 0 20px; }
@@ -272,7 +470,9 @@
/* window buttons: only inside the exe (html.exe set by kit-host.js) */
#winctl { position: fixed; top: 8px; right: 8px; display: none; gap: 6px; z-index: 10; }
html.exe #winctl { display: flex; }
#winctl button { width: 34px; height: 30px; padding: 0; opacity: .75; }
#winctl button { width: 34px; height: 30px; min-height: 30px; padding: 0; opacity: .75; }
html.exe #hud { padding-right: 130px; }
html.exe #fightHud { padding: 10px 130px 0; }
</style>
</head>
<body>
@@ -284,17 +484,6 @@
<div id="rotate">&#x21BB; <span data-i18n="rotate_hint">Turn your device sideways</span></div>
<div id="app">
<div id="hud">
<div class="logo">ROBOT CLASH</div>
<div class="chip" data-i18n-title="hud_money"><span class="pic" data-f="🪙" id="icoMoney"></span><b id="hMoney">0</b></div>
<div class="chip" data-i18n-title="hud_fame"><span class="pic" data-f="⭐" id="icoFame"></span><b id="hFame">0</b></div>
<div class="chip"><span data-i18n="hud_league">League</span> <b id="hLeague">-</b></div>
<div class="grow"></div>
<div class="chip" id="hUser" data-i18n-title="account"></div>
<button id="bSettings" data-i18n-title="settings">⚙</button>
<button id="bMute" title="M">Sound</button>
<button id="bPause" title="P / Esc" data-i18n="pause">Pause</button>
</div>
<div id="stage">
<div id="bgimg"></div>
<canvas id="gl"></canvas>
@@ -303,17 +492,30 @@
<div id="shop" class="hide">
<div id="sLeft">
<input id="rname" maxlength="18" spellcheck="false">
<div class="mech"><span class="pic" data-f="🧔" id="mechPic"></span><div class="bubble" id="mechTip"></div></div>
<div class="zoombar"><button id="zOut" title="Zoom -">-</button><span data-i18n="zoom">Zoom</span><button id="zIn" title="Zoom +">+</button></div>
<div class="spacer"></div>
<div class="stats" id="meters"></div>
<div class="paint" id="paintBody"></div>
<div class="paint" id="paintAccent"></div>
<button id="bPaint" data-i18n="pt_open">🎨 Paint it yourself</button>
<div class="mech"><span class="pic" data-f="🧔" id="mechPic"></span><div class="bubble" id="mechTip"></div></div>
</div>
<div id="sRight">
<div class="tabs" id="tabs"></div>
<div id="cards"></div>
<div id="detail"></div>
<div class="shoptabs" id="shopTabs"></div>
<div id="buildView">
<div class="tabs" id="tabs"></div>
<div id="cards"></div>
<div id="detail"></div>
<div class="fittedwrap"><div class="flabel" data-i18n="fitted_parts">Fitted</div><div id="fitted" class="fitted"></div></div>
</div>
<div id="paintView" class="hide">
<div class="psec"><h4 data-i18n="paint_body">Body</h4><div class="pgrid" id="paintBody"></div></div>
<div class="psec"><h4 data-i18n="paint_accent">Accent</h4><div class="pgrid" id="paintAccent"></div></div>
<div class="psec"><h4 data-i18n="paint_schemes">Schemes</h4><div class="pgrid wide" id="paintSchemes"></div></div>
<div class="spacer"></div>
<div class="pcustom">
<div class="pct"><b data-i18n="pt_open">Paint it yourself</b><span class="muted" data-i18n="paint_hint">Pick quick colours above, or paint your own design.</span></div>
<button id="bPaint" class="primary">🎨</button>
</div>
</div>
<div id="hangarView" class="hide"></div>
<div class="gbar">
<div class="err" id="gErr"></div>
<button id="bGMenu" data-i18n="menu">Menu</button>
@@ -325,20 +527,34 @@
</div>
<div id="fightHud" class="hide">
<div class="fbox" id="fLeft"><div class="fn"><span id="fN0"></span><small id="fW0"></small></div><div class="hp"><i id="fH0"></i></div></div>
<div class="fbox" id="fLeft"><div class="fn"><span id="fN0"></span><small id="fW0"></small></div><div class="hp"><i class="g" id="fG0"></i><i id="fH0"></i></div><div class="fsub" id="fD0"></div></div>
<div class="fbox" id="fMid"><div id="fTime">2:00</div><div id="fState"></div></div>
<div class="fbox" id="fRight"><div class="fn"><span id="fN1"></span><small id="fW1"></small></div><div class="hp"><i id="fH1"></i></div></div>
<div class="fbox" id="fRight"><div class="fn"><span id="fN1"></span><small id="fW1"></small></div><div class="hp"><i class="g" id="fG1"></i><i id="fH1"></i></div><div class="fsub" id="fD1"></div></div>
</div>
<div id="dmgvig"></div>
<div id="fCds"></div>
<div id="pad">
<div>
<span></span><button data-action="up">&#9650;</button><span></span>
<button data-action="left">&#9664;</button><button data-action="down">&#9660;</button><button data-action="right">&#9654;</button>
</div>
<div class="fire">
<button data-action="fire2" data-i18n="pad_tower">Tower</button><button data-action="fire" data-i18n="pad_weapon">Weapon</button>
<button data-action="fire3" data-i18n="pad_gadget" id="padGadget">Gadget</button><button data-action="fire2" data-i18n="pad_tower">Tower</button><button data-action="fire" data-i18n="pad_weapon">Weapon</button>
</div>
</div>
<div id="hud">
<div class="logo">ROBOT CLASH</div>
<div class="chip" data-i18n-title="hud_money"><span class="pic" data-f="🪙" id="icoMoney"></span><b id="hMoney">0</b></div>
<div class="chip" data-i18n-title="hud_fame"><span class="pic" data-f="⭐" id="icoFame"></span><b id="hFame">0</b></div>
<div class="chip"><span data-i18n="hud_league">League</span> <b id="hLeague">-</b></div>
<div class="grow"></div>
<div class="chip" id="hUser" data-i18n-title="account"></div>
<button id="bSettings" class="icobtn" data-i18n-title="settings">⚙</button>
<button id="bMute" class="icobtn" title="M">🔊</button>
<button id="bPause" class="icobtn" title="P / Esc" data-i18n-title="pause">⏸</button>
</div>
<div id="overlay" class="hide"></div>
</div>
</div>
@@ -365,6 +581,7 @@
<script src="netfight.js"></script>
<script src="shop.js"></script>
<script src="painter.js"></script>
<script src="uicheck.js"></script>
<script src="game.js"></script>
</body>
</html>