:root {
  --vh: 1vh;
  --gold: #ffd32a;
  --gold2: #ffa31a;
  --amber-dark: #9a5c0e;
  --cyan: #5ad2ff;
  --pink: #ff6fae;
  --ink: #140c33;
  --panel-b: rgba(255, 255, 255, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Outfit', sans-serif;
  touch-action: none;
  background:
    linear-gradient(rgba(28, 19, 82, 0.10), rgba(28, 19, 82, 0.10)),
    url('bg.png') center center / cover no-repeat;
}

#gameWrap {
  position: relative;
  width: 100vw;
  height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  background:
    linear-gradient(rgba(28, 19, 82, 0.10), rgba(28, 19, 82, 0.10)),
    url('bg.png') center center / cover no-repeat;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#uiLayer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.glass {
  background: linear-gradient(180deg, rgba(86, 62, 160, 0.82) 0%, rgba(44, 28, 100, 0.88) 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(220, 200, 255, 0.28);
  box-shadow: 0 8px 24px rgba(8, 2, 30, 0.5), 0 2px 0 rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -2px 6px rgba(0, 0, 0, 0.28);
}

/* ---------- HUD ---------- */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 0 12px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-14px);
  transition: opacity .35s ease, transform .35s ease;
}

.playing #hud {
  opacity: 1;
  transform: none;
}

.hudRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hudPill {
  border-radius: 999px;
  padding: 7px 16px 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff8e6;
  min-height: 40px;
}

.hudPill .ic {
  width: 20px;
  height: 20px;
  flex: none;
}

.hudPill .lbl {
  font-size: 10.5px;
  letter-spacing: 1.4px;
  color: #c9b8ff;
  font-weight: 700;
}

.hudPill .val {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  color: var(--gold);
  font-size: 19px;
  letter-spacing: 0.3px;
  min-width: 18px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

#shotsPill.low .val {
  color: #ff6b81;
  animation: pulseBadge .7s ease infinite;
}

#iconBtns {
  display: flex;
  gap: 9px;
  pointer-events: all;
}

.iconBtn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(220, 200, 255, 0.3);
  background: linear-gradient(180deg, rgba(96, 72, 170, 0.95), rgba(48, 30, 108, 0.95));
  box-shadow: 0 5px 14px rgba(8, 2, 30, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform .15s ease;
}

.iconBtn:active {
  transform: scale(0.86);
}

.iconBtn svg {
  width: 20px;
  height: 20px;
  fill: #fff8e6;
}

/* ---------- boosters ---------- */
#boosters {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .35s ease, transform .35s ease;
}

.playing #boosters {
  opacity: 1;
  transform: none;
}

.boost {
  pointer-events: all;
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: #fff8e6;
  font-family: 'Outfit', sans-serif;
  transition: transform .12s ease, box-shadow .2s ease;
}

.boost svg {
  width: 26px;
  height: 26px;
}

.boost .bl {
  font-size: 9.5px;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: #d9ccff;
}

.boost:active {
  transform: scale(0.9);
}

.boost.armed {
  box-shadow: 0 0 0 3px var(--gold), 0 0 24px rgba(255, 211, 42, 0.7), 0 8px 24px rgba(8, 2, 30, 0.5);
  animation: pulseBadge .8s ease infinite;
}

