@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@800;900&display=swap');

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: #8bd9ff;
  font-family: "Nunito", Arial, sans-serif;
  overscroll-behavior: none;
}

button {
  font-family: inherit;
}

.game-screen {
  --nav-h: 103px;
  --nav-bottom: max(10px, env(safe-area-inset-bottom));
  --nav-space: calc(var(--nav-h) + var(--nav-bottom) + 12px);
  --panel-shadow:
    0 9px 0 #c8d1dc,
    0 22px 30px rgba(42, 91, 134, .18),
    inset 0 2px 0 rgba(255,255,255,.95);

  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  background: linear-gradient(180deg, #43b6f5 0%, #8bd9ff 48%, #bdf0ff 100%);
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
}

.screen.active {
  display: flex;
  animation: screenIn .26s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

button:focus-visible {
  outline: 4px solid rgba(255,255,255,.78);
  outline-offset: 4px;
}

.game-screen[data-screen="levels"] .top-coins,
.game-screen[data-screen="settings"] .top-coins {
  display: none;
}

/* BACKGROUND */

.bg-cloud,
.bg-shape {
  position: absolute;
  pointer-events: none;
}

.bg-cloud {
  z-index: 0;
  width: 260px;
  height: 176px;
  opacity: .9;
  background: center / contain no-repeat url("../assets/cloud.png");
  filter: drop-shadow(0 18px 28px rgba(92, 176, 235, .18));
  will-change: transform, opacity;
}

.cloud-a {
  top: 7%;
}

.cloud-b {
  top: 18%;
}

.cloud-c {
  top: 46%;
}

.cloud-d {
  top: 63%;
}

.cloud-e {
  top: 31%;
}


.bg-shape {
  z-index: 1;
  width: 82px;
  height: 82px;
  opacity: .34;
  filter: blur(.2px);
  background: rgba(255,255,255,.25);
}

.shape-a,
.shape-d {
  clip-path: polygon(50% 0%, 62% 34%, 98% 35%, 69% 56%, 79% 91%, 50% 70%, 21% 91%, 31% 56%, 2% 35%, 38% 34%);
}

.shape-b,
.shape-c {
  clip-path: polygon(50% 0%, 64% 28%, 95% 20%, 82% 50%, 100% 76%, 67% 75%, 50% 100%, 33% 75%, 0 76%, 18% 50%, 5% 20%, 36% 28%);
}

.shape-a {
  top: 20%;
  left: 7%;
  background: rgba(45, 154, 241, .28);
  transform: rotate(10deg);
}

.shape-b {
  top: 21%;
  right: 5%;
  transform: rotate(12deg) scale(1.16);
}

.shape-c {
  bottom: -18px;
  left: 3%;
  transform: rotate(-12deg) scale(1.45);
}

.shape-d {
  bottom: 7%;
  right: 7%;
  background: rgba(45, 154, 241, .24);
  transform: rotate(-8deg) scale(.92);
}

/* TOP COINS */

.coins-pill {
  position: fixed;
  z-index: 30;
  top: calc(env(safe-area-inset-top) + 12px);
  left: calc(env(safe-area-inset-left) + 12px);
  min-width: 128px;
  height: 46px;
  padding: 0 10px 0 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #edf3f8 100%);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow:
    0 5px 0 rgba(183, 197, 211, .95),
    0 10px 16px rgba(40, 105, 160, .14),
    inset 0 2px 0 rgba(255,255,255,.95);
}

.coin-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #d89208;
  font-size: 18px;
  font-weight: 900;
  background: radial-gradient(circle at 35% 25%, #ffe268 0%, #ffc226 45%, #f39a00 100%);
  box-shadow:
    0 3px 0 #c47700,
    inset 0 2px 0 rgba(255,255,255,.45);
}

.coins-pill span {
  color: #4a5873;
  font-size: 18px;
  font-weight: 900;
}

.coin-plus {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  font-weight: 900;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #7ed957, #42b83b);
  box-shadow:
    0 3px 0 #238b28,
    inset 0 2px 0 rgba(255,255,255,.25);
  cursor: pointer;
}

/* MAIN MENU */

.menu-main {
  z-index: 4;
  width: min(464px, 100vw);
  height: 100%;
  margin: 0 auto;
  padding: 84px 16px var(--nav-space);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.logo-wrap {
  position: relative;
  width: 390px;
  height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: translateY(-8px) rotate(-2deg);
}

.logo-bg {
  position: absolute;
  left: 28px;
  right: 28px;
  top: 52px;
  bottom: 22px;
  border-radius: 28px;
  background: #fff;
  transform: rotate(1deg);
  box-shadow:
    0 9px 0 rgba(203, 221, 235, .95),
    0 14px 18px rgba(45, 106, 154, .14);
}

.logo-word {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: .86;
  letter-spacing: -2px;
}

.logo-word span {
  display: inline-block;
}

.puzzle-word {
  font-size: 52px;
  margin-top: 46px;
}

.puzzle-word span {
  color: var(--c);
  -webkit-text-stroke: 6px #fff;
  paint-order: stroke fill;
  text-shadow:
    0 4px 0 var(--s),
    0 8px 7px rgba(44, 72, 115, .20);
}

.blocks-word {
  margin-top: 12px;
  font-size: 45px;
}

.blocks-word span {
  color: #1e62a9;
  -webkit-text-stroke: 6px #fff;
  paint-order: stroke fill;
  text-shadow:
    0 4px 0 #17497e,
    0 8px 7px rgba(24, 59, 96, .22);
}

.continue-card {
  position: relative;
  width: 268px;
  height: 82px;
  border: 0;
  border-radius: 24px;
  padding: 0 22px 0 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f8 100%);
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  box-shadow:
    0 5px 0 #c6ccd4,
    0 12px 18px rgba(42, 88, 134, .16),
    inset 0 2px 0 rgba(255,255,255,.95);
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), filter .18s ease;
}

.continue-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.01);
}

.continue-card:active {
  transform: translateY(3px);
}

.continue-img {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  overflow: hidden;
  flex: 0 0 auto;
  background: #32a8f5;
  box-shadow:
    0 4px 0 #1477c8,
    inset 0 2px 0 rgba(255,255,255,.3);
}

.continue-img svg {
  width: 100%;
  height: 100%;
}

.continue-img rect {
  fill: #2aa8fb;
}

.continue-img path {
  fill: rgba(255,255,255,.45);
}

.continue-img circle {
  fill: rgba(255,255,255,.75);
}

.continue-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.continue-text strong {
  color: #1d5ca9;
  font-size: 22px;
  font-weight: 900;
}

.continue-text span {
  margin-top: 8px;
  color: #287be1;
  font-size: 15px;
  font-weight: 900;
}

.continue-arrow {
  margin-left: auto;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #2f9bf2;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.play-wrap {
  width: 390px;
  height: 146px;
  display: grid;
  place-items: center;
}

.play-btn {
  --main: #82dd15;
  --top: #a8f43a;
  --dark: #55ad0f;
  --shadow: #3f8e08;

  position: relative;
  width: 330px;
  height: 112px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}

.play-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--dark);
  box-shadow:
    0 6px 0 var(--shadow),
    0 12px 14px rgba(42, 100, 10, .18);
  z-index: 1;
}

.play-face {
  position: absolute;
  top: 4px;
  left: 50%;
  width: calc(100% - 10px);
  height: calc(100% - 14px);
  border-radius: 999px;
  background: var(--main);
  filter: blur(1.2px);
  transform: translateX(-50%);
  overflow: hidden;
  z-index: 2;
}

.play-face::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: radial-gradient(circle at 24% 18%, var(--top) 0%, rgba(255,255,255,.10) 34%, transparent 62%);
  filter: blur(8px);
}

.play-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 100%, rgba(0,0,0,.18) 0%, rgba(0,0,0,.07) 34%, transparent 66%);
}

.play-shine {
  position: absolute;
  top: 19px;
  left: 36px;
  width: 118px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(11deg, rgba(255,255,255,.85), transparent);
  filter: blur(5px);
  opacity: .72;
  transform: translate(-2px, -2px) rotate(350deg);
  z-index: 4;
}

.play-content {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transform: translateY(-3px);
}

.play-icon {
  width: 48px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #fff;
}

.play-icon svg {
  width: 48px;
  height: 48px;
  fill: currentColor;
  filter:
    drop-shadow(0 2px 0 rgba(45, 118, 9, .78))
    drop-shadow(0 4px 0 rgba(45, 118, 9, .58))
    drop-shadow(0 6px 5px rgba(18, 78, 0, .18));
}

.play-text {
  color: #fff;
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 4px;
  text-shadow:
    0 2px 0 rgba(45, 118, 9, .78),
    0 4px 0 rgba(45, 118, 9, .62),
    0 6px 5px rgba(18, 78, 0, .18);
}

.play-btn:hover {
  transform: translateY(-2px);
}

