* {
box-sizing: border-box;
font-family: 'Syne Mono', monospace;
}
h1 { color: whitesmoke; }
body { display: flex; justify-content: center; background-color: #3d5671; }
#outermost { display: inline-block; }
#coinicon { width: 50px; height: auto; }
.textBox {
width: 100%; display: flex; align-items: center;
text-align: center; justify-content: center;
}
#mainDiv { position: relative; display: inline-block; }
#scoreInfo {
position: absolute; color: white; display: none;
align-items: center; justify-content: center;
top: 0; bottom: 0; right: 0; left: 0; font-size: 40px;
}
.coinBar { height: 30px; width: 100%; position: absolute; top: 0; right: 0; bottom: 0; border-radius: 10px; }
.coinBarContainer { position: relative; align-items: flex-end; width: 100%; border: 1px solid white; border-radius: 10px; margin: 10px; }
.coinBarBg { background-color: rgb(112, 112, 112); height: 30px; width: 100%; background-image: url("./img/healthbar_bg.png"); background-blend-mode: luminosity; border-radius: 10px; }
#coinBar { background-color: #e4d053; left: 0; width: 0%; transition: width .45s ease; }
#sidediv { height: 100%; padding-left: 5px; margin-left: 5px; display: block; }
#game { display: flex; }
#refreshBtn { background-color: #6d7eaf; }
#pauseBtn { background-color: #75c9b1; }
button { border-radius: 40px; transition: transform .7s ease-in-out; }
button:hover { transform: rotate(360deg); background-color: #d3e6ec; }
.btnImg { width: 60px; height: 60px; }
.btnContainer { padding-bottom: 15px; }

button {
border: 1px solid rgba(255, 255, 255, .35);
cursor: pointer;
}
button:active {
transform: scale(.96);
}
button:focus-visible {
outline: 2px solid white;
outline-offset: 3px;
}
#scoreInfo {
z-index: 2;
text-align: center;
}

#mainDiv {
overflow: hidden;
}
#scoreInfo {
line-height: 1.25;
padding: 20px;
}
canvas {
display: block;
}

#topBar {
gap: 10px;
align-items: center;
flex-wrap: wrap;
}
#levelBadge {
color: white;
min-width: 90px;
text-align: left;
white-space: nowrap;
}
#statsPanel {
display: flex;
gap: 14px;
color: white;
min-width: 100%;
justify-content: flex-end;
order: 10;
white-space: nowrap;
}
#coinText,
#healthText {
font-size: 15px;
}
.coinBarContainer {
flex: 1 1 420px;
}

#helpPanel {
color: antiquewhite;
display: flex;
justify-content: center;
gap: 18px;
margin-top: 10px;
font-size: 15px;
flex-wrap: wrap;
}
#helpPanel span {
white-space: nowrap;
}
@media (max-width: 760px) {
#helpPanel {
gap: 8px;
font-size: 13px;
}
}

#muteBtn {
background-color: #b0a162;
}
#muteBtn img {
display: block;
}
#sidediv {
min-width: 72px;
}

canvas {
max-width: min(100vw - 130px, 1024px);
height: auto;
image-rendering: pixelated;
}
@media (max-width: 900px) {
body {
margin: 0;
padding: 8px;
}
#outermost {
width: 100%;
}
#game {
justify-content: center;
}
canvas {
max-width: calc(100vw - 94px);
}
.btnImg {
width: 48px;
height: 48px;
}
#scoreInfo {
font-size: 30px;
}
}
@media (max-width: 520px) {
#topBar {
gap: 6px;
}
#statsPanel {
min-width: 150px;
gap: 8px;
}
canvas {
max-width: calc(100vw - 78px);
}
.btnImg {
width: 40px;
height: 40px;
}
}

#touchControls {
display: none;
justify-content: center;
gap: 12px;
margin-top: 10px;
}
.touchBtn {
width: 58px;
height: 48px;
color: white;
background-color: #476b4e;
border: 1px solid #d8ead8;
border-radius: 8px;
font-size: 20px;
}
.touchBtn:active {
background-color: #75c9b1;
color: #10251e;
}
@media (max-width: 900px) {
#touchControls {
display: flex;
}
}

