* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Ubuntu, sans-serif;
}

@keyframes hoverZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

/* Contenitore principale */
.paytable-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.899);
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
    /* Abilita lo scroll verticale */
    overflow-x: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 60px !important;
    z-index: 1000;
    scrollbar-width: none;
    /* Nasconde la barra*/
}

/* Logo */
.paytable-image-logo img {
    max-width: 60%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 20px;
}

/* Titoli delle sezioni */
.paytable-section-title {
    font-size: 3vw;
    /* Imposta la dimensione del testo in base alla larghezza della finestra */
    color: #ffffff;
    padding: 10px 20px;
    /* Spazio interno per mantenere il testo al centro */
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
    background-color: rgba(44, 44, 44, 0.329);
    border-radius: 15px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
    animation: fadeInSlideDown 0.5s ease-out forwards;
    width: 100%;
    position: relative;
    z-index: 100;
}

.paytable-section-title.sticky {
    animation: changeBackground 1s ease infinite alternate;
}

@keyframes fadeInSlideDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Elementi della paytable */
.paytable-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    padding: 20px;
    margin-bottom: 30px;
}

.paytable-item:last-child {
    border-bottom: none;
}

.paytable-image img {
    width: 220px;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    margin-bottom: 15px;
}

.paytable-math1bonus{
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    margin-bottom: 15px;
}

.paytable-details {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.paytable-item-title {
    font-size: 1.8em;
    color: #ffffff;
    margin-bottom: 5px;
}

.paytable-description {
    font-size: 1.8em;
    color: #ffffff;
    margin: 5px 0;
    line-height: 1.5;
    /* Aumenta la distanza tra le righe del testo */
    text-align: center;
    margin-top: 25px;
    margin-bottom: 25px;
    padding: 0 15px;
}

.paytable-payout {
    font-size: 1.5em;
    color: #ffffff;
    font-weight: bold;
    margin-top: 5px;
    text-align: center;
}

/* Griglia per la paytable */
.paytable-symbols-group {
    display: grid;
    gap: 55px;
    width: 100%;
}

.paytable-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    /* Adatta automaticamente in base allo spazio disponibile */
    gap: 20px;
    justify-items: center;
    width: 100%;
    max-width: 1200px;
    /* Imposta un limite massimo per garantire che la griglia non si allarghi troppo */
    margin: 0 auto;
    /* Centra la griglia all'interno del contenitore */
}

/* Stile per la sezione delle paylines */
.paylines-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* 5 colonne per riga */
    gap: 20px;
    padding: 20px;
    justify-items: center;
}

.payline-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.payline-item img:hover {
    transform: scale(1.05);
}

.custom-paytable-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    text-align: center;
}

.custom-paytable-image img {
    width: 100px;
    height: auto;
    margin-bottom: 10px;
}

.custom-paytable-item-title {
    font-size: 1.4em;
    color: #ffeb3b;
    margin-bottom: 5px;
}

.custom-paytable-values {
    font-size: 1em;
    color: #ffffff;
    text-align: left;
    /* Mantiene i valori allineati a sinistra */
    display: inline-block;
    /* Centra il blocco di valori sotto il titolo */
}

/* --- RESTA IL TUO BLOCCO ORIGINALE --- */
.custom-paytable-row {
  display: flex;
  justify-content: flex-start;
  padding: 2px 0;
  font-size: 1.2em;
}

.custom-paytable-row span {
  display: inline-block;
}

.custom-paytable-row .separator {
  margin: 0 5px;
  color: #ffffff;
  font-weight: bold;
}

/* ---------- NUOVE REGOLE PER L'ALLINEAMENTO ---------- */
.custom-paytable-row span:first-child {   /* numero (15+, 14, 13, …) */
  width: 3ch;          /* spazio per 3 caratteri: “15+” */
  text-align: right;
}

.custom-paytable-row .separator {         /* il pipe | */
  width: 2ch;          /* 1 carattere esatto */
  margin: 0;           /* annullo il margin 0 5px così la colonna resta fissa */
  text-align: center;
}

.custom-paytable-row span:last-child {    /* payout (x150, x70, …) */
  width: 4ch;          /* spazio per “x150” / “x1000” (all’occorrenza allarga) */
  text-align: left;
}

.line-number {
    /*colore numeretti paylines*/
    color: rgb(255, 255, 255);
}

/* Media Queries per griglia responsive */
@media (max-width: 1024px) {
    .paylines-container {
        grid-template-columns: repeat(4, 1fr);
        /* 4 colonne per schermi medi */
    }

}

