/* ==========================================================================
   Игры: Краш и Мины
   ========================================================================== */
:root {
  --stage-a: #f4f9fe;
  --stage-b: #e2effa;
  --stage-dot: rgba(70, 162, 223, .16);
  --tile-a: #ffffff;
  --tile-b: #edf3fa;
  --tile-edge: #d3e1ee;
  --gold: #e3a400;
  --gold-soft: #fff4d6;
}
:root[data-theme="dark"] {
  --stage-a: #1f2c3a;
  --stage-b: #172330;
  --stage-dot: rgba(98, 177, 239, .14);
  --tile-a: #2a394a;
  --tile-b: #233142;
  --tile-edge: #15202b;
  --gold-soft: #3a3020;
}

.casino-page .page { padding-bottom: 40px; }

/* ---------- Верхняя панель игры ---------- */
.cg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 0; }
.cg-balance {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 8px; border-radius: 20px;
  background: var(--card); font-size: 15px; font-variant-numeric: tabular-nums; min-width: 0;
}
.cg-balance b { font-weight: 700; }
.cg-balance > .ic { width: 18px; height: 18px; color: var(--hint); }
.cg-balance span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cg-tools { display: flex; gap: 8px; flex: none; }
.cg-tool { width: 40px; height: 40px; border-radius: 50%; background: var(--card); color: var(--link); display: flex; align-items: center; justify-content: center; }
.cg-tool .ic { width: 21px; height: 21px; }
.cg-tool:active { transform: scale(.92); }