.boost.disabled {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.boost .badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff8fa3, #ff4757);
  border: 2px solid #fff;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

/* ---------- screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  text-align: center;
  padding: 24px;
  z-index: 6;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97);
  transition: opacity .4s cubic-bezier(.2, .8, .2, 1), transform .4s cubic-bezier(.2, .8, .2, 1), visibility .4s;
  background: radial-gradient(ellipse at 50% 20%, rgba(70, 44, 150, 0.45), rgba(14, 6, 40, 0.86) 70%);
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.logoWrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
  position: relative;
  animation: logoFloat 3.4s ease-in-out infinite;
}

@keyframes logoFloat {

  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}

h1.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 0.95;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

h1.title .t1 {
  font-size: 64px;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff7c2 0%, #ffd32a 45%, #ff9f1a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 2px rgba(120, 60, 0, 0.55);
}

h1.title .t2 {
  font-size: 31px;
  letter-spacing: 4px;
  margin-top: -2px;
  background: linear-gradient(90deg, #5ad2ff, #ff6fae, #5ad2ff);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: -220% 50%;
  }
}

.bubbleDeco {
  position: absolute;
  inset: -30px -30px;
  pointer-events: none;
}

.bubbleDeco i {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0 8%, rgba(255, 255, 255, 0.25) 9% 18%, transparent 19%), radial-gradient(circle at 50% 50%, var(--c1), var(--c2));
  box-shadow: inset -4px -6px 10px rgba(0, 0, 0, 0.25), 0 6px 14px rgba(0, 0, 0, 0.35);
  animation: bob 3s ease-in-out infinite;
}

.bubbleDeco i:nth-child(1) {
  width: 34px;
  height: 34px;
  left: 6px;
  top: 8px;
  --c1: #ff6b81;
  --c2: #d62839;
}

.bubbleDeco i:nth-child(2) {
  width: 26px;
  height: 26px;
  right: 10px;
  top: 0;
  --c1: #5ad2ff;
  --c2: #1b7fc4;
  animation-delay: -.8s;
}

.bubbleDeco i:nth-child(3) {
  width: 22px;
  height: 22px;
  left: -2px;
  bottom: 48px;
  --c1: #7dffb0;
  --c2: #1fa85a;
  animation-delay: -1.5s;
}

.bubbleDeco i:nth-child(4) {
  width: 30px;
  height: 30px;
  right: 0;
  bottom: 38px;
  --c1: #d9a6ff;
  --c2: #8a3fd1;
  animation-delay: -2.1s;
}

.bubbleDeco i:nth-child(5) {
  width: 16px;
  height: 16px;
  left: 46%;
  bottom: 0;
  --c1: #ffe27a;
  --c2: #e0a000;
  animation-delay: -.4s;
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.subtitle {
  color: #ffffff;
  font-size: 15px;
  margin-top: 10px;
  letter-spacing: 3px;
  opacity: 0.85;
  text-transform: uppercase;
  font-weight: 700;
}

/* ---------- buttons ---------- */
.btn {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: #3a2200;
  border: none;
  border-radius: 30px;
  padding: 16px 40px;
  cursor: pointer;
  background: linear-gradient(180deg, #fff6c4, var(--gold) 52%, var(--gold2));
  box-shadow: 0 5px 0 var(--amber-dark), 0 12px 26px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 190, 60, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 6px rgba(190, 110, 10, 0.35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  margin: 7px 6px;
  transition: transform .12s ease, box-shadow .12s ease;
  min-width: 220px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-20deg);
  animation: btnShine 3.2s ease-in-out infinite;
}

@keyframes btnShine {

  0%,
  60% {
    left: -60%;
  }

  100% {
    left: 140%;
  }
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--amber-dark), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn.secondary {
  background: linear-gradient(180deg, #6a4cc4, #42288e);
  color: #fff8e6;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
  box-shadow: 0 5px 0 rgba(10, 4, 40, 0.55), 0 10px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.22);
  min-width: 215px;
  font-size: 15px;
  padding: 13px 26px;
}

.btn.secondary::after {
  display: none;
}

.btn.secondary:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(10, 4, 40, 0.55);
}

.btnRow {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.statsRow {
  display: flex;
  gap: 12px;
  margin: 12px 0 18px 0;
  flex-wrap: wrap;
  justify-content: center;
}

.statCard {
  border-radius: 18px;
  padding: 13px 22px;
  min-width: 108px;
}

.statCard .label {
  font-size: 10.5px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #c9b8ff;
  margin-bottom: 5px;
  font-weight: 700;
}

.statCard .num {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--gold);
  text-shadow: 0 2px 8px rgba(255, 201, 60, 0.3);
}

h2.screenTitle {
  font-family: 'Baloo 2', sans-serif;
  color: #fff8e6;
  font-size: 30px;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}

.footNote {
  margin-top: 14px;
  font-size: 11.5px;
  color: #a898e0;
  letter-spacing: 0.6px;
}

.newBest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #ff9f6b, #ffd76b);
  color: #3a1a00;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: 999px;
  text-transform: uppercase;
  animation: pulseBadge 1s ease infinite;
  box-shadow: 0 4px 14px rgba(255, 180, 60, 0.4);
}

@keyframes pulseBadge {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.08);
  }
}

