/*
 * Play button transform pulse: matches the APK-card video reference with a
 * purple core that alternates between a clean button and a soft expanded ring.
 */
.mf-play-transform-btn {
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    border: 0;
    outline: 0;
    background: linear-gradient(145deg, #7061ef 0%, #4536db 100%) !important;
    box-shadow: 0 8px 18px rgba(69, 54, 219, .24);
    transform-origin: center;
    transition: transform .3s ease, box-shadow .3s ease;
    animation: mf-play-transform-core 1.35s ease-in-out infinite;
    will-change: transform;
}

.mf-play-transform-btn::before {
    content: "";
    position: absolute;
    inset: -10px;
    z-index: 0;
    border-radius: 999px;
    background: rgba(112, 97, 239, .38);
    box-shadow:
        inset 0 0 0 8px rgba(112, 97, 239, .28),
        0 8px 20px rgba(69, 54, 219, .16);
    transform: scale(.72);
    opacity: 0;
    animation: mf-play-transform-ring 1.35s ease-in-out infinite;
}

.mf-play-transform-ring {
    display: none;
}

.mf-play-transform-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    line-height: 1;
    transform: translateX(1px);
}

.mf-play-transform-btn:hover,
.mf-play-transform-btn:focus {
    transform: scale(1.08);
    box-shadow: 0 10px 22px rgba(69, 54, 219, .32);
}

.mf-game-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 58px;
    align-items: center;
    column-gap: 12px;
}

.mf-game-action {
    width: 58px;
    min-width: 58px;
    justify-self: end;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
}

.mf-game-action a {
    display: inline-flex;
    justify-content: center;
    width: 100%;
}

.mf-game-status {
    width: 100%;
    text-align: center;
}

@keyframes mf-play-transform-core {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.18);
    }
}

@keyframes mf-play-transform-ring {
    0% {
        opacity: .45;
        transform: scale(.85);
    }
    55%, 100% {
        opacity: 0;
        transform: scale(1.55);
    }
}

