/* Экраны: меню, карта уровней, игровой интерфейс, окна результата, лавки, наград */

/* ---------- меню ---------- */
#scr-menu {
  background: #ffb347;
}
#menuIn {
  display: flex;
  flex-direction: column;
  padding: 10px 16px 12px;
}
.m-top {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  flex-shrink: 0;
}
.m-top-gap {
  flex: 1;
}
.m-logo {
  text-align: center;
  flex-shrink: 0;
  margin-top: 4px;
}
.logo-1 {
  font-size: 50px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 1px;
  color: #fff3b8;
  text-shadow:
    0 2px 0 #ff8a1a,
    0 4px 0 #c2410c,
    0 6px 0 #7a2408,
    0 10px 16px rgba(60, 16, 0, 0.55);
  animation: logobob 3.2s ease-in-out infinite;
}
.logo-2 {
  display: inline-block;
  margin-top: 8px;
  padding: 5px 16px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  color: #fff7dc;
  background: linear-gradient(180deg, #e2364f, #a81d33);
  border: 2px solid #5c0f1b;
  box-shadow: 0 3px 0 #5c0f1b;
  text-shadow: 0 1px 0 #5c0f1b;
}
@keyframes logobob {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-4px) rotate(1deg);
  }
}
.m-space {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}
.m-progress {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 18px;
  font-size: 15px;
  font-weight: 900;
  color: #ffe07a;
  background: rgba(58, 26, 8, 0.78);
  border: 2px solid #f2b632;
  text-shadow: 0 1px 0 #2a1004;
}
.m-progress svg.ic {
  width: 20px;
  height: 20px;
}
.m-progress span {
  margin-right: 8px;
}
.m-progress span:last-child {
  margin-right: 0;
}
.guest {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0 auto 8px;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #5a2203;
  background: linear-gradient(180deg, #fff3b8, #ffd24a);
  border: 2px solid #9a5d08;
  flex-shrink: 0;
}
.guest.show {
  display: flex;
}
.guest svg.ic {
  width: 20px;
  height: 20px;
}
.m-btns {
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex-shrink: 0;
  margin-bottom: 9px;
}
.m-row-small {
  gap: 7px;
}
.m-btns .m-row .btn {
  font-size: 16px;
  padding: 0 8px;
  gap: 6px;
}
.m-btns .m-row .btn.btn-wide {
  flex: 1.45 1 0;
}
.m-btns .m-row-small .btn {
  font-size: 12.5px;
  padding: 0 4px;
  gap: 3px;
}
.btn .dot {
  position: absolute;
  right: -4px;
  top: -6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: none;
  background: radial-gradient(circle at 35% 30%, #ffb0a0, #e2364f);
  border: 2px solid #fff;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
}
.btn .dot.show {
  display: block;
  animation: dotpulse 1s ease-in-out infinite;
}
@keyframes dotpulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.25);
  }
}