/* ---------- loader ---------- */
#loadBarOuter {
  width: min(250px, 62vw);
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  margin-top: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#loadBarInner {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold2), var(--gold), #fff2c2);
  border-radius: 999px;
  transition: width .25s ease;
  position: relative;
  overflow: hidden;
}

#loadBarInner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  width: 50%;
  animation: btnShine 1.4s ease-in-out infinite;
}

#loadLabel {
  margin-top: 13px;
  font-size: 13px;
  color: #d9ccff;
  letter-spacing: 0.5px;
}

/* ---------- level select ---------- */
#levelGrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
  width: min(360px, 100%);
  max-height: calc(var(--vh, 1vh) * 64);
  overflow-y: auto;
  touch-action: pan-y;
  padding: 6px 4px 12px 4px;
  margin-bottom: 10px;
  scrollbar-width: none;
}

#levelGrid::-webkit-scrollbar {
  display: none;
}

.lvl {
  aspect-ratio: 1;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 21px;
  color: #3a2200;
  background: linear-gradient(180deg, #fff6c4, var(--gold) 55%, var(--gold2));
  box-shadow: 0 4px 0 var(--amber-dark), 0 8px 14px rgba(0, 0, 0, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.6);
  transition: transform .12s ease;
  line-height: 1;
  gap: 3px;
}

.lvl:active {
  transform: translateY(3px);
}

.lvl .st {
  font-size: 10px;
  letter-spacing: 1px;
  color: #b15a00;
}

.lvl .st b {
  color: #ff8a00;
  font-weight: 800;
}

.lvl .st s {
  text-decoration: none;
  color: rgba(120, 60, 0, 0.3);
}

.lvl.locked {
  background: linear-gradient(180deg, #54489a, #352a76);
  color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 0 rgba(10, 4, 40, 0.5), 0 8px 14px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  cursor: default;
}

.lvl.locked svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.5);
}

.lvl.current {
  animation: pulseBadge 1.1s ease infinite;
}

/* ---------- how to ---------- */
#htpVisual {
  width: min(240px, 64vw);
  height: 120px;
  border-radius: 18px;
  overflow: hidden;
  margin: 8px 0 14px 0;
  position: relative;
  border: 1px solid var(--panel-b);
  background: linear-gradient(180deg, #3a2790, #1b1145);
}

.htpBubbles i {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0 8%, rgba(255, 255, 255, 0.25) 9% 18%, transparent 19%), radial-gradient(circle at 50% 50%, var(--c1), var(--c2));
  box-shadow: inset -3px -5px 8px rgba(0, 0, 0, 0.25);
}

.htpBubbles .b1 {
  left: 66px;
  top: 8px;
  --c1: #ff6b81;
  --c2: #d62839;
}

.htpBubbles .b2 {
  left: 100px;
  top: 8px;
  --c1: #ff6b81;
  --c2: #d62839;
}

.htpBubbles .b3 {
  left: 134px;
  top: 8px;
  --c1: #5ad2ff;
  --c2: #1b7fc4;
}

.htpBubbles .b4 {
  left: 83px;
  top: 40px;
  --c1: #5ad2ff;
  --c2: #1b7fc4;
}

.htpShot {
  position: absolute;
  left: 117px;
  bottom: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff 0 8%, rgba(255, 255, 255, 0.25) 9% 18%, transparent 19%), radial-gradient(circle at 50% 50%, #ff6b81, #d62839);
  animation: shoot 1.6s ease-in infinite;
}

@keyframes shoot {

  0%,
  15% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }

  70% {
    transform: translate(-32px, -62px) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(-32px, -66px) scale(1.5);
    opacity: 0;
  }
}

.htpTips {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 14px;
  max-width: 330px;
}

.htpTip {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border-radius: 15px;
  padding: 10px 14px;
}

.htpTip .htpIcon {
  width: 32px;
  height: 32px;
  flex: none;
}

.htpTip .htpIcon svg {
  width: 100%;
  height: 100%;
}

.htpTip .txt {
  font-size: 13.5px;
  color: #efe9ff;
  line-height: 1.35;
}

.htpTip .txt b {
  color: var(--gold);
}

/* ---------- win / lose ---------- */
#starsRow {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 10px 0;
}

