/* =====================================================================
   SUDOKA — стили игры «Zuma»
   Тёмная тема шутера с шариками.
   Внешние запросы отсутствуют.
   ===================================================================== */

/* ---------- Игровой контейнер ---------- */
.zuma-page { max-width: 900px; margin-inline: auto; }
.zuma-head { text-align: center; margin-bottom: 1rem; }
.zuma-head h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.zuma-head p { color: var(--ink-muted); max-width: 46ch; margin: .35rem auto 0; }

.zuma-root {
  position: relative;
  width: 100%;
  aspect-ratio: 1200 / 800;
  border-radius: var(--radius);
  overflow: hidden;
  background: radial-gradient(circle at center, #002129, #000);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ---------- Сброс внутри игры ---------- */
.zuma-root * {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Контейнер игрового поля ---------- */
.zuma-game-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.zuma-game {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
}

/* ---------- Декоративная тень ---------- */
.zuma-shadow {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-image: radial-gradient(circle at center, rgba(0,33,41,0), rgba(0,0,0,.8));
  z-index: 20;
  pointer-events: none;
}

/* ---------- Игрок (лягушка) ---------- */
.zuma-player {
  width: 175px;
  height: 175px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 11;
}

.zuma-player::before {
  content: "";
  display: block;
  width: 2px;
  height: 600px;
  margin-left: -1px;
  position: absolute;
  left: 50%;
  bottom: 30px;
  background-image: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.5));
  z-index: 1;
}

.zuma-player::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 175 175'%3E%3Cg%3E%3Ccircle cx='87.5' cy='87.5' r='87.5' opacity='.34'/%3E%3Cpath d='M72.821 26.814L25.726 58.923c-8.903 6.07-12.636 17.352-9.11 27.535l17.352 50.115c3.329 9.614 12.384 16.061 22.558 16.061h59.485c10.174 0 19.229-6.448 22.558-16.061l17.352-50.115c3.526-10.182-.207-21.465-9.11-27.535L99.716 26.814C91.604 21.284 80.933 21.284 72.821 26.814z' fill='%2383BE7C'/%3E%3Ccircle cx='86.11' cy='81.429' r='59.062' fill='%23A2E79D'/%3E%3Cpath d='M86.11 58.095c18.175 0 34.429-5.677 45.264-14.605-10.834-12.913-27.089-21.125-45.264-21.125s-34.429 8.212-45.264 21.125C51.681 52.418 67.935 58.095 86.11 58.095z' fill='%23C7E7C3'/%3E%3Ccircle cx='34.582' cy='48.859' r='19.688' fill='%23A2E79D'/%3E%3Ccircle cx='135.207' cy='44.97' r='19.688' fill='%23A2E79D'/%3E%3Cellipse cx='138.439' cy='36.549' rx='8.321' ry='11.771' transform='rotate(75.9 138.439 36.549)' fill='%23A2E79D'/%3E%3Cellipse cx='32.207' cy='41.47' rx='11.771' ry='9.271' transform='rotate(22.1 32.207 41.47)' fill='%23A2E79D'/%3E%3Cpath d='M130.673 139.956c-1.866-2.02-1.74-5.199.28-7.066l19.098-17.643c2.02-1.866 5.199-1.74 7.066.28 1.866 2.02 1.74 5.199-.28 7.066l-19.098 17.643c-2.02 1.866-5.199 1.74-7.066-.28z' fill='%2383BE7C'/%3E%3Cpath d='M130.038 138.154c-.814-2.627.67-5.442 3.296-6.256l24.835-7.694c2.627-.814 5.442.67 6.256 3.296.814 2.627-.67 5.442-3.296 6.256l-24.835 7.694c-2.627.814-5.442-.67-6.256-3.296z' fill='%2383BE7C'/%3E%3Cpath d='M43.404 141.356c-1.17 2.489-4.163 3.568-6.652 2.398l-23.53-11.06c-2.489-1.17-3.568-4.163-2.398-6.652 1.17-2.489 4.163-3.568 6.652-2.398l23.53 11.06c2.489 1.17 3.568 4.163 2.398 6.652z' fill='%2383BE7C'/%3E%3Cpath d='M41.974 142.622c-2.128 1.742-5.294 1.426-7.036-.701l-16.47-20.118c-1.742-2.128-1.426-5.294.702-7.036 2.128-1.742 5.294-1.426 7.036.702l16.47 20.118c1.742 2.128 1.426 5.294-.702 7.036z' fill='%2383BE7C'/%3E%3C/g%3E%3C/svg%3E");
  z-index: 2;
}