/* ---------- карта уровней ---------- */
#scr-map {
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 255, 255, 0.35) 0, rgba(255, 255, 255, 0) 30%),
    repeating-linear-gradient(45deg, rgba(120, 50, 10, 0.08) 0 14px, rgba(255, 255, 255, 0) 14px 28px),
    linear-gradient(180deg, #ffcf5c 0%, #ff9a3c 55%, #e9583f 100%);
}
.mapwrap {
  display: flex;
  flex-direction: column;
  padding: 10px 12px 10px;
}
.map-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  flex-shrink: 0;
}
.map-title {
  flex: 1;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  color: #fff7dc;
  text-shadow:
    0 2px 0 #a3321d,
    0 4px 8px rgba(60, 16, 0, 0.5);
}
.map-list {
  flex: 1;
  min-height: 0;
  border-radius: 16px;
  padding: 2px 2px 14px;
}
.world {
  position: relative;
  border-radius: 18px;
  padding: 10px 10px 12px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 3px solid var(--wd);
  box-shadow:
    0 4px 0 var(--wd),
    0 8px 12px rgba(40, 10, 0, 0.3);
  background: linear-gradient(160deg, var(--w1) 0%, var(--w2) 100%);
}
.world::before {
  content: '';
  position: absolute;
  right: -34px;
  top: -34px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.4) 0 30%,
    rgba(255, 255, 255, 0.15) 31% 52%,
    rgba(255, 255, 255, 0) 53%
  );
  pointer-events: none;
}
.world-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}
.world-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 19px;
  font-weight: 900;
  color: #fff;
  background: var(--wd);
  border: 2.5px solid #fff7dc;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.world-name {
  flex: 1;
  min-width: 0;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 0 var(--wd);
  line-height: 1.1;
}
.world-sub {
  font-size: 12px;
  font-weight: 700;
  color: #fff7dc;
  text-shadow: 0 1px 0 var(--wd);
  margin-top: 2px;
}
.world-stars {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 5px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 900;
  color: #ffe07a;
  background: rgba(40, 14, 4, 0.55);
  border: 1.5px solid rgba(255, 224, 122, 0.8);
  flex-shrink: 0;
}
.world-stars svg.ic {
  width: 18px;
  height: 18px;
}
.world-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}
.lv {
  position: relative;
  height: 58px;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #4a2609;
  background: linear-gradient(180deg, #fffdf2, #ffe9a8);
  border: 2.5px solid #7a4408;
  box-shadow:
    0 3px 0 #7a4408,
    inset 0 2px 0 #fff;
}
.lv:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #7a4408;
}
.lv .lv-st {
  display: flex;
  gap: 1px;
  margin-top: 1px;
  height: 14px;
}
.lv .lv-st svg {
  width: 13px;
  height: 13px;
}
.lv.cur {
  background: linear-gradient(180deg, #e7ffb8, #9be36a);
  border-color: #1c6b22;
  box-shadow:
    0 3px 0 #1c6b22,
    0 0 0 3px rgba(255, 255, 255, 0.75);
  animation: dotpulse 1.4s ease-in-out infinite;
}
.lv.lock {
  background: linear-gradient(180deg, #d9c9a8, #b8a27a);
  color: #7a6642;
  border-color: #6b5836;
  box-shadow: 0 3px 0 #6b5836;
}
.lv.lock svg.ic {
  width: 24px;
  height: 24px;
}
.world.w-lock {
  filter: saturate(0.45) brightness(0.9);
}

/* ---------- игровой экран ---------- */
#scr-game {
  background: #5a2c10;
}
.hud {
  pointer-events: none;
}
.hud-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 58px;
  padding: 6px 10px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hud-title {
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 4px 9px;
  border-radius: 12px;
  background: rgba(40, 16, 4, 0.6);
  border: 1.5px solid rgba(255, 224, 122, 0.5);
}
#hud-level {
  font-size: 17px;
  font-weight: 900;
  color: #fff7dc;
  text-shadow:
    0 2px 0 #5a2203,
    0 0 6px rgba(0, 0, 0, 0.45);
  line-height: 1.1;
  white-space: nowrap;
}
#hud-world {
  font-size: 12px;
  font-weight: 800;
  color: #ffe07a;
  text-shadow:
    0 1px 0 #5a2203,
    0 0 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hud-moves {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 0 11px 0 6px;
  border-radius: 20px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #2c8f86, #0d5f58);
  border: 2.5px solid #8ff3e3;
  box-shadow: 0 3px 0 #06403b;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1px 0 #06403b;
}
.hud-moves svg.ic {
  width: 24px;
  height: 24px;
}
.hud-moves.low {
  background: linear-gradient(180deg, #ff7a66, #c8273d);
  border-color: #ffd0c8;
  box-shadow: 0 3px 0 #6d1220;
  animation: dotpulse 0.7s ease-in-out infinite;
}
.hud-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  padding: 4px 10px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gbtn {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 1.5px 0 var(--bd);
  pointer-events: auto;
  background: linear-gradient(180deg, var(--b1), var(--b2));
  border: 2.5px solid var(--bd);
  box-shadow:
    0 4px 0 var(--bd),
    0 6px 8px rgba(30, 10, 0, 0.4),
    inset 0 2px 0 rgba(255, 255, 255, 0.55);
}
.gbtn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--bd);
}
.gbtn svg.ic {
  width: 24px;
  height: 24px;
}
.gbtn .lbl {
  white-space: nowrap;
}
.gbtn b {
  position: absolute;
  right: -5px;
  top: -8px;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 12px;
  line-height: 20px;
  text-align: center;
  font-size: 13px;
  color: #fff;
  background: #e2364f;
  border: 2px solid #fff;
  text-shadow: none;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
}
.gbtn.dim {
  filter: grayscale(0.75) brightness(0.9);
}

