/* «Кракен: сундук глубин» — подводная сцена, рама, панель управления. */

.kraken { padding: 0; overflow: hidden; }
.kr-stage {
  position: relative;
  padding: 14px 14px 10px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  isolation: isolate;
}
.kr-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }

.kr-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 8px; }
.kr-jps { display: flex; flex-direction: column; gap: 6px; }
.kr-jps:last-child { align-items: flex-end; }
/* Джекпоты: латунные таблички на ржавом металле; цвет джекпота — только тонкая кромка сверху. */
.kr-jp {
  --acc: #c9a14a;
  display: flex; flex-direction: column; align-items: center; min-width: 120px; max-width: 170px; width: 100%;
  padding: 4px 10px 5px; border-radius: 6px;
  background: linear-gradient(180deg, rgba(10, 8, 6, .55), rgba(4, 3, 2, .82)), url(../textures/metal-rust.jpg) center / 180px;
  border: 1px solid rgba(201, 161, 74, .55);
  border-top: 2px solid var(--acc);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 236, 190, .12);
  font-family: Oswald, var(--font);
}
.kr-jp span { font-size: 11px; font-weight: 600; letter-spacing: .22em; color: var(--acc); }
.kr-jp b { font-size: 21px; font-weight: 600; color: #efe4c8; font-variant-numeric: tabular-nums; line-height: 1.15; text-shadow: 0 0 12px rgba(201, 161, 74, .25); }
.kr-jp.grand { --acc: #e0b54a; }
.kr-jp.major { --acc: #b8323f; }
.kr-jp.minor { --acc: #4fb3a8; transform: scale(.92); }
.kr-jp.mini { --acc: #7d9a5a; transform: scale(.92); }

.kr-logo { text-align: center; line-height: 1; display: flex; flex-direction: column; align-items: center; }
.kr-logo:has(.kr-meter:not([hidden])) .kr-logo-sub, .kr-logo:has(.kr-hw:not([hidden])) .kr-logo-sub { display: none; }
.kr-logo-title {
  font-family: "Cormorant SC", Georgia, serif;
  font-weight: 700;
  font-size: 60px;
  letter-spacing: .1em;
  background: linear-gradient(180deg, #f3ead2 0%, #c9a14a 55%, #5e4316 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .9)) drop-shadow(0 0 22px rgba(79, 227, 216, .22));
}
.kr-logo-sub {
  margin-top: 4px; font-family: Oswald, var(--font); font-weight: 400; font-size: 13px; letter-spacing: .5em; text-transform: uppercase;
  color: #6fb7b0; text-shadow: 0 0 10px rgba(79, 227, 216, .35);
}

.kr-meter {
  display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px auto 0; width: fit-content;
  padding: 4px 12px; border-radius: 6px; border: 1px solid rgba(184, 50, 63, .7);
  background: linear-gradient(180deg, rgba(40, 6, 14, .92), rgba(10, 2, 5, .95));
  box-shadow: 0 0 22px rgba(184, 50, 63, .3);
  font-family: Oswald, var(--font);
}
.kr-meter > div:not(.kr-meter-eyes) { display: flex; flex-direction: column; align-items: center; }
.kr-meter span { font-size: 10px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: #ffb3c4; }
.kr-meter b { font-size: 17px; font-weight: 900; color: #fff; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kr-meter-eyes { display: flex; gap: 6px; }
.kr-meter-eyes i {
  width: 22px; height: 15px; border-radius: 50%; display: block;
  background: radial-gradient(ellipse at 50% 50%, #3a0a1e 0 30%, #1a0410 31%);
  border: 2px solid #6e0f33;
  transition: background .3s, box-shadow .3s;
}
.kr-meter-eyes i.on {
  background: radial-gradient(ellipse 18% 70% at 50% 50%, #120000 0 99%, transparent 100%), radial-gradient(circle at 50% 50%, #fff6a8, #ffc53d 50%, #e07000);
  border-color: #ffd45c; box-shadow: 0 0 12px rgba(255, 200, 60, .8);
}

.kr-hw {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin: 8px auto 0; width: fit-content;
  padding: 5px 14px; border-radius: 6px; border: 1px solid rgba(155, 123, 255, .6); background: rgba(10, 6, 24, .9);
  font-family: Oswald, var(--font); font-weight: 500; letter-spacing: .08em; color: #c9bdf0; font-size: 14px;
}
.kr-hw i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #9b7bff; display: block; }
.kr-hw i.on { background: radial-gradient(circle at 35% 30%, #fff, #c9b6ff 50%, #6b4bd6); box-shadow: 0 0 10px rgba(180, 150, 255, .8); }

.kr-reels-box { display: flex; justify-content: center; }
#kr-reels { width: 100%; max-width: 640px; aspect-ratio: 632 / 516; display: block; }

.kr-msg {
  text-align: center; margin-top: 6px; min-height: 1.4em;
  font-family: Oswald, var(--font); font-weight: 500; font-size: 18px; letter-spacing: .12em; text-transform: uppercase;
  color: #e6dcc2; text-shadow: 0 2px 6px #000, 0 0 14px rgba(79, 227, 216, .25);
}

/* Панель */
.kr-bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  padding: 12px 14px; border-top: 1px solid rgba(201, 161, 74, .45);
  background: linear-gradient(180deg, rgba(8, 14, 16, .9), rgba(2, 4, 6, .96)), url(../textures/metal-rust-2.jpg) center / 260px;
  font-family: Oswald, var(--font);
}
.kr-bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kr-stats { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kr-bar-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; min-width: 0; }
.kr-stat { display: flex; flex-direction: column; min-width: 86px; }
.kr-stat span { font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: #7f9c98; }
.kr-stat b { font-size: 20px; font-weight: 600; color: #efe4c8; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kr-bet { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 14px; background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .1); }
.kr-bet .kr-stat { min-width: 76px; text-align: center; align-items: center; }
.kr-bet > button { width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 20px; font-weight: 600; background: radial-gradient(circle at 40% 35%, #4a4030, #15110b); color: #e6d6a8; border: 1px solid rgba(201, 161, 74, .5); }
.kr-bet > button.kr-max { width: auto; border-radius: 999px; padding: 0 10px; font-size: 12px; }
.kr-buy {
  width: 64px; height: 64px; border-radius: 50%; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #d9bb76, #8a6a2e 50%, #3a2a0e);
  border: 2px solid #1a1206; color: #1a1206; font-weight: 600; font-size: 11px; line-height: 1.1; text-transform: uppercase; letter-spacing: .06em;
  box-shadow: 0 0 16px rgba(201, 161, 74, .35), inset 0 -3px 0 rgba(0, 0, 0, .3);
  animation: kr-buy-pulse 2.4s infinite;
}
@keyframes kr-buy-pulse { 50% { box-shadow: 0 0 26px rgba(201, 161, 74, .65), inset 0 -3px 0 rgba(0, 0, 0, .3); } }
.kr-spin {
  width: 82px; height: 82px; border-radius: 50%; padding: 0; flex: none;
  background: radial-gradient(circle at 38% 32%, #3c3a32, #14120e 60%, #050403);
  border: 3px solid #8a6a2e; color: #d9c48e; font-size: 38px; font-weight: 400;
  box-shadow: 0 0 0 2px #050403, 0 0 26px rgba(79, 227, 216, .35), inset 0 0 18px rgba(79, 227, 216, .18);
  transition: transform .1s;
}
.kr-spin span { display: inline-block; line-height: 1; transition: transform .4s; }
.kr-spin:hover span { transform: rotate(90deg); }
.kr-spin:active { transform: scale(.95); }
.kr-spin.busy span { animation: kr-spin 0.7s linear infinite; }
@keyframes kr-spin { to { transform: rotate(360deg); } }
.kr-side { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.kr-small { padding: 8px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; letter-spacing: .06em; background: rgba(0, 0, 0, .45); color: #d8cba6; border: 1px solid rgba(201, 161, 74, .35); }
.kr-small.off { opacity: .45; text-decoration: line-through; }
.kr-small.on { background: linear-gradient(180deg, #8a6a2e, #4a3610); color: #f3ead2; border-color: #c9a14a; }
.kr-auto-wrap { position: relative; }
.kr-auto-menu {
  position: absolute; bottom: calc(100% + 8px); right: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, auto); gap: 6px;
  padding: 10px; border-radius: 14px; background: #0d2438; border: 1px solid rgba(242, 193, 78, .5); box-shadow: 0 12px 30px rgba(0, 0, 0, .6);
}
.kr-auto-menu button { padding: 8px 10px; border-radius: 10px; font-weight: 900; background: rgba(255, 255, 255, .08); color: #fff; }
.kr-auto-menu label { grid-column: 1 / -1; font-size: 12px; color: #cfe7ff; display: flex; gap: 6px; align-items: center; white-space: nowrap; }

/* Окна */
.kr-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 6, 14, .75); }
.kr-dialog {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  padding: 20px; border-radius: 10px; border: 1px solid rgba(201, 161, 74, .6);
  background: linear-gradient(180deg, rgba(8, 18, 22, .96), rgba(2, 5, 7, .98)), url(../textures/stone-sea.jpg) center / 300px;
  color: #e6dcc2; font-family: var(--font);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .7);
}
.kr-dialog.wide { width: min(760px, 100%); }
.kr-dialog h3 { margin: 0 0 14px; font-family: "Cormorant SC", Georgia, serif; font-weight: 700; font-size: 32px; letter-spacing: .06em; color: #d9bb76; }
.kr-dialog h3 small { font-family: Oswald, var(--font); font-size: 13px; color: #8fb7d6; margin-left: 8px; }
.kr-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; }
.kr-buys { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kr-buy-card { padding: 14px; border-radius: 14px; display: flex; flex-direction: column; gap: 8px; }
.kr-buy-card.fs { background: linear-gradient(180deg, #6a0f33, #2a0614); border: 1px solid #ff6b8b; }
.kr-buy-card.hw { background: linear-gradient(180deg, #2b1a6b, #0f0830); border: 1px solid #9b7bff; }
.kr-buy-title { font-family: "Cormorant SC", Georgia, serif; font-weight: 700; font-size: 22px; letter-spacing: .04em; }
.kr-buy-card p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .8); flex: 1; }
.kr-pays { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.kr-pay { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 12px; background: rgba(0, 0, 0, .3); }
.kr-pay img { width: 58px; height: 58px; flex: none; border-radius: 10px; }
.kr-pay div { display: flex; flex-direction: column; font-size: 12px; font-variant-numeric: tabular-nums; }
.kr-pay b { color: #ffd45c; }
.kr-rules { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.kr-rule { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; background: rgba(0, 0, 0, .25); }
.kr-rule img { width: 76px; height: 76px; flex: none; border-radius: 12px; }
.kr-rule p { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.kr-lines { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.kr-line { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; padding: 3px; border-radius: 6px; background: rgba(0, 0, 0, .35); }
.kr-line i { aspect-ratio: 1; display: block; background: rgba(255, 255, 255, .08); border-radius: 1px; }
.kr-line i.on { background: var(--lc); }

@media (max-width: 700px) {
  .kr-logo-title { font-size: 40px; }
  .kr-jp { min-width: 0; padding: 2px 6px 4px; }
  .kr-jp b { font-size: 15px; }
  .kr-jp span { font-size: 9px; }
  .kr-top { gap: 6px; }
  .kr-buys, .kr-pays { grid-template-columns: 1fr 1fr; }
  .kr-lines { grid-template-columns: repeat(5, 1fr); }
  .kr-stat { min-width: 70px; }
  .kr-stat b { font-size: 16px; }
}
@media (max-width: 560px) {
  .kr-bar { grid-template-columns: 1fr auto; }
  .kr-bar-right { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; }
  .kr-spin { grid-column: 2; grid-row: 1; }
}
@media (max-width: 480px) {
  .kr-msg { font-size: 14px; }
  .kr-stage { padding: 10px 6px 8px; }
  .kr-logo-title { font-size: 30px; }
  .kr-logo-sub { font-size: 10px; letter-spacing: .2em; }
  .kr-jp b { font-size: 13px; }
  .kr-bar { gap: 8px; padding: 10px 8px; }
  .kr-spin { width: 70px; height: 70px; font-size: 34px; }
  .kr-buy { width: 54px; height: 54px; font-size: 10px; }
  .kr-buys { grid-template-columns: 1fr; }
}
.kr-buy-card .action { flex: none; min-height: 46px; font-size: 15px; }
.kr-buy-card.fs .action { background: linear-gradient(180deg, #ff8fa8, #c0234a 60%, #7a0f33); color: #fff; }
.kr-buy-card.hw .action { background: linear-gradient(180deg, #c9b6ff, #6b4bd6 60%, #3a2390); color: #fff; }