#starsRow .star {
  width: 64px;
  height: 64px;
  fill: rgba(255, 255, 255, 0.16);
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 0.8;
  transform: scale(0.8);
}

#starsRow .star.mid {
  width: 82px;
  height: 82px;
  margin-bottom: 8px;
}

#starsRow .star.on {
  fill: url(#none);
  fill: #ffd32a;
  stroke: #b06800;
  stroke-width: 1;
  filter: drop-shadow(0 0 12px rgba(255, 211, 42, 0.8));
  animation: starPop .6s cubic-bezier(.2, 1.6, .3, 1) both;
  animation-delay: var(--d, 0s);
}

@keyframes starPop {
  0% {
    transform: scale(0) rotate(-40deg);
  }

  100% {
    transform: scale(1) rotate(0);
  }
}

.loseBubble {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  margin: 6px 0 4px 0;
  background: radial-gradient(circle at 32% 28%, #fff 0 7%, rgba(255, 255, 255, 0.25) 8% 16%, transparent 17%), radial-gradient(circle at 50% 50%, #9a8ad8, #4b3a99);
  box-shadow: inset -8px -12px 20px rgba(0, 0, 0, 0.3), 0 12px 24px rgba(0, 0, 0, 0.4);
  position: relative;
  animation: bob 2.4s ease-in-out infinite;
}

.loseBubble::before,
.loseBubble::after {
  content: '';
  position: absolute;
  top: 38px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1b1145;
}

.loseBubble::before {
  left: 26px;
}

.loseBubble::after {
  right: 26px;
}

#flashOverlay {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
}

#gameWrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(ellipse at 50% 46%, rgba(0, 0, 0, 0) 55%, rgba(8, 2, 30, 0.4) 100%);
}

@media (min-width:700px) {
  #gameWrap {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.7);
    border-radius: 18px;
    overflow: hidden;
  }
}

@media (max-height: 640px) {
  h1.title .t1 {
    font-size: 52px;
  }

  .btn {
    padding: 12px 32px;
  }

  .statsRow {
    margin: 6px 0 10px;
  }
}

.footLinks {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #8b7bc8;
}

.footLinks a {
  color: #c9b8ff;
  text-decoration: none;
  padding: 4px 6px;
  font-weight: 600;
}

.footLinks a:active {
  color: var(--gold);
}

/* =====================================================
   VOLCANO / LAVA THEME OVERRIDES
   ===================================================== */
:root {
  --gold: #ffc21f;
  --gold2: #ff8a1f;
  --amber-dark: #8a3a06;
  --ember: #ff6a1a;
}

html,
body {
  background: #0c0403;
}

#gameWrap {
  background: #1a0806;
}

.glass {
  background: linear-gradient(180deg, rgba(92, 40, 22, 0.9) 0%, rgba(38, 14, 9, 0.93) 100%);
  border: 1px solid rgba(255, 170, 80, 0.38);
  box-shadow: 0 8px 24px rgba(10, 2, 0, 0.55), 0 0 14px rgba(255, 110, 30, 0.14), inset 0 1px 0 rgba(255, 220, 170, 0.24), inset 0 -2px 6px rgba(0, 0, 0, 0.35);
}

.hudPill .lbl,
.boost .bl {
  color: #ffd2a0;
}

.hudPill .val,
.statCard .num {
  color: #ffc21f;
  text-shadow: 0 0 10px rgba(255, 140, 30, 0.45), 0 2px 6px rgba(0, 0, 0, 0.4);
}

.iconBtn {
  border: 1px solid rgba(255, 170, 80, 0.4);
  background: linear-gradient(180deg, rgba(112, 52, 28, 0.95), rgba(44, 16, 10, 0.95));
  box-shadow: 0 5px 14px rgba(10, 2, 0, 0.55), 0 0 12px rgba(255, 110, 30, 0.15), inset 0 1px 0 rgba(255, 220, 170, 0.28);
}

.boost.armed {
  box-shadow: 0 0 0 3px #ffc21f, 0 0 26px rgba(255, 150, 30, 0.85), 0 8px 24px rgba(10, 2, 0, 0.55);
}

.screen {
  background: radial-gradient(ellipse at 50% 28%, rgba(150, 56, 14, 0.5), rgba(22, 6, 3, 0.9) 72%);
}