/* ---------- результат ---------- */
.pn-result {
  width: 330px;
}
.res-stars {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  height: 76px;
  margin-top: 2px;
}
.res-stars .rs {
  width: 58px;
  height: 58px;
}
.res-stars .rs2 {
  width: 74px;
  height: 74px;
}
.res-stars .rs.on {
  animation: starpop 0.5s cubic-bezier(0.2, 1.8, 0.4, 1) both;
}
.res-stars .rs2.on {
  animation-delay: 0.22s;
}
.res-stars .rs3.on {
  animation-delay: 0.44s;
}
@keyframes starpop {
  from {
    transform: scale(0) rotate(-140deg);
  }
  to {
    transform: scale(1) rotate(0);
  }
}
.res-reason {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: #a8253a;
  min-height: 18px;
}
.res-reason.good {
  color: #2a7a22;
}
.res-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.res-cell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 11px;
  border-radius: 11px;
  background: linear-gradient(180deg, #fffdf2, #ffeebe);
  border: 2px solid #c98a2b;
  font-size: 13px;
  font-weight: 700;
  color: #7a5a2c;
}
.res-cell b {
  font-size: 17px;
  font-weight: 900;
  color: #b5500a;
}
.res-melody {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 0 #3d1c73;
  background: linear-gradient(180deg, #b98cff, #7b3fd1);
  border: 2px solid #3d1c73;
}
.res-melody.show {
  display: flex;
  animation: bump 0.5s ease-out;
}
.res-melody svg.ic {
  width: 22px;
  height: 22px;
}
.res-progress {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #7a5a2c;
  min-height: 16px;
}
.pn-result.lose {
  background: linear-gradient(180deg, #ffe9e0 0%, #ffc9b0 100%);
}

/* ---------- лавка ---------- */
.shop-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
}
.shop-head .coinbox {
  align-self: center;
}
.shop-head .tabs {
  flex: none;
}
.shop-head .coinbox {
  height: 36px;
  padding: 0 9px 0 5px;
  font-size: 15px;
}
.shop-head .coinbox svg.ic {
  width: 22px;
  height: 22px;
}
#shop-list {
  height: 292px;
}
.price {
  display: flex;
  align-items: center;
  gap: 3px;
}
.skin-row.sel {
  background: linear-gradient(180deg, #e8f6ff, #b9dcff);
  border-color: #2f6fe4;
  box-shadow: 0 2px 0 #2f6fe4;
}

/* ---------- награды ---------- */
#ach-list {
  height: 300px;
}
.ach-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ach-stats div {
  padding: 5px 4px;
  border-radius: 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #7a5a2c;
  line-height: 1.15;
  background: linear-gradient(180deg, #fffdf2, #ffeebe);
  border: 2px solid #c98a2b;
}
.ach-stats div b {
  display: block;
  font-size: 17px;
  font-weight: 900;
  color: #b5500a;
}
.ach-bar {
  height: 8px;
  border-radius: 4px;
  background: #dcc48f;
  border: 1px solid #a8843f;
  margin-top: 5px;
  overflow: hidden;
}
.ach-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #26c6b0, #9be36a);
}

/* ---------- мелодии ---------- */
#mel-list {
  height: 320px;
}
.mel-info {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #7a5a2c;
}
.mel-row.playing {
  background: linear-gradient(180deg, #f3e6ff, #d6b5ff);
  border-color: #7b3fd1;
  box-shadow: 0 2px 0 #7b3fd1;
}

/* ---------- как играть ---------- */
#howto-list {
  height: 340px;
}
.how {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf2, #ffeebe);
  border: 2px solid #c98a2b;
}
.how + .how {
  margin-top: 8px;
}
.how svg.ic {
  width: 40px;
  height: 40px;
}
.how b {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: #4a2609;
}
.how span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #6b4a22;
  line-height: 1.25;
  margin-top: 2px;
}

/* ---------- подсказки-окна, подарок ---------- */
.tip-pic {
  display: flex;
  justify-content: center;
}
.tip-pic svg.ic {
  width: 96px;
  height: 96px;
  animation: logobob 2.4s ease-in-out infinite;
  filter: drop-shadow(0 5px 6px rgba(60, 20, 0, 0.35));
}
.tip-text {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #5a3a14;
  line-height: 1.3;
}
.daily-gift {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.daily-gift svg.ic.big {
  width: 64px;
  height: 64px;
  animation: logobob 1.6s ease-in-out infinite;
}
.daily-gift .btn,
#daily-play {
  align-self: stretch;
  flex: 0 0 auto;
}
#daily-play {
  font-size: 19px;
  min-height: 54px;
}
#daily-play svg.ic {
  width: 28px;
  height: 28px;
}
.daily-text {
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  color: #5a3a14;
  line-height: 1.25;
}
.daily-days {
  display: flex;
  gap: 5px;
}
.daily-days i {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  color: #7a5a2c;
  background: #f3dfae;
  border: 2px solid #c98a2b;
}
.daily-days i.on {
  color: #fff;
  background: linear-gradient(180deg, #a8ec5c, #3fae3a);
  border-color: #1c6b22;
  text-shadow: 0 1px 0 #1c6b22;
}
.daily-days i.now {
  color: #5a2c05;
  background: linear-gradient(180deg, #fff0a0, #ffbf2e);
  border-color: #8a4b10;
  box-shadow: 0 0 0 2px #fff;
}
.daily-sep {
  height: 3px;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, #c98a2b 0 8px, rgba(0, 0, 0, 0) 8px 14px);
}

#ov-settings .btn {
  font-size: 15px;
  padding: 0 8px;
}
#ov-settings .btn[data-act='privacy'] {
  font-size: 13px;
  gap: 5px;
  padding: 0 4px;
}
#ov-settings .btn[data-act='privacy'] svg.ic {
  width: 20px;
  height: 20px;
}
/* ---------- вступление ---------- */
#scr-intro {
  background: #0c0838;
}
.intro-skip {
  position: absolute;
  right: 10px;
  top: 8px;
  width: 150px;
  flex: none;
  height: 46px;
  opacity: 0.92;
}