.zuma-player .zuma-marble-1,
.zuma-player .zuma-marble-2 {
  position: absolute;
  z-index: 3;
}

.zuma-player .zuma-marble-1 {
  width: 60px;
  height: 60px;
  border-radius: 100px;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.zuma-player .zuma-marble-2 {
  width: 20px;
  height: 20px;
  border-radius: 100px;
  left: 50%;
  border: solid 5px #83be7c;
}

.zuma-player .zuma-marble-2:nth-child(2) {
  top: 85px;
  transform: translateX(calc(-50% - 30px));
}

.zuma-player .zuma-marble-2:nth-child(3) {
  width: 25px;
  height: 25px;
  top: 105px;
  transform: translateX(-50%);
}

.zuma-player .zuma-marble-2:nth-child(4) {
  top: 85px;
  transform: translateX(calc(-50% + 30px));
}

/* ---------- Дырки ---------- */
.zuma-start-hole {
  width: 100px;
  height: 100px;
  border-radius: 100px;
  background-color: black;
  position: absolute;
  transform: translate(-50%, -50%);
}

.zuma-final-hole {
  width: 100px;
  height: 100px;
  border-radius: 100px;
  background-color: rgba(0,0,0,.5);
  position: absolute;
  transform: translate(-50%, -50%);
}

/* ---------- Шарики ---------- */
.zuma-marble {
  background-color: rgba(0,0,0,.5);
  border-radius: 100px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

/* ---------- Счёт ---------- */
.zuma-score {
  position: absolute;
  bottom: 40px;
  right: 40px;
  color: #fff;
  text-align: right;
  z-index: 19;
}

.zuma-score .zuma-score-title {
  font-size: 16px;
}

.zuma-score .zuma-score-num {
  font-size: 90px;
}

/* ---------- Всплывающие окна ---------- */
.zuma-popups {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #002129;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 19;
  pointer-events: none;
}

.zuma-popups .zuma-popup {
  min-width: 300px;
  padding: 50px 40px 30px;
  border-radius: 30px;
  opacity: 0;
  background-color: rgba(255,255,255,.8);
  position: absolute;
  transform: translateY(20px);
  transition: .2s;
  pointer-events: none;
  z-index: 1;
}

.zuma-popups .zuma-popup::after {
  content: "";
  display: block;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border: solid 5px #002129;
  border-radius: 30px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.zuma-popups .zuma-popup .zuma-popup-title {
  font-size: 30px;
  text-align: center;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.zuma-popups .zuma-popup .zuma-popup-info {
  font-size: 16px;
  color: #002129;
  text-align: center;
}

.zuma-popups .zuma-popup .zuma-popup-info ul {
  list-style-type: disc;
  padding-left: 1em;
  text-align-last: left;
}

.zuma-popups .zuma-popup .zuma-popup-info ul li {
  margin-top: 10px;
}

.zuma-popups .zuma-popup .zuma-popup-info .zuma-popup-num {
  font-size: 24px;
  font-weight: bold;
}

.zuma-popups .zuma-popup .zuma-popup-buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  align-content: center;
  margin-top: 30px;
}

.zuma-popups .zuma-popup .zuma-popup-buttons .zuma-btn {
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  text-align: center;
  letter-spacing: 1px;
  background-color: #002129;
  border-radius: 100px;
  padding: 15px 30px 10px;
  cursor: pointer;
  font-family: inherit;
}

.zuma-popups .zuma-popup .zuma-popup-buttons .zuma-btn--secondary {
  padding: 0;
  margin-top: 15px;
  font-size: 14px;
  font-weight: bold;
  color: #002129;
  background-color: transparent;
}

.zuma-popups .zuma-popup.zuma-popup--active {
  opacity: 1;
  transform: translateY(0px);
  pointer-events: auto;
}

.zuma-popups .zuma-popup.zuma-popup--active ~ .zuma-popup-mask {
  opacity: 1;
}

.zuma-popups .zuma-popup-mask {
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,.5);
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: .5s;
  pointer-events: none;
}

/* ---------- Подсказки ---------- */
.zuma-help {
  text-align: center;
  color: var(--ink-muted);
  font-size: .9rem;
  margin-top: .75rem;
}

.zuma-help kbd {
  display: inline-block;
  font-family: inherit;
  font-size: .85em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 .35em;
}