.play-btn:active {
  transform: translateY(4px);
}

/* SHOP */

.shop-main {
  z-index: 5;
  width: min(480px, 100vw);
  height: 100%;
  margin: 0 auto;
  padding: 52px 10px var(--nav-space);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.shop-modal {
  width: min(380px, calc(100vw - 18px));
  min-height: calc(100svh - var(--nav-space) - 26px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: auto 0;
}

.shop-head {
  width: 100%;
  display: grid;
  place-items: center;
}

.shop-head h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(52px, 14vw, 76px);
  line-height: .88;
  font-weight: 900;
  letter-spacing: -2px;
  -webkit-text-stroke: clamp(5px, 1.5vw, 7px) #2a8ce7;
  paint-order: stroke fill;
  text-shadow:
    0 6px 0 #1264be,
    0 12px 14px rgba(18, 71, 135, .22);
}

.shop-panel {
  width: 100%;
  position: relative;
  padding: 16px 14px 14px;
  border-radius: 34px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  box-shadow: var(--panel-shadow);
}

.shop-panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
  pointer-events: none;
}

.shop-section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.shop-section-title h2 {
  margin: 0;
  color: #1f5bab;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .2px;
}

.sparkle {
  color: #7abfff;
  font-size: 18px;
  line-height: 1;
}

.shop-section-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(180deg, #49bdff 0%, #1a8ceb 100%);
  box-shadow: 0 3px 0 #0867bd, inset 0 2px 0 rgba(255,255,255,.28);
}

.shop-section-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.skin-card {
  position: relative;
  border-radius: 18px;
  padding: 10px 8px 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5fa 100%);
  border: 1.5px solid #dce4ee;
  box-shadow:
    0 4px 0 #d1d9e2,
    0 9px 12px rgba(40, 79, 115, .10),
    inset 0 2px 0 rgba(255,255,255,.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 176px;
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), box-shadow .16s ease;
}

.skin-card:hover {
  transform: translateY(-2px);
}

.skin-card.equipped {
  border-color: #8dd88b;
  box-shadow:
    0 4px 0 #7bc275,
    0 0 0 2px rgba(113, 208, 110, .22),
    0 10px 16px rgba(73, 170, 67, .14),
    inset 0 2px 0 rgba(255,255,255,.92);
}

.skin-name {
  color: #213f74;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  margin-bottom: 8px;
}

.skin-preview {
  position: relative;
  width: 74px;
  height: 86px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  filter: drop-shadow(0 9px 7px rgba(43, 87, 120, .18));
}

.skin-preview .cube,
.galaxy-core {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    inset 0 2px 0 rgba(255,255,255,.28),
    inset 0 -9px 10px rgba(0,0,0,.10);
}

.skin-preview .cube::before,
.galaxy-core::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.34), transparent 44%);
}