@media (max-width: 768px) {
    .paylines-container {
        grid-template-columns: repeat(3, 1fr);
        /* 3 colonne per schermi piccoli */
    }

    .paytable-row {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        /* 3 colonne per schermi medi */
    }
}

@media (max-width: 480px) {
    .paylines-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .paytable-row {
        grid-template-columns: 1fr;
    }

    .paytable-description {
        font-size: 1.26em;
        padding: 0 25px;
    }
}

/* Chiudi qui la media query */


@media (orientation: landscape) and (max-width: 768px) {
    .paytable-row {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        /* Adatta a 3 colonne per dispositivi mobili in modalità orizzontale */
    }
}

/* Media Queries */
@media (max-width: 768px) {
    .paytable-container {
        padding: 10px;
    }

    .paytable-item img {
        width: 190px;
        /* Ridimensiona per schermi più piccoli */
    }

    .paytable-math1bonus img{
        width: 90%;
    }

    .paytable-image-logo img {
        max-width: 90%;
        margin-top: 30px;
    }
}

@media (max-width: 1024px) {
    .paytable-section-title {
        font-size: 5vw;
        /* Rimpicciolisce il testo su schermi più piccoli */
    }
}

@media (max-width: 768px) {
    .paytable-section-title {
        font-size: 5vw;
        /* Rimpicciolisce ulteriormente il testo */
    }
    .paytable-description{
        font-size: 1.2em;
        padding: 0 20px;
    }
}

@media (max-width: 480px) {
    .paytable-section-title {
        font-size: 7vw;
        /* Ancora più piccolo per schermi molto piccoli */
    }

    .paytable-item img {
        width: 160px;
        /* Ulteriore ridimensionamento per schermi piccoli */
    }

    .paytable-math1bonus img{
        width: 90%;
    }

    .paytable-container {
        padding: 10px;
        /* riduci il padding */
    }
}

@media (max-width: 970px) {
    .paytable-item img {
        width: 160px;
        /* Ulteriore ridimensionamento per schermi piccoli */
    }

    .paytable-math1bonus img{
        width: 90%;
    }
}

/* Font Styles */
.ubuntu-light {
    font-family: "Ubuntu", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.ubuntu-regular {
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.ubuntu-medium {
    font-family: "Ubuntu", sans-serif;
    font-weight: 500;
    font-style: normal;
}

.ubuntu-bold {
    font-family: "Ubuntu", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.ubuntu-light-italic {
    font-family: "Ubuntu", sans-serif;
    font-weight: 300;
    font-style: italic;
}

.ubuntu-regular-italic {
    font-family: "Ubuntu", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.ubuntu-medium-italic {
    font-family: "Ubuntu", sans-serif;
    font-weight: 500;
    font-style: italic;
}

.ubuntu-bold-italic {
    font-family: "Ubuntu", sans-serif;
    font-weight: 700;
    font-style: italic;
}

/* Contenitore genitore per la paytable */
.paytable-wrapper {
    position: relative;
    overflow: hidden;
}

/* Stile tabella per math6 numero simboli FS/numero giri gratis */

.table-container {
    width: 90%;
    max-width: 600px;
    background: rgb(38 38 38 / 46%);
    box-shadow: 0 5px 6px rgb(255 255 255 / 37%);
    border-radius: 12px;
    /*overflow-x: auto; */
    /* Permette lo scroll orizzontale in caso di necessità */
    padding: 10px;
}

.table-container-math1 {
    width: auto;
    background: rgb(38 38 38 / 46%);
    box-shadow: 0 5px 6px rgb(255 255 255 / 37%);
    border-radius: 12px;
    /*overflow: hidden;*/
    padding: 10px;
}

.table-container-math1 th {
    color: #ffffff;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
}

.modern-table td {
    padding: 15px;
    border-bottom: 1px solid rgb(68 65 65);
    font-size: 20px;
    color: #ffffff;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:hover {
    background: rgba(0, 0, 0, 0.05);
    /* Effetto hover */
}

/* Pulsante di chiusura */
.paytable-container .close-button {
    position: fixed !important;
    top: 10px !important;
    right: 25px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer !important;
    z-index: 1000 !important;
}

@media (max-width: 768px) {
    .modern-table td {
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modern-table td {
        text-align: center;
        padding: 10px 5px;
        font-size: 8px;
    }

    .table-container-math1 th{
        font-size: 10px;
    }

    .modern-table td:first-child {
        font-weight: bold;
    }
}