#helpPanel span:nth-child(2) {
color: #fff3a3;
}

#jumpFeelText {
color: #fff3a3;
min-width: 150px;
text-align: center;
}

#checkpointText {
color: #d8ead8;
}
#statsPanel {
min-width: 265px;
}
#checkpointBanner {
color: #d8ead8;
height: 20px;
margin-top: 6px;
opacity: 0;
text-align: center;
transition: opacity .2s ease;
}
#checkpointBanner.show {
opacity: 1;
}

#healthText {
min-width: 70px;
}
body.hurtFlash {
background-color: #5a4050;
}

#scoreInfo {
text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}
#enemyText {
color: #ffd7aa;
}

#enemyText {
min-width: 82px;
}

#comboBadge {
color: #e4d053;
min-width: 90px;
text-align: right;
white-space: nowrap;
}

#mainDiv {
background-color: #25384a;
}

#scoreInfo {
background-color: rgba(0, 0, 0, .18);
}
#scoreInfo br {
display: block;
content: "";
margin-top: 8px;
}

#timerBadge {
color: white;
min-width: 80px;
text-align: right;
white-space: nowrap;
}

#scoreBadge {
color: white;
min-width: 110px;
text-align: right;
white-space: nowrap;
}

#scoreBadge {
min-width: 160px;
}
#bestBanner {
color: #fff3a3;
height: 20px;
margin-top: 4px;
opacity: 0;
text-align: center;
transition: opacity .2s ease;
}
#bestBanner.show {
opacity: 1;
}

#difficultyPanel {
display: none;
justify-content: center;
gap: 8px;
margin-top: 4px;
}
.difficultyBtn {
border-radius: 8px;
padding: 4px 10px;
background-color: #435d42;
color: white;
border: 1px solid #d8ead8;
transition: background-color .2s ease;
font-size: 13px;
}
.difficultyBtn.active {
background-color: #75c9b1;
color: #10251e;
}
@media (max-width: 520px) {
#difficultyPanel {
display: flex;
}
}


#levelSelect {
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
margin-top: 6px;
color: antiquewhite;
font-size: 13px;
}
.levelBtn {
width: 30px;
height: 28px;
padding: 0;
border-radius: 6px;
background-color: #435d42;
color: white;
transition: background-color .2s ease;
}
.levelBtn.active {
background-color: #75c9b1;
color: #10251e;
}
.levelBtn:disabled {
cursor: default;
opacity: .45;
}

body {
margin: 0;
min-height: 100vh;
padding: 14px;
overflow-x: hidden;
}
#outermost {
width: min(100%, 1120px);
}
#game {
width: 100%;
align-items: flex-start;
}
#mainDiv {
flex: 1 1 auto;
min-width: 0;
}
canvas {
width: 100%;
max-width: 1024px;
height: auto;
}

@media (max-width: 760px) {
#game {
display: block;
}
#mainDiv {
display: block;
width: 100%;
}
#sidediv {
display: flex;
justify-content: center;
gap: 12px;
min-width: 0;
margin: 10px 0 0;
padding: 0;
}
.btnContainer {
padding: 0;
}
.btnImg {
width: 42px;
height: 42px;
}
#topBar {
justify-content: center;
}
#statsPanel {
justify-content: center;
white-space: normal;
}
#scoreInfo {
font-size: 26px;
}
canvas {
max-width: 100%;
}
}

@media (max-width: 420px) {
body {
padding: 8px;
}
h1 {
font-size: 27px;
}
.textBox p {
font-size: 14px;
}
#statsPanel {
font-size: 12px;
gap: 7px;
}
#helpPanel {
display: none;
}
#touchControls {
display: flex;
}
.touchBtn {
width: 64px;
height: 44px;
}
#levelSelect {
margin-top: 10px;
}
}
