/* STEP 132 — stronger light-mode contrast for footer rules link */
html:not([data-theme="dark"]) .site-footer .footer-rules-link,
html:not([data-theme="dark"]) footer .footer-rules-link{
    color:#4b145d !important;
    background:#f3e8f7 !important;
    border-color:#b878ca !important;
    font-weight:950 !important;
    opacity:1 !important;
    text-shadow:none !important;
}
html:not([data-theme="dark"]) .site-footer .footer-rules-link:hover,
html:not([data-theme="dark"]) footer .footer-rules-link:hover{
    color:#35103f !important;
    background:#ead7f0 !important;
    border-color:#8e45a3 !important;
    box-shadow:0 5px 15px rgba(75,20,93,.13) !important;
}
    /* Footer statistics — responsive and isolated */
footer .footer-site-stats,
footer .footer-site-stats * {
    box-sizing: border-box;
}

footer .footer-site-stats {
    direction: rtl;
    width: 100%;
    max-width: 100%;
    margin: 0 0 34px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 20px;
    background:
        radial-gradient(
            circle at 92% 0,
            rgba(124, 58, 237, .24),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            rgba(30, 41, 59, .98),
            rgba(15, 23, 42, .98)
        );
    box-shadow: 0 16px 38px rgba(0, 0, 0, .16);
    color: #fff;
}

footer .footer-site-stats-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    gap: 16px;
    margin: 0 0 17px;
}

footer .footer-site-stats-heading > div {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

footer .footer-site-stats-heading > div > span {
    margin: 0;
    color: #c4b5fd;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.7;
}

footer .footer-site-stats-heading > div > strong {
    display: block;
    margin: 0;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: clamp(15px, 2vw, 18px);
    font-weight: 900;
    line-height: 1.7;
}

footer .footer-site-stats-live {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 7px 11px;
    border: 1px solid rgba(74, 222, 128, .25);
    border-radius: 999px;
    background: rgba(34, 197, 94, .1);
    color: #86efac !important;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.5;
    white-space: nowrap;
}

footer .footer-site-stats-live i {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, .13);
}

footer .footer-site-stats-grid {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns:
        repeat(
            var(--footer-stat-count, 4),
            minmax(0, 1fr)
        );
    gap: 11px;
}

footer .footer-site-stat {
    display: flex;
    min-width: 0;
    min-height: 78px;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 15px;
    background: rgba(255, 255, 255, .055);
    box-shadow: none;
}

footer .footer-site-stat-icon {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    margin: 0;
    border-radius: 12px;
    background: rgba(124, 58, 237, .18);
    font-size: 19px;
    line-height: 1;
}

footer .footer-site-stat > div {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

footer .footer-site-stat strong {
    display: block;
    margin: 0;
    color: #fff;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
}

footer .footer-site-stat small {
    display: block;
    margin: 0;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

footer .footer-site-stat.is-online {
    border-color: rgba(74, 222, 128, .15);
    background: rgba(34, 197, 94, .07);
}

footer .footer-site-stat.is-online .footer-site-stat-icon {
    background: rgba(34, 197, 94, .14);
}

/* Tablet: maximum three cards per row */
@media (min-width: 768px) and (max-width: 1100px) {
    footer .footer-site-stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    footer .footer-site-stats {
        margin-bottom: 28px;
        padding: 15px;
        border-radius: 17px;
    }

    footer .footer-site-stats-heading {
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 14px;
    }

    footer .footer-site-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    footer .footer-site-stat {
        min-height: 70px;
        gap: 8px;
        padding: 10px 9px;
        border-radius: 13px;
    }

    footer .footer-site-stat-icon {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
        border-radius: 10px;
        font-size: 15px;
    }

    footer .footer-site-stat strong {
        font-size: 16px;
    }

    footer .footer-site-stat small {
        font-size: 10px;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    footer .footer-site-stats-heading {
        flex-direction: column;
    }

    footer .footer-site-stats-grid {
        grid-template-columns: 1fr;
    }

    footer .footer-site-stat {
        min-height: 64px;
    }
}
