/* =========================
   RESPONSIVE
   Breakpoints: 1440, 1024, 768, 480, 375
========================= */


/* No horizontal overflow ever */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.matches-table,
.casino-section,
.sports-tabs-inner,
.nav-list,
.live-strip-inner {
    max-width: 100%;
}


/* Utility classes */

.mobile-only {
    display: none;
}


/* Sport tab icon hidden on desktop */

.sport-tab-icon {
    display: none;
}

.sport-tab-label {
    display: inline;
}


/* Mobile-only sections hidden by default */

.mob-featured-strip,
.mob-category-nav {
    display: none;
}


/* Mobile home icon hidden on desktop */

.mob-home-icon {
    display: none;
}


/* =========================
   1440px — large desktop (baseline, minor tweaks)
========================= */

@media (max-width: 1440px) {
    .casino-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}


/* =========================
   1024px — laptop / small desktop
========================= */

@media (max-width: 1024px) {
     :root {
        --sidebar-w: 150px;
    }
    .casino-grid {
        grid-template-columns: repeat(8, 1fr);
    }
    .nav-link {
        padding: 5px 8px;
        font-size: 10px;
    }
    .match-odds {
        grid-template-columns: repeat(6, 38px);
    }
    .odds-btn {
        width: 100%;
        height: 20px;
        line-height: 20px;
        font-size: 9px;
    }
    .match-title {
        font-size: 10px;
    }
}


/* =========================
   768px — tablet / mobile
========================= */

@media (max-width: 768px) {
     :root {
        --sidebar-w: 210px;
        --hdr-h: 44px;
        --ticker-h: 18px;
    }
    /* Show mobile-only elements */
    .mobile-only {
        display: block;
    }
    .mob-featured-strip {
        display: flex;
    }
    .mob-category-nav {
        display: block;
    }
    .mob-home-icon {
        display: flex;
    }
    /* ---- HEADER ---- */
    .header-logo {
        display: flex;
        align-items: center;
        margin-left: -4px;
    }
    .header-inner {
        padding: 0 8px;
        gap: 0px;
    }
    .btn-apk {
        display: none;
    }
    /* Demo: white background, blue text */
    .btn-demo {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 61px;
        height: 32px;
        background: var(--btn-demo-bg);
        color: var(--btn-demo-text);
        font-size: 12px;
        font-weight: bold;
        border: none;
        padding: 0;
        font-family: sans-serif;
    }
    .btn-demo:hover {
        background: var(--btn-demo-bg);
    }
    /* Login / Register: dark navy */
    .btn-login {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 61px;
        height: 32px;
        background: var(--btn-login-bg);
        color: var(--btn-login-text);
        font-size: 12px;
        font-weight: bolder;
        border: 1px solid var(--btn-login-bg);
        padding: 0;
        font-family: sans-serif;
    }
    .btn-login:hover {
        background: var(--btn-login-bg);
    }
    .btn-register {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 74px;
        height: 32px;
        background: var(--btn-login-bg);
        color: var(--btn-login-text);
        font-size: 12px;
        font-weight: bolder;
        border: 1px solid var(--btn-login-bg);
        padding: 0;
        font-family: sans-serif;
    }
    .btn-register:hover {
        background: var(--btn-login-bg);
    }
    .logo-img {
        max-height: none;
        height: 34px;
        width: auto;
        padding-right: -4px;
    }
    /* Mobile home icon — compact square */
    .mob-home-icon {
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 20px;
        border-radius: 4px;
        color: #fff;
        flex-shrink: 0;
        margin-right: 4px;
    }
    .mob-home-icon svg {
        width: 22px;
        height: 22px;
    }
    .mob-home-icon:hover {
        background: rgba(255, 255, 255, 0.28);
    }
    /* Hide desktop live strip on mobile */
    .live-strip {
        display: none;
    }
    /* ---- FEATURED MATCH STRIP ---- */
    .mob-featured-strip {
        background: var(--mob-feat-bg);
        padding: 4px;
        align-items: center;
        gap: 4px;
        overflow-x: hidden;
        flex-shrink: 0;
    }
    .mob-featured-strip::-webkit-scrollbar {
        display: none;
    }
    /* Two compact side-by-side match bars */
    .mob-feat-card {
        flex: 0 0 calc(50% - 2px);
        display: flex;
        align-items: center;
        gap: 6px;
        background: var(--mob-feat-card-bg);
        color: var(--mob-feat-text);
        padding: 0 9px;
        height: 32px;
        border-radius: 0px;
        font-size: 14px;
        font-family: sans-serif;
        text-decoration: none;
        border: 1px solid var(--mob-feat-card-bg);
        overflow: hidden;
        white-space: nowrap;
        font-weight: bolder;
    }
    .mob-feat-card:nth-child(2) {
        animation-delay: 1.5s;
    }
    .mob-feat-icon {
        font-size: 13px;
        color: var(--back);
        flex-shrink: 0;
    }
    .mob-feat-name {
        font-size: 11px;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        animation: textBlink 1.6s ease-in-out infinite;
    }
    /* ---- CATEGORY NAV (blue) ---- */
    .mob-category-nav {
        background: var(--mob-cat-bg);
        border-bottom: 1px solid var(--mob-cat-bg);
        overflow-x: auto;
        scrollbar-width: none;
    }
    .mob-category-nav::-webkit-scrollbar {
        display: none;
    }
    .mob-category-inner {
        display: flex;
        align-items: stretch;
        min-width: max-content;
    }
    .mob-cat-item {
        display: flex;
        align-items: center;
        padding: 10px 10px;
        color: var(--mob-cat-text);
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
        border-right: 1px solid rgba(255, 255, 255, 0.25);
        letter-spacing: 0px;
        font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
        transition: background 0.15s;
    }
    .mob-cat-item:last-child {
        border-right: none;
    }
}