/* ---------- История множителей ---------- */
.xchips-row { display: flex; gap: 6px; padding: 12px 16px 0; overflow-x: auto; scrollbar-width: none; }
.xchips-row::-webkit-scrollbar { display: none; }
.xchip { flex: none; height: 28px; padding: 0 10px; border-radius: 14px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.xchip.gray { background: var(--bg2); color: var(--hint); }
.xchip.blue { background: var(--accent-soft); color: var(--link); }
.xchip.green { background: var(--green-soft); color: var(--green); }
.xchip.gold { background: var(--gold-soft); color: var(--gold); }
.xchip.fresh { animation: chipIn .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes chipIn { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Сцена краша ---------- */
.crash-stage {
  position: relative; margin: 12px 16px 0; height: 270px; border-radius: 24px; overflow: hidden;
  background:
    radial-gradient(var(--stage-dot) 1.2px, transparent 1.3px) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--stage-a) 0%, var(--stage-b) 100%);
  border: 1px solid var(--accent-soft2);
  transition: background-color .4s, border-color .4s;
}
.crash-stage.flying { animation: stageMove 1.6s linear infinite; }
@keyframes stageMove { to { background-position: -22px 22px, 0 0; } }
.crash-stage.crashed { border-color: color-mix(in srgb, var(--red) 45%, transparent); }
.crash-stage.crashed::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--red) 22%, transparent), transparent 65%); animation: flash .9s ease-out; pointer-events: none; }
@keyframes flash { from { opacity: 1; } to { opacity: .35; } }
.crash-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.crash-plane { position: absolute; left: 0; top: 0; width: 70px; height: 70px; will-change: transform; z-index: 2; pointer-events: none; }
.crash-plane .sticker { pointer-events: none; }
.crash-stage:not(.flying):not(.crashed) .crash-plane .sticker { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.crash-plane.gone { transition: transform 1s cubic-bezier(.5, 0, .9, .4), opacity 1s; opacity: 0; }
.crash-center { position: absolute; left: 0; right: 0; top: 34%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; z-index: 1; }
.crash-mult { font-size: 52px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--text); text-shadow: 0 2px 18px color-mix(in srgb, var(--bg) 80%, transparent); line-height: 1; }
.crash-mult.wait { font-size: 40px; color: var(--link); }
.crash-mult.won { color: var(--green); }
.crash-mult.crashed { color: var(--red); animation: crashShake .5s; }
@keyframes crashShake { 20%, 60% { transform: translateX(-7px) rotate(-2deg); } 40%, 80% { transform: translateX(7px) rotate(2deg); } }
.crash-sub { font-size: 14px; font-weight: 600; color: var(--hint); }
.crash-bar { width: 140px; height: 5px; border-radius: 3px; background: var(--accent-soft2); overflow: hidden; margin-top: 6px; }
.crash-stage:not(.flying):not(.crashed) .crash-bar { opacity: 1; }
.crash-stage.flying .crash-bar, .crash-stage.crashed .crash-bar { opacity: 0; }
.crash-bar i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 3px; }
.crash-online { position: absolute; right: 12px; top: 12px; z-index: 2; display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: color-mix(in srgb, var(--bg) 75%, transparent); backdrop-filter: blur(6px); font-size: 12.5px; font-weight: 600; color: var(--text2); }
.crash-online i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.crash-bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.bubble {
  position: absolute; padding: 4px 9px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--bg); color: var(--text2); box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
  animation: bubbleUp 1.8s ease-out forwards;
}
.bubble.me { background: var(--green); color: #fff; font-size: 15px; padding: 6px 12px; border-radius: 12px; }
@keyframes bubbleUp { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { transform: translateY(-10px) scale(1); opacity: 1; } 100% { transform: translateY(-70px); opacity: 0; } }

/* ---------- Панель ставки ---------- */
.bet-card { margin: 12px 16px 0; padding: 14px; border-radius: 20px; display: flex; flex-direction: column; gap: 12px; }
.bet-box { display: flex; flex-direction: column; gap: 8px; transition: opacity .2s; }
.bet-box.locked, .mines-count.locked { opacity: .55; pointer-events: none; }
.bet-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; color: var(--text2); }
.bet-label .muted { font-weight: 400; font-size: 13.5px; }
.bet-row { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px 0 12px; border-radius: 14px; background: var(--field-bg); border: 1px solid var(--input-border); transition: border-color .15s, box-shadow .15s; }
.bet-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.bet-input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }
.bet-unit { color: var(--hint); font-weight: 600; font-size: 15px; }
.bet-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mines-count .bet-quick { grid-template-columns: repeat(5, 1fr); }
.bet-quick button { height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--link); font-weight: 700; font-size: 14px; transition: transform .1s, background .15s, color .15s; }
.bet-quick button:active { transform: scale(.94); }
.bet-quick button.on { background: var(--accent); color: #fff; }

.auto-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auto-toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; cursor: pointer; }
.auto-x { display: flex; align-items: center; gap: 4px; height: 42px; width: 118px; padding: 0 12px; border-radius: 12px; background: var(--field-bg); border: 1px solid var(--input-border); transition: opacity .2s; }
.auto-x span { color: var(--hint); font-weight: 700; }
.auto-x input { width: 100%; border: 0; outline: 0; background: none; font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums; }
.auto-x.off { opacity: .45; }

