style.css

At 65bd8a6

65bd8a6History

Preview

Code · 6.6 KiB
:root {
  color-scheme: dark;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e5e7e8;
  background: #101216;
  --green: #b6ff54;
  --muted: #93989f;
  --border: #ffffff14;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; background: #ffffff06; border: 1px solid var(--border); border-radius: 7px; padding: 8px 13px; }
button:hover { background: #ffffff0e; }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
button, input, select { -webkit-tap-highlight-color: transparent; }
main { width: min(100% - 40px, 660px); margin: 36px auto; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
h1 { margin: 0; font-size: 19px; font-weight: 600; }
nav { display: flex; gap: 5px; }
nav button { font-size: 12px; background: transparent; border-color: transparent; padding: 7px 9px; color: #aeb3b9; }
#music[aria-pressed="true"] { color: var(--green); }
.game-panel { background: #13161c; border: 1px solid #ffffff1c; border-radius: 10px; overflow: hidden; }
.scorebar { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; }
.scores { display: flex; gap: 24px; font-size: 13px; color: var(--muted); }
.scores strong { color: #e9ebed; font-variant-numeric: tabular-nums; font-weight: 500; margin-left: 7px; }
.scores span:first-child strong { color: var(--green); }
#pause { font-size: 12px; padding: 5px 10px; }
.board-shell { position: relative; border-block: 1px solid var(--border); }
canvas { width: 100%; height: auto; aspect-ratio: 1; display: block; touch-action: none; }
.overlay { position: absolute; inset: 0; display: grid; place-items: center; background: #10131b50; padding: 20px; }
.overlay[hidden] { display: none; }
.start-card { text-align: center; padding: 26px 30px; border-radius: 10px; background: #161a22f5; border: 1px solid #ffffff19; box-shadow: 0 12px 50px #0004; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 9px; }
.start-card p { font-size: 13px; margin: 0 0 20px; color: #aeb4bd; }
.primary { background: var(--green); border-color: transparent; color: #1b2710; font-weight: 600; }
.primary:hover { background: #c8ff82; }
.start-card .primary { min-width: 110px; }
.board-footer { display: flex; justify-content: space-between; padding: 11px 18px; color: var(--muted); font-size: 12px; }
.keyboard-hint { text-align: center; font-size: 12px; color: #777e87; margin: 16px 0 0; }
.touch-controls { display: none; text-align: center; margin-top: 18px; }
.touch-controls button { width: 48px; height: 40px; margin: 3px; touch-action: manipulation; }
dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 40px); overflow: auto; background: #1a1e25; color: #e5e7e8; border: 1px solid #ffffff26; border-radius: 12px; padding: 24px; box-shadow: 0 25px 100px #0007; }
dialog::backdrop { background: #080b10b0; backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dialog-heading h2 { margin: 0; }
.dialog-heading button { border: 0; background: transparent; font-size: 23px; line-height: 1; padding: 4px 8px; color: var(--muted); }
dialog p { font-size: 13px; color: #adb3bc; line-height: 1.7; }
.field-label, legend { display: block; margin-bottom: 9px; font-size: 13px; }
select { width: 100%; padding: 10px; background: #10141a; color: inherit; border: 1px solid #ffffff20; border-radius: 6px; margin-bottom: 22px; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { padding: 0; }
.obstacle-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.obstacle-options label { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #adb3bc; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--green); width: 16px; height: 16px; margin: 0; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 49px; border-top: 1px solid var(--border); font-size: 13px; }
input[type="color"] { cursor: pointer; width: 32px; height: 27px; padding: 2px; background: #10141a; border: 1px solid #ffffff20; border-radius: 5px; }
input[type="range"] { width: 130px; accent-color: var(--green); }
.settings-note { margin: 20px 0; font-size: 12px; }
.dialog-actions { display: flex; justify-content: space-between; gap: 12px; }
.music-credit { margin: 22px 0; padding-top: 8px; border-top: 1px solid var(--border); }
.music-credit p { font-size: 12px; }
a { color: inherit; text-underline-offset: 3px; }
.sr-only { position: absolute; clip: rect(0,0,0,0); width: 1px; height: 1px; overflow: hidden; }
.world { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, #30253530, transparent 75%); }
.arch { position: absolute; top: 18vh; width: 240px; height: 760px; border: 25px solid #332d3926; border-radius: 50% 50% 0 0; box-shadow: inset 0 0 0 1px #ffffff05; background: repeating-linear-gradient(0deg, transparent 0 80px, #ffffff03 81px 83px); }
.arch-left { right: calc(50% + 420px); }
.arch-right { left: calc(50% + 420px); }
.mist { position: absolute; inset: 40% -40% -20%; background: radial-gradient(ellipse at 25% 75%, #7d668710, transparent 40%); animation: drift 24s ease-in-out infinite alternate; }
.no-mist .mist { display: none; }
@keyframes drift { to { transform: translateX(12%); } }
@media (max-width: 600px) {
  main { width: calc(100% - 24px); margin: 20px auto; }
  header { margin-bottom: 16px; gap: 8px; }
  h1 { font-size: 17px; }
  nav { gap: 0; }
  nav button { padding: 7px; font-size: 11px; }
  .scorebar { padding: 12px 14px; }
  .scores { gap: 18px; }
  .start-card { padding: 21px; }
  .start-card h2 { font-size: 18px; }
  .start-card p { font-size: 12px; }
  .touch-controls { display: block; }
  .keyboard-hint { display: none; }
}
@media (pointer: coarse) { .touch-controls { display: block; } .keyboard-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .mist { animation: none; } }

nav .icon-button { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 8px; }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#music .sound-waves, #music[aria-pressed="true"] .sound-muted { display: none; }
#music[aria-pressed="true"] .sound-waves { display: inline; }

Files