/* Minijuegos — estilo Stake / crypto casino */
.mg-shell {
    background: linear-gradient(180deg, #0b1220 0%, #060a12 100%);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(45, 52, 82, 0.6);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.mg-arena {
    position: relative;
    min-height: 340px;
    background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(16, 185, 129, 0.08) 0%, transparent 70%),
        linear-gradient(180deg, #030711 0%, #0a1428 55%, #0d1f3c 100%);
    overflow: hidden;
}

.mg-arena.av-theme {
    background: radial-gradient(ellipse 70% 50% at 20% 80%, rgba(239, 68, 68, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 55%),
        linear-gradient(180deg, #1a0a2e 0%, #0f0520 45%, #050210 100%);
}

.mg-mult {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: clamp(3.5rem, 12vw, 6rem);
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: 0 0 60px currentColor;
    transition: color 0.15s, transform 0.15s;
}

.mg-mult.pulse {
    animation: mgMultPulse 0.6s ease-in-out infinite;
}

@keyframes mgMultPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.mg-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 8;
}

.mg-status {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
    font-weight: 500;
}

.mg-hist {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.35);
    overflow-x: auto;
    min-height: 40px;
    scrollbar-width: none;
    border-top: 1px solid rgba(45, 52, 82, 0.4);
}

.mg-hist::-webkit-scrollbar { display: none; }

.mg-hist-pill {
    flex-shrink: 0;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid transparent;
}

.mg-controls {
    padding: 16px 18px 18px;
    background: #070d18;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: end;
    border-top: 1px solid rgba(45, 52, 82, 0.35);
}

.mg-lbl {
    font-size: 10px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 5px;
}

.mg-inp {
    width: 100%;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 11px 12px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.mg-inp:focus {
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.mg-chip {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 8px;
    padding: 6px 10px;
    color: #94a3b8;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}

.mg-chip:hover { color: #fff; border-color: #334155; }

.mg-btn-bet {
    flex: 1;
    padding: 13px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    font-weight: 800;
    font-size: 14px;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(16, 185, 129, 0.35);
    transition: transform 0.12s, box-shadow 0.12s;
}

.mg-btn-bet:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 28px rgba(16, 185, 129, 0.45); }
.mg-btn-bet:disabled { opacity: 0.35; cursor: not-allowed; }

.mg-btn-co {
    flex: 1;
    padding: 13px 16px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.08);
    border: 2px solid #10b981;
    color: #34d399;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.mg-btn-co:not(:disabled):hover {
    background: #10b981;
    color: #fff;
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.4);
}

.mg-btn-co:disabled { opacity: 0.2; cursor: not-allowed; }

.mg-btn-pair { display: flex; gap: 8px; }

.mg-rtp {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 9px;
    color: #475569;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 9;
}

.mg-players {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 9;
}

.mg-dot-live {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

/* Mines — gemas 3D */
.mg-mine-cell {
    border-radius: 12px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: not-allowed;
    background: linear-gradient(145deg, #1a2332 0%, #0f1520 100%);
    border: 1px solid #2d3a52;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.04), 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.mg-mine-cell.ready {
    cursor: pointer;
    background: linear-gradient(145deg, #1e2d3d 0%, #121c28 100%);
}

.mg-mine-cell.ready:hover {
    transform: translateY(-3px) scale(1.04);
    border-color: #10b981;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mg-mine-cell.safe {
    background: linear-gradient(145deg, #064e3b 0%, #022c22 100%);
    border-color: #10b981;
    animation: mgGemPop 0.25s ease-out;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
}

.mg-mine-cell.boom {
    background: linear-gradient(145deg, #7f1d1d 0%, #450a0a 100%);
    border-color: #ef4444;
    animation: mgBoom 0.35s ease-out;
}

@keyframes mgGemPop {
    0% { transform: scale(0.7); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes mgBoom {
    0%, 100% { transform: scale(1); }
    30% { transform: scale(1.1) rotate(-4deg); }
    60% { transform: scale(0.95) rotate(4deg); }
}

/* Dice */
.mg-dice-scene {
    min-height: 200px;
    background: radial-gradient(circle at 50% 30%, rgba(16, 185, 129, 0.06) 0%, transparent 55%),
        linear-gradient(180deg, #050d1a, #0a1628);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mg-dice-num {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    font-size: 4.5rem;
    line-height: 1;
    margin-top: 12px;
}

.mg-dice-track {
    position: relative;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

@keyframes floatUp {
    0% { transform: translateY(0) scale(1); opacity: 1; }
    100% { transform: translateY(-80px) scale(0); opacity: 0; }
}

@keyframes crashShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* ── Aviator Spribe-style ── */
.aviator-shell { background: #0a0a0f; }
.av-hist-top {
    display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto;
    background: rgba(0,0,0,0.4); border-bottom: 1px solid rgba(45,52,82,0.35);
    scrollbar-width: none; min-height: 38px;
}
.av-hist-top::-webkit-scrollbar { display: none; }
.av-hist-pill {
    flex-shrink: 0; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06);
}
.av-arena { min-height: 300px; }
.av-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.av-mult-display { color: #fff !important; font-size: clamp(3rem, 10vw, 5.5rem) !important; }
.av-dot { background: #e11d48 !important; }
.av-dual-panels {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    padding: 14px; background: #0d0d14; border-top: 1px solid rgba(45,52,82,0.4);
}
.av-panel {
    background: #14141f; border-radius: 14px; padding: 12px;
    border: 1px solid rgba(45,52,82,0.5);
}
.av-panel-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.av-ptab { font-size: 10px; color: #64748b; font-weight: 700; text-transform: uppercase; }
.av-ptab.on { color: #e11d48; }
.av-amt-row { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.av-amt-btn {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid #334155;
    background: #1e293b; color: #94a3b8; font-size: 18px; cursor: pointer;
}
.av-amt-inp { flex: 1; font-size: 16px !important; }
.av-quick-row { display: flex; gap: 4px; margin-bottom: 8px; }
.av-quick {
    flex: 1; padding: 5px; border-radius: 8px; border: 1px solid #334155;
    background: #1e293b; color: #94a3b8; font-size: 11px; font-weight: 700; cursor: pointer;
}
.av-quick:hover { color: #fff; border-color: #475569; }
.av-auto-inp { margin-bottom: 8px; font-size: 11px !important; padding: 8px !important; }
.av-bet-main {
    width: 100%; padding: 14px; border-radius: 12px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    box-shadow: 0 4px 20px rgba(34,197,94,0.35); margin-bottom: 6px;
}
.av-bet-main:disabled { opacity: 0.35; cursor: not-allowed; }
.av-bet-lbl { font-weight: 900; font-size: 15px; letter-spacing: 0.05em; }
.av-bet-sub { font-size: 10px; opacity: 0.85; }
.av-co-main {
    width: 100%; padding: 10px; border-radius: 12px; cursor: pointer;
    background: rgba(234,179,8,0.12); border: 2px solid #eab308; color: #fde047;
    display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 800; font-size: 12px;
}
.av-co-main:disabled { opacity: 0.2; cursor: not-allowed; }

/* ── Mines neon ── */
.mines-shell { padding: 16px; }
.mines-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.mines-pill-row { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mines-lbl { font-size: 9px; color: #64748b; text-transform: uppercase; letter-spacing: 0.08em; margin-right: 4px; }
.mines-cnt-pill, .mines-size-pill {
    padding: 5px 10px; border-radius: 8px; font-size: 11px; font-weight: 800;
    border: 1px solid #334155; background: #0f172a; color: #94a3b8; cursor: pointer;
}
.mines-cnt-pill.on, .mines-size-pill.on {
    background: rgba(16,185,129,0.15); border-color: #10b981; color: #34d399;
}
.mines-mult-badge {
    margin-left: auto; padding: 6px 14px; border-radius: 10px; font-weight: 900; font-size: 14px;
    background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.35); color: #10b981;
}
.mines-co-btn {
    padding: 8px 16px; border-radius: 10px; border: none; cursor: pointer; font-weight: 800; font-size: 12px;
    background: linear-gradient(135deg, #10b981, #059669); color: #fff;
    box-shadow: 0 0 20px rgba(16,185,129,0.35); animation: mgCoPulse 1.5s infinite;
}
@keyframes mgCoPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(16,185,129,0.3); }
    50% { box-shadow: 0 0 28px rgba(16,185,129,0.55); }
}
.mines-grid { display: grid; gap: 8px; margin-bottom: 14px; max-width: 420px; margin-left: auto; margin-right: auto; }
.mines-controls { grid-template-columns: 1fr auto !important; }
.mg-gem-icon {
    width: 28px; height: 28px; display: block;
    background: linear-gradient(135deg, #67e8f9 0%, #22d3ee 40%, #0891b2 100%);
    clip-path: polygon(50% 0%, 85% 25%, 85% 75%, 50% 100%, 15% 75%, 15% 25%);
    box-shadow: 0 0 16px rgba(34,211,238,0.6);
}
.mg-gem-dim {
    width: 16px; height: 16px; display: block; opacity: 0.15;
    background: #64748b; clip-path: polygon(50% 0%, 85% 25%, 85% 75%, 50% 100%, 15% 75%, 15% 25%);
}
.mg-bomb-icon {
    width: 26px; height: 26px; display: block; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #475569, #0f172a);
    box-shadow: inset 0 -4px 0 #ef4444, 0 0 12px rgba(239,68,68,0.5);
    position: relative;
}
.mg-bomb-icon::after {
    content: '💥'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); font-size: 10px;
}

/* ── Chicken Road ── */
.ck-shell { overflow: hidden; }
.ck-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; background: #0a0f00; border-bottom: 1px solid #1a2e00;
}
.ck-logo { font-weight: 900; font-size: 13px; color: #84cc16; letter-spacing: 0.04em; }
.ck-online { font-size: 11px; color: #64748b; display: flex; align-items: center; gap: 6px; }
.ck-road-canvas { display: block; width: 100%; background: #111; }
.ck-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 12px 16px; }
.ck-stat { background: #0d1a00; border: 1px solid #2a3a00; border-radius: 10px; padding: 10px; text-align: center; }
.ck-stat-lbl { font-size: 9px; color: #4d6600; text-transform: uppercase; letter-spacing: 0.05em; display: block; margin-bottom: 4px; }
.ck-stat-val { font-size: 14px; font-weight: 800; }
.ck-mult { color: #84cc16; }
.ck-win { color: #10b981; }
.ck-diff-row {
    display: flex; gap: 6px; padding: 0 16px 12px; flex-wrap: wrap;
}
.ck-diff-pill {
    flex: 1; min-width: 70px; padding: 8px; border-radius: 10px; font-size: 11px; font-weight: 800;
    border: 1px solid #334155; background: #0f172a; color: #94a3b8; cursor: pointer;
}
.ck-diff-pill.on { background: rgba(132,204,22,0.15); border-color: #84cc16; color: #a3e635; }
.ck-controls {
    display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 16px; background: #080f00;
    border-top: 1px solid #1a2e00; align-items: flex-end;
}
.ck-bet-block { flex: 1; min-width: 140px; }
.ck-quick { display: flex; gap: 4px; margin-top: 6px; }
.ck-co-btn {
    flex: 1; min-width: 100px; padding: 14px 12px; border-radius: 12px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #eab308, #ca8a04); color: #0f172a; font-weight: 900;
    display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px;
}
.ck-co-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.ck-go-btn {
    flex: 1; min-width: 80px; padding: 14px; border-radius: 12px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; font-weight: 900; font-size: 14px;
}
.ck-go-btn:disabled { opacity: 0.25; cursor: not-allowed; }
.ck-start-btn {
    flex: 1; min-width: 100px; padding: 14px; border-radius: 12px; border: none; cursor: pointer;
    background: linear-gradient(135deg, #84cc16, #65a30d); color: #fff; font-weight: 900;
}
.ck-hint { text-align: center; font-size: 10px; color: #334400; padding: 0 16px 12px; margin: 0; }

@keyframes mgShake {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-10px) rotate(-0.5deg); }
    30% { transform: translateX(8px) rotate(0.5deg); }
    45% { transform: translateX(-6px); }
    60% { transform: translateX(5px); }
    75% { transform: translateX(-3px); }
}

.mg-shake { animation: mgShake 0.45s ease-out; }

.mg-mine-cell.safe .mg-gem-icon {
    animation: mgGemSparkle 0.5s ease-out;
}

@keyframes mgGemSparkle {
    0% { transform: scale(0.5) rotate(-20deg); filter: brightness(2); }
    50% { transform: scale(1.2) rotate(10deg); filter: brightness(1.5); }
    100% { transform: scale(1) rotate(0); filter: brightness(1); }
}

.mg-mine-cell.boom .mg-bomb-icon {
    animation: mgBombFlash 0.4s ease-out;
}

@keyframes mgBombFlash {
    0% { transform: scale(0.6); box-shadow: 0 0 0 rgba(239,68,68,0); }
    40% { transform: scale(1.3); box-shadow: 0 0 30px rgba(239,68,68,0.8); }
    100% { transform: scale(1); }
}

.ck-go-btn:not(:disabled):active { transform: scale(0.96); }
.av-bet-main:not(:disabled):active { transform: scale(0.98); }

@media (max-width: 640px) {
    .av-dual-panels { grid-template-columns: 1fr; }
}
