/* ═══ Koi Queen — японский слот 5×3 ═══════════════════════════════ */

.kq {
  --kq-ink: #12161f;
  --kq-red: #e4572e;
  --kq-gold: #f0b429;
  --kq-jade: #2fa08a;
  --cell: 62px;
}

/* ── Рамка барабанов ── */

.kq-stage {
  position: relative;
  padding: 14px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 90% at 50% -20%, rgba(240, 180, 41, .16), transparent 62%),
    var(--surface);
  box-shadow:
    inset 6px 6px 16px var(--shadow-dark),
    inset -6px -6px 16px var(--shadow-light);
  overflow: hidden;
}
.kq-stage::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(115deg, transparent 0 22px, rgba(228, 87, 46, .05) 22px 24px);
  opacity: .55;
}

.kq-frame { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }

.kq-reel {
  position: relative;
  height: calc(var(--cell) * 3);
  overflow: hidden;
  border-radius: 12px;
  background: var(--bg-deep);
  box-shadow: inset 0 5px 11px rgba(0, 0, 0, .3), inset 0 -5px 11px rgba(0, 0, 0, .3);
}
.kq-strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.kq-cell {
  height: var(--cell);
  display: grid; place-items: center;
  font-size: calc(var(--cell) * .52);
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
  transition: transform .3s var(--ease-spring);
}
.kq-cell.lit {
  animation: kqLit .7s var(--ease-spring);
  background: radial-gradient(circle, rgba(240, 180, 41, .3), transparent 70%);
  border-radius: 10px;
}
.kq-cell.dim { opacity: .28; }
@keyframes kqLit {
  0% { transform: scale(1) }
  45% { transform: scale(1.24) }
  100% { transform: scale(1.08) }
}
.kq-cell.wild-drop { animation: kqDrop .55s var(--ease-spring); }
@keyframes kqDrop {
  0% { transform: scale(0) rotate(-160deg); opacity: 0 }
  100% { transform: scale(1) rotate(0); opacity: 1 }
}
.kq-cell.dragon-drop { animation: kqRoar .6s var(--ease-spring); }
@keyframes kqRoar {
  0% { transform: scale(2.4); opacity: 0 }
  60% { transform: scale(.85); opacity: 1 }
  100% { transform: scale(1) }
}

.kq-lines { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.kq-lines path {
  fill: none; stroke: var(--kq-gold); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(240, 180, 41, .8));
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  animation: kqDraw .5s var(--ease-out) forwards;
}
@keyframes kqDraw { to { stroke-dashoffset: 0 } }

/* ── Табло ── */

.kq-banner {
  min-height: 46px; margin-top: 12px; padding: 10px 14px;
  border-radius: var(--r-md); text-align: center;
  display: grid; place-items: center; gap: 2px;
  box-shadow: inset 3px 3px 9px var(--shadow-dark), inset -3px -3px 9px var(--shadow-light);
}
.kq-banner b { font-size: 19px; font-variant-numeric: tabular-nums; }
.kq-banner span { font-size: 12px; color: var(--text-dim); }
.kq-banner.win b { color: var(--green); }
.kq-banner.big b { color: var(--kq-gold); font-size: 26px; animation: pop .5s var(--ease-spring); }

/* ── Ставка+ ── */