.mob-cat-item i {
    font-size: 12px;
}


/* ---- NAV — full-screen overlay on mobile ---- */

.nav-hamburger {
    display: none !important;
}

.nav-list {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nav-bg);
    z-index: 500;
    flex-direction: column;
    align-items: flex-start;
    padding-top: 60px;
    overflow-y: auto;
}

.nav-list.open {
    display: flex;
}

.nav-link {
    padding: 13px 20px;
    font-size: 1rem;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.nav-close-btn {
    position: absolute;
    top: 13px;
    right: 15px;
    background: none;
    border: none;
    color: var(--nav-active);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ---- SIDEBAR — slide in/out ---- */

.left-sidebar {
    position: fixed;
    top: 0;
    left: -220px;
    height: 100%;
    z-index: 200;
    transition: left 0.25s ease;
    overflow-y: auto;
    width: var(--sidebar-w);
}

.left-sidebar.open {
    left: 0;
}

.sidebar-toggle-btn {
    display: none !important;
    align-items: center;
    justify-content: center;
}

.main-content {
    width: 100%;
}


/* Casino — 4 columns, tight gap */

.casino-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
}

.casino-section {
    padding: 1px;
}


/* ---- SPORT TABS — dark navy, icon above label ---- */

.sports-tabs {
    background: var(--tabm-bg);
    border-bottom: none;
    overflow-x: auto;
    scrollbar-width: none;
}

.sports-tabs::-webkit-scrollbar {
    display: none;
}

.sports-tabs-inner {
    display: flex;
    align-items: stretch;
    min-width: max-content;
    gap: 0;
}

.sport-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 0 0 auto;
    min-width: 80px;
    padding: 6px 6px 5px;
    margin: 0;
    background: var(--tabm-bg);
    color: var(--tabm-text);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.sport-tab:hover {
    background: var(--tabm-bg);
    color: var(--tabm-text);
}

.sport-tab.active {
    background: var(--tabm-bg);
    color: var(--tabm-text);
    border-bottom-color: var(--tabm-active-line);
}

.sport-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 22px;
    background: none;
    border-radius: 0;
    font-size: 19px;
    color: var(--tabm-text);
}

.sport-tab.active .sport-tab-icon {
    background: none;
    color: var(--tabm-text);
}

.sport-tab-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--tabm-text);
    white-space: nowrap;
    letter-spacing: 0;
    line-height: 1;
}


/* Live strip item padding */

.live-match-item {
    padding: 3px 10px;
}


/* WhatsApp float: reduce size on mobile */

.whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
    top: 50%;
    right: 8px;
    bottom: auto;
    transform: translateY(-50%);
}


