HF-Racing / www /css /style.css
1024m's picture
Upload folder using huggingface_hub
d0a5946 verified
Raw
History Blame Contribute Delete
5.65 kB
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html,
body {
width: 100%;
height: 100%;
overflow: hidden;
background: #0a0a0a;
font-family: "Segoe UI", "Helvetica Neue", sans-serif;
color: #fff;
}
#game-canvas {
display: block;
position: fixed;
inset: 0;
width: 100%;
height: 100%;
}
#hud {
position: fixed;
inset: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 10;
}
#player-hud {
position: absolute;
top: 12px;
left: 12px;
z-index: 16;
display: flex;
align-items: center;
gap: 0.55rem;
}
#player-hud[hidden] {
display: none !important;
}
#player-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
border: 2px solid rgba(255, 255, 255, 0.85);
background: #222;
}
#player-name {
font-family: "Arial Black", "Helvetica Neue", Impact, sans-serif;
font-size: 0.95rem;
color: #fff;
text-shadow: 0 1px 2px #000, 1px 1px 0 #000;
}
#speed-hud {
position: absolute;
bottom: 28px;
right: 20px;
font-family: "Arial Black", "Helvetica Neue", Impact, sans-serif;
font-size: 2.2rem;
letter-spacing: 0.02em;
text-shadow: 0 2px 0 #000;
}
.speed-unit {
margin-left: 0.25rem;
font-size: 0.9rem;
opacity: 0.75;
}
#lap-hud {
position: absolute;
top: 14px;
right: 18px;
font-size: 0.95rem;
letter-spacing: 0.06em;
text-transform: uppercase;
color: #e8e2da;
text-shadow: 0 1px 2px #000;
}
#spectate-bar {
position: absolute;
bottom: 36px;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 0.65rem;
pointer-events: auto;
background: rgba(10, 10, 10, 0.72);
padding: 0.45rem 0.75rem;
border: 1px solid #3a322a;
}
#spectate-bar[hidden] {
display: none !important;
}
.spec-arrow {
pointer-events: auto;
cursor: pointer;
border: 1px solid #5a5048;
background: #1a1510;
color: #ece6df;
padding: 0.35rem 0.55rem;
}
#spec-avatar {
width: 44px;
height: 44px;
border-radius: 50%;
object-fit: cover;
background: #222;
}
#controls-footer {
position: fixed;
left: 12px;
bottom: 10px;
z-index: 20;
font-size: 0.75rem;
color: #9aa6b2;
pointer-events: none;
}
.menu-root {
position: fixed;
inset: 0;
z-index: 30;
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
padding: 1.5rem;
background:
radial-gradient(ellipse at 50% 15%, rgba(120, 30, 20, 0.45), transparent 55%),
linear-gradient(180deg, #1a1010 0%, #0c0808 100%);
pointer-events: auto;
}
.menu-root[hidden] {
display: none !important;
}
.menu-brand {
font-family: "Arial Black", "Helvetica Neue", sans-serif;
font-size: clamp(2.4rem, 6vw, 4rem);
letter-spacing: 0.04em;
text-transform: uppercase;
color: #f2f4f7;
text-shadow: 0 2px 0 #000;
}
.menu-sub {
margin: 0.25rem 0 1.25rem;
color: #9aa6b2;
font-size: 0.95rem;
}
.menu-panel {
width: min(920px, 100%);
text-align: center;
}
.menu-actions {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
justify-content: center;
}
.menu-btn {
pointer-events: auto;
cursor: pointer;
border: 2px solid #d8dde3;
background: #1a1110;
color: #f5f7fa;
padding: 0.7rem 1.4rem;
font-size: 0.95rem;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.menu-btn:hover {
background: #3a2018;
}
.menu-btn.ghost {
border-color: #5a6570;
background: transparent;
font-size: 0.8rem;
padding: 0.45rem 0.85rem;
}
.menu-user {
position: absolute;
top: 14px;
left: 16px;
font-size: 0.8rem;
color: #b7c2cc;
}
.menu-error {
position: absolute;
top: 40px;
left: 16px;
right: 16px;
color: #ff8e8e;
font-size: 0.85rem;
}
.menu-lobby {
text-align: left;
max-height: min(78vh, 720px);
display: flex;
flex-direction: column;
}
.menu-panel[hidden],
.menu-lobby[hidden] {
display: none !important;
}
.lobby-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.5rem;
}
.lobby-toolbar h2 {
flex: 1;
font-size: 1.15rem;
}
.lobby-actions {
display: flex;
gap: 0.5rem;
}
.lobby-meta {
color: #9aa6b2;
font-size: 0.8rem;
margin-bottom: 0.75rem;
}
.lobby-list {
overflow: auto;
display: flex;
flex-direction: column;
gap: 0.65rem;
padding-right: 0.25rem;
}
.lobby-card {
border: 1px solid #3a322a;
background: #100e0c;
padding: 0.65rem 0.75rem;
}
.lobby-card-head {
display: flex;
justify-content: space-between;
gap: 0.5rem;
margin-bottom: 0.5rem;
font-size: 0.85rem;
color: #ece6df;
}
.lobby-seats {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
}
.lobby-seats.teams {
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
gap: 0.6rem;
}
.team-col {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
max-width: 42%;
}
.team-col.team-x {
justify-content: flex-start;
}
.team-col.team-y {
justify-content: flex-end;
}
.team-mid {
flex: 0 0 auto;
}
.seat-btn {
pointer-events: auto;
cursor: pointer;
border: 1px solid #5a5048;
background: #1a1510;
color: #ece6df;
font-size: 0.78rem;
font-weight: 700;
min-width: 2rem;
padding: 0.35rem 0.55rem;
}
.seat-btn.team-x {
border-color: #c44b3c;
background: #3a1814;
color: #ffd4ce;
}
.seat-btn.team-y {
border-color: #3b7ec4;
background: #142433;
color: #cfe4ff;
}
.seat-btn .seat-who {
display: block;
font-size: 0.62rem;
font-weight: 500;
opacity: 0.85;
}
.seat-btn.filled {
opacity: 0.9;
cursor: default;
}
.seat-btn.spectate-btn {
border-color: #5dce8a;
color: #b8f0d0;
background: #142018;
font-weight: 600;
}
.seat-btn:disabled {
cursor: default;
}