* {
  box-sizing: border-box;
  image-rendering: pixelated;
}
 
body {
  text-align: center;
  font-family: "Jersey 10", sans-serif;
}
 
body {
  background-image: url("img/pixelback.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

canvas {
  width: 50vw;
  height: 70vh;
  image-rendering: pixelated;
  margin: 0 auto;
}
 
/* TITLE */
h1 {
  z-index: 100;
  font-size: 5vw;
  color: white;
  padding: 2vw;
  /* padding-top: 3vw; */
  width: 30vw;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  margin-top: 0.5vw;
  background-color:#f87ba0;
  border-radius: 5vw;
  
}
 
/* CANVAS */
#screen {
  display: block;
  margin: 20px auto;
  border: 3px solid rgb(235, 231, 123);
  background: #f5f5f5;
  display: flex;
}
 
/* BUTTONS */
#mainBtns {
  background-image: none;
  display: flex;
  flex-direction: column;
  gap: 2vw;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 30px;
  left: 10vw;
}

button {
  background: none;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease;
}

button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

button:active {
  transform: translateY(3px);
  filter: brightness(0.9);
}

button img {
  width: 8vw;
  height: 8vw;
  filter: drop-shadow(3px 3px 0px rgba(0,0,0,0.3));
}

button:active img {
  filter: drop-shadow(1px 1px 0px rgba(0,0,0,0.2));
}
 
/* CURRENCY */

#currencyBar {
  position: fixed;
  top: 2vw;
  right: 4vw;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 100;
  font-size: 30px;
}

#flowerIcon {
  width: 3vw;
}


#coinBox{
  width: 7vw;
  position: fixed;
  top: 0.1vw;
  right: 2vw;
}

#titleBox {
  position: fixed;
  margin: auto;
  left: 0;
  right: 0;
  width: 55vw;
  height: 115vw;
  top: -33.7vw;
  z-index: -1 !important;
}
 
/* POPUPS */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
 
  width: 300px;
  height: auto;
 
  background: white;
  border: 2px solid black;
  border-radius: 10px;
 
  display: flex;
  justify-content: center;
  align-items: center;
 
  z-index: 1000;
}
 
.popup-box {
  padding: 20px;
  text-align: center;
}
 
.hidden {
  display: none;
}
 
 
/* ── XP Bar ── */
.xp-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 50vw;
  height: 3vw;
  background: #fff8f0;
  border: 4px solid #3d2b1a;
  box-shadow: 4px 4px 0 #3d2b1a;
  overflow: visible;
  margin: 0 auto 0.8vw auto;
}
 
.xp-level-chip {
  flex-shrink: 0;
  height: 100%;
  background: #f0a8bc;
  border-right: 4px solid #3d2b1a;
  box-shadow: inset -2px 0 0 #c45878;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  gap: 2px;
}
 
.xp-lvl-word {
  font-size: 6px;
  color: #3d2b1a;
  letter-spacing: 0.1em;
  font-family: "Jersey 10", sans-serif;
}
 
.xp-lvl-num {
  font-size: 14px;
  color: #3d2b1a;
  line-height: 1;
  font-family: "Jersey 10", sans-serif;
}
 
.xp-track {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #f3e193;
}
 
.xp-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    90deg,
    #f0a8bc 0px,
    #f0a8bc 5px,
    #e07898 5px,
    #e07898 6px
  );
  transform-origin: left center;
  overflow: hidden;
}
 
.xp-fill.bump {
  animation: xpBarBump 0.35s ease;
}
 
.xp-tick {
  position: absolute;
  top: 15%;
  height: 70%;
  width: 2px;
  background: #3d2b1a;
  opacity: 0.12;
  z-index: 2;
}
 
.xp-floater {
  position: absolute;
  top: -28px;
  right: 12px;
  font-size: 9px;
  color: #f0d040;
  text-shadow: 1px 1px 0 #3d2b1a;
  white-space: nowrap;
  animation: xpFloatUp 1.3s ease-out forwards;
  pointer-events: none;
  font-family: "Jersey 10", sans-serif;
}
 
 
/* ── Hunger Bar ── */
  .hunger-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 50vw;
  height: 3vw;
  background: #fff8f0;
  border: 4px solid #3d2b1a;
  box-shadow: 4px 4px 0 #3d2b1a;
  margin: 0 auto;
  }
 
.hunger-chip {
  flex-shrink: 0;
  height: 100%;
  background: #f0a8bc;
  border-right: 4px solid #3d2b1a;
  box-shadow: inset -2px 0 0 #c45878;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}
 
.hunger-label {
  font-size: 6px;
  color: #3d2b1a;
  letter-spacing: 0.1em;
  font-family: "Jersey 10", sans-serif;
}
 
.hunger-slots {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-evenly;
  padding: 0 6px;
  background: #fff8f0;
}
 
.hunger-slot {
  width: 2vw;
  height: 2vw;
  flex-shrink: 0;
}

.hunger-slot.full {
  background: url(sprite/visuals/hungar.svg) center/contain no-repeat;
}

.hunger-slot.empty {
  background: url(sprite/visuals/empty-hunger.svg) center/contain no-repeat;
}

.hud {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: row; /* 👈 side by side */
  gap: 12px;
  z-index: 100;
}

#aboutBtn {
  position: fixed;
  bottom: 2vw;
  right: 2vw;
  width: 4vw;
  height: 4vw;
  min-width: 48px;
  min-height: 48px;
  background: #fef08a;
  border: 3px solid #c8860a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  font-family: "Jersey 10", sans-serif;
  font-size: 2vw;
  color: #3d2b1a;
  box-shadow: 3px 3px 0 #c8860a;
  transition: transform 0.1s ease, filter 0.1s ease;
}

#aboutBtn:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

#aboutBtn:active {
  transform: translateY(2px);
  box-shadow: 1px 1px 0 #c8860a;
}

#aboutPopup {
  width: 70vw;
  max-width: 800px;
  min-height: 400px;
}

#aboutPopup .popup-box {
  width: 100%;
  padding: 40px;
}

#aboutPopup p {
  font-size: 20px;
  line-height: 2;
}
 
 
/* ── Keyframes ── */
@keyframes xpFloatUp {
  0%   { opacity: 1; transform: translateY(0); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-36px); }
}
 
@keyframes xpBarBump {
  0%,100% { transform: scaleY(1); }
  50%     { transform: scaleY(1.08); }
}
 
@keyframes xpShine {
  0%   { left: -70%; }
  100% { left: 130%; }
}