/* =====================================================================================
   Contraste: textos sempre legíveis.
   Painéis voltam a ser sólidos; tudo que é texto fica branco com contorno escuro ou tinta escura em fundo claro.
   Carrega por último.
   ===================================================================================== */

/* painel sólido (vidro só na borda) */
.panel {
  background:
    radial-gradient(110% 60% at 30% 0%, rgba(255, 255, 255, 0.7), transparent 60%) padding-box,
    linear-gradient(180deg, #fbf5ff, #e9dbff) padding-box,
    var(--iris) border-box;
}
.panel::before,
.panel::after {
  /* bolhinhas cheias, não aros soltos */
  background: radial-gradient(circle at 32% 30%, #fff 0 16%, #f1e3ff 40%, #c7a6ff 100%);
  box-shadow:
    inset 0 0 0 2px #fff,
    0 2px 4px rgba(70, 40, 120, 0.3);
}
.modal {
  background: rgba(50, 25, 95, 0.5);
}
.note {
  font-size: 15px;
  font-weight: 700;
  color: #4a2c7d;
}
.label {
  color: #3d1f6e;
  text-shadow: none;
}
#lose-msg {
  color: #3d1f6e;
}

/* botões das fases: bolha saturada, número branco com contorno escuro */
#level-grid {
  gap: 12px;
}
.lv {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  -webkit-text-stroke: 3px #3d1f6e;
  paint-order: stroke fill;
  text-shadow: 0 3px 0 #3d1f6e;
  background: radial-gradient(circle at 35% 28%, #fff 0 7%, #d4b2ff 26%, #9a62f0 70%, #7a44d6);
  box-shadow:
    inset 0 -5px 0 rgba(40, 15, 90, 0.3),
    inset 0 0 0 3px rgba(255, 255, 255, 0.8),
    0 4px 0 rgba(60, 30, 110, 0.4);
  filter: none;
  opacity: 1;
}
.lv:active {
  transform: translateY(3px);
}
.lv.current {
  box-shadow:
    inset 0 -5px 0 rgba(40, 15, 90, 0.3),
    inset 0 0 0 3px #fff,
    0 0 0 4px #ffd23f,
    0 4px 0 rgba(60, 30, 110, 0.4);
  animation: lvPulse 1.4s ease-in-out infinite;
}
@keyframes lvPulse {
  50% {
    transform: scale(1.07);
  }
}
.lv[disabled] {
  filter: none;
  opacity: 1;
  cursor: default;
  color: #e9e2f5;
  -webkit-text-stroke-color: #5b4b80;
  text-shadow: 0 3px 0 #5b4b80;
  background: radial-gradient(circle at 35% 28%, #f3eefb 0 7%, #c6bad9 30%, #9787b5 75%, #7e6fa0);
  box-shadow:
    inset 0 -5px 0 rgba(40, 25, 70, 0.25),
    inset 0 0 0 3px rgba(255, 255, 255, 0.55),
    0 4px 0 rgba(60, 40, 100, 0.3);
}
.lv[disabled]::after {
  /* cadeado */
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #5b4b80
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='11' width='14' height='10' rx='2' fill='white'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3' stroke='white' stroke-width='2.6' fill='none'/%3E%3C/svg%3E")
    center / 14px no-repeat;
  box-shadow: 0 0 0 2px #fff;
}
.lv small {
  bottom: -18px;
  font-size: 15px;
  color: #ffd23f;
  -webkit-text-stroke: 2px #6b4400;
  paint-order: stroke fill;
  text-shadow: none;
  letter-spacing: 0;
}
#level-grid {
  row-gap: 24px;
}

/* pausa: linhas com fundo mais firme */
.setting {
  background: #fff;
  box-shadow:
    inset 0 0 0 2px #d9c4ff,
    0 2px 0 rgba(70, 40, 120, 0.15);
}

/* abertura em tela deitada: logo cabe na altura, botão sempre visível */
#s-title > * {
  zoom: var(--pk, 1);
}
.logo-img {
  max-height: 36vh;
  width: auto;
  max-width: 84vw;
}
body.land .title-space {
  height: 24vh;
}
body.land #s-title {
  padding-top: 4vh;
  gap: 1.6vh;
}

