/* ========================================================
   RESPONSIVE LAYOUT & SITE-WIDE MOBILE OPTIMIZATION STYLES
   Guarantees 0 Horizontal Page Overflow across 320px - 768px Viewports.
   ======================================================== */

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 100%;
    padding: 0 12px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

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

article, section, div, p, table, form {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

@media (max-width: 900px) {
    .nav-link {
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .header-inner {
        flex-direction: column;
        gap: 6px;
    }

    .brand-title {
        font-size: 18px;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .loc-card {
        padding: 14px 10px;
    }

    .loc-title { font-size: 15px; }
    .loc-number { font-size: 30px; }

    .promoter-grid {
        grid-template-columns: 1fr;
    }

    .vip-owner-heading {
        font-size: 20px;
    }

    .back-to-all-menu-btn {
        display: block;
        width: 100%;
        text-align: center;
        font-size: 12px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }

    .results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .section-wrapper {
        padding: 16px 10px;
        margin: 14px 0;
    }

    .admin-card {
        padding: 16px 12px !important;
    }

    /* SELECTORS (RESULT & CHART PAGES) */
    select#result-month-select,
    select#result-year-select,
    select#chart-month-select,
    select#chart-year-select,
    select#result-year-filter {
        max-width: 48%;
        font-size: 11px !important;
        padding: 4px 6px !important;
    }

    /* FLOATING CONTACT BADGES — STRICT MOBILE RESPONSIVE POSITIONING (0 OVERLAP) */
    .floating-contact-btn {
        width: 46px;
        height: 46px;
        font-size: 20px;
        bottom: max(14px, env(safe-area-inset-bottom));
        z-index: 9999;
    }

    .floating-whatsapp {
        left: 14px !important;
        right: auto !important;
    }

    .floating-telegram {
        right: 14px !important;
        left: auto !important;
    }
}

/* ========================================================
   CRITICAL 6-COLUMN MOBILE CHART (STRICT 0 HORIZONTAL SCROLL)
   Works at 320px, 360px, 375px, 390px, 412px, 430px
   ======================================================== */

.chart-table-container {
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* STRICT NO HORIZONTAL SCROLLING */
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.monthly-chart-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed; /* Mandates column widths fit 100% viewport */
    border-collapse: collapse;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 2px solid #000000;
}

.monthly-chart-table th {
    background: linear-gradient(180deg, #f97316 0%, #d97706 100%);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 11px;
    padding: 8px 2px;
    text-align: center;
    border: 1px solid #000000;
    word-break: break-word;
    white-space: normal;
    line-height: 1.15;
    vertical-align: middle;
    text-transform: uppercase;
}

.monthly-chart-table th.col-date {
    background: linear-gradient(180deg, #f97316 0%, #d97706 100%);
    color: #ffffff;
}

.monthly-chart-table td {
    padding: 5px 2px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: #000000;
    border: 1px solid #000000;
    white-space: nowrap;
    overflow: hidden;
    background: #ffffff;
}

.monthly-chart-table tr:nth-child(even) td {
    background: #ffffff;
}

.monthly-chart-table tr:hover td {
    background: #fef3c7;
}

.monthly-chart-table .col-date {
    width: 22%;
    background: #fff7ed;
    color: #c2410c;
    font-weight: 900;
    font-size: 11px;
}

.monthly-chart-table .col-game {
    width: 13%;
    font-size: 14px;
}

.monthly-chart-table tr.today-row td {
    background: #fef3c7 !important;
    color: #b45309;
    font-weight: 900;
}

/* Viewport 320px - 480px Adjustments */
@media (max-width: 480px) {
    .monthly-chart-table th {
        font-size: 9.5px;
        padding: 5px 1px;
        line-height: 1.1;
    }

    .monthly-chart-table td {
        font-size: 12px;
        padding: 4px 1px;
    }

    .monthly-chart-table .col-date {
        width: 23%;
        font-size: 9.5px;
    }

    .monthly-chart-table .col-game {
        width: 12.8%;
    }
}

/* Extra Small Viewports (320px - 360px) */
@media (max-width: 360px) {
    .monthly-chart-table th {
        font-size: 8.5px;
        padding: 4px 1px;
    }

    .monthly-chart-table td {
        font-size: 10.5px;
        padding: 3px 1px;
    }

    .monthly-chart-table .col-date {
        width: 24%;
        font-size: 8.5px;
    }

    .monthly-chart-table .col-game {
        width: 12.6%;
    }

    .nav-btn {
        font-size: 9.5px !important;
        padding: 5px 1px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ticker-3d-track {
        animation: none !important;
    }
}