h2.screenTitle {
  color: #fff3dd;
  text-shadow: 0 0 18px rgba(255, 120, 30, 0.5), 0 3px 12px rgba(0, 0, 0, 0.5);
}

h1.title .t1 {
  background: linear-gradient(180deg, #fff6c8 0%, #ffc21f 40%, #ff6a1a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 2px rgba(110, 28, 4, 0.7);
  filter: drop-shadow(0 0 14px rgba(255, 110, 20, 0.55));
}

h1.title .t2 {
  background: linear-gradient(90deg, #ffd27a, #ff6a3a, #ffd27a);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
}

.statCard .label,
#loadLabel,
.footNote {
  color: #ffcaa0;
}

.footLinks,
.footLinks a {
  color: #e9a979;
}

.btn {
  color: #3a1800;
  box-shadow: 0 5px 0 var(--amber-dark), 0 12px 26px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 130, 30, 0.38), inset 0 2px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 6px rgba(190, 80, 10, 0.4);
}

.btn.secondary {
  background: linear-gradient(180deg, #7a3a22, #3e1810);
  box-shadow: 0 5px 0 rgba(20, 4, 0, 0.7), 0 10px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 210, 160, 0.3);
  border: 1px solid rgba(255, 170, 80, 0.35);
}

.btn.secondary:active {
  box-shadow: 0 1px 0 rgba(20, 4, 0, 0.7);
}

#loadBarOuter {
  border: 1px solid rgba(255, 170, 80, 0.35);
  background: rgba(0, 0, 0, 0.35);
}

#loadBarInner {
  background: linear-gradient(90deg, #ff6a1a, #ffc21f, #fff2c2);
  box-shadow: 0 0 14px rgba(255, 140, 30, 0.7);
}

