/* ============================================================
   BETRON — Global responsive & polish overrides
   ============================================================ */

/* --- Mobil menyu düyməsi (bütün səhifələr) --- */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--bg-card, #1a2038);
    border: 1px solid var(--border, #2a3152);
    color: var(--text-primary, #fff);
    font-size: 18px;
    cursor: pointer;
    transition: all .25s;
}
.mobile-menu-toggle:hover {
    border-color: var(--accent-green, #a3e635);
    color: var(--accent-green, #a3e635);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(2px);
    z-index: 998;
}
body.sidebar-open .sidebar-backdrop { display: block; }

/* --- Ümumi kart hover polish --- */
.game-card {
    transition: transform .25s ease, box-shadow .25s ease;
    will-change: transform;
}
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

/* --- Skrol bar polish --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
    background: #2a3152;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #3b446e; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   DASHBOARD / GAME_PANO / b/*.php üçün mobil düzəlişlər
   (.sidebar + .main-content strukturu)
   ============================================================ */
@media (max-width: 1024px) {
    .sidebar { width: 220px !important; }
    .main-content { margin-left: 220px !important; padding: 18px !important; }
}

@media (max-width: 768px) {
    html, body { overflow-x: hidden; }

    .mobile-menu-toggle { display: inline-flex !important; }

    /* Sidebar off-canvas */
    .sidebar,
    .left-sidebar {
        transform: translateX(-100%);
        transition: transform .3s ease;
        width: 82vw !important;
        max-width: 300px !important;
        z-index: 999 !important;
        box-shadow: 4px 0 24px rgba(0, 0, 0, .55);
    }
    body.sidebar-open .sidebar,
    body.sidebar-open .left-sidebar {
        transform: translateX(0);
    }

    /* Əsas məzmun */
    .main-content,
    .dashboard-page .main-content {
        margin-left: 0 !important;
        padding: 14px !important;
    }

    /* Top bar-ı stack et */
    .top-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }
    .top-bar .balance-display,
    .top-bar .top-actions,
    .top-bar .search-box,
    .top-bar .header-actions {
        width: 100% !important;
    }
    .top-bar .top-actions { justify-content: space-between !important; }
    .top-bar .balance-display { justify-content: space-between !important; }

    .wallet-btn { flex: 1; justify-content: center; }
    .profile-btn .profile-name {
        max-width: 90px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Profil kartı */
    .profile-card { padding: 16px !important; }
    .profile-card h1 { font-size: 22px !important; }
    .vip-level-badge { transform: scale(.85); }

    /* Oyun grid: 3 sütun */
    .games-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
    }
    .game-card { min-width: 0 !important; }
    .game-info { padding: 8px !important; }
    .game-name { font-size: 12px !important; }
    .game-provider { font-size: 10px !important; }

    /* Section başlığı */
    .section-title { font-size: 18px !important; }
    .section-header { flex-wrap: wrap !important; gap: 8px !important; }
    .section-nav { margin-left: auto; }
    .nav-arrow { width: 32px !important; height: 32px !important; }

    /* Dropdown mərkəzləşmə */
    .profile-dropdown,
    .notifications-dropdown,
    .currency-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 12px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-height: 70vh;
        overflow-y: auto;
        margin-top: 0 !important;
    }

    /* Footer (dashboard inline) */
    footer[style*="margin-left: 240px"],
    .main-footer {
        margin-left: 0 !important;
        padding: 26px 16px 16px !important;
    }
    footer[style*="grid-template-columns"] > div {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .games-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .profile-card h1 { font-size: 20px !important; }
    .section-title { font-size: 16px !important; }
    .wallet-btn { padding: 10px 14px !important; font-size: 13px !important; }
    .currency-btn { padding: 8px 12px !important; font-size: 13px !important; }
}

/* ============================================================
   İLK SƏHİFƏ (index.php - .left-sidebar) üçün əlavə
   ============================================================ */
@media (max-width: 768px) {
    .app-container .top-bar .header-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px !important;
    }
    .app-container .top-bar .header-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
