feat: add bark battle browser prototype
This commit is contained in:
193
src/games/bark-battle/ui/BarkBattleHud.css
Normal file
193
src/games/bark-battle/ui/BarkBattleHud.css
Normal file
@@ -0,0 +1,193 @@
|
||||
.bark-battle-hud {
|
||||
min-height: 100svh;
|
||||
color: #fff7ed;
|
||||
background: radial-gradient(circle at 50% 15%, rgba(251, 191, 36, 0.35), transparent 28%), linear-gradient(180deg, #1f1147 0%, #521b4f 48%, #130a28 100%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bark-battle-hud__topline {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.bark-battle-hud__timer {
|
||||
justify-self: center;
|
||||
border-radius: 999px;
|
||||
padding: 8px 16px;
|
||||
background: rgba(15, 23, 42, 0.56);
|
||||
font-weight: 900;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
|
||||
.bark-battle-energy {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: 18px;
|
||||
border: 2px solid rgba(255, 247, 237, 0.78);
|
||||
border-radius: 999px;
|
||||
overflow: hidden;
|
||||
background: rgba(15, 23, 42, 0.48);
|
||||
}
|
||||
|
||||
.bark-battle-energy__side--player { background: linear-gradient(90deg, #f97316, #facc15); }
|
||||
.bark-battle-energy__side--opponent { background: linear-gradient(90deg, #60a5fa, #a78bfa); }
|
||||
|
||||
.bark-battle-arena {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
grid-template-rows: 1fr auto 1fr;
|
||||
place-items: center;
|
||||
}
|
||||
|
||||
.bark-battle-dog {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.bark-battle-dog__body {
|
||||
font-size: clamp(92px, 30vw, 150px);
|
||||
filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.42));
|
||||
}
|
||||
|
||||
.bark-battle-dog--player .bark-battle-dog__body {
|
||||
transform: rotateY(180deg) translateY(4px);
|
||||
}
|
||||
|
||||
.bark-battle-dog__label,
|
||||
.bark-battle-vs {
|
||||
font-weight: 900;
|
||||
text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.bark-battle-vs {
|
||||
border-radius: 999px;
|
||||
padding: 10px 18px;
|
||||
background: rgba(255, 255, 255, 0.16);
|
||||
}
|
||||
|
||||
.bark-battle-controls,
|
||||
.bark-battle-result__stats {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.bark-battle-controls button,
|
||||
.bark-battle-primary-button {
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
padding: 12px 18px;
|
||||
color: #1f1147;
|
||||
background: #fff7ed;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.bark-battle-primary-button {
|
||||
background: linear-gradient(135deg, #facc15, #fb7185);
|
||||
}
|
||||
|
||||
.bark-battle-status-card,
|
||||
.bark-battle-result {
|
||||
margin: auto;
|
||||
width: min(92vw, 420px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.18);
|
||||
border-radius: 28px;
|
||||
padding: 24px;
|
||||
text-align: center;
|
||||
background: rgba(15, 23, 42, 0.68);
|
||||
box-shadow: 0 26px 60px rgba(0, 0, 0, 0.3);
|
||||
backdrop-filter: blur(18px);
|
||||
}
|
||||
|
||||
.bark-battle-result__stats span {
|
||||
min-width: 84px;
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.bark-battle-result__stats strong {
|
||||
font-size: 28px;
|
||||
}
|
||||
|
||||
.bark-battle-particles {
|
||||
position: absolute;
|
||||
inset: 18% 0 auto;
|
||||
pointer-events: none;
|
||||
text-align: center;
|
||||
font-size: clamp(30px, 10vw, 70px);
|
||||
font-weight: 950;
|
||||
letter-spacing: 0.08em;
|
||||
color: rgba(255, 247, 237, 0.88);
|
||||
text-shadow: 0 0 18px rgba(250, 204, 21, 0.75);
|
||||
animation: barkBattleParticlePop 820ms ease-out both;
|
||||
}
|
||||
|
||||
.bark-battle-debug-panel {
|
||||
position: fixed;
|
||||
right: 12px;
|
||||
bottom: max(12px, env(safe-area-inset-bottom));
|
||||
z-index: 8;
|
||||
width: min(92vw, 340px);
|
||||
max-height: 42svh;
|
||||
overflow: auto;
|
||||
border: 1px solid rgba(255, 255, 255, 0.18);
|
||||
border-radius: 22px;
|
||||
padding: 12px;
|
||||
color: #fff7ed;
|
||||
background: rgba(15, 23, 42, 0.72);
|
||||
box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
|
||||
backdrop-filter: blur(18px);
|
||||
}
|
||||
|
||||
.bark-battle-debug-panel header,
|
||||
.bark-battle-debug-panel label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.bark-battle-debug-panel label {
|
||||
margin-top: 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.bark-battle-debug-panel input {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.bark-battle-debug-panel output {
|
||||
min-width: 44px;
|
||||
text-align: right;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.bark-battle-debug-panel__controls {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.bark-battle-debug-panel__controls button {
|
||||
flex: 1;
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
padding: 8px 10px;
|
||||
color: #1f1147;
|
||||
background: #fff7ed;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
@keyframes barkBattleParticlePop {
|
||||
from { transform: translateY(28px) scale(0.7); opacity: 0; }
|
||||
42% { opacity: 1; }
|
||||
to { transform: translateY(-80px) scale(1.14); opacity: 0; }
|
||||
}
|
||||
Reference in New Issue
Block a user