.lvl {
  color: #3a1800;
  background: linear-gradient(180deg, #fff0b8, #ffc21f 55%, #ff8a1f);
  box-shadow: 0 4px 0 var(--amber-dark), 0 8px 14px rgba(0, 0, 0, 0.45), 0 0 12px rgba(255, 130, 30, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.6);
}

.lvl .st {
  color: #a24a00;
}

.lvl.locked {
  background: linear-gradient(180deg, #5a3224, #2e140e);
  color: rgba(255, 220, 190, 0.45);
  box-shadow: 0 4px 0 rgba(15, 3, 0, 0.6), 0 8px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 200, 150, 0.15);
}

.lvl.locked svg {
  fill: rgba(255, 220, 190, 0.5);
}

#htpVisual {
  background: linear-gradient(180deg, #7a2c0c, #1d0806);
  border: 1px solid rgba(255, 170, 80, 0.35);
}

.htpTip .txt {
  color: #ffeedd;
}

.bubbleDeco i:nth-child(1),
.htpBubbles .b1,
.htpBubbles .b2 {
  --c1: #ff6a4d;
  --c2: #b81f14;
}

.bubbleDeco i:nth-child(2),
.htpBubbles .b3,
.htpBubbles .b4 {
  --c1: #6aa6ff;
  --c2: #1646b8;
}

.bubbleDeco i:nth-child(3) {
  --c1: #7dffb0;
  --c2: #14894a;
}

.bubbleDeco i:nth-child(4) {
  --c1: #ffd45a;
  --c2: #d98a00;
}

.bubbleDeco i:nth-child(5) {
  --c1: #8b8d99;
  --c2: #2f3038;
}

.htpShot {
  background: radial-gradient(circle at 32% 28%, #fff 0 8%, rgba(255, 255, 255, 0.25) 9% 18%, transparent 19%), radial-gradient(circle at 50% 50%, #ff6a4d, #b81f14);
}

.loseBubble {
  background: radial-gradient(circle at 32% 28%, #fff 0 7%, rgba(255, 255, 255, 0.25) 8% 16%, transparent 17%), radial-gradient(circle at 50% 50%, #6a6c78, #25262d);
  box-shadow: inset -8px -12px 20px rgba(0, 0, 0, 0.35), 0 0 30px rgba(255, 110, 30, 0.45), 0 12px 24px rgba(0, 0, 0, 0.5);
}

.loseBubble::before,
.loseBubble::after {
  background: #ffb02e;
  box-shadow: 0 0 10px #ff7a1a;
}

#gameWrap::after {
  background: radial-gradient(ellipse at 50% 46%, rgba(0, 0, 0, 0) 52%, rgba(20, 3, 0, 0.5) 100%);
}

#starsRow .star.on {
  filter: drop-shadow(0 0 14px rgba(255, 150, 30, 0.9));
}

/* =====================================================
   OCEAN / TREASURE THEME OVERRIDES (Gem Cove)
   ===================================================== */
:root {
  --gold: #ffd23f;
  --gold2: #ff9f1a;
  --amber-dark: #8a5206;
  --aqua: #5be6ff;
  --panel-b: rgba(140, 230, 255, 0.35);
}

html, body {  background:
    linear-gradient(rgba(28, 19, 82, 0.10), rgba(28, 19, 82, 0.10)),
    url('bg.png') center center / cover no-repeat; }
#gameWrap { background: #08324a; }

.glass {
  background: linear-gradient(180deg, rgba(20, 86, 120, 0.9) 0%, rgba(7, 34, 58, 0.94) 100%);
  border: 1px solid rgba(140, 230, 255, 0.38);
  box-shadow: 0 8px 24px rgba(0, 10, 24, 0.55), 0 0 14px rgba(60, 200, 255, 0.14), inset 0 1px 0 rgba(200, 245, 255, 0.28), inset 0 -2px 6px rgba(0, 0, 0, 0.35);
}
.hudPill .lbl, .boost .bl, .statCard .label { color: #a8e8ff; }
.hudPill .val, .statCard .num { color: #ffd23f; text-shadow: 0 0 10px rgba(255, 190, 40, 0.45), 0 2px 6px rgba(0, 0, 0, 0.4); }
.iconBtn {
  border: 1px solid rgba(140, 230, 255, 0.4);
  background: linear-gradient(180deg, rgba(30, 110, 150, 0.95), rgba(8, 36, 62, 0.95));
  box-shadow: 0 5px 14px rgba(0, 10, 24, 0.55), inset 0 1px 0 rgba(200, 245, 255, 0.3);
}
.iconBtn svg { fill: #e8fbff; }
.screen { background: radial-gradient(ellipse at 50% 28%, rgba(20, 120, 170, 0.5), rgba(2, 14, 28, 0.92) 72%); }
h2.screenTitle { color: #effcff; text-shadow: 0 0 18px rgba(80, 220, 255, 0.5), 0 3px 12px rgba(0, 0, 0, 0.5); }
h1.title .t1 {
  background: linear-gradient(180deg, #fffbe0 0%, #ffd23f 42%, #ff9f1a 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 2px rgba(100, 50, 0, 0.7);
  filter: drop-shadow(0 0 14px rgba(255, 190, 40, 0.55));
}
h1.title .t2 {
  background: linear-gradient(90deg, #5be6ff, #b4f6ff, #5be6ff);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text;
}
.mascot { width: 92px; margin-bottom: 4px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 16px rgba(80, 200, 255, 0.5)); }
.logoWrap { margin-bottom: 14px; }
.statCard .label, #loadLabel, .footNote { color: #b4ecff; }
.footLinks, .footLinks a { color: #8fd8ee; }
.btn { color: #3a2200; box-shadow: 0 5px 0 var(--amber-dark), 0 12px 26px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 190, 40, 0.38), inset 0 2px 0 rgba(255, 255, 255, 0.7), inset 0 -3px 6px rgba(190, 110, 10, 0.4); }
.btn.secondary {
  background: linear-gradient(180deg, #2a7ea8, #0e3a5c); color: #effcff;
  box-shadow: 0 5px 0 rgba(0, 12, 28, 0.7), 0 10px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(200, 245, 255, 0.35);
  border: 1px solid rgba(140, 230, 255, 0.35);
}
#loadBarOuter { border: 1px solid rgba(140, 230, 255, 0.35); background: rgba(0, 0, 0, 0.35); }
#loadBarInner { background: linear-gradient(90deg, #1a9ad8, #5be6ff, #e8fdff); box-shadow: 0 0 14px rgba(80, 220, 255, 0.7); }
#gameWrap::after { background: radial-gradient(ellipse at 50% 46%, rgba(0, 0, 0, 0) 55%, rgba(0, 8, 20, 0.5) 100%); }

/* HUD */
#hud { gap: 8px; }
#movesBox {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 98px; padding: 4px 18px 5px; border-radius: 18px; line-height: 1;
}
#movesBox .lbl { font-size: 10px; letter-spacing: 1.6px; color: #a8e8ff; font-weight: 700; }
#movesBox .mv { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 30px; color: #ffd23f; text-shadow: 0 0 12px rgba(255, 190, 40, 0.5), 0 2px 6px rgba(0, 0, 0, 0.45); margin-top: 1px; }
#movesBox.low .mv { color: #ff6b81; animation: pulseBadge .7s ease infinite; }
#goals { display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 4px 12px; min-height: 40px; max-width: 70%; flex-wrap: nowrap; overflow: hidden; }
.goalChip { display: flex; align-items: center; gap: 5px; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 17px; color: #fff; }
.goalChip canvas { width: 28px; height: 28px; display: block; }
.goalChip .gt { min-width: 22px; text-align: left; text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); }
.goalChip.done .gt { color: #7dffb0; }
.goalChip.done::after { content: '✔'; color: #7dffb0; font-size: 13px; }
.goalChip.pop { animation: pulseBadge .35s ease; }
.boost.armed { box-shadow: 0 0 0 3px #ffd23f, 0 0 26px rgba(255, 210, 60, 0.85), 0 8px 24px rgba(0, 10, 24, 0.55); }
.boost .badge { background: linear-gradient(180deg, #ffe27a, #ff9f1a); color: #4a2800; border: 2px solid #fff; }

/* goal intro screen */
.goalLabel { font-size: 12px; letter-spacing: 3px; color: #a8e8ff; font-weight: 700; margin-bottom: 14px; }
#goalList { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.goalCard { border-radius: 18px; padding: 12px 18px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 104px; }
.goalCard canvas { width: 54px; height: 54px; }
.goalCard .gn { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 24px; color: #ffd23f; line-height: 1; }
.goalCard .gl { font-size: 10.5px; letter-spacing: 1.4px; color: #a8e8ff; text-transform: uppercase; font-weight: 700; }
.goalMoves { margin: 4px 0 12px; font-weight: 700; color: #effcff; font-size: 15px; }
.goalMoves span { font-family: 'Baloo 2', sans-serif; font-size: 26px; color: #ffd23f; }

/* level select */
#levelGrid { grid-template-columns: repeat(5, 1fr); max-height: calc(var(--vh, 1vh) * 66); }
.lvl { color: #3a2200; background: linear-gradient(180deg, #fff6c4, #ffd23f 55%, #ff9f1a); box-shadow: 0 4px 0 var(--amber-dark), 0 8px 14px rgba(0, 0, 0, 0.45), 0 0 12px rgba(255, 190, 40, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.6); }
.lvl.locked { background: linear-gradient(180deg, #25607e, #0e2c44); color: rgba(200, 240, 255, 0.45); box-shadow: 0 4px 0 rgba(0, 10, 24, 0.6), inset 0 1px 0 rgba(200, 245, 255, 0.15); }
.lvl.locked svg { fill: rgba(200, 240, 255, 0.5); }

/* how-to */
#htpVisual { background: linear-gradient(180deg, #1a7aa8, #072a48); border: 1px solid rgba(140, 230, 255, 0.35); width: min(320px, 82vw); height: 120px; display: flex; align-items: center; justify-content: center; }
#htpCanvas { width: 100%; height: 100%; }
.htpTip .txt { color: #e6f9ff; }
.htpTip .txt b { color: #ffd23f; }
.loseGem {
  width: 84px; height: 84px; margin: 6px 0 4px; position: relative; animation: bob 2.4s ease-in-out infinite;
  background: linear-gradient(135deg, #8aa0b4, #3a4a5e); clip-path: polygon(50% 0, 100% 34%, 50% 100%, 0 34%);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
}
.loseGem::before, .loseGem::after { content: ''; position: absolute; top: 34%; width: 9px; height: 9px; border-radius: 50%; background: #0a1a2a; }
.loseGem::before { left: 32%; } .loseGem::after { right: 32%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
#starsRow .star.on { fill: #ffd23f; filter: drop-shadow(0 0 14px rgba(255, 200, 60, 0.9)); }
