:root {
  --acid: #5de4ff;
  --ink: #222039;
}
body {
  height: 100dvh;
  overflow: hidden;
  background: #11101e;
}
.game-title {
  color: #ffa9fb;
}
.stage-wrap {
  position: absolute;
  inset: 62px 0 87px;
  overflow: hidden;
}
.bubble-frame {
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
}
.bubble-hud {
  position: absolute;
  z-index: 3;
  top: 80px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  text-shadow: 0 2px 12px #000;
}
.bubble-hud > div {
  max-width: 34%;
}
.bubble-hud small {
  display: block;
  margin-bottom: 4px;
  font-size: 9px;
  letter-spacing: 1.3px;
  color: #d2cbe3;
}
.bubble-hud strong {
  font: 700 16px/1.2 Poppins;
  color: #fff;
}
.bubble-hud .points {
  text-align: center;
}
.bubble-hud .points strong {
  font-size: 25px;
}
.bubble-hud .life-box {
  text-align: right;
}
.life-box strong {
  color: #ff8fdb;
  letter-spacing: 2px;
  font-size: 22px;
}
.bubble-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 8px;
}
.bubble-controls button {
  position: relative;
  overflow: hidden;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 12px;
  background: #262238;
  border-color: #b4a2ce40;
}
.bubble-controls button small {
  display: block;
  margin-top: 4px;
  font-size: 8px;
  letter-spacing: 2px;
}
.bubble-controls #swap > span:first-child {
  font-size: 25px;
}
.bubble-controls .fire-button {
  font: 700 16px Poppins;
  background: linear-gradient(100deg, #00a6ff, #8152f2);
  color: white;
  border-color: #bdb3ef;
  box-shadow: 0 3px 0 #3b2968;
}
#boom-icon {
  font-size: 24px;
}
#boom::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: var(--charge, 0%);
  background: #ffa9fb;
}
#boom.ready {
  border-color: #ffa9fb;
  background: #4c2866;
  box-shadow: 0 0 22px #ff5eed45;
}
#boom.armed {
  border-color: #fff;
  background: #8152f2;
}
#boom-label {
  font-size: 12px;
  white-space: nowrap;
}
.bubble-footer {
  position: absolute;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  left: 14px;
  right: 14px;
  bottom: 6px;
  color: #cfc6df;
  font-size: 10px;
}
#shot-hint {
  position: absolute;
  pointer-events: none;
  left: 50%;
  transform: translateX(-50%);
  bottom: 3%;
  font-size: 12px;
  color: #cda9f6;
  background: #161225cf;
  padding: 9px 14px;
  border-radius: 20px;
  width: max-content;
  max-width: 90%;
  transition: opacity 0.2s;
}
#shot-hint b {
  color: #fff;
}
#chain-tag {
  position: absolute;
  pointer-events: none;
  right: 7%;
  bottom: 23%;
  padding: 9px 14px;
  border: 1px solid #ffa9fb;
  border-radius: 7px;
  background: #8152f2;
  color: #fff;
  font: 700 13px Poppins;
  transform: rotate(-8deg);
}
.result-home {
  display: block;
  text-align: center;
  margin-top: 20px;
  min-height: 44px;
  padding: 12px;
  font-size: 12px;
}
.candy-intro {
  display: none;
}
@media (max-width: 600px) {
  .stage-wrap {
    inset: 58px 0 88px;
  }
  .game-title {
    font-size: 15px;
    letter-spacing: -0.7px;
  }
  .bubble-hud {
    top: 76px;
    left: 14px;
    right: 14px;
  }
  .bubble-hud #stage-name {
    font-size: 11px;
  }
  .bubble-hud small {
    font-size: 8px;
  }
  .bubble-hud .points strong {
    font-size: 22px;
  }
  .life-box strong {
    font-size: 20px;
    letter-spacing: 0;
  }
  .bubble-controls button {
    min-height: 48px;
    gap: 7px;
    padding: 8px;
  }
  .bubble-controls button small {
    display: none;
  }
  #shot-hint {
    font-size: 10px;
  }
  #chain-tag {
    font-size: 11px;
    right: 9%;
    bottom: 25%;
  }
}
/* On shorter phones the board reaches the controls, so the hint would sit on the launcher;
   lift it above the danger line until the first shot. */
@media (max-width: 600px) and (orientation: portrait) and (min-aspect-ratio: 53/100) {
  #shot-hint {
    bottom: 30%;
  }
}
@media (max-width: 359px) {
  .game-title {
    font-size: 12px;
    letter-spacing: -0.4px;
  }
  .brand-group {
    gap: 6px;
  }
  .bubble-controls button {
    font-size: 12px;
    gap: 5px;
  }
  #boom-label {
    font-size: 10px;
  }
}
@media (max-height: 500px) and (min-width: 601px) {
  .topbar {
    height: 54px;
    padding: 5px 14px;
  }
  .game-title {
    font-size: 17px;
  }
  .stage-wrap {
    inset: 54px 0 62px;
  }
  .bubble-hud {
    top: 67px;
    left: 15px;
    right: 15px;
  }
  .bubble-hud strong {
    font-size: 13px;
  }
  .bubble-hud .points strong {
    font-size: 20px;
  }
  .bubble-controls {
    bottom: 12px;
    width: 330px;
  }
  .bubble-controls button {
    min-height: 44px;
    padding: 6px;
  }
  .bubble-controls button small {
    display: none;
  }
  .bubble-footer {
    display: none;
  }
  #shot-hint {
    bottom: 9%;
    font-size: 10px;
  }
  #chain-tag {
    right: 18%;
    bottom: 7%;
    font-size: 11px;
  }
  /* Tighter result spacing keeps the personal-best line on screen. */
  #result .lede {
    margin: 8px 0 12px;
    font-size: 14px;
  }
  #result .actions {
    margin-top: 12px;
  }
  .result-home {
    margin-top: 0;
  }
  #saved {
    margin-top: 0;
  }
}
@media (hover: none) and (pointer: coarse) {
  .bubble-controls button small {
    display: none;
  }
}
