.ganancia-espectacular {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    scale: 0.1;
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ganancia-espectacular.ganancia-animada {
    opacity: 1;
    scale: 1;
}

.ganancia-texto {
    text-align: center;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    text-shadow: 0 0 20px currentColor, 0 0 40px currentColor;
    animation: ganancia-pulso 1.0s ease-in-out;
}

.ganancia-titulo {
    font-family: 'Poppins', sans-serif;
    font-size: 4.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        0 0 30px currentColor,
        2px 2px 0px rgba(255, 255, 255, 0.8),
        -2px -2px 0px rgba(255, 255, 255, 0.8),
        2px -2px 0px rgba(255, 255, 255, 0.8),
        -2px 2px 0px rgba(255, 255, 255, 0.8);
    animation: ganancia-rebote 1.2s ease-out;
    position: relative;
}

.ganancia-monto {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.8rem;
    font-weight: 600;
    text-shadow: 
        0 0 10px currentColor,
        0 0 20px currentColor,
        1px 1px 0px rgba(255, 255, 255, 0.6),
        -1px -1px 0px rgba(255, 255, 255, 0.6);
    animation: ganancia-rebote 1.2s ease-out 0.15s both;
    letter-spacing: 0.02em;
}

@keyframes ganancia-pulso {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes ganancia-rebote {
    0% { 
        transform: translateY(50px) scale(0.5);
        opacity: 0;
    }
    50% { 
        transform: translateY(-10px) scale(1.1);
        opacity: 1;
    }
    100% { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Estilos para botones de apuesta */

.raspa { padding: 12px 16px 32px; font: 500 15px/1.45 Poppins, system-ui, sans-serif; color: #19264a; }
.raspa-back { display: inline-flex; align-items: center; min-height: 44px; color: #364680; font-weight: 700; text-decoration: none; }
.raspa h1 { margin: 4px 0 16px; font-size: clamp(28px, 8vw, 36px); letter-spacing: -.055em; font-weight: 900; color: #172653; }
.raspa h2 { margin: 0; font-size: 18px; font-weight: 800; color: inherit; line-height: 1.25; }
.raspa-stakes { padding: 14px 16px; border: 1px solid #d6d9e5; border-radius: 14px; background: white; }
.apuesta-buttons-container { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.raspa button { cursor: pointer; font-family: inherit; }
.btn-apuesta { flex: 1 0 auto; min-height: 44px; padding: 6px 10px; border: 1px solid #d6d9e5; border-radius: 9px; color: #293860; background: #f5f5fa; font-weight: 750; }
.btn-apuesta.active { background: #263da2; border-color: #263da2; color: white; }
.raspa-ticket { margin: 16px 0; padding: 0 10px 12px; border-radius: 18px; background: linear-gradient(125deg, #293ba0, #252571 68%, #4a2881); box-shadow: 0 4px 0 #191e59; overflow: hidden; }
.raspa-ticket-head { display: flex; justify-content: space-between; align-items: center; color: white; padding: 15px 6px 13px; border-bottom: 1px dashed #8997c0; }
.raspa-ticket-head h2 { font-size: 24px; letter-spacing: -.04em; }
.raspa-ticket-head p { margin: 1px 0 0; font-size: 13px; color: #e0e6ff; }
.raspa-ticket-head output { color: #28204b; background: #ffda71; font: 750 14px/1.4 system-ui,sans-serif; border: 1px solid #ffe9a4; border-radius: 20px; padding: 4px 11px; }
.raspa-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 1px; background: #d0cddb; margin-top: 10px; overflow: hidden; border-radius: 9px; }
/* El encabezado y las ocho filas comparten el color de su columna. */
.raspa-grid > :nth-child(5n+1) { --banda: #ff8ca7; --papel: #fff3f6; --tinta: #a82651; }
.raspa-grid > :nth-child(5n+2) { --banda: #ffb666; --papel: #fff6e8; --tinta: #904506; }
.raspa-grid > :nth-child(5n+3) { --banda: #55dbae; --papel: #edfbf5; --tinta: #11674f; }
.raspa-grid > :nth-child(5n+4) { --banda: #76c8ff; --papel: #eff8ff; --tinta: #165e9b; }
.raspa-grid > :nth-child(5n)   { --banda: #c1a1ff; --papel: #f7f2ff; --tinta: #65429b; }
.raspa-letter { text-align: center; background: var(--banda); color: #222440; box-shadow: inset 0 -3px #0002; font: 900 30px/46px Georgia,serif; }
.bolita-numero { position: relative; min-height: 44px; padding: 0; border: 0; border-radius: 0; background: var(--papel); color: var(--tinta); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; isolation: isolate; }
.bolita-numero::before { content: ""; position: absolute; inset: 50% auto auto 50%; width: 36px; height: 36px; transform: translate(-50%,-50%); border-radius: 50%; z-index: -1; }
.bolita-numero.seleccionado { color: white; }
.bolita-numero.seleccionado::before { background: var(--tinta); box-shadow: inset 0 0 0 2px var(--tinta), inset 0 0 0 3px var(--banda); }
.bolita-numero.acierto { color: #412c05; }
.bolita-numero.acierto::before { background: #ffca48; border: 2px solid #a16a0d; }
.bolita-numero.ganador-no-seleccionado::before { border: 2px dashed #717ba0; }
.bolita-numero.revelando { background: #ffdc87; }
.raspa button:focus-visible { outline: 3px solid #2360b4; outline-offset: -3px; }
.botones-accion-container { display: flex; gap: 8px; width: 100%; }
.raspa .btn-apostar,.raspa .btn-limpiar { border: 0; border-radius: 10px; padding: 12px; font-weight: 800; color: #182652; }
.raspa .btn-apostar { flex: 1; background: #ffce58; }
.raspa .btn-apostar:disabled { opacity: .55; }
.raspa .btn-limpiar { background: #e3e7f4; }
.raspa-payouts { margin-top: 20px; }
.raspa-payouts:has(.ganancia-potencial-table:empty) { display: none; }
.ganancia-potencial-table { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ganancia-row { flex: 1 0 54px; padding: 6px; text-align: center; background: white; border: 1px solid #cdd3e2; border-radius: 8px; }
.ganancia-numero { font-weight: 800; }
.ganancia-multiplicador { font-size: 13px; }

.raspa-top, .raspa-guia-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.raspa-help { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px; border: 0; border-radius: 12px; color: #252554; background: #ffda71; font-size: 12px; font-weight: 800; }
.raspa-help span { display: grid; place-items: center; width: 20px; height: 20px; border: 2px solid currentColor; border-radius: 50%; }
.raspa-visitante { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: #e9edff; color: #29335f; }
.raspa-visitante a { color: #253ba0; font-weight: 750; text-decoration: underline; }
.raspa button:disabled { cursor: default; }
#raspa-guia { position: fixed; inset: 0; width: min(410px, calc(100% - 24px)); max-height: 84vh; max-height: 84dvh; margin: auto; padding: 0; overflow: hidden; border: 0; border-radius: 18px; background: #fffaf2; color: #19264a; box-shadow: 0 12px 48px #121c4d55; }
#raspa-guia::backdrop { background: #101936bc; }
#raspa-guia form { display: flex; flex-direction: column; max-height: inherit; margin: 0; }
.raspa-guia-head { flex: none; padding: 10px 16px; color: white; background: #293ba0; }
.raspa-guia-head button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: #ffffff22; color: white; font-size: 25px; }
#raspa-guia ol { margin: 0; padding: 18px 16px; overflow-y: auto; overscroll-behavior: contain; list-style: decimal outside; padding-left: 44px; }
#raspa-guia li { padding-left: 5px; margin-bottom: 12px; }
#raspa-guia li:last-child { margin-bottom: 0; }
#raspa-guia li::before { content: none; }
#raspa-guia li::marker { color: #3743a4; font-weight: 800; }
.raspa-entendido { flex: none; margin: 0 16px 16px; min-height: 44px; width: calc(100% - 32px); border: 0; border-radius: 10px; background: #ffda71; color: #252554; font-weight: 800; }
