Files
2026-09-01 14:37:28 +10:00

293 lines
4.7 KiB
CSS

:root {
--bg-top: #0b1026;
--bg-bottom: #171d42;
--panel: #1c2347;
--panel-border: #39457f;
--text: #eef1ff;
--muted: #9aa3d1;
--accent: #5eead4;
--fire: #ff6b4a;
--chrome-reserve: 140px;
--scene-w: min(100%, calc((100vh - var(--chrome-reserve)) * 0.75));
--radius: 16px;
}
@supports (height: 100dvh) {
:root {
--scene-w: min(100%, calc((100dvh - var(--chrome-reserve)) * 0.75));
}
}
* {
box-sizing: border-box;
}
html,
body {
height: 100%;
}
body {
margin: 0;
font-family: "Comic Sans MS", "Chalkboard SE", "Marker Felt", "Segoe UI", system-ui, sans-serif;
color: var(--text);
background: linear-gradient(var(--bg-top), var(--bg-bottom));
}
#app {
min-height: 100vh;
min-height: 100dvh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
padding: 12px;
}
#scene-wrap {
position: relative;
width: var(--scene-w);
aspect-ratio: 3 / 4;
border-radius: var(--radius);
overflow: hidden;
background: #0a0f2c;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}
#scene {
display: block;
width: 100%;
height: 100%;
}
.overlay {
position: absolute;
inset: 0;
z-index: 10;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
background: rgba(8, 11, 32, 0.85);
}
.overlay-card {
width: min(100%, 420px);
max-height: 100%;
overflow-y: auto;
background: var(--panel);
border: 2px solid var(--panel-border);
border-radius: var(--radius);
padding: 20px 18px;
text-align: center;
}
.hidden {
display: none !important;
}
.game-title {
margin: 0 0 4px;
font-size: clamp(1.5rem, 6vw, 2.2rem);
color: var(--accent);
letter-spacing: 0.5px;
}
.game-title.small {
font-size: clamp(1.3rem, 5vw, 1.8rem);
}
.tagline {
margin: 0 0 12px;
color: var(--muted);
}
.instructions {
margin: 0 auto 14px;
padding-left: 20px;
text-align: left;
font-size: 0.95rem;
line-height: 1.5;
}
.leaderboard-block {
margin: 0 auto 16px;
}
.leaderboard-block h2 {
margin: 0 0 8px;
font-size: 1rem;
}
.leaderboard {
width: 100%;
border-collapse: collapse;
font-size: 0.95rem;
}
.leaderboard th,
.leaderboard td {
padding: 4px 8px;
border-bottom: 1px solid var(--panel-border);
}
.leaderboard th {
color: var(--muted);
font-weight: normal;
}
.leaderboard tr:last-child td {
border-bottom: none;
}
.empty-note {
margin: 8px 0 0;
color: var(--muted);
font-size: 0.9rem;
}
.btn {
appearance: none;
border: none;
cursor: pointer;
font: inherit;
font-weight: bold;
color: #fff;
background: var(--panel-border);
min-height: 44px;
padding: 10px 22px;
border-radius: 999px;
box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
touch-action: manipulation;
transition: transform 0.05s ease, filter 0.15s ease;
}
.btn:not(:disabled):hover {
filter: brightness(1.12);
}
.btn:not(:disabled):active,
.btn-pressed {
transform: translateY(2px);
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.btn-primary {
background: var(--accent);
color: #08241f;
}
.btn-fire {
background: var(--fire);
}
.btn-mute {
display: flex;
align-items: center;
justify-content: center;
justify-self: start;
width: 44px;
height: 44px;
padding: 0;
background: rgba(255, 255, 255, 0.08);
}
#mute-btn .mute-x {
display: none;
}
#mute-btn.muted .mute-x {
display: block;
}
#mute-btn.muted .mute-waves {
display: none;
}
#hud {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 10px;
width: var(--scene-w);
}
.hud-center {
display: flex;
justify-content: center;
gap: 10px;
}
#answer {
font: inherit;
font-size: 1.4rem;
font-weight: bold;
text-align: center;
color: var(--text);
background: rgba(255, 255, 255, 0.08);
border: 2px solid var(--panel-border);
border-radius: 12px;
min-height: 44px;
width: 6ch;
padding: 8px 10px;
outline: none;
touch-action: manipulation;
}
#answer:focus {
border-color: var(--accent);
}
#answer:disabled,
.btn:disabled {
opacity: 0.55;
}
#score {
justify-self: end;
font-size: 1.3rem;
font-weight: bold;
text-align: center;
min-width: 3.5ch;
padding: 10px 14px;
background: rgba(255, 255, 255, 0.08);
border: 2px solid var(--panel-border);
border-radius: 999px;
}
.final-score {
margin: 8px 0 16px;
font-size: 1.2rem;
}
#top3-block {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
margin-bottom: 16px;
}
.congrats {
margin: 0;
font-weight: bold;
color: var(--accent);
}
#player-name {
font: inherit;
min-height: 44px;
padding: 8px 12px;
text-align: center;
color: var(--text);
background: rgba(255, 255, 255, 0.08);
border: 2px solid var(--panel-border);
border-radius: 12px;
outline: none;
}
#player-name:focus {
border-color: var(--accent);
}