.crash-btn { height: 58px; flex-direction: column; gap: 0; font-size: 17px; border-radius: 16px; }
.crash-btn small { font-size: 13px; font-weight: 600; opacity: .85; }
.crash-btn small:empty { display: none; }
.btn-cash { color: #fff; background: linear-gradient(180deg, #3fc062 0%, #27a046 100%); box-shadow: 0 6px 18px color-mix(in srgb, var(--green) 35%, transparent); animation: cashGlow 1.2s ease-in-out infinite; }
.btn-cash[disabled] { animation: none; opacity: .5; box-shadow: none; }
@keyframes cashGlow { 50% { box-shadow: 0 6px 28px color-mix(in srgb, var(--green) 65%, transparent); filter: brightness(1.06); } }
.btn-cancel { background: var(--red-soft); color: var(--red); }
.crash-note { text-align: center; min-height: 0; }
.crash-note:empty { display: none; }

/* ---------- Игроки раунда ---------- */
.players-card { margin: 16px 16px 0; padding: 12px 14px 6px; border-radius: 20px; background: var(--card); }
.pc-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 6px; }
.pl-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 86px; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; border-top: 1px solid var(--sep); transition: background .3s, opacity .3s; }
.pc-head + div .pl-row:first-child { border-top: 0; }
.pl-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-bet { color: var(--hint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-res { display: flex; flex-direction: column; align-items: flex-end; font-variant-numeric: tabular-nums; line-height: 1.15; }
.pl-res i { font-style: normal; font-size: 12px; }
.pl-row.won { animation: rowWin .6s; }
@keyframes rowWin { from { background: color-mix(in srgb, var(--green) 18%, transparent); } }
.pl-row.lost { opacity: .5; }
.pl-row.me .pl-name { color: var(--link); }

/* ---------- Списки игр ---------- */
.gb-list { padding: 0 16px; }
.gb-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--sep); font-size: 14.5px; }
.gb-row > b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gb-ic { width: 38px; height: 38px; border-radius: 12px; flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.gb-ic .ic { width: 21px; height: 21px; }
.gb-ic.crash { background: linear-gradient(180deg, #5cb7f2, #2d8bd8); }
.gb-ic.mines { background: linear-gradient(180deg, #c27bff, #7b45e8); }
.gb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gb-main b { font-weight: 600; }
.casino-foot { text-align: center; padding: 22px 24px 0; line-height: 1.4; }

/* ---------- Мины ---------- */
.mines-card {
  margin: 12px 16px 0; padding: 14px; border-radius: 24px;
  background: linear-gradient(180deg, var(--stage-a) 0%, var(--stage-b) 100%);
  border: 1px solid var(--accent-soft2);
  transition: background .4s, border-color .4s;
}
.mines-card.lost { border-color: color-mix(in srgb, var(--red) 50%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--red) 12%, var(--stage-a)), var(--stage-b)); }
.mines-card.shake { animation: boardShake .45s; }
@keyframes boardShake { 15%, 55% { transform: translate(-6px, 2px); } 35%, 75% { transform: translate(6px, -2px); } }
.mines-stats { display: flex; gap: 8px; margin-bottom: 12px; }
.mstat { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 17px; background: var(--bg); font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 1px 4px rgba(0, 0, 0, .05); }
.mstat .ic { width: 18px; height: 18px; color: var(--red); }
.mstat.gemc .ic { color: var(--link); }
.mstat.mult { margin-left: auto; color: var(--text); transition: background .25s, color .25s; }
.mstat.mult.hot { background: var(--green); color: #fff; animation: multPop .35s; }
@keyframes multPop { 50% { transform: scale(1.12); } }

.mines-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; perspective: 600px; }
.mtile {
  position: relative; aspect-ratio: 1; border-radius: 14px;
  background: linear-gradient(180deg, var(--tile-a) 0%, var(--tile-b) 100%);
  box-shadow: 0 3px 0 var(--tile-edge), 0 6px 14px rgba(45, 133, 208, .08);
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, box-shadow .12s, opacity .3s;
  transform-style: preserve-3d;
}
.mtile::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--accent-soft2); transition: transform .2s; }
.mtile:hover::after { transform: scale(1.4); }
.mines-grid:not(.idle) .mtile:not(.open):hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--tile-edge), 0 10px 18px rgba(45, 133, 208, .14); }
.mines-grid:not(.idle) .mtile:not(.open):active { transform: translateY(2px); box-shadow: 0 1px 0 var(--tile-edge); }
.mtile.open::after, .mtile.dim::after { display: none; }
.mt-face { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.mt-face svg { width: 66%; height: 66%; }
.mtile.flip { animation: flipOut .14s ease-in forwards; }
@keyframes flipOut { to { transform: rotateY(90deg) scale(.95); } }
.mtile.open.gem { background: linear-gradient(180deg, #e2f2fe 0%, #c7e3fa 100%); box-shadow: 0 3px 0 #a9cfee, 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent) inset; }
:root[data-theme="dark"] .mtile.open.gem { background: linear-gradient(180deg, #24435f 0%, #1c3550 100%); box-shadow: 0 3px 0 #10202f; }
.mtile.pop { animation: flipIn .3s cubic-bezier(.2, 1.5, .4, 1); }
.mtile.pop .mt-face svg { animation: gemPop .45s cubic-bezier(.2, 1.6, .4, 1); filter: drop-shadow(0 3px 6px rgba(43, 134, 214, .45)); }
@keyframes flipIn { from { transform: rotateY(-90deg); } to { transform: none; } }
@keyframes gemPop { from { transform: scale(.2) rotate(-25deg); } to { transform: none; } }
.spark { position: absolute; inset: -4px; border-radius: 16px; pointer-events: none; }
.spark::before, .spark::after { content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px 3px #8fd8ff; animation: spark .6s ease-out forwards; }
.spark::after { animation-delay: .08s; box-shadow: 0 0 10px 3px #ffe58a; }
@keyframes spark { from { transform: scale(.2); opacity: 1; } to { transform: translate(var(--sx, 18px), var(--sy, -22px)) scale(0); opacity: 0; } }
.spark::after { --sx: -20px; --sy: 16px; }
.mtile.open.mine, .mtile.hit { background: linear-gradient(180deg, #ff8f84 0%, #e5534b 100%); box-shadow: 0 3px 0 #b8362f, 0 8px 22px rgba(229, 83, 75, .4); }
.mtile.boom::before { content: ''; position: absolute; inset: -10px; border-radius: 50%; border: 4px solid #ffb526; animation: boom .6s ease-out forwards; }
.mtile.boom .mt-face svg { animation: bombIn .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes boom { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
@keyframes bombIn { from { transform: scale(1.8); } to { transform: none; } }
.mtile.dim { opacity: .5; box-shadow: 0 2px 0 var(--tile-edge); }
.mtile.dim .mt-face svg { width: 52%; height: 52%; }
.mtile.dim.mine { background: linear-gradient(180deg, #ffe5e2, #fbd0cc); }
:root[data-theme="dark"] .mtile.dim.mine { background: linear-gradient(180deg, #4a2a2d, #3c2326); }
.mtile.reveal { animation: fadeTile .35s both; }
@keyframes fadeTile { from { opacity: 0; transform: scale(.7); } }
.mtile.nudge { animation: nudge .3s; }
@keyframes nudge { 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.mines-grid.start .mtile { animation: tileIn .38s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i, 0) * 14ms); }
@keyframes tileIn { from { transform: scale(.5); opacity: 0; } }
.mines-info { text-align: center; font-size: 14.5px; margin-top: 12px; color: var(--text2); min-height: 20px; }

.ms-strip { display: flex; gap: 6px; padding: 12px 16px 2px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.ms-strip::-webkit-scrollbar { display: none; }
.ms-chip { flex: none; display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 4px; border-radius: 16px; background: var(--card); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text2); transition: background .25s, color .25s; }
.ms-chip i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: var(--hint); }
.ms-chip.done { background: var(--green-soft); color: var(--green); }
.ms-chip.cur { background: var(--accent); color: #fff; }
.ms-chip.cur i { color: var(--link); }

.mines-count { display: flex; flex-direction: column; gap: 10px; transition: opacity .2s; }
.mines-count .bet-label b { font-size: 17px; color: var(--link); }
.mines-count input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; outline: 0;
  background: linear-gradient(90deg, var(--accent) 0 var(--p, 10%), var(--accent-soft2) var(--p, 10%) 100%);
}
.mines-count input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); cursor: pointer; }
.mines-count input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); cursor: pointer; }
.mines-btns { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; }
.mines-btns .btn { height: 54px; border-radius: 16px; }
[data-actions] .btn-block { height: 54px; border-radius: 16px; }

/* ---------- Лобби ---------- */
.casino-hero {
  position: relative; overflow: hidden; margin: 12px 16px 0; padding: 18px 18px 16px; border-radius: 26px; color: #fff;
  background: linear-gradient(135deg, #52b3ee 0%, #2d82d4 52%, #5d5ce8 100%);
  box-shadow: 0 12px 30px rgba(45, 130, 212, .28);
}
.ch-glow { position: absolute; inset: -40%; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .35), transparent 40%), radial-gradient(circle at 80% 70%, rgba(255, 210, 120, .3), transparent 35%); animation: glow 8s ease-in-out infinite alternate; pointer-events: none; }
@keyframes glow { to { transform: translate(8%, 6%) rotate(12deg); } }
.ch-text { position: relative; max-width: 62%; }
.ch-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; background: rgba(255, 255, 255, .2); font-size: 12.5px; font-weight: 600; }
.ch-badge .ic { width: 16px; height: 16px; }
.casino-hero h1 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin-top: 10px; }
.casino-hero p { font-size: 14px; line-height: 1.35; opacity: .92; margin-top: 4px; }
.ch-art { position: absolute; right: 6px; top: 6px; animation: floaty 3.2s ease-in-out infinite; }
@keyframes floaty { 50% { transform: translateY(-8px) rotate(3deg); } }
.ch-bal { position: relative; display: flex; gap: 8px; margin-top: 16px; }
.ch-coin { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px 0 10px; border-radius: 16px; background: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); color: #fff; text-align: left; }
.ch-coin .ch-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-coin small { font-size: 12px; opacity: .8; }
.ch-amt { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.ch-amt b { overflow: hidden; text-overflow: ellipsis; }
.ch-amt i { font-style: normal; font-size: 13px; font-weight: 600; opacity: .85; flex: none; }
.ch-coin b { font-size: 18px; font-weight: 800; }
.ch-coin > .ic { width: 18px; height: 18px; opacity: .8; }
.ch-btn { width: 52px; height: 52px; border-radius: 16px; background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.ch-btn .ic { width: 24px; height: 24px; }
.ch-btn:active, .ch-coin:active { transform: scale(.96); }

.games { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 16px 0; }
.game-card { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--card); transition: transform .15s; box-shadow: 0 6px 18px rgba(20, 40, 80, .06); }
.game-card:active { transform: scale(.97); }
.gc-art { position: relative; height: 118px; overflow: hidden; }
.gc-crash .gc-art { background: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.2px) 0 0 / 16px 16px, linear-gradient(160deg, #47a6ea 0%, #1f5fb3 100%); animation: stageMove 2.4s linear infinite; }
.gc-curve { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }
.gc-curve path { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 220; stroke-dashoffset: 220; animation: draw 3s ease-in infinite; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .8)); }
@keyframes draw { 0% { stroke-dashoffset: 220; opacity: 1; } 75% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.gc-plane { position: absolute; left: -10px; bottom: -14px; animation: flyCard 3s ease-in infinite; }
@keyframes flyCard { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 75% { transform: translate(100px, -84px) rotate(-18deg); opacity: 1; } 100% { transform: translate(150px, -130px) rotate(-24deg); opacity: 0; } }
.gc-mines .gc-art { background: radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .25), transparent 40%), linear-gradient(160deg, #b36cf6 0%, #5a3dd8 100%); display: flex; align-items: center; justify-content: center; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 28px); gap: 6px; transform: rotate(-8deg); }
.mini-tile { width: 28px; height: 28px; border-radius: 8px; background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.mini-tile svg { width: 72%; height: 72%; opacity: 0; }
.mini-tile.g, .mini-tile.b { animation: miniFlip 3.2s infinite; }
.mini-tile.g svg, .mini-tile.b svg { animation: miniShow 3.2s infinite; animation-delay: inherit; }
.mini-tile.b { animation-name: miniFlipB; }
@keyframes miniFlip { 0%, 30% { background: rgba(255, 255, 255, .22); transform: none; } 38% { transform: rotateY(90deg); } 46%, 90% { background: rgba(255, 255, 255, .92); transform: none; } 100% { background: rgba(255, 255, 255, .22); } }
@keyframes miniFlipB { 0%, 30% { background: rgba(255, 255, 255, .22); transform: none; } 38% { transform: rotateY(90deg); } 46%, 90% { background: #ff8f84; transform: none; } 100% { background: rgba(255, 255, 255, .22); } }
@keyframes miniShow { 0%, 38% { opacity: 0; } 46%, 90% { opacity: 1; } 100% { opacity: 0; } }
.gc-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.gc-body b { font-size: 18px; font-weight: 800; }
.gc-body > span { font-size: 13px; color: var(--hint); line-height: 1.3; }
.gc-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 8px; }
.gc-tags i { font-style: normal; font-size: 11.5px; font-weight: 700; height: 22px; padding: 0 8px; border-radius: 11px; display: inline-flex; align-items: center; gap: 5px; background: var(--bg); color: var(--link); white-space: nowrap; }
.gc-tags i.live em { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gc-tags i.live.wait { color: var(--orange); }
.gc-tags i.live.fly { color: var(--green); }
.gc-tags i.live.fly em { animation: blink 1s infinite; }
.gc-tags i.live.crash { color: var(--red); }
@keyframes blink { 50% { opacity: .2; } }
.gc-tags i.live span { font-variant-numeric: tabular-nums; }

.bonus-card { display: flex; align-items: center; gap: 12px; margin: 14px 16px 0; padding: 10px 14px 10px 8px; border-radius: 20px; background: linear-gradient(90deg, var(--gold-soft), var(--card)); }
.bonus-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bonus-main b { font-size: 16px; }
.bonus-card .btn { height: 38px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-variant-numeric: tabular-nums; }
.bonus-card .btn[disabled] { opacity: .8; }
.bonus-card .btn .ic { width: 16px; height: 16px; }

.casino-stats > div b { font-size: 18px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--red); font-size: 12px; letter-spacing: .06em; }
.live-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: pulseRed 1.4s infinite; }
@keyframes pulseRed { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.feed { margin: 0 16px; padding: 4px 14px; border-radius: 20px; background: var(--card); overflow: hidden; }
.feed-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; }
.feed-row + .feed-row { border-top: 1px solid var(--sep); }
.feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.feed-row > b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.feed-row.new { animation: feedIn .5s cubic-bezier(.2, 1.2, .4, 1); }
@keyframes feedIn { from { transform: translateY(-14px); opacity: 0; background: color-mix(in srgb, var(--green) 14%, transparent); } }
.casino-links { margin-top: 18px; }

/* ---------- Окно выигрыша ---------- */
.win-overlay { position: fixed; inset: 0; z-index: 250; display: flex; align-items: center; justify-content: center; background: rgba(10, 20, 35, .35); backdrop-filter: blur(4px); opacity: 0; transition: opacity .25s; }
.win-overlay.show { opacity: 1; }
.win-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 34px 22px; border-radius: 28px; background: var(--sheet-bg); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); transform: scale(.6); transition: transform .45s cubic-bezier(.2, 1.5, .4, 1); text-align: center; }
.win-overlay.show .win-card { transform: none; }
.win-title { font-size: 18px; font-weight: 700; margin-top: 4px; }
.win-amount { font-size: 32px; font-weight: 800; color: var(--green); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.win-mult { height: 28px; padding: 0 12px; border-radius: 14px; background: var(--green-soft); color: var(--green); font-weight: 800; display: inline-flex; align-items: center; }
.win-fiat { color: var(--hint); font-size: 14px; margin-top: 2px; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 300; }

/* ---------- Честная игра и правила ---------- */
.fair-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.fair-head p { font-size: 14px; line-height: 1.4; }
.rules { display: flex; flex-direction: column; gap: 10px; }
.rule { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; background: var(--card); }
.rule b { font-size: 16px; }
.rule p { font-size: 14px; line-height: 1.45; color: var(--text2); margin-top: 3px; }

@media (max-width: 370px) {
  .crash-mult { font-size: 44px; }
  .games { gap: 8px; }
  .gc-body b { font-size: 16px; }
  .ch-text { max-width: 68%; }
  .casino-hero h1 { font-size: 23px; }
  .pl-row { grid-template-columns: 30px minmax(0, 1fr) auto 72px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .crash-stage.flying, .gc-crash .gc-art, .ch-glow, .ch-art, .gc-plane, .gc-curve path, .mini-tile, .btn-cash { animation: none !important; }
}