.classic-skin .red { background: linear-gradient(180deg, #ff6658, #d83020); }
.classic-skin .yellow { background: linear-gradient(180deg, #ffd84f, #f3ac04); }
.classic-skin .green { background: linear-gradient(180deg, #8ae941, #48b31d); }
.classic-skin .blue { background: linear-gradient(180deg, #3fbcff, #0b71db); }

.ocean-skin .c1 { background: linear-gradient(180deg, #77dbef, #1cb4d1); }
.ocean-skin .c2 { background: linear-gradient(180deg, #49d8d8, #19b5bd); }
.ocean-skin .c3 { background: linear-gradient(180deg, #2995ff, #0466d2); }
.ocean-skin .c4 { background: linear-gradient(180deg, #2388ed, #0358bb); }

.sunset-skin .c1 { background: linear-gradient(180deg, #ff8390, #ee4960); }
.sunset-skin .c2 { background: linear-gradient(180deg, #ffa03f, #f06f00); }
.sunset-skin .c3 { background: linear-gradient(180deg, #b37bff, #7b3fe9); }
.sunset-skin .c4 { background: linear-gradient(180deg, #ffd145, #f5a100); }

.forest-skin .c1 { background: linear-gradient(180deg, #b8ec69, #85c93a); }
.forest-skin .c2 { background: linear-gradient(180deg, #7ed841, #4faf22); }
.forest-skin .c3 { background: linear-gradient(180deg, #3f9c4f, #296f39); }
.forest-skin .c4 { background: linear-gradient(180deg, #2e8d7e, #16655d); }

.candy-skin .c1 { background: linear-gradient(180deg, #ff7dbf, #e6499a); }
.candy-skin .c2 { background: linear-gradient(180deg, #ffe672, #f5c825); }
.candy-skin .c3 { background: linear-gradient(180deg, #b181ff, #8f56f7); }
.candy-skin .c4 { background: linear-gradient(180deg, #60ddf6, #31bed9); }

.galaxy-skin { gap: 1px; }
.galaxy-skin .cube,
.galaxy-core {
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.95) 0 1px, transparent 2px),
    radial-gradient(circle at 68% 24%, rgba(255,255,255,.75) 0 1px, transparent 2px),
    radial-gradient(circle at 78% 78%, rgba(255,255,255,.55) 0 1px, transparent 2px),
    radial-gradient(circle at 50% 48%, rgba(193, 110, 255, .9) 0%, rgba(125, 52, 238, .55) 24%, transparent 55%),
    linear-gradient(180deg, #4422a9 0%, #28106b 58%, #17083f 100%);
}

.galaxy-core {
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(235, 170, 255, .96) 0 10%, rgba(150, 86, 255, .72) 24%, rgba(69, 32, 164, .18) 44%, transparent 52%),
    radial-gradient(circle at center, transparent 34%, rgba(255,255,255,.75) 35%, transparent 38%),
    linear-gradient(180deg, transparent, transparent);
  box-shadow: none;
  z-index: 2;
}

.leaf::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1.6px solid rgba(38, 115, 48, .22);
  border-radius: 50% 0 50% 0;
  transform: rotate(45deg);
}

.sprinkles::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 32%, #ffe79c 0 1.6px, transparent 2px),
    radial-gradient(circle at 65% 70%, #ffb4e7 0 1.6px, transparent 2px),
    radial-gradient(circle at 72% 28%, #fff 0 1.3px, transparent 1.7px),
    radial-gradient(circle at 28% 72%, #ffe79c 0 1.3px, transparent 1.8px);
  opacity: .7;
}

.skin-buy-btn {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2px;
  transition: transform .14s cubic-bezier(.2, .8, .2, 1), filter .14s ease;
}

.skin-buy-btn:hover { transform: translateY(-1px); }
.skin-buy-btn:active { transform: translateY(2px); }

.equipped-btn,
.equip-btn {
  background: linear-gradient(180deg, #93e64a 0%, #52c320 100%);
  box-shadow: 0 3px 0 #2d9217, inset 0 2px 0 rgba(255,255,255,.28);
}

.btn-check {
  font-size: 16px;
  line-height: 1;
}

.price-btn {
  background: linear-gradient(180deg, #4bbdff 0%, #168ee8 100%);
  box-shadow: 0 3px 0 #0868bd, inset 0 2px 0 rgba(255,255,255,.28);
}

.shop-coin {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #ffe268 0%, #ffc226 45%, #f39a00 100%);
  box-shadow: 0 2px 0 #c47700;
}

/* LEVELS */

.levels-main {
  z-index: 5;
  width: min(480px, 100vw);
  height: 100%;
  margin: 0 auto;
  padding: 12px 14px var(--nav-space);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.levels-modal {
  width: min(420px, calc(100vw - 28px));
  min-height: calc(100svh - var(--nav-space) - 26px);
  max-height: calc(100svh - var(--nav-space) - 16px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: auto 0;
  animation: levelsModalIn .40s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes levelsModalIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(.96);
  }
  65% {
    opacity: 1;
    transform: translateY(-3px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.levels-head {
  width: 100%;
  display: grid;
  place-items: center;
}

.levels-head h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(50px, 13vw, 76px);
  line-height: .88;
  font-weight: 900;
  letter-spacing: -2px;
  -webkit-text-stroke: clamp(5px, 1.5vw, 7px) #2a8ce7;
  paint-order: stroke fill;
  text-shadow:
    0 6px 0 #1264be,
    0 12px 14px rgba(18, 71, 135, .22);
  transform: rotate(-2deg);
}

.levels-panel {
  position: relative;
  width: 100%;
  padding: 18px;
  border-radius: 34px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  box-shadow: var(--panel-shadow);
}

.levels-panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
  pointer-events: none;
}

.levels-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(5, 1fr);
  gap: 12px;
}

.level-card {
  position: relative;
  height: 82px;
  min-height: 82px;
  border: 0;
  border-radius: 22px;
  padding: 0;
  cursor: pointer;
  user-select: none;
  display: grid;
  grid-template-rows: 34px 18px 1fr;
  justify-items: center;
  align-items: center;
  isolation: isolate;
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), filter .16s ease, box-shadow .16s ease;
  transform: translateZ(0);
  backface-visibility: hidden;
  animation: levelCardIn .32s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}

@keyframes levelCardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.level-card::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 2px;
  height: 38%;
  border-radius: 18px 18px 14px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.24), transparent);
  pointer-events: none;
  z-index: 1;
}

.level-card::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.55), transparent 58%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,.22), transparent 62%);
  opacity: 0;
  transform: scale(.9);
  pointer-events: none;
  z-index: 0;
  transition:
    opacity .18s ease,
    transform .18s cubic-bezier(.2, .8, .2, 1);
}

.level-card:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.018);
  filter: brightness(1.018);
}

.level-card:hover:not(:disabled)::before {
  opacity: .28;
  transform: scale(1.035);
  animation: none;
}

.level-card.current:hover {
  filter: brightness(1.02);
}

.level-card.current:hover::before {
  opacity: 0;
  transform: scale(.92);
}

.level-card:hover:not(:disabled) .level-number {
  animation: levelNumberHover .38s cubic-bezier(.2, .9, .2, 1) both;
}

.level-card:hover:not(:disabled) .level-star {
  animation: levelStarSweepHover .56s cubic-bezier(.16, .92, .2, 1) both;
}

.level-card:hover:not(:disabled) .level-star:nth-child(1) {
  animation-delay: 0ms;
}

.level-card:hover:not(:disabled) .level-star:nth-child(2) {
  animation-delay: 72ms;
}

.level-card:hover:not(:disabled) .level-star:nth-child(3) {
  animation-delay: 144ms;
}

.level-card:active:not(:disabled) {
  transform: translateY(1px) scale(.985);
  filter: brightness(.99);
}

.level-card.level-click-pop .level-number,
.level-card.level-click-pop .level-stars,
.level-card.level-click-pop .level-check {
  animation: levelInnerClickPop .24s cubic-bezier(.18, .95, .24, 1) both;
}

@keyframes levelHoverAura {
  from {
    opacity: .26;
    transform: scale(1.02);
  }
  to {
    opacity: .58;
    transform: scale(1.075);
  }
}

@keyframes levelNumberHover {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-3px) scale(1.12); }
  100% { transform: translateY(-1px) scale(1.06); }
}

@keyframes levelStarSweepHover {
  0% {
    transform: translateY(0) scale(1) rotate(0deg);
    filter: brightness(1);
  }
  28% {
    transform: translateY(-6px) scale(1.18) rotate(-7deg);
    filter: brightness(1.2);
  }
  58% {
    transform: translateY(2px) scale(.96) rotate(5deg);
    filter: brightness(1.05);
  }
  100% {
    transform: translateY(0) scale(1.06) rotate(0deg);
    filter: brightness(1.12);
  }
}

@keyframes levelInnerClickPop {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(1px) scale(.9); }
  78% { transform: translateY(-1px) scale(1.08); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes levelClickPop {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  38% {
    transform: translateY(4px) scale(.92);
    filter: brightness(.96);
  }
  72% {
    transform: translateY(-5px) scale(1.08);
    filter: brightness(1.08);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

.level-card.completed {
  background: linear-gradient(180deg, #a7e956 0%, #72cc27 58%, #4cb61d 100%);
  box-shadow:
    0 5px 0 #348d13,
    0 8px 10px rgba(35, 113, 18, .18),
    inset 0 2px 0 rgba(255,255,255,.34);
}

.level-card.current {
  background: linear-gradient(180deg, #66c9ff 0%, #2ea1f0 58%, #167bd8 100%);
  box-shadow:
    0 6px 0 #075aa8,
    0 11px 12px rgba(8, 91, 170, .24),
    inset 0 2px 0 rgba(255,255,255,.32);
  animation: levelCardIn .32s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}

@keyframes currentLevelPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translateY(-1px) scale(1.015);
    filter: brightness(1.03);
  }
}

.level-card.locked {
  cursor: default;
  background: linear-gradient(180deg, #ffffff 0%, #edf2f7 100%);
  box-shadow:
    0 5px 0 #cdd5df,
    0 8px 10px rgba(75, 102, 130, .12),
    inset 0 2px 0 rgba(255,255,255,.96);
}

.level-number {
  position: relative;
  z-index: 2;
  align-self: end;
  font-size: 27px;
  font-weight: 900;
  line-height: .95;
}

.level-card.completed .level-number,
.level-card.current .level-number {
  color: #fff;
  text-shadow:
    0 2px 0 #075aa8,
    0 4px 5px rgba(3, 57, 118, .18);
}

.level-card.completed .level-number {
  text-shadow:
    0 2px 0 rgba(63, 120, 12, .65),
    0 4px 6px rgba(33, 84, 9, .18);
}

.level-card.current .level-number {
  text-shadow:
    0 2px 0 rgba(5, 83, 160, .72),
    0 4px 6px rgba(5, 72, 130, .18);
}

.level-card.locked .level-number {
  color: #99a2ad;
  text-shadow: 0 2px 0 rgba(255,255,255,.86);
}

.level-stars {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 21px;
  transform: translateY(1px);
}

.level-star {
  --star-face: #2a6fc4;
  --star-shadow: #11599f;
  position: relative;
  width: 21px;
  height: 21px;
  display: block;
  background: transparent;
  transform-origin: 50% 56%;
  will-change: transform, filter;
}

.level-star::before,
.level-star::after {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  -webkit-mask: url("../assets/level-star.svg") center / contain no-repeat;
  mask: url("../assets/level-star.svg") center / contain no-repeat;
}

.level-star::before {
  background: var(--star-shadow);
  transform: translateY(3px);
  opacity: .96;
}

.level-star::after {
  background: var(--star-face);
}

.level-star.full {
  --star-face: linear-gradient(180deg, #fff075 0%, #ffc827 100%);
  --star-shadow: #c77f00;
  animation: starSparkle 2.2s ease-in-out infinite;
}

.level-card.completed .level-star.full:nth-child(2),
.level-card.current .level-star.full:nth-child(2) {
  animation-delay: .15s;
}

.level-card.completed .level-star.full:nth-child(3) {
  animation-delay: .3s;
}

@keyframes starSparkle {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.level-star.empty {
  --star-face: #1b6fc5;
  --star-shadow: #0d559a;
  opacity: .96;
}

.level-check {
  position: relative;
  z-index: 4;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #90e34d 0%, #4cb51c 100%);
  box-shadow:
    0 3px 0 #257a12,
    0 5px 7px rgba(31, 101, 16, .18),
    inset 0 1px 0 rgba(255,255,255,.35);
  transform: translateY(3px);
  animation: checkBounce 2.4s ease-in-out infinite;
}

@keyframes checkBounce {
  0%, 100% {
    transform: translateY(3px) scale(1);
  }
  50% {
    transform: translateY(2px) scale(1.06);
  }
}

.level-check svg {
  width: 58%;
  height: 58%;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.level-lock {
  position: relative;
  z-index: 2;
  grid-row: 2 / span 2;
  align-self: center;
  width: 24px;
  height: 24px;
  color: #9aa3ae;
  transform: translateY(5px);
}

.level-lock svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  filter: drop-shadow(0 2px 0 rgba(255,255,255,.75));
}

.levels-pager {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pager-btn {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(180deg, #4bbdff 0%, #168ee8 100%);
  box-shadow:
    0 4px 0 #0868bd,
    0 8px 12px rgba(22, 111, 190, .16),
    inset 0 2px 0 rgba(255,255,255,.3);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform .15s cubic-bezier(.2, .8, .2, 1), opacity .15s ease;
}

.pager-btn svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pager-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.pager-btn:active:not(:disabled) {
  transform: translateY(3px);
}

.pager-btn:disabled {
  cursor: default;
  opacity: .42;
}

.pager-indicator {
  min-width: 94px;
  height: 46px;
  padding: 0 16px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #2b5da9;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(180deg, #ffffff 0%, #edf2f7 100%);
  box-shadow:
    0 4px 0 #cfd7e2,
    inset 0 2px 0 rgba(255,255,255,.92);
}

/* SETTINGS */

.settings-main {
  z-index: 5;
  width: min(480px, 100vw);
  height: 100%;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 34px) 22px var(--nav-space);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.settings-head {
  width: 100%;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
}

.settings-head h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(38px, 10vw, 54px);
  line-height: .92;
  font-weight: 900;
  letter-spacing: -2px;
  -webkit-text-stroke: 5px #2a8ce7;
  paint-order: stroke fill;
  text-shadow:
    0 6px 0 #1264be,
    0 13px 14px rgba(18, 71, 135, .22);
}

.settings-panel {
  width: min(404px, calc(100vw - 44px));
  border-radius: 44px;
  padding: 32px 24px 26px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fb 100%);
  box-shadow: var(--panel-shadow);
}

.setting-row {
  position: relative;
  width: 100%;
  height: 72px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) max-content;
  align-items: center;
  column-gap: 12px;
  border-radius: 22px;
  padding: 0 14px 0 12px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow:
    0 3px 0 #d6dde6,
    0 8px 15px rgba(52, 91, 128, .10),
    inset 0 2px 0 rgba(255,255,255,.92);
}

.quality-row {
  z-index: 10;
}

.setting-icon {
  width: 56px;
  height: 56px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow:
    0 4px 0 rgba(0,0,0,.18),
    inset 0 2px 0 rgba(255,255,255,.32);
}

.setting-icon svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.setting-icon svg * {
  fill: currentColor;
}

.setting-icon .line {
  fill: none !important;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.setting-icon.blue {
  background: linear-gradient(180deg, #47bdff 0%, #1586e6 100%);
  box-shadow: 0 4px 0 #0765bd, inset 0 2px 0 rgba(255,255,255,.32);
}

.setting-icon.purple {
  background: linear-gradient(180deg, #b262ff 0%, #7b2bdd 100%);
  box-shadow: 0 4px 0 #5412ae, inset 0 2px 0 rgba(255,255,255,.32);
}

.setting-icon.orange {
  background: linear-gradient(180deg, #ffc54c 0%, #f39200 100%);
  box-shadow: 0 4px 0 #c56c00, inset 0 2px 0 rgba(255,255,255,.32);
}

.setting-icon.green {
  background: linear-gradient(180deg, #91e642 0%, #43bd22 100%);
  box-shadow: 0 4px 0 #248916, inset 0 2px 0 rgba(255,255,255,.32);
}

.setting-label {
  justify-self: start;
  min-width: 0;
  color: #183d7c;
  font-size: clamp(16px, 4.3vw, 20px);
  font-weight: 900;
  letter-spacing: 1px;
  white-space: nowrap;
}

.toggle,
.quality-select {
  justify-self: end;
  margin-left: auto;
}

.toggle {
  position: relative;
  width: 86px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  cursor: pointer;
  background: linear-gradient(180deg, #d5dde7 0%, #aeb8c5 100%);
  box-shadow: 0 4px 0 #8894a3, inset 0 2px 3px rgba(255,255,255,.42);
}

.toggle span {
  position: absolute;
  top: 4px;
  left: 5px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffffff 0%, #edf2f7 100%);
  box-shadow: 0 3px 4px rgba(41, 52, 65, .18), inset 0 2px 0 rgba(255,255,255,.96);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}

.toggle.active {
  background: linear-gradient(180deg, #9af13c 0%, #55c92a 100%);
  box-shadow: 0 4px 0 #278b16, inset 0 2px 3px rgba(255,255,255,.34);
}

.toggle.active span {
  transform: translateX(46px);
}

.quality-select {
  position: relative;
  width: 128px;
}

.quality-btn {
  width: 100%;
  height: 45px;
  border: 0;
  border-radius: 18px;
  padding: 0 14px 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(180deg, #4bbdff 0%, #168ee8 100%);
  box-shadow:
    0 4px 0 #0868bd,
    0 8px 12px rgba(22, 111, 190, .16),
    inset 0 2px 0 rgba(255,255,255,.3);
}

.quality-btn span {
  font-size: clamp(15px, 4.3vw, 20px);
  font-weight: 900;
  letter-spacing: 1px;
}

.quality-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}

.quality-select[data-open="true"] .quality-btn svg {
  transform: rotate(180deg);
}

.quality-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 10px);
  right: 0;
  width: 158px;
  padding: 8px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #eef4fa 100%);
  box-shadow:
    0 6px 0 #c7d0db,
    0 14px 22px rgba(35, 82, 125, .18),
    inset 0 2px 0 rgba(255,255,255,.94);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(.96);
  transform-origin: top right;
  transition: opacity .18s ease, transform .18s cubic-bezier(.2, .8, .2, 1);
}

.quality-select[data-open="true"] .quality-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.quality-option {
  width: 100%;
  height: 42px;
  border: 0;
  border-radius: 16px;
  margin-bottom: 6px;
  padding: 0 13px;
  color: #2862a7;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-weight: 900;
  letter-spacing: .8px;
}

.quality-option:last-child {
  margin-bottom: 0;
}

.quality-option:hover {
  background: rgba(47, 157, 241, .10);
}

.quality-option.active {
  color: #fff;
  background: linear-gradient(180deg, #6fd0ff 0%, #2097ef 100%);
  box-shadow: 0 3px 0 #0b6fc5, inset 0 2px 0 rgba(255,255,255,.26);
}

.settings-separator {
  height: 2px;
  margin: 20px 0;
  border-radius: 999px;
  background: #d9e0e9;
}

.action-row {
  width: 100%;
  height: 62px;
  border: 0;
  border-radius: 20px;
  padding: 0 18px;
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: 48px 1fr 32px;
  align-items: center;
  column-gap: 14px;
  cursor: pointer;
  background: linear-gradient(180deg, #f9fbfd 0%, #edf2f7 100%);
  color: #247bd9;
  box-shadow: 0 3px 0 #d1d9e4, 0 8px 14px rgba(46, 88, 130, .10), inset 0 2px 0 rgba(255,255,255,.94);
}


.action-row.danger-row {
  color: #ef3f48;
}

.action-row.danger-row span {
  color: #d92f3c;
}

.action-row.danger-row .action-arrow {
  stroke: #ef3f48;
}

.action-row:last-child {
  margin-bottom: 0;
}

.action-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.action-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.action-icon.shield svg {
  fill: currentColor;
  stroke: none;
}

.action-icon.shield svg path:nth-child(2),
.action-icon.shield svg path:nth-child(3),
.action-icon.shield svg circle {
  fill: #fff;
  opacity: .92;
}

.action-row span {
  text-align: left;
  font-size: clamp(15px, 4vw, 19px);
  font-weight: 900;
  letter-spacing: .8px;
  color: #1c62ba;
}

.action-arrow {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #2e9af3;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  justify-self: end;
}


/* ACTION JUICE + MODALS */

.juice-action {
  overflow: hidden;
  transform-origin: center;
  transition:
    transform .18s cubic-bezier(.2, .8, .2, 1),
    filter .18s ease,
    box-shadow .18s ease;
}

.juice-action:hover {
  transform: translateY(-3px) scale(1.012);
  filter: brightness(1.02);
  box-shadow:
    0 5px 0 #d1d9e4,
    0 13px 18px rgba(46, 88, 130, .14),
    inset 0 2px 0 rgba(255,255,255,.94);
}

.juice-action:active,
.juice-action.press-pop {
  transform: translateY(2px) scale(.985);
  box-shadow:
    0 1px 0 #d1d9e4,
    0 5px 10px rgba(46, 88, 130, .12),
    inset 0 2px 0 rgba(255,255,255,.75);
}

.danger-row.juice-action:hover {
  box-shadow:
    0 5px 0 #dc6d6d,
    0 13px 18px rgba(213, 54, 61, .16),
    inset 0 2px 0 rgba(255,255,255,.94);
}

.danger-row.juice-action:active,
.danger-row.juice-action.press-pop {
  box-shadow:
    0 1px 0 #dc6d6d,
    0 5px 10px rgba(213, 54, 61, .12),
    inset 0 2px 0 rgba(255,255,255,.75);
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.modal-layer.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 72, 122, .42);
  backdrop-filter: blur(7px);
}

.confirm-modal {
  position: absolute;
  width: min(354px, calc(100vw - 44px));
  border-radius: 36px;
  padding: 30px 24px 24px;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
  box-shadow:
    0 9px 0 #c7d0db,
    0 26px 38px rgba(26, 75, 126, .30),
    inset 0 2px 0 rgba(255,255,255,.96);
  transform: translateY(22px) scale(.9);
  opacity: 0;
  pointer-events: none;
}

.modal-layer.active .confirm-modal.active {
  pointer-events: auto;
  animation: modalPopIn .32s cubic-bezier(.18, .9, .2, 1.12) both;
}

.confirm-modal.modal-out {
  animation: modalPopOut .18s ease both;
}

@keyframes modalPopIn {
  0% { opacity: 0; transform: translateY(26px) scale(.88); }
  68% { opacity: 1; transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalPopOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(14px) scale(.94); }
}

.modal-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  color: #6d7f99;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #edf2f7 100%);
  box-shadow: 0 3px 0 #cdd5df, inset 0 2px 0 rgba(255,255,255,.94);
  cursor: pointer;
  transition: transform .16s cubic-bezier(.2, .8, .2, 1);
}

.modal-x:hover {
  transform: translateY(-2px);
}

.modal-x:active {
  transform: translateY(2px);
}

.modal-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 16px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  color: #fff;
}

.modal-icon svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-icon svg path,
.modal-icon svg circle {
  fill: none;
}

.modal-icon.blue {
  background: linear-gradient(180deg, #4bbdff 0%, #168ee8 100%);
  box-shadow: 0 6px 0 #0868bd, inset 0 2px 0 rgba(255,255,255,.28);
}

.modal-icon.blue svg {
  fill: currentColor;
  stroke: none;
}

.modal-icon.blue svg path,
.modal-icon.blue svg circle {
  fill: currentColor;
  stroke: none;
}

.modal-icon.blue svg path:nth-child(2),
.modal-icon.blue svg path:nth-child(3),
.modal-icon.blue svg circle {
  fill: #fff;
  opacity: .9;
}

.modal-icon.danger {
  background: linear-gradient(180deg, #ff777a 0%, #e8343e 100%);
  box-shadow: 0 6px 0 #b81b25, inset 0 2px 0 rgba(255,255,255,.30);
}

.confirm-modal h2 {
  margin: 0;
  color: #183d7c;
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -1px;
}

.reset-modal h2 {
  color: #d72232;
}

.confirm-modal p {
  width: min(250px, 100%);
  margin: 12px auto 22px;
  color: #4a78ad;
  font-size: 16px;
  line-height: 1.22;
  font-weight: 900;
}

.reset-modal p {
  color: #a6424a;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-btn {
  height: 56px;
  border: 0;
  border-radius: 20px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .8px;
  cursor: pointer;
  transition: transform .16s cubic-bezier(.2, .8, .2, 1), filter .16s ease;
}

.modal-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.modal-btn:active {
  transform: translateY(3px);
}

.modal-btn.ghost {
  color: #4870a2;
  background: linear-gradient(180deg, #ffffff 0%, #edf2f7 100%);
  box-shadow: 0 4px 0 #cdd5df, inset 0 2px 0 rgba(255,255,255,.95);
}

.modal-btn.danger {
  background: linear-gradient(180deg, #ff777a 0%, #e8343e 100%);
  box-shadow: 0 4px 0 #b81b25, inset 0 2px 0 rgba(255,255,255,.25);
}

.modal-btn.blue {
  background: linear-gradient(180deg, #4bbdff 0%, #168ee8 100%);
  box-shadow: 0 4px 0 #0868bd, inset 0 2px 0 rgba(255,255,255,.28);
}

.reset-flash {
  animation: resetFlash .34s ease both;
}

@keyframes resetFlash {
  0%, 100% { filter: none; }
  45% { filter: brightness(1.18) saturate(1.15); }
}


/* NAV */

.bottom-nav {
  position: fixed;
  z-index: 80;
  left: 50%;
  bottom: var(--nav-bottom);
  width: min(432px, calc(100vw - 32px));
  height: var(--nav-h);
  border-radius: 30px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffffff 0%, #f2f5f8 100%);
  box-shadow:
    0 7px 0 #c6ccd4,
    0 14px 20px rgba(45, 91, 134, .16),
    inset 0 2px 0 rgba(255,255,255,.95);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 12px 12px 10px;
}

.nav-item {
  position: relative;
  border: 0;
  border-radius: 20px;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #687790;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1), color .18s ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 6px 8px;
  border-radius: 18px;
  background: rgba(47, 157, 241, .08);
  opacity: 0;
  transition: opacity .18s ease;
}

.nav-item svg,
.nav-item svg *,
.nav-item span {
  position: relative;
  z-index: 1;
}

.nav-item svg {
  width: 38px;
  height: 38px;
  fill: currentColor;
  filter: drop-shadow(0 3px 0 rgba(70, 83, 105, .18));
}

.nav-item svg * {
  fill: currentColor;
}

.nav-item span {
  font-size: 13px;
}

.nav-item:hover {
  transform: translateY(-2px);
  color: #52637f;
}

.nav-item:hover::before {
  opacity: .8;
}

.nav-item:active {
  transform: translateY(2px);
}

.nav-item.active {
  color: #2c9df1;
}

.nav-item.active::before {
  opacity: 1;
  background: rgba(47, 157, 241, .10);
}

/* RESPONSIVE */

@media (max-width: 430px) {
  .menu-main {
    gap: 14px;
    padding-top: 96px;
  }

  .logo-wrap {
    width: 352px;
    height: 208px;
    transform: translateY(-6px) rotate(-2deg) scale(.95);
  }

  .play-wrap {
    transform: scale(.92);
    transform-origin: center center;
  }

  .levels-main {
    padding-left: 10px;
    padding-right: 10px;
  }

  .levels-modal {
    width: min(398px, calc(100vw - 20px));
    gap: 14px;
  }

  .levels-panel {
    padding: 16px;
  }

  .levels-grid {
    gap: 11px;
  }

  .level-card {
    height: 78px;
    min-height: 78px;
  }

  .settings-panel {
    width: min(392px, calc(100vw - 36px));
    border-radius: 40px;
    padding: 30px 20px 24px;
  }

  .setting-row {
    grid-template-columns: 54px minmax(0, 1fr) max-content;
    height: 70px;
    padding-left: 10px;
    padding-right: 12px;
  }

  .setting-icon {
    width: 54px;
    height: 54px;
  }

  .toggle {
    width: 78px;
    height: 36px;
  }

  .toggle span {
    width: 28px;
    height: 28px;
  }

  .toggle.active span {
    transform: translateX(41px);
  }

  .quality-select {
    width: 116px;
  }

  .quality-btn {
    height: 43px;
  }

  .quality-menu {
    width: 148px;
  }
}

@media (max-width: 370px) {
  .logo-wrap {
    width: 320px;
    transform: translateY(-5px) rotate(-2deg) scale(.88);
  }

  .continue-card {
    transform: scale(.94);
  }

  .play-wrap {
    transform: scale(.84);
  }

  .levels-modal {
    width: min(356px, calc(100vw - 16px));
    gap: 12px;
  }

  .levels-panel {
    padding: 13px;
  }

  .levels-grid {
    gap: 9px;
  }

  .level-card {
    height: 72px;
    min-height: 72px;
    border-radius: 19px;
  }

  .level-number {
    font-size: 24px;
  }

  .level-star {
    width: 15px;
    height: 15px;
  }

  .setting-row {
    grid-template-columns: 50px minmax(0, 1fr) max-content;
  }

  .setting-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .setting-icon svg {
    width: 30px;
    height: 30px;
  }

  .toggle {
    width: 68px;
  }

  .toggle.active span {
    transform: translateX(31px);
  }

  .quality-select {
    width: 100px;
  }

  .quality-btn span {
    font-size: 15px;
  }

  .quality-menu {
    width: 132px;
  }
}

@media (max-height: 760px) {
  .game-screen {
    --nav-h: 92px;
  }

  .menu-main {
    gap: 12px;
    padding-top: 88px;
  }

  .logo-wrap {
    transform: translateY(-6px) rotate(-2deg) scale(.84);
    margin-bottom: -8px;
  }

  .continue-card {
    transform: scale(.92);
  }

  .play-wrap {
    transform: scale(.82);
    height: 128px;
  }

  .levels-modal {
    min-height: calc(100svh - var(--nav-space) - 18px);
    gap: 12px;
  }

  .levels-head h1 {
    font-size: clamp(44px, 11vw, 66px);
  }

  .levels-panel {
    padding: 14px;
  }

  .levels-grid {
    gap: 10px;
  }

  .level-card {
    height: 72px;
    min-height: 72px;
  }

  .settings-head {
    margin-bottom: 12px;
  }

  .settings-head h1 {
    font-size: clamp(34px, 9vw, 48px);
  }

  .settings-panel {
    transform: scale(.92);
    transform-origin: center center;
  }
}

@media (max-height: 690px) {
  .game-screen {
    --nav-h: 84px;
  }

  .menu-main {
    gap: 10px;
    padding-top: 80px;
  }

  .logo-wrap {
    transform: translateY(-6px) rotate(-2deg) scale(.76);
    margin-bottom: -18px;
  }

  .play-wrap {
    transform: scale(.76);
    height: 112px;
  }

  .levels-modal {
    gap: 10px;
  }

  .levels-panel {
    padding: 12px;
  }

  .levels-grid {
    gap: 8px;
  }

  .level-card {
    height: 65px;
    min-height: 65px;
    border-radius: 18px;
  }

  .level-number {
    font-size: 22px;
  }

  .level-star {
    width: 14px;
    height: 14px;
  }

  .level-check {
    width: 19px;
    height: 19px;
  }

  .pager-btn {
    width: 48px;
    height: 48px;
    border-radius: 18px;
  }

  .pager-indicator {
    min-width: 84px;
    height: 42px;
    font-size: 18px;
  }

  .bottom-nav {
    border-radius: 26px;
    padding: 9px 10px 8px;
  }

  .nav-item svg {
    width: 32px;
    height: 32px;
  }

  .nav-item span {
    font-size: 11px;
  }

  .settings-panel {
    transform: scale(.84);
  }
}



.settings-gear-svg {
  transform: scale(.94);
  transform-origin: center;
}


@media (max-width: 430px) {
  .shop-main {
    padding-left: 8px;
    padding-right: 8px;
  }

  .shop-modal {
    width: min(376px, calc(100vw - 12px));
  }

  .shop-grid {
    gap: 9px;
  }

  .skin-card {
    min-height: 170px;
    padding-left: 7px;
    padding-right: 7px;
  }

  .skin-preview {
    width: 68px;
    height: 80px;
  }
}

@media (max-width: 370px) {
  .shop-modal {
    width: min(356px, calc(100vw - 10px));
    gap: 12px;
  }

  .shop-panel {
    padding: 14px 11px 12px;
  }

  .shop-grid {
    gap: 8px;
  }

  .skin-card {
    min-height: 162px;
  }

  .skin-name {
    font-size: 12px;
  }

  .skin-preview {
    width: 62px;
    height: 74px;
  }

  .skin-buy-btn {
    font-size: 11px;
  }
}

@media (max-height: 760px) {
  .shop-main {
    padding-top: 42px;
  }

  .shop-modal {
    gap: 12px;
    min-height: calc(100svh - var(--nav-space) - 18px);
  }

  .shop-panel {
    padding: 14px 12px 12px;
  }

  .shop-grid {
    gap: 8px;
  }

  .skin-card {
    min-height: 158px;
    padding-top: 8px;
  }

  .skin-preview {
    width: 60px;
    height: 70px;
    margin-bottom: 8px;
  }

  .shop-section-title {
    margin-bottom: 10px;
  }

  .shop-head h1 {
    font-size: clamp(46px, 12vw, 68px);
  }
}

@media (max-height: 690px) {
  .shop-main {
    padding-top: 36px;
  }

  .shop-modal {
    gap: 10px;
  }

  .shop-head h1 {
    font-size: clamp(42px, 11vw, 62px);
  }

  .shop-panel {
    padding: 12px 10px 10px;
  }

  .skin-card {
    min-height: 146px;
  }

  .skin-preview {
    width: 54px;
    height: 62px;
  }

  .skin-buy-btn {
    height: 31px;
  }
}


/* v5.5 — shared uploaded coin art everywhere coins are shown */
.coin-icon,
.shop-coin {
  background: url("../assets/coin.webp") center / contain no-repeat !important;
  border-radius: 50%;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  flex: 0 0 auto;
}
.coin-icon {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 4px 0 rgba(176, 104, 0, .42));
}
.shop-coin {
  width: 19px;
  height: 19px;
  filter: drop-shadow(0 2px 0 rgba(176, 104, 0, .42));
}
.price-btn .shop-coin {
  margin-right: 1px;
}

/* Global interaction lock inside the menu iframe. */
html, body, .game-screen, .game-screen *{
  -webkit-user-select:none!important;
  user-select:none!important;
  -webkit-touch-callout:none!important;
}
img, svg, canvas, video, picture, source{
  -webkit-user-drag:none!important;
  user-drag:none!important;
  -webkit-touch-callout:none!important;
  -webkit-user-select:none!important;
  user-select:none!important;
}
::selection{background:transparent;color:inherit;}

.image-logo-wrap{
  width:min(700px,96vw);
  max-width:700px;
  min-height:unset;
  height:auto;
  display:flex;
  align-items:center;
  justify-content:center;
  align-self:center;
  margin:0 auto 18px;
  padding:0 6px;
  transform:none!important;
}
.image-logo-wrap .game-title-image{
  display:block;
  width:100%;
  max-width:680px;
  height:auto;
  object-fit:contain;
  margin:0 auto;
  filter:drop-shadow(0 10px 20px rgba(42,76,118,.20));
  user-select:none;
  pointer-events:none;
  -webkit-user-drag:none;
}
@media (max-width:640px){
  .image-logo-wrap{width:min(560px,96vw); margin:0 auto 16px; padding:0 4px;}
}
@media (max-width:420px){
  .image-logo-wrap{width:min(390px,96vw); margin:0 auto 14px; padding:0 2px;}
}

/* v7.3: fixed main menu title fit. Keep the full Block Away logo inside the portrait menu bounds. */
.menu-main{
  overflow:visible;
  padding-top:clamp(58px,10svh,84px)!important;
  gap:clamp(12px,2.2svh,16px)!important;
}
.menu-main .image-logo-wrap{
  width:min(100%,430px,calc(100vw - 36px))!important;
  max-width:430px!important;
  min-width:0!important;
  height:auto!important;
  margin:0 auto clamp(14px,2.2svh,20px)!important;
  padding:0!important;
  transform:none!important;
  flex:0 0 auto!important;
  overflow:visible!important;
}
.menu-main .image-logo-wrap .game-title-image{
  width:100%!important;
  max-width:100%!important;
  height:auto!important;
  object-fit:contain!important;
  object-position:center center!important;
  margin:0 auto!important;
  display:block!important;
}
@media (max-width:420px){
  .menu-main .image-logo-wrap{
    width:min(100%,382px,calc(100vw - 28px))!important;
    max-width:382px!important;
    margin-bottom:14px!important;
  }
}
@media (max-height:720px){
  .menu-main{padding-top:52px!important;gap:11px!important;}
  .menu-main .image-logo-wrap{width:min(100%,360px,calc(100vw - 34px))!important;margin-bottom:10px!important;}
}
@media (max-height:620px){
  .menu-main{padding-top:42px!important;gap:9px!important;}
  .menu-main .image-logo-wrap{width:min(100%,322px,calc(100vw - 34px))!important;margin-bottom:8px!important;}
}

/* v8.2 mobile performance polish: keep the candy look, remove compositor-heavy work on phones. */
html.perf-mobile .bg-cloud,
html.perf-reduced-motion .bg-cloud {
  filter: none !important;
  will-change: transform, opacity;
}

html.perf-mobile .cloud-c,
html.perf-mobile .cloud-d,
html.perf-mobile .cloud-e,
html.perf-reduced-motion .cloud-c,
html.perf-reduced-motion .cloud-d,
html.perf-reduced-motion .cloud-e {
  display: none !important;
}

html.perf-mobile .game-screen:not([data-screen="home"]) .bg-cloud,
html.perf-reduced-motion .game-screen:not([data-screen="home"]) .bg-cloud {
  display: none !important;
}

html.perf-mobile .bg-shape,
html.perf-reduced-motion .bg-shape {
  filter: none !important;
  opacity: .55;
  will-change: auto;
}

html.perf-mobile .game-title-image,
html.perf-reduced-motion .game-title-image {
  filter: drop-shadow(0 5px 10px rgba(42,76,118,.13)) !important;
}

html.perf-mobile .level-card,
html.perf-reduced-motion .level-card {
  animation: none !important;
  animation-delay: 0ms !important;
  transition: transform .12s ease, filter .12s ease !important;
  will-change: auto !important;
}

html.perf-mobile .level-star.full,
html.perf-mobile .level-check,
html.perf-reduced-motion .level-star.full,
html.perf-reduced-motion .level-check {
  animation: none !important;
  will-change: auto !important;
}

html.perf-mobile .skin-card,
html.perf-mobile .shop-modal,
html.perf-mobile .levels-modal,
html.perf-mobile .settings-panel,
html.perf-reduced-motion .skin-card,
html.perf-reduced-motion .shop-modal,
html.perf-reduced-motion .levels-modal,
html.perf-reduced-motion .settings-panel {
  will-change: auto !important;
}

html.perf-mobile .modal-layer,
html.perf-reduced-motion .modal-layer {
  backdrop-filter: none !important;
}

@media (max-width: 640px), (pointer: coarse), (prefers-reduced-motion: reduce) {
  .screen {
    animation-duration: .16s !important;
  }

  .level-card:hover:not(:disabled) .level-number,
  .level-card:hover:not(:disabled) .level-star,
  .level-card.current:hover::before,
  .level-card:hover:not(:disabled)::before {
    animation: none !important;
  }
}

/* v8.9 temporary flat title: replace image logo on home menu with simple text */
.menu-main .text-logo-wrap{
  width:auto!important;
  max-width:calc(100vw - 36px)!important;
  height:auto!important;
  min-height:0!important;
  margin:0 auto clamp(14px,2.2svh,20px)!important;
  padding:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
  transform:none!important;
  background:none!important;
  box-shadow:none!important;
  filter:none!important;
  overflow:visible!important;
  flex:0 0 auto!important;
}
.menu-main .menu-flat-title{
  margin:0;
  font-family:"Nunito",Arial,sans-serif;
  font-size:clamp(44px,12vw,66px);
  font-weight:900;
  line-height:.92;
  letter-spacing:-.055em;
  color:#ffffff;
  text-align:center;
  white-space:nowrap;
  text-shadow:0 4px 0 rgba(20,96,163,.22),0 10px 18px rgba(25,82,140,.18);
}
@media (max-height:720px){
  .menu-main .text-logo-wrap{margin-bottom:10px!important;}
  .menu-main .menu-flat-title{font-size:clamp(38px,10vw,56px);}
}
@media (max-height:620px){
  .menu-main .text-logo-wrap{margin-bottom:8px!important;}
  .menu-main .menu-flat-title{font-size:clamp(34px,9vw,50px);}
}


/* Project Prism v0.3 accent override: same menu UI, prism violet accent. */
body{background:#61dcff!important;}
.game-screen{background:linear-gradient(180deg,#7c4dff 0%,#61dcff 50%,#bdf0ff 100%)!important;}
.classic-skin .blue{background:linear-gradient(180deg,#b68cff,#6b3ee8)!important;}
.setting-icon.blue,.modal-icon.blue{background:linear-gradient(180deg,#b68cff 0%,#7b45ee 100%)!important;box-shadow:0 4px 0 #5630b7,inset 0 2px 0 rgba(255,255,255,.32)!important;}
.modal-btn.blue{background:linear-gradient(180deg,#b68cff 0%,#8b5cff 50%,#6b3ee8 100%)!important;box-shadow:0 6px 0 #4f2eb7,0 12px 18px rgba(82,55,150,.18),inset 0 3px 0 rgba(255,255,255,.28)!important;}
.play-button,.menu-btn.primary,.nav-tab.active{filter:hue-rotate(52deg) saturate(1.18);}


/* Project Prism v0.4 — nocturnal menu background + violet accent, including levels/settings/modals */
body{background:#070718!important;}
.game-screen{
  background:
    radial-gradient(circle at 13% 12%,rgba(255,255,255,.9) 0 1.1px,transparent 1.8px),
    radial-gradient(circle at 82% 20%,rgba(198,165,255,.8) 0 1.35px,transparent 2px),
    radial-gradient(circle at 34% 39%,rgba(255,255,255,.62) 0 1px,transparent 1.7px),
    radial-gradient(circle at 88% 62%,rgba(255,255,255,.70) 0 1px,transparent 1.7px),
    radial-gradient(circle at 16% 79%,rgba(198,165,255,.66) 0 1.2px,transparent 1.9px),
    radial-gradient(circle at 50% 112%,rgba(120,64,255,.36),transparent 42%),
    linear-gradient(180deg,#050614 0%,#090824 44%,#17113f 76%,#25135a 100%)!important;
}
.game-screen::before{
  content:"";position:absolute;inset:0;z-index:0;pointer-events:none;opacity:.48;
  background-image:
    radial-gradient(circle,rgba(255,255,255,.86) 0 1px,transparent 1.7px),
    radial-gradient(circle,rgba(185,148,255,.62) 0 1px,transparent 1.8px);
  background-size:96px 96px,142px 142px;
  background-position:8px 28px,50px 6px;
}
.bg-cloud{opacity:.10!important;filter:brightness(.72) saturate(.70) hue-rotate(52deg)!important;}
.bg-shape{opacity:.20!important;background:rgba(139,92,255,.26)!important;}
.menu-flat-title,.levels-head h1,.shop-head h1,.settings-title h1{
  -webkit-text-stroke-color:#4f2eb7!important;
  text-shadow:0 6px 0 #2b176c,0 12px 14px rgba(22,14,78,.34)!important;
}
.continue-card,.shop-modal,.levels-panel,.settings-card,.privacy-modal,.reset-modal{
  box-shadow:0 9px 0 #b9b4cf,0 22px 30px rgba(20,14,68,.32),inset 0 2px 0 rgba(255,255,255,.95)!important;
}
.play-face,.play-btn,.skin-buy-btn,.price-btn,.pager-btn,.settings-close,.modal-btn.blue,.bottom-tab.active .tab-icon,.coin-plus{
  background:linear-gradient(180deg,#c4a2ff 0%,#9566ff 48%,#6b3ee8 100%)!important;
  box-shadow:0 6px 0 #4f2eb7,0 12px 18px rgba(80,46,183,.22),inset 0 3px 0 rgba(255,255,255,.28)!important;
}
.play-btn{filter:drop-shadow(0 10px 0 #4f2eb7) drop-shadow(0 18px 20px rgba(80,46,183,.28))!important;}
.continue-arrow,.continue-text strong,.shop-section-title h2,.settings-label,.settings-title h1,.level-card.locked .level-number{color:#5630b7!important;}
.continue-img rect,.shop-section-icon,.setting-icon.blue,.modal-icon.blue{
  background:linear-gradient(180deg,#c4a2ff 0%,#7b45ee 100%)!important;
  box-shadow:0 4px 0 #5630b7,inset 0 2px 0 rgba(255,255,255,.32)!important;
}
.continue-img svg rect{fill:#8b5cff!important;}
.continue-img svg path,.continue-img svg circle{fill:#fff!important;opacity:.92!important;}
.classic-skin .blue{background:linear-gradient(180deg,#c4a2ff,#6b3ee8)!important;}
.levels-head h1{-webkit-text-stroke:clamp(5px,1.5vw,7px) #4f2eb7!important;}
.level-card.current{
  background:linear-gradient(180deg,#c4a2ff 0%,#9566ff 58%,#6b3ee8 100%)!important;
  box-shadow:0 6px 0 #4f2eb7,0 11px 12px rgba(80,46,183,.28),inset 0 2px 0 rgba(255,255,255,.32)!important;
}
.level-card.current .level-number,.level-card.completed .level-number{
  text-shadow:0 2px 0 rgba(43,23,108,.72),0 4px 6px rgba(43,23,108,.22)!important;
}
.level-star{--star-face:#8b5cff!important;--star-shadow:#4f2eb7!important;}
.level-star.empty{--star-face:#6b3ee8!important;--star-shadow:#3b248c!important;}
.level-star.full{--star-face:linear-gradient(180deg,#fff075 0%,#ffc827 100%)!important;--star-shadow:#c77f00!important;}
.levels-pager .pager-btn,.pager-btn{
  background:linear-gradient(180deg,#c4a2ff 0%,#9566ff 48%,#6b3ee8 100%)!important;
  box-shadow:0 4px 0 #4f2eb7,0 8px 12px rgba(80,46,183,.18),inset 0 2px 0 rgba(255,255,255,.3)!important;
}
.setting-icon.blue,.modal-icon.blue{
  background:linear-gradient(180deg,#c4a2ff 0%,#7b45ee 100%)!important;
  box-shadow:0 4px 0 #5630b7,inset 0 2px 0 rgba(255,255,255,.32)!important;
}
.modal-btn.blue{
  background:linear-gradient(180deg,#c4a2ff 0%,#9566ff 48%,#6b3ee8 100%)!important;
  box-shadow:0 6px 0 #4f2eb7,0 12px 18px rgba(80,46,183,.22),inset 0 3px 0 rgba(255,255,255,.28)!important;
}
.bottom-nav{box-shadow:0 8px 0 #b9b4cf,0 -14px 28px rgba(20,14,68,.20),inset 0 2px 0 rgba(255,255,255,.95)!important;}
.bottom-tab.active{color:#5630b7!important;}
.coins-pill{box-shadow:0 5px 0 #b9b4cf,0 12px 18px rgba(22,14,78,.20),inset 0 2px 0 rgba(255,255,255,.90)!important;}


/* Project Prism v0.6 — zen night sky + corrected violet accent. No clouds. */
.bg-cloud,.bg-shape{display:none!important;opacity:0!important;visibility:hidden!important;}
body{background:#050612!important;}
.game-screen{
  background:
    radial-gradient(circle at 50% 115%,rgba(110,68,255,.26),transparent 42%),
    linear-gradient(180deg,#050612 0%,#080921 48%,#13103a 78%,#211150 100%)!important;
}
.game-screen::before{display:none!important;}
.night-star-layer{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden;contain:layout paint;}
.menu-star{position:absolute;width:var(--s,2px);height:var(--s,2px);left:var(--x);top:var(--y);border-radius:999px;background:rgba(255,255,255,var(--o,.8));box-shadow:0 0 calc(var(--s,2px) * 3) rgba(195,165,255,.55);animation:menuStarTwinkle var(--d,3.8s) ease-in-out infinite;animation-delay:var(--delay,0s);}
.menu-star.soft{background:rgba(196,162,255,var(--o,.7));box-shadow:0 0 calc(var(--s,2px) * 4) rgba(139,92,255,.48);}
.shooting-star{position:absolute;left:var(--x);top:var(--y);width:clamp(72px,18vw,180px);height:2px;border-radius:999px;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.96),rgba(196,162,255,.25));filter:drop-shadow(0 0 6px rgba(196,162,255,.82));transform:rotate(var(--rot,-22deg)) translateX(-140%);opacity:0;animation:shootingStar var(--d,5.8s) cubic-bezier(.2,.7,.2,1) infinite;animation-delay:var(--delay,1s);}
@keyframes menuStarTwinkle{0%,100%{opacity:.38;transform:scale(.86)}45%{opacity:1;transform:scale(1.15)}72%{opacity:.56;transform:scale(.96)}}
@keyframes shootingStar{0%,72%{opacity:0;transform:rotate(var(--rot,-22deg)) translateX(-140%)}76%{opacity:1}88%{opacity:.92}100%{opacity:0;transform:rotate(var(--rot,-22deg)) translateX(120vw)}}

/* Play stays green. Purple is UI accent only. */
.play-btn{--main:#82dd15!important;--top:#a8f43a!important;--dark:#55ad0f!important;--shadow:#3f8e08!important;background:transparent!important;filter:drop-shadow(0 10px 0 rgba(63,142,8,.92)) drop-shadow(0 18px 20px rgba(42,100,10,.22))!important;}
.play-btn::before{background:var(--dark)!important;box-shadow:0 6px 0 var(--shadow),0 12px 14px rgba(42,100,10,.18)!important;}
.play-face{background:var(--main)!important;box-shadow:none!important;}
.play-face::before{background:radial-gradient(circle at 24% 18%,var(--top) 0%,rgba(255,255,255,.12) 34%,transparent 62%)!important;}

/* Purple corrections missed in v0.4/v0.5. */
.continue-arrow{color:#6b3ee8!important;stroke:#6b3ee8!important;filter:drop-shadow(0 2px 0 rgba(79,46,183,.18));}
.continue-text span{color:#6b3ee8!important;font-weight:900!important;}
.continue-img svg rect{fill:#8b5cff!important;filter:drop-shadow(0 5px 0 #4f2eb7)!important;}
.continue-img svg path,.continue-img svg circle{fill:#fff!important;}
.quality-btn{
  color:#fff!important;
  background:linear-gradient(180deg,#c4a2ff 0%,#9566ff 48%,#6b3ee8 100%)!important;
  box-shadow:0 4px 0 #4f2eb7,0 8px 13px rgba(80,46,183,.18),inset 0 2px 0 rgba(255,255,255,.28)!important;
}
.quality-menu{border-color:rgba(139,92,255,.18)!important;box-shadow:0 12px 22px rgba(42,25,115,.18),0 3px 0 rgba(185,180,207,.62)!important;}
.quality-option{color:#5630b7!important;}
.quality-option:hover{background:rgba(139,92,255,.12)!important;}
.quality-option.active{color:#fff!important;background:linear-gradient(180deg,#c4a2ff 0%,#9566ff 48%,#6b3ee8 100%)!important;box-shadow:0 3px 0 #4f2eb7,inset 0 2px 0 rgba(255,255,255,.28)!important;}
.action-row:not(.danger-row){color:#5630b7!important;}
.action-row:not(.danger-row) span{color:#5630b7!important;}
.action-row:not(.danger-row) .action-arrow{stroke:#6b3ee8!important;}
.action-row:not(.danger-row):hover{box-shadow:0 5px 0 #b9b4cf,0 13px 18px rgba(80,46,183,.14),inset 0 2px 0 rgba(255,255,255,.94)!important;}
.action-icon.shield{color:#8b5cff!important;filter:drop-shadow(0 3px 0 rgba(79,46,183,.18));}
.modal-icon.blue,.setting-icon.blue,.shop-section-icon{background:linear-gradient(180deg,#c4a2ff 0%,#7b45ee 100%)!important;box-shadow:0 4px 0 #5630b7,inset 0 2px 0 rgba(255,255,255,.32)!important;}
.modal-btn.blue,.settings-close,.pager-btn,.skin-buy-btn,.price-btn,.coin-plus,.bottom-tab.active .tab-icon{background:linear-gradient(180deg,#c4a2ff 0%,#9566ff 48%,#6b3ee8 100%)!important;box-shadow:0 5px 0 #4f2eb7,0 10px 16px rgba(80,46,183,.20),inset 0 3px 0 rgba(255,255,255,.28)!important;}
.bottom-tab.active,.nav-item.active{color:#5630b7!important;}
.level-card.current{background:linear-gradient(180deg,#c4a2ff 0%,#9566ff 58%,#6b3ee8 100%)!important;box-shadow:0 6px 0 #4f2eb7,0 11px 12px rgba(80,46,183,.28),inset 0 2px 0 rgba(255,255,255,.32)!important;}
.level-card.current .level-number,.level-card.completed .level-number{color:#fff!important;text-shadow:0 2px 0 rgba(43,23,108,.72),0 4px 6px rgba(43,23,108,.22)!important;}
.level-lock svg{fill:#6b3ee8!important;}
@media (prefers-reduced-motion: reduce){.menu-star,.shooting-star{animation:none!important;}.shooting-star{display:none!important;}}

/* Project Prism v0.7 — softer cosmos sky, still no clouds. */
.game-screen{
  background:
    radial-gradient(ellipse at 22% 16%,rgba(98,72,255,.34) 0%,rgba(98,72,255,.12) 28%,transparent 58%),
    radial-gradient(ellipse at 80% 36%,rgba(207,127,255,.22) 0%,rgba(207,127,255,.08) 30%,transparent 62%),
    radial-gradient(ellipse at 52% 112%,rgba(60,191,255,.16) 0%,rgba(100,54,255,.22) 34%,transparent 66%),
    linear-gradient(180deg,#03040d 0%,#07071c 36%,#121039 72%,#29145b 100%)!important;
}
.night-star-layer::before{
  content:"";position:absolute;inset:-12%;pointer-events:none;opacity:.42;mix-blend-mode:screen;
  background:
    radial-gradient(ellipse at 20% 20%,rgba(133,104,255,.30),transparent 46%),
    radial-gradient(ellipse at 77% 38%,rgba(214,143,255,.20),transparent 44%),
    radial-gradient(ellipse at 47% 92%,rgba(68,180,255,.16),transparent 48%);
  animation:cosmosDrift 14s ease-in-out infinite alternate;
}
.menu-star{box-shadow:0 0 calc(var(--s,2px) * 4) rgba(214,195,255,.62),0 0 calc(var(--s,2px) * 9) rgba(139,92,255,.18)!important;}
.shooting-star{height:1.6px!important;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.98),rgba(214,195,255,.42),rgba(139,92,255,0))!important;filter:drop-shadow(0 0 7px rgba(214,195,255,.86)) drop-shadow(0 0 13px rgba(139,92,255,.35))!important;}
@keyframes cosmosDrift{from{transform:translate3d(-1.5%,-.8%,0) scale(1)}to{transform:translate3d(1.2%,1.4%,0) scale(1.035)}}


/* Project Prism v0.12 — restore simpler v0.6 zen 2D sky. Cozy, fewer nebula layers. */
.game-screen{
  background:
    radial-gradient(circle at 50% 115%,rgba(110,68,255,.26),transparent 42%),
    linear-gradient(180deg,#050612 0%,#080921 48%,#13103a 78%,#211150 100%)!important;
}
.night-star-layer::before{display:none!important;content:none!important;}
.menu-star{box-shadow:0 0 calc(var(--s,2px) * 3) rgba(195,165,255,.55)!important;}
.menu-star.soft{background:rgba(196,162,255,var(--o,.7))!important;box-shadow:0 0 calc(var(--s,2px) * 4) rgba(139,92,255,.48)!important;}
.shooting-star{height:2px!important;background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.96),rgba(196,162,255,.25))!important;filter:drop-shadow(0 0 6px rgba(196,162,255,.82))!important;}


/* Project Prism v0.48 — stars live only in main menu and fade in cleanly */
.night-star-layer,
.menu-stars,
.star-layer,
#starsLayer{
  opacity:0;
  animation:mainMenuStarsFadeIn 1.05s cubic-bezier(.22,.8,.22,1) .22s forwards;
  will-change:opacity;
}
.menu-star,
.shooting-star{
  animation-delay:var(--star-delay, -.6s);
}
@keyframes mainMenuStarsFadeIn{
  0%{opacity:0;filter:brightness(.76);}
  100%{opacity:1;filter:brightness(1);}
}


/* Project Prism v0.49 — lighter main menu on weak phones */
html.perf-low *{
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;
}
html.perf-low .shooting-star{
  display:none !important;
}
html.perf-low .menu-star{
  box-shadow:none !important;
  animation-duration:4.8s !important;
}
html.perf-low .home-card,
html.perf-low .continue-card,
html.perf-low .level-card,
html.perf-low .settings-panel,
html.perf-low .shop-card{
  filter:none !important;
  box-shadow:0 6px 16px rgba(10,12,28,.10) !important;
}
html.perf-low .play-face::before,
html.perf-low .logo-glow,
html.perf-low .sparkle{
  display:none !important;
}
html.perf-low .night-star-layer{
  opacity:.72;
}
