/* Fuente personalizada JJ2Rg-Bold para el juego de fútbol */
@font-face {
    font-family: 'JJ2Rg-Bold';
    src: url('https://archeio.nyc3.cdn.digitaloceanspaces.com/websites/jameson-embedded-widgets/fonts/JJ2Rg-Bold.woff2') format('woff2'),
         url('https://archeio.nyc3.cdn.digitaloceanspaces.com/websites/jameson-embedded-widgets/fonts/JJ2Rg-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* Aplicar la fuente a elementos de texto del juego */
body, 
html, 
canvas,
div,
span,
p,
h1, h2, h3, h4, h5, h6,
button,
input,
textarea,
select,
.game-text,
.ui-text,
.score-text,
.level-text,
.info-text {
    font-family: 'JJ2Rg-Bold', 'Arial Rounded MT Bold', 'Arial Black', Arial, sans-serif !important;
}

/* Asegurar que CreateJS también use la fuente */
.createjs-text,
.game-canvas-text,
text {
    font-family: 'JJ2Rg-Bold', 'Arial Rounded MT Bold', 'Arial Black', Arial, sans-serif !important;
}

/* Fuente para elementos del web component */
football-game,
football-game *,
.football-game-container,
.football-game-container * {
    font-family: 'JJ2Rg-Bold', 'Arial Rounded MT Bold', 'Arial Black', Arial, sans-serif !important;
}

/* Fuente para modales y overlays del juego */
.modal,
.overlay,
.popup,
.dialog,
.menu,
.button,
.score,
.level,
.timer,
.info {
    font-family: 'JJ2Rg-Bold', 'Arial Rounded MT Bold', 'Arial Black', Arial, sans-serif !important;
}

/* Precargar la fuente para evitar FOUT (Flash of Unstyled Text) */
.font-preload {
    font-family: 'JJ2Rg-Bold';
    position: absolute;
    left: -9999px;
    visibility: hidden;
    font-size: 1px;
}

/* Media queries para asegurar carga en dispositivos móviles */
@media (max-width: 768px) {
    * {
        font-family: 'JJ2Rg-Bold', 'Arial Rounded MT Bold', 'Arial Black', Arial, sans-serif !important;
    }
}

/* Optimizaciones de renderizado de fuente */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}