/* ================================================================
   BETUXO — Mobile Responsive (Figma M01-M12)
   ================================================================ */

/* ---------- M01 / Lobby mobile ---------- */
@media (max-width: 768px) {
    .wrapper { padding-top: 56px !important; margin-left: 0 !important; }
    .navbar { height: 56px; left: 0; padding: 0 12px; border-radius: 0; }
    .navbar-tabs { display: none; }
    .navbar-search { height: 36px; border-radius: 8px; }
    .navbar-search input { font-size: 13px; }
    .navbar-account { display: none; }
    .navbar-icons { gap: 6px; }
    .navbar-icon { width: 36px; height: 36px; }

    .sidebar { display: none !important; }

    .content { padding: 8px 12px 80px !important; gap: 10px !important; }

    .lobby-categories { gap: 6px; padding: 4px 0; }
    .lobby-cat-icon { width: 42px; height: 42px; border-radius: 10px; }
    .lobby-cat span { font-size: 9px; }

    .lobby-hero { margin: 6px 0 !important; border-radius: 12px !important; max-height: 200px; }
    .lobby-hero > img { max-height: 200px; border-radius: 12px !important; }
    .lobby-hero-content { padding: 16px; max-width: 70%; }
    .lobby-hero h2 { font-size: 24px; }
    .lobby-hero h3 { font-size: 16px; }

    .lobby-promos { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .lobby-promo-card { aspect-ratio: 3/1; }

    .lobby-section-title { font-size: 14px; }
    .lobby-game { flex: 0 0 120px; }
    .lobby-games { gap: 8px; }

    .lobby-providers { gap: 6px; }
    .lobby-provider { padding: 8px 16px; min-height: 38px; }

    .lobby-winners { margin: 0 -12px; border-radius: 0; }
    .winners-table { font-size: 11px; }
    .winners-table th, .winners-table td { padding: 8px 6px; }
    .winner-game-cell img { width: 24px; height: 24px; }

    .lobby-footer { padding: 24px 0 12px; }
    .lobby-footer-links { gap: 4px; font-size: 11px; }

    .footer { padding: 12px !important; font-size: 10px !important; }

    /* M11 — Bottom nav (menu mobile) */
    .bottom-nav {
        display: flex !important; position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
        background: rgba(8,15,22,.95);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255,255,255,.06);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        gap: 2px;
    }
    .bottom-nav a {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
        color: #9EA7B5; font-size: 9px; font-weight: 500; padding: 6px 2px;
        border-radius: 8px; transition: all .15s; text-decoration: none;
    }
    .bottom-nav a.active { color: var(--primary); }
    .bottom-nav a:hover { color: #F7F8FA; }
    .bottom-nav a svg { width: 20px; height: 20px; }

    /* Chat panel mobile */
    .chat-panel { width: 100% !important; top: 56px; }
}

/* ---------- M02 / Buscar jogos ---------- */
@media (max-width: 768px) {
    .catalog-header { margin-bottom: 12px; }
    .catalog-title { font-size: 18px; }
    .catalog-search input { height: 40px; font-size: 13px; }
    .catalog-filters { gap: 6px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .catalog-filters::-webkit-scrollbar { display: none; }
    .catalog-filter { padding: 6px 12px; font-size: 12px; white-space: nowrap; }
    .catalog-providers { gap: 6px; }
    .catalog-provider-chip { padding: 6px 12px; font-size: 12px; }
    .catalog-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

@media (max-width: 480px) {
    .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
}

/* ---------- M03 / Jogo ---------- */
@media (max-width: 768px) {
    .game-frame { height: 60vh !important; max-width: 100% !important; width: 100% !important; border-radius: 0 !important; margin: 0 -12px !important; }
    .game-frame iframe { width: 100% !important; height: 100% !important; }
    .game-info { padding: 12px 0; }
    .game-title { font-size: 18px; }
    .game-actions { flex-wrap: wrap; gap: 8px; }
}

/* ---------- M04 / Carteira ---------- */
@media (max-width: 768px) {
    .wallet-overview-title { font-size: 18px; }
    .wallet-cards { grid-template-columns: 1fr; gap: 8px; }
    .wallet-card { padding: 16px; }
    .wallet-card-value { font-size: 24px; }
    .wallet-actions { flex-direction: column; gap: 8px; }
    .wallet-action-btn { height: 44px; font-size: 13px; }
}

/* ---------- M05-M06 / Deposito e Saque ---------- */
@media (max-width: 768px) {
    .wallet { margin-top: 12px !important; }
    .wallet-title { font-size: 20px; }
    .pix-box { padding: 16px; }
    .pix-amount { font-size: 24px; }
    .quick { gap: 6px; }
    .quick-btn { font-size: 13px; padding: 10px; }
    .deposit-total { padding: 12px; border-radius: 10px; }
}

/* ---------- M07 / Minha conta ---------- */
@media (max-width: 768px) {
    .profile-header { flex-direction: column; text-align: center; gap: 12px; }
    .profile-avatar { width: 64px; height: 64px; }
    .profile-info h2 { font-size: 18px; }
    .profile-cards { grid-template-columns: 1fr; gap: 8px; }
    .profile-card { padding: 14px; }
}

/* ---------- M08 / Ofertas/Promocoes ---------- */
@media (max-width: 768px) {
    .promo-grid { grid-template-columns: 1fr !important; gap: 10px; }
    .promo-detail { flex-direction: column; }
    .promo-detail-img { width: 100%; height: 160px; }
}

/* ---------- M09 / Limites pessoais (jogo responsavel) ---------- */
@media (max-width: 768px) {
    .limits-grid { grid-template-columns: 1fr !important; gap: 10px; }
    .limit-card { padding: 14px; }
}

/* ---------- M10 / Suporte (ajuda) ---------- */
@media (max-width: 768px) {
    .help-grid { grid-template-columns: 1fr !important; gap: 10px; }
    .help-card { padding: 14px; }
    .faq-item summary { font-size: 13px; padding: 12px; }
}

/* ---------- M12 / Chat da comunidade mobile ---------- */
@media (max-width: 768px) {
    .chat-page { height: calc(100vh - 136px); border-radius: 0; margin: 0 -12px; }
    .chat-page-header { padding: 12px 16px; }
    .chat-page-title { font-size: 16px; }
    .chat-page-messages { padding: 12px; gap: 12px; }
    .chat-page-bubble { max-width: 90%; font-size: 13px; }
    .chat-page-input-wrap { padding: 8px 12px; }
}

/* ---------- Cassino ao vivo mobile ---------- */
@media (max-width: 768px) {
    .live-title { font-size: 18px; }
    .live-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .live-filters { gap: 6px; }
    .live-filter { padding: 6px 14px; font-size: 12px; }
}
@media (max-width: 480px) {
    .live-grid { grid-template-columns: 1fr; }
}

/* ---------- Shared mobile tweaks ---------- */
@media (max-width: 768px) {
    .page-header { margin-bottom: 16px; }
    .page-title { font-size: 18px; }
    .page-subtitle { font-size: 13px; }

    .fav-empty { padding: 40px 16px; }
    .fav-empty-icon { width: 56px; height: 56px; }
    .fav-empty h3 { font-size: 16px; }
    .fav-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

    /* Tables responsive */
    .winners-table thead { display: none; }
    .winners-table tr { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
    .winners-table td { border: none; padding: 2px 0; }
    .winner-value { font-size: 14px; }

    /* Extrato mobile */
    .extrato-table thead { display: none; }
    .extrato-table tr { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px; }

    /* Hide scroll indicators on mobile */
    .lobby-games::-webkit-scrollbar,
    .lobby-providers::-webkit-scrollbar,
    .lobby-categories::-webkit-scrollbar { display: none; }
}

/* ---------- Small phones ---------- */
@media (max-width: 380px) {
    .content { padding: 6px 8px 80px !important; }
    .lobby-game { flex: 0 0 105px; }
    .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .navbar { padding: 0 8px; }
    .bottom-nav a { font-size: 8px; }
    .bottom-nav a svg { width: 18px; height: 18px; }
}
