
body {
  margin:0;
  background: radial-gradient(circle at top, #0f172a, #020617);
  color:white;
  font-family:Arial;
}
.game {
  max-width:420px;
  margin:auto;
  padding:25px;
  padding-bottom: 80px;   /* ВОТ ЭТО ВАЖНО */
  text-align:center;
}

.balance { font-size:18px; margin-bottom:6px; }

.panel {
  margin-top:10px;
  padding:16px;
  border-radius:14px;
  background:rgba(255,255,255,.07);
  box-shadow:0 0 20px rgba(0,0,0,.3);
  text-align:left;
}
.panel div { margin:5px 0; }

.button {
  width:100%;
  padding:14px;
  margin-top:10px;
  border:none;
  border-radius:14px;
  background:linear-gradient(135deg,#2563eb,#3b82f6);
  color:white;
  font-size:17px;
}

.bar-bg {
  background:#0b1224;
  border-radius:10px;
  height:10px;
  overflow:hidden;
}
.bar {
  height:100%;
  width:0%;
  transition:width .5s;
}
.cell-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.cell-btn {
  padding: 8px 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: bold;
  border: none;
  color: white;
}

.bronze { background: linear-gradient(135deg,#92400e,#d97706); }
.silver { background: linear-gradient(135deg,#9ca3af,#e5e7eb); color:#111; }
.gold   { background: linear-gradient(135deg,#facc15,#f59e0b); color:#111; }

.xp-glow {
  box-shadow: 0 0 12px rgba(34,211,238,.8);
}
@keyframes shock {
  0% { box-shadow: 0 0 0 rgba(253,224,71,0); }
  50% { box-shadow: 0 0 25px rgba(253,224,71,.9); }
  100% { box-shadow: 0 0 0 rgba(253,224,71,0); }
}

.impulse-flash {
  animation: shock .6s ease;
}
.training {
  background: linear-gradient(135deg,#22c55e,#16a34a);
  color:white;
}

#result { margin:10px 0; min-height:22px; }

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #0b1224;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  text-align: center;
  padding: 8px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  z-index: 999;
}

.nav-btn {
  color: white;
  font-size: 12px;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.85;
  transition: transform 0.1s ease, background 0.15s ease;
  padding: 6px;
}


.nav-btn span {
  font-size: 20px;
}

.nav-btn.active {
  opacity: 1;
  color: #3b82f6;
}
.button,
.cell-btn {
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.button:active,
.cell-btn:active {
  transform: scale(0.96);
  box-shadow: 0 0 18px rgba(255,255,255,.25);
}

.button.clicked,
.cell-btn.clicked {
  animation: clickFlash 0.25s ease;
}

@keyframes clickFlash {
  0%   { box-shadow: 0 0 0 rgba(255,255,255,0); }
  50%  { box-shadow: 0 0 20px rgba(255,255,255,.7); }
  100% { box-shadow: 0 0 0 rgba(255,255,255,0); }
}
.container {
  max-width: 420px;
  margin: 0 auto;
  padding: 10px;
}

.title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: center;
}

.card {
  background: #111827;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 12px;
}

.label {
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 5px;
}

.ref-row {
  display: flex;
  gap: 8px;
}

input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background: #0f172a;
  color: white;
}

.btn {
  background: #2563eb;
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 8px;
}

.btn.full {
  width: 100%;
  margin-top: 8px;
}

.stat {
  display: flex;
  justify-content: space-between;
}

.value {
  font-weight: bold;
}

.info {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 8px;
}
.button-row {
  display: flex;
  gap: 10px;
}

.button-row .main-btn {
  flex: 1;
}




/* Эффект нажатия */
.nav-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.08);
}

/* Лёгкая подсветка при касании */
.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Анимация иконки при нажатии */
.nav-btn:active span {
  transform: scale(0.9);
}

/* Активная кнопка */
.nav-btn.active {
  color: #2563eb;
  font-weight: bold;
}

/* Маленький эффект "волны" */
.nav-btn {
  position: relative;
  overflow: hidden;
}

.nav-btn::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.15s;
}

.nav-btn:active::after {
  opacity: 1;
}.game-message {
  margin-top: 12px;
}
#result {
  margin-top: 12px;
  min-height: 22px;
  text-align: center;
  font-size: 15px;
  opacity: 0.95;
}

/* ⓘ Кнопка информации */
.game {
  position: relative; /* 👈 ВАЖНО */
}


.info-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg,#38bdf8,#2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  z-index: 50;
}



.info-btn:active {
  transform: scale(.92);
}

/* 🌑 Затемнение */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

/* 🪟 Окно */
.modal {
  width: 90%;
  max-width: 420px;
  background: #0b1220;
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0,0,0,.8);
  animation: modalIn .25s ease-out;
}

@keyframes modalIn {
  from { transform: scale(.9); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.modal-content {
  padding: 16px;
  font-size: 14px;
  line-height: 1.5;
}

.modal-content ul {
  padding-left: 18px;
  margin: 10px 0;
}