/* Support */

.support-section {
    padding: 10px 14px;
}

.support-text h3 {
    font-size: 1rem;
}


/* Footer */

.footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 8px;
}

.footer-safe {
    width: 100%;
    display: flex;
    justify-content: center;
}

.footer-copy {
    order: 2;
}

.footer-badges {
    order: 3;
}

/* =========================
   MATCHES TABLE — mobile (reference: playzone9.games @ 390px)
   Row = 4 stacked lines:
   teams + icons / date / 1 X 2 / six odds cells
========================= */

@media (max-width: 768px) {
    /* Fixed viewport with internal scroll */
    .matches-table {
        max-height: 220px;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scrollbar-width: none;
    }
    .matches-table::-webkit-scrollbar {
        width: 0;
        display: none;
    }
    /* Tournament header */
    .match-group-header {
        height: 22px;
        padding: 0 6px;
        background: var(--table-head-bg);
    }
    .match-group-title {
        font-size: 12px;
    }
    /* ---- Row ---- */
    .match-row {
        display: block;
        padding: 4px 0 5px;
        border-bottom: 1px solid var(--table-border);
    }
    /* Line 1 — teams left, live dot + icons right */
    .match-info {
        align-items: flex-start;
        padding: 0 6px;
    }
    .match-title {
        font-size: 11px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
        line-height: 1.25;
        flex: 1;
    }
    .match-meta {
        padding-top: 1px;
    }
    /* Line 2 — date / time */
    .match-datetime {
        display: block;
        margin-top: 1px;
        padding: 0 6px;
    }
    /* Line 3 — 1 / X / 2 */
    .mob-odds-labels {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        background: var(--labels-bg);
        margin-top: 3px;
    }
    .mob-odds-labels span {
        text-align: center;
        font-size: 11px;
        font-weight: 700;
        color: var(--labels-text);
        line-height: 1.3;
        padding: 1px 0;
    }
    /* Line 4 — six equal odds cells */
    .match-odds {
        grid-template-columns: repeat(6, 1fr);
        gap: 1px;
        width: 100%;
        margin-top: 1px;
    }
    .odds-btn {
        width: 100%;
        height: 20px;
        line-height: 20px;
        font-size: 11px;
    }
    .odds-btn.lock i {
        font-size: 13px;
    }
    .odds-btn.lock .lock-dash {
        font-size: 10px;
    }
}


/* =========================
   480px — large mobile
========================= */
@media (max-width: 480px) {
     :root {
        --hdr-h: 44px;
    }
    
    .header-inner {
        padding: 0 8px;
        gap: 2px;
    }
    /* Buttons stay compact — do NOT enlarge */
    
    .btn-login,
    .btn-register {
        padding: 3px 6px;
        font-size: 9px;
    }
    /* Casino — keep 4 columns */
    
    .casino-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    /* Sports tabs */
    
    .sport-tab {
        min-width: 76px;
    }
    /* Live strip */
    
    .live-strip-inner {
        flex-wrap: nowrap;
    }
    
    .live-match-item {
        padding: 3px 8px;
    }
    
    .match-name {
        font-size: 9px;
    }
    /* Support */
    
    .support-text h3 {
        font-size: 0.95rem;
    }
    
    .support-wa-btn {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }
    /* Footer */
    
    .footer-copy {
        font-size: 9px;
    }
    
    .safe-title {
        font-size: 0.75rem;
    }
    
    .safe-sub {
        font-size: 8px;
    }
}

/* =========================
   375px — small mobile (iPhone SE)
========================= */
@media (max-width: 375px) {
    .btn-apk {
        display: none;
    }
    
    .btn-login,
    .btn-register {
        padding: 2px 5px;
        font-size: 8px;
    }
    /* Keep 4 columns even at smallest mobile */
    
    .casino-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .sport-tab {
        min-width: 70px;
        padding: 6px 4px 5px;
    }
    
    .sport-tab-icon {
        height: 20px;
        font-size: 17px;
    }
    
    .sport-tab-label {
        font-size: 10px;
    }
    
    .match-title {
        font-size: 10px;
    }
    
    .odds-btn {
        font-size: 10px;
        height: 19px;
        line-height: 19px;
    }
    
    .nav-link {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}
