diff --git a/public/css/game.css b/public/css/game.css new file mode 100644 index 0000000..0432802 --- /dev/null +++ b/public/css/game.css @@ -0,0 +1,169 @@ +.screen { + position: fixed; inset: 0; + display: flex; flex-direction: column; + min-height: 100dvh; +} + +/* ---------- Title ---------- */ +.title-wrap { + flex: 1; display: flex; flex-direction: column; justify-content: center; + padding: 32px 24px; max-width: 560px; margin: 0 auto; width: 100%; +} +.eyebrow { + font-family: var(--mono); font-size: 12px; letter-spacing: .35em; + text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; +} +.game-title { + font-size: clamp(52px, 16vw, 104px); line-height: .86; margin: 0 0 18px; + text-shadow: 0 0 40px rgba(59,182,255,.25); +} +.game-title span { + display: block; color: var(--blue); + -webkit-text-stroke: 1px var(--blue); color: transparent; +} +.tagline { color: var(--text-dim); font-size: 16px; line-height: 1.6; max-width: 42ch; margin: 0 0 30px; } +.title-actions { display: flex; flex-direction: column; gap: 12px; max-width: 320px; } +.title-actions button { padding: 16px; font-size: 15px; } +.battery-hint { margin-top: 34px; font-size: 11px; letter-spacing: .25em; color: var(--text-dim); } + +/* ---------- Shared ---------- */ +.back { + position: absolute; top: 16px; left: 16px; z-index: 30; + background: rgba(13,17,28,.7); backdrop-filter: blur(8px); padding: 9px 14px; font-size: 13px; +} +.back.small { padding: 8px 12px; } +.row { display: flex; gap: 8px; } +.row input { flex: 1; } + +/* ---------- Scan ---------- */ +.scan-wrap { flex: 1; padding: 64px 22px 28px; max-width: 520px; margin: 0 auto; width: 100%; } +.scan-wrap h2 { font-size: 28px; margin: 0 0 6px; } +.scan-video { + position: relative; margin: 20px 0; border-radius: var(--rad); overflow: hidden; + aspect-ratio: 4/3; background: #000; border: 1px solid var(--line); +} +.scan-video video { width: 100%; height: 100%; object-fit: cover; } +.scan-reticle { + position: absolute; inset: 22%; border: 2px solid rgba(59,182,255,.8); border-radius: 12px; + box-shadow: 0 0 0 9999px rgba(7,9,15,.45); +} +.scan-status { + position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; + font-size: 12px; color: var(--text); text-shadow: 0 1px 4px #000; +} +.manual-entry { margin-top: 8px; } +.scan-error { color: var(--danger); font-size: 13px; margin-top: 10px; } + +/* ---------- AR Hunt ---------- */ +#ar-video, #ar-canvas { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; } +#ar-video { z-index: 0; background: #000; } +#ar-canvas { z-index: 1; } +.hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; } +.hud button, .hud .wheel-seg, .hud input { pointer-events: auto; } + +.hud-top { + position: absolute; top: 0; left: 0; right: 0; + display: flex; align-items: center; justify-content: space-between; + padding: 14px 16px; gap: 12px; +} +.battery { display: flex; align-items: center; gap: 8px; } +.battery-label { font-size: 10px; letter-spacing: .2em; color: var(--text-dim); } +.battery-bar { + width: 120px; height: 14px; border: 1px solid var(--line); border-radius: 4px; + background: rgba(7,9,15,.6); overflow: hidden; position: relative; +} +.battery-bar::after { + content: ""; position: absolute; right: -5px; top: 3px; width: 4px; height: 8px; + background: var(--line); border-radius: 0 2px 2px 0; +} +.battery-fill { height: 100%; width: 100%; background: linear-gradient(90deg,#7CFFB2,#3bb6ff); transition: width .3s, background .3s; } +.battery-fill.low { background: linear-gradient(90deg,#ff3b5c,#ffc23b); } +.gloom-count { font-size: 14px; display: flex; align-items: center; gap: 6px; background: rgba(13,17,28,.6); padding: 6px 10px; border-radius: 8px; } + +/* color wheel */ +.wheel { + position: absolute; left: 50%; top: 22%; transform: translateX(-50%); + width: 132px; height: 132px; border-radius: 50%; + display: grid; place-items: center; + filter: drop-shadow(0 8px 24px rgba(0,0,0,.5)); +} +.wheel-seg { + position: absolute; width: 50%; height: 50%; border: none; padding: 0; + background: transparent; opacity: .92; transition: opacity .15s, transform .15s; +} +.wheel-seg::before { content: ""; position: absolute; inset: 0; } +.seg-red { top: 0; left: 25%; clip-path: polygon(50% 100%, 0 0, 100% 0); } +.seg-red::before { background: var(--red); clip-path: polygon(50% 100%, 0 0, 100% 0); border-radius: 4px; } +.seg-yellow { bottom: 4%; left: 4%; clip-path: polygon(0 50%, 100% 0, 100% 100%); } +.seg-yellow::before { background: var(--yellow); clip-path: polygon(100% 0, 100% 100%, 0 50%); } +.seg-blue { bottom: 4%; right: 4%; clip-path: polygon(0 0, 100% 50%, 0 100%); } +.seg-blue::before { background: var(--blue); clip-path: polygon(0 0, 100% 50%, 0 100%); } +.wheel-seg:active { transform: scale(.9); opacity: 1; } +.wheel-seg.armed::before { box-shadow: 0 0 18px currentColor; filter: brightness(1.25); } +.wheel-core { + width: 46px; height: 46px; border-radius: 50%; background: var(--bg-soft); + border: 1px solid var(--line); display: grid; place-items: center; + font-size: 11px; letter-spacing: .15em; color: var(--text-dim); z-index: 2; +} + +/* lock-on */ +.lockon { + position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); + text-align: center; width: min(80vw, 320px); +} +.lockon-name { font-size: 26px; text-shadow: 0 2px 12px #000; } +.lockon-sub { font-size: 12px; color: var(--text-dim); margin: 4px 0 8px; text-transform: uppercase; } +.ghost-hp { height: 8px; border-radius: 4px; background: rgba(7,9,15,.7); overflow: hidden; border: 1px solid var(--line); } +.ghost-hp-fill { height: 100%; width: 100%; background: linear-gradient(90deg,var(--danger),var(--yellow)); transition: width .12s linear; } + +/* blaster */ +.hud-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); } +.blaster { + width: 100%; padding: 20px; font-size: 17px; font-weight: 700; + background: var(--blue); color: #04121f; border: none; border-radius: 14px; + box-shadow: 0 6px 0 #1a6fa0; user-select: none; -webkit-user-select: none; +} +.blaster:active { transform: translateY(4px); box-shadow: 0 2px 0 #1a6fa0; } +.blaster.overheated { background: var(--danger); color: #fff; box-shadow: 0 6px 0 #8a1f2f; } +.overheat { height: 6px; border-radius: 3px; background: rgba(7,9,15,.7); overflow: hidden; margin-bottom: 10px; border: 1px solid var(--line); } +.overheat-fill { height: 100%; width: 0%; background: linear-gradient(90deg,#ffc23b,#ff3b5c); transition: width .1s linear; } + +/* toast + result */ +.toast { + position: absolute; left: 50%; top: 38%; transform: translateX(-50%); + background: rgba(13,17,28,.92); border: 1px solid var(--line); border-radius: 12px; + padding: 14px 20px; font-family: var(--display); letter-spacing: .05em; text-transform: uppercase; + text-align: center; max-width: 80vw; box-shadow: var(--shadow); +} +.toast.jumpscare { border-color: var(--danger); color: var(--danger); animation: shake .4s; font-size: 20px; } +@keyframes shake { 0%,100%{transform:translateX(-50%)} 25%{transform:translate(-54%,-2%)} 75%{transform:translate(-46%,2%)} } + +.result { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(7,9,15,.85); backdrop-filter: blur(4px); pointer-events: auto; } +.result-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--rad); padding: 28px; text-align: center; max-width: 340px; box-shadow: var(--shadow); } +.result-card .display { font-size: 30px; margin-bottom: 8px; } +.result-card button { margin-top: 20px; width: 100%; } + +/* ---------- Roster ---------- */ +.roster-wrap { flex: 1; padding: 64px 18px 28px; max-width: 880px; margin: 0 auto; width: 100%; } +.roster-wrap h2 { font-size: 28px; margin: 0 0 16px; } +.roster-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; } +.roster-filters select { width: auto; } +.boss-toggle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); margin: 0; } +.boss-toggle input { width: auto; } +.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } +.ghost-card { + background: var(--panel); border: 1px solid var(--line); border-radius: 12px; + padding: 14px; position: relative; overflow: hidden; +} +.ghost-card.boss { border-color: var(--yellow); } +.ghost-card .accent { position: absolute; top: 0; left: 0; right: 0; height: 3px; } +.ghost-card .gname { font-family: var(--display); font-size: 15px; line-height: 1.15; margin: 6px 0 4px; text-transform: uppercase; } +.ghost-card .meta { font-size: 11px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; margin-bottom: 8px; } +.ghost-card .set-ref { font-family: var(--mono); font-size: 10px; color: var(--text-dim); } +.ghost-card .statline { font-family: var(--mono); font-size: 11px; color: var(--text-dim); display: flex; justify-content: space-between; } +.ghost-thumb { width: 100%; aspect-ratio: 1; object-fit: contain; background: #000a; border-radius: 8px; margin-bottom: 6px; } +.boss-badge { font-size: 9px; background: var(--yellow); color: #1a1200; padding: 2px 6px; border-radius: 4px; letter-spacing: .1em; } + +@media (prefers-reduced-motion: reduce) { + * { animation-duration: .001ms !important; transition-duration: .001ms !important; } +}