@media (max-width: 767.98px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
    }

    html:has(.mf-chart-index),
    body:has(.mf-chart-index),
    html:has(.mf-chart-detail),
    body:has(.mf-chart-detail) {
        max-width: 100%;
        overflow-x: hidden;
    }

    .mf-available-games,
    #available-game-row {
        width: 100%;
        max-width: 100%;
    }

    .mf-available-games {
        padding-right: 8px !important;
        padding-left: 8px !important;
    }

    .mf-game-card {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 58px;
        column-gap: 8px;
        align-items: center;
        width: 100%;
        min-height: 136px;
        height: auto !important;
        padding: 14px 22px 14px 16px !important;
        overflow: hidden;
    }

    .mf-game-info {
        min-width: 0;
        margin: 0 !important;
        padding-left: 0 !important;
        text-align: center;
    }

    .mf-game-name {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 100%;
        color: #111;
        font-size: 18px;
        line-height: 1.2;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .mf-game-name .fa-info-circle {
        flex: 0 0 auto;
        padding-left: 0 !important;
        font-size: 15px;
    }

    .mf-game-result {
        margin: 7px 0 8px !important;
        color: #111;
        font-size: 23px !important;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .mf-game-links {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        row-gap: 2px;
        width: 100%;
        color: #ff0088;
        line-height: 1.25;
    }

    .mf-game-links a {
        flex: 0 1 auto;
        font-size: 14px;
        line-height: 1.25;
        white-space: normal;
    }

    .mf-link-divider {
        flex: 0 0 auto;
        margin-right: 8px !important;
        margin-left: 8px !important;
        color: #111;
        font-size: 22px !important;
        line-height: 1;
    }

    .mf-game-action {
        width: 58px;
        min-width: 58px;
        justify-self: end;
        margin: 0 !important;
        text-align: center;
    }

    .mf-game-status {
        width: 100%;
        margin-bottom: 8px !important;
        font-size: 12px;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
    }

    .mf-game-status:empty {
        display: block;
        min-height: 30px;
        margin-bottom: 8px !important;
    }

    .mf-game-action button {
        width: 42px;
        height: 42px;
    }

    .mf-game-action .animate-ping {
        animation: none;
        opacity: .18;
    }

    .mf-chart-index {
        width: 100%;
        max-width: 100%;
        margin-top: 64px;
        overflow-x: hidden;
        background: linear-gradient(180deg, #f9f7ff 0%, #fff 24%);
    }

    .mf-chart-index > .w-full {
        width: 100%;
        max-width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }

    .mf-chart-index > .w-full:first-child {
        padding-top: 5px;
    }

    .mf-chart-index > .w-full:first-child > div {
        max-width: 100%;
        padding-right: 0;
        padding-left: 0;
        overflow: visible;
        border-radius: 16px;
        background: transparent;
    }

    .mf-chart-index > .w-full:first-child button {
        width: min(100%, 280px);
        min-height: 48px;
        margin-top: 8px !important;
        border-radius: 24px;
        font-size: 14px;
    }

    .mf-chart-index > .w-full > .bg-pink {
        margin-top: 18px;
        margin-bottom: 10px;
        padding: 12px;
        border-radius: 13px;
        background: linear-gradient(105deg, #4b2188, #c72e89);
        box-shadow: 0 7px 18px rgba(75, 33, 136, .18);
        font-size: 15px;
        letter-spacing: .8px;
    }

    .mf-chart-index .gameNameRow {
        min-height: 48px;
        height: auto;
        margin: 7px 0;
        border: 1px solid rgba(75, 33, 136, .12);
        border-radius: 13px;
        background: #fff;
        box-shadow: 0 4px 13px rgba(52, 28, 91, .07);
        font-size: 14px;
        line-height: 1.25;
    }

    .mf-chart-index .gameNameRow a {
        min-height: 48px;
        padding: 10px 14px;
    }

    .mf-chart-detail {
        width: 100%;
        max-width: 100%;
        margin-top: 74px;
        padding: 0 8px 16px;
        overflow-x: hidden;
        background: linear-gradient(180deg, #f8f5ff 0%, #fff 160px);
    }

    .mf-chart-detail > .divTable {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
        border: 1px solid rgba(75, 33, 136, .16);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(45, 23, 77, .1);
    }

    .mf-chart-detail > .divTable > .bg-gray-200 {
        padding: 14px 12px;
        background: linear-gradient(135deg, #f3ecff, #fff3fa);
    }

    .mf-chart-detail .gameNameChart {
        color: #4b2188 !important;
        font-size: 19px;
        font-weight: 800;
        line-height: 1.2;
        text-align: center;
        text-shadow: none !important;
        filter: none !important;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .mf-chart-detail .gameNameDesc {
        margin-top: 5px;
        color: #5f5668;
        font-size: 11px;
        line-height: 1.45;
        text-align: center;
    }

    .mf-chart-detail .gameNameDesc + .pb-2,
    .mf-chart-detail .gameNameDesc + .pb-2.visible {
        text-align: center;
    }

    .mf-chart-detail .gameNameDesc + .pb-2 button {
        min-height: 34px;
        height: auto;
        border-radius: 17px;
    }

    .mf-chart-detail .divResultsTable {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
    }

    .mf-chart-detail .divResultsTable table {
        border-spacing: 0;
    }

    .mf-chart-detail .thChartResult {
        border: 1px solid #0b0b0b;
        vertical-align: middle;
    }

    .mf-jodi-detail .divResultsTable table {
        width: 100%;
        min-width: 100%;
        table-layout: fixed;
    }

    .mf-jodi-detail .divResultsTable td {
        width: 14.285%;
        min-width: 0;
        padding-right: 2px;
        padding-left: 2px;
        overflow-wrap: anywhere;
    }

    .mf-jodi-detail .fontResult {
        min-height: 34px;
        padding-top: 7px;
        padding-bottom: 7px;
        font-size: 13px;
        line-height: 1.2;
    }

    .mf-pana-detail .divResultsTable table {
        width: max-content;
        min-width: 520px;
        table-layout: fixed;
    }

    .mf-pana-detail .divResultsTable td {
        width: 58px;
        min-width: 0;
        padding: 4px 2px;
        font-size: 10px;
        line-height: 1.2;
        overflow: hidden;
    }

    .mf-pana-detail .divResultsTable td:first-child {
        width: 86px;
        padding-right: 3px;
        padding-left: 3px;
    }

    .mf-pana-detail .divResultsTable {
        overflow-x: auto;
    }

    .mf-pana-detail .divResultsTable .tdresultnew,
    .mf-pana-detail .divResultsTable .divPana {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .mf-pana-detail .divResultsTable .tdresultclosenew,
    .mf-pana-detail .divResultsTable .lining-nums {
        font-size: 10px;
        line-height: 1.15;
        letter-spacing: 0;
    }

    .mf-pana-detail .divResultsTable td > .flex {
        min-width: 0;
        font-size: 9px;
        line-height: 1.15;
        white-space: normal;
        word-break: break-word;
    }

    .mf-pana-detail .divResultsTable td > .flex .whitespace-pre {
        white-space: normal;
    }

    .mf-pana-detail .divResultsTable .pt-3 {
        padding-top: 6px;
    }

    .mf-pana-detail .divResultsTable .pb-3 {
        padding-bottom: 6px;
    }

    .mf-chart-detail .divBottomButtons {
        margin: 14px 0 16px;
        padding: 0 10px;
    }

    .mf-chart-detail .divBottomButtons button {
        min-height: 34px;
        height: auto;
        border-radius: 17px;
    }

    .chart-page {
        max-width: 100%;
        margin: 16px 0 26px;
        padding: 18px 15px;
        overflow-wrap: anywhere;
        border: 1px solid rgba(75, 33, 136, .13);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 9px 28px rgba(51, 24, 91, .09);
    }

    .chart-page > :first-child {
        margin-top: 0;
    }

    .chart-page h1,
    .chart-page h2,
    .chart-page h3 {
        color: #38205d;
        line-height: 1.3;
    }

    .chart-page p,
    .chart-page li {
        line-height: 1.65;
    }

    .chart-page ul,
    .chart-page ol {
        padding-left: 20px;
    }

    .chart-page img,
    .chart-page iframe,
    .chart-page video {
        max-width: 100%;
        height: auto;
    }

    .footer-sec {
        padding: 28px 20px 24px !important;
        background: linear-gradient(145deg, #47207f 0%, #32165e 100%);
    }

    .footer-sec > div {
        display: flex;
        width: 100%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0;
        text-align: center;
    }

    .footer-sec > div > a {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
    }

    .footer-sec > div > a img {
        width: auto;
        max-width: 180px;
        height: auto;
        margin: 0 auto 16px !important;
    }

    .footer-sec > div > span {
        display: block;
        width: 100%;
        color: rgba(255, 255, 255, .88);
    }

    .footer-sec > div > span p {
        margin: 0 !important;
        padding: 0 4px;
        color: #fff !important;
        font-size: 13px;
        line-height: 1.55;
        text-align: center;
    }

    .footer-sec > div > span > div {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 12px !important;
    }

    .footer-sec > div > span > div a {
        margin: 0 !important;
        padding: 6px 9px;
        border: 1px solid rgba(255, 255, 255, .2);
        border-radius: 15px;
        font-size: 12px;
        line-height: 1.2;
    }

    .footer-sec > div > div {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: center;
        margin-top: 18px !important;
    }

    .footer-sec > div > div > div {
        display: flex;
        align-items: center;
        justify-content: center !important;
        gap: 22px;
    }

    .footer-sec > div > div a {
        display: inline-flex;
        width: 34px;
        height: 34px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, .1);
    }

    .footer-sec > div > div img {
        width: 18px;
        height: 18px;
    }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    .mf-chart-index > .w-full {
        max-width: 820px;
        padding-right: 24px;
        padding-left: 24px;
    }

    .mf-chart-detail {
        width: 100%;
        padding-right: 20px;
        padding-left: 20px;
    }

    .mf-chart-detail > .divTable {
        width: 100%;
        max-width: 920px;
    }
}