.kq-ante {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-md); margin-top: 12px;
  box-shadow: inset 3px 3px 9px var(--shadow-dark), inset -3px -3px 9px var(--shadow-light);
}
.kq-ante .txt { flex: 1; min-width: 0; }
.kq-ante .txt b { display: block; font-size: 15px; }
.kq-ante .txt span { font-size: 12px; color: var(--text-dim); }
.kq-switch {
  width: 54px; height: 32px; flex: none; border: 0; border-radius: 999px;
  background: var(--surface); position: relative; cursor: pointer;
  box-shadow: inset 3px 3px 7px var(--shadow-dark), inset -3px -3px 7px var(--shadow-light);
  transition: background .3s;
}
.kq-switch i {
  position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(160deg, #fff, #ccd3de);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  transition: transform .35s var(--ease-spring);
}
.kq-switch.on { background: linear-gradient(160deg, #ffd76e, var(--kq-gold)); }
.kq-switch.on i { transform: translateX(22px); }

/* ── Пруд с рыбами ── */

#kqOverlay {
  position: fixed; inset: 0; z-index: 150; display: none;
  place-items: center; padding: 24px;
  background: rgba(6, 9, 15, .74); backdrop-filter: blur(16px);
}
#kqOverlay.show { display: grid; animation: fade .35s ease; }
.kq-modal {
  width: 100%; max-width: 340px; text-align: center;
  padding: 26px 22px; border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: 10px 10px 30px rgba(0, 0, 0, .5), inset 0 1px 0 var(--edge);
  animation: pop .5s var(--ease-spring);
}
.kq-modal h3 { margin: 10px 0 4px; font-size: 21px; }
.kq-modal p { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.45; }
.kq-modal .big-em { font-size: 60px; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
.kq-modal .prize { font-size: 30px; font-weight: 760; color: var(--kq-gold); margin-top: 10px;
  font-variant-numeric: tabular-nums; }

.kq-pond { display: flex; justify-content: center; gap: 14px; margin: 22px 0 6px; }
.kq-fish {
  width: 84px; height: 96px; border: 0; border-radius: 20px; cursor: pointer;
  display: grid; place-items: center; font-size: 38px;
  background: linear-gradient(170deg, rgba(47, 160, 138, .32), rgba(20, 70, 90, .5));
  box-shadow: 0 8px 18px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .22);
  animation: kqSwim 2.4s ease-in-out infinite;
  transition: transform .35s var(--ease-spring), opacity .3s;
}
.kq-fish:nth-child(2) { animation-delay: .35s }
.kq-fish:nth-child(3) { animation-delay: .7s }
@keyframes kqSwim { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-9px) } }
.kq-fish.open { animation: none; transform: scale(1.12); }
.kq-fish.gone { animation: none; opacity: .3; transform: scale(.88); }

/* ── Колесо ── */

.kq-wheel-wrap { position: relative; width: 250px; height: 250px; margin: 6px auto 14px; }
.kq-wheel {
  width: 100%; height: 100%; border-radius: 50%;
  transition: transform 4.2s cubic-bezier(.16, .84, .26, 1);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .5));
}
.kq-wheel-pin {
  position: absolute; top: -8px; left: 50%; transform: translateX(-50%);
  font-size: 26px; z-index: 2; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .6));
}
.kq-wheel-hub {
  position: absolute; top: 50%; left: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: radial-gradient(circle at 34% 30%, #ffe9a8, var(--kq-gold) 58%, #a97410);
  box-shadow: 0 5px 14px rgba(0, 0, 0, .5), inset 0 2px 0 rgba(255, 255, 255, .6);
}

/* ── Фриспины ── */

.kq-fs-head { display: flex; justify-content: space-between; align-items: center;
  padding: 10px 4px 12px; font-size: 13px; }
.kq-fs-head b { font-size: 17px; font-variant-numeric: tabular-nums; }
.kq-mult {
  padding: 5px 12px; border-radius: 999px; font-weight: 720; font-size: 15px;
  color: var(--kq-ink); background: linear-gradient(160deg, #ffd76e, var(--kq-gold));
  box-shadow: 0 3px 9px rgba(240, 180, 41, .45);
  transition: transform .3s var(--ease-spring);
}
.kq-mult.up { transform: scale(1.28); }

.kq-pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0 4px; }
.kq-pad {
  aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgba(47, 160, 138, .2); color: var(--text-dim);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25);
  transform: scale(0); animation: kqPad .4s var(--ease-spring) forwards;
}
.kq-pad.value { background: linear-gradient(160deg, #ffd76e, var(--kq-gold)); color: var(--kq-ink); }
.kq-pad.dud { background: rgba(228, 87, 46, .28); color: var(--red); font-size: 20px; }
@keyframes kqPad { to { transform: scale(1) } }

/* ── Таблица выплат ── */

.kq-pay { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center;
  font-size: 13.5px; }
.kq-pay .sym { font-size: 22px; }
.kq-pay .nm { color: var(--text-dim); font-size: 12.5px; }
.kq-pay .vals { font-variant-numeric: tabular-nums; text-align: right; font-size: 12.5px; }
.kq-pay .row { display: contents; }

.kq-wheel-list { display: grid; gap: 10px; }
.kq-wheel-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.kq-wheel-item + .kq-wheel-item { box-shadow: inset 0 1px 0 var(--edge); }
.kq-wheel-item .em { font-size: 26px; flex: none; }
.kq-wheel-item b { font-size: 14.5px; display: block; }
.kq-wheel-item span { font-size: 12.5px; color: var(--text-dim); }