/* botões redondos (pausa, engrenagem): fundo roxo escuro e ícone branco, para ler sobre o céu claro */
.round {
  background: radial-gradient(circle at 35% 28%, #b98cff 0 8%, #7a44d6 40%, #4b2390 90%);
  box-shadow:
    inset 0 -4px 0 rgba(20, 5, 50, 0.35),
    inset 0 0 0 3px rgba(255, 255, 255, 0.85),
    0 4px 0 rgba(40, 15, 90, 0.45),
    0 0 0 2px rgba(60, 30, 110, 0.35);
  color: #fff;
}
.ico-pause {
  border-left-color: #fff;
  border-right-color: #fff;
  filter: none;
}
#level-title {
  background: linear-gradient(180deg, #9a62f0, #6a35c4);
}

/* abertura em grade: logo, faixa livre para as bolhas, texto e botão; o botão nunca sai da tela */
#s-title {
  display: none;
  grid-template-rows: auto minmax(12vh, 1fr) auto auto;
  align-content: stretch;
  justify-items: center;
  gap: 1.5vh;
  padding: 4vh 16px 5vh;
}
#s-title.on {
  display: grid;
}
#s-title > * {
  zoom: 1;
}
.logo-img {
  max-height: 30vh;
  max-width: 86vw;
  width: auto;
}
.title-space {
  height: auto;
  align-self: stretch;
}
#btn-start {
  width: min(84vw, 460px);
  font-size: clamp(22px, 3.6vh, 34px);
}
.sub {
  font-size: clamp(18px, 2.6vh, 26px);
}
.gear {
  position: fixed;
}

/* barra de dica: a frase de ajuda em tinta escura (o branco sumia na barra clara) */
.hint-text.msg {
  color: #3d1f6e;
  -webkit-text-stroke: 0;
  text-shadow: none;
  font-weight: 700;
}

/* pausa: ícones em bolha roxa escura com desenho branco */
.setting .ico {
  background: radial-gradient(circle at 35% 28%, #b98cff 0 8%, #7a44d6 40%, #4b2390 90%);
  color: #fff;
  box-shadow:
    inset 0 -3px 0 rgba(20, 5, 50, 0.35),
    inset 0 0 0 2.5px rgba(255, 255, 255, 0.85);
}
.setting span {
  font-size: 20px;
}

/* 4. garrafa: o líquido sobe na barriga (abaixo do rótulo) e a garrafa "engole" a cada acerto */
.flask .liquid {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  -webkit-mask: var(--img) center bottom / contain no-repeat;
  mask: var(--img) center bottom / contain no-repeat;
}
.flask .liquid::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--fill, 0%) * 0.3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), var(--c) 30%);
  opacity: 0.75;
  transition: height 0.6s cubic-bezier(0.3, 1.5, 0.5, 1);
}
.flask.done .liquid::before {
  height: 30%;
}
.flask .side {
  z-index: 1;
}
.flask.gulp .bottle {
  animation: gulp 0.5s cubic-bezier(0.3, 1.6, 0.5, 1);
}
@keyframes gulp {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.12, 0.9);
  }
  60% {
    transform: scale(0.95, 1.06);
  }
  100% {
    transform: none;
  }
}

/* 5. contador de sequência */
#streak {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(var(--hint-top, 200px));
  transform: translate(-50%, 0) scale(0);
  pointer-events: none;
  font-weight: 700;
  font-size: calc(30px * var(--k, 1));
  color: #fff;
  -webkit-text-stroke: 3px #6b3d00;
  paint-order: stroke fill;
  padding: 2px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe36a, color-mix(in srgb, #ffb21f calc(var(--hot, 0) * 100%), #ffd23f));
  box-shadow:
    inset 0 -3px 0 rgba(120, 60, 0, 0.3),
    inset 0 0 0 2px #fff,
    0 0 calc(12px + 18px * var(--hot, 0)) rgba(255, 200, 60, 0.9);
  transition: transform 0.25s cubic-bezier(0.3, 1.7, 0.5, 1);
}
#streak.on {
  transform: translate(-50%, 0) scale(1);
}
#streak.bump {
  animation: streakBump 0.35s cubic-bezier(0.3, 1.8, 0.5, 1);
}
@keyframes streakBump {
  0% {
    transform: translate(-50%, 0) scale(1.5) rotate(-6deg);
  }
  100% {
    transform: translate(-50%, 0) scale(1);
  }
}
.flask .liquid {
  background: none;
  height: auto;
}
.flask.done .bottle {
  box-shadow: none;
  filter: drop-shadow(0 0 10px var(--c)) drop-shadow(0 0 4px #fff);
}

/* End of ui-contraste.css */
