/* ==========================================
   RESPONSIVIDADE - TABLET (992px - 1199px)
   ========================================== */

@media (max-width: 1199px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .videos-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .payment-methods {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-banner {
        flex-direction: column;
        text-align: center;
    }

    .hero-person {
        flex: 0 0 250px;
    }
}

/* ==========================================
   RESPONSIVIDADE - TABLET PEQUENO (768px - 991px)
   ========================================== */

@media (max-width: 991px) {
    .main-wrapper {
        flex-direction: column;
    }

    /* Sidebar Mobile - Modern Drawer Style */
    .sidebar {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        left: -300px;
        top: 0;
        width: 280px;
        height: 100vh;
        z-index: 10001;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
        background: linear-gradient(180deg, #1a1a1a 0%, #0d0d0d 100%);
        overflow-y: auto;
        padding: 0;
    }

    .sidebar.active {
        left: 0;
    }

    /* Sidebar Title - Modern App Style */
    .sidebar .sidebar-title {
        background: linear-gradient(135deg, var(--color-accent) 0%, #FFA500 100%);
        color: #000 !important;
        padding: 24px 20px;
        font-size: 16px;
        font-weight: 800;
        letter-spacing: 1px;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .sidebar .sidebar-title svg {
        fill: #000 !important;
    }

    /* Sidebar Menu - Mobile Optimized */
    .sidebar .sidebar-menu {
        padding: 16px 12px;
        flex: 1;
    }

    .sidebar .sidebar-menu li {
        margin-bottom: 4px;
    }

    .sidebar .sidebar-menu a {
        padding: 16px 18px;
        font-size: 15px;
        font-weight: 500;
        border-radius: 12px;
        border-left: none;
        background: transparent;
        transition: all 0.2s ease;
    }

    .sidebar .sidebar-menu a:hover,
    .sidebar .sidebar-menu a.active {
        background: rgba(255, 228, 0, 0.15);
        color: var(--color-accent);
        border-left: none;
        transform: scale(1.02);
    }

    .sidebar .sidebar-menu-icon {
        font-size: 20px;
        width: 24px;
        text-align: center;
    }

    /* Sidebar Footer - Modern */
    .sidebar .sidebar-footer {
        padding: 16px 20px;
        margin-top: auto;
        background: rgba(0, 0, 0, 0.3);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 11px;
        color: #666;
    }

    /* App Install Card */
    .sidebar .sidebar-app-install {
        margin: 16px 12px;
        padding: 20px;
        background: linear-gradient(135deg, rgba(76, 209, 55, 0.1), rgba(76, 209, 55, 0.05));
        border: 1px solid rgba(76, 209, 55, 0.2);
        border-radius: 16px;
    }

    /* Overlay */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        z-index: 10000;
        opacity: 0;
        transition: opacity 0.3s;
        visibility: hidden;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        background-color: var(--color-secondary);
        border-top: 1px solid var(--color-border);
        padding: 6px 8px;
        align-items: center;
        height: 64px;
    }

    .bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #ddd;
        gap: 4px;
        font-size: 10px;
    }

    .bottom-nav .nav-item:hover,
    .bottom-nav .nav-item:active {
        color: #ffffff;
    }

    .bottom-nav .nav-fab {
        position: relative;
        grid-column: 3;
        transform: translateY(-20px);
        margin: 0 auto;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: var(--color-accent);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #000000;
        font-weight: 800;
        box-shadow: 0 5px 20px rgba(var(--color-accent-rgb), 0.4);
        border: 4px solid #1a1a1a;
        z-index: 10000;
    }

    .bottom-nav .fab-icon {
        width: 24px;
        height: 24px;
        stroke-width: 2.5;
    }

    .bottom-nav .fab-label {
        font-size: 10px;
        color: #000000;
        margin-top: 2px;
        font-weight: 700;
    }

    .bottom-nav .nav-icon {
        width: 22px;
        height: 22px;
    }


    .main-content {
        padding-bottom: 95px;
    }

    .header-nav {
        display: none;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .tutorial-icons {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-content {
        padding: 15px;
        padding-bottom: 80px;
        /* Space for bottom nav */
    }

    /* Admin Table Responsiveness */
    .admin-card table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Game Play - Mobile Adjustments */
    .game-play-container {
        flex-direction: column;
    }

    .game-modality-sidebar {
        width: 100%;
        margin-bottom: 10px;
        display: block;
        /* Stack titles and lists vertically */
    }

    .modality-list {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        /* Scroll individual lists */
        padding-bottom: 10px;
        width: 100%;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .modality-list li {
        min-width: 140px;
        /* Ensure enough width */
        flex: 0 0 auto;
        /* Prevent shrinking */
        border-bottom: none;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        margin-bottom: 0;
        background: var(--color-secondary);
    }

    .modality-list li .mod-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px;
    }

    /* Fix Digit Input Display */
    .digit-input-display {
        justify-content: center;
        gap: 15px;
        margin: 20px 0;
    }

    .digit-box {
        width: 65px;
        height: 65px;
        font-size: 36px;
        border-width: 2px;
        background: var(--color-primary);
    }

    /* Keypad Touch Friendly */
    .numeric-keypad .key-btn {
        padding: 20px;
        font-size: 24px;
        /* Larger hit area */
    }

    .digit-box {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .page-section {
        padding: 20px;
    }
}

/* ==========================================
   RESPONSIVIDADE - MOBILE GRANDE (480px - 767px)
   ========================================== */

@media (max-width: 767px) {
    .top-banner {
        flex-direction: column;
        gap: 0;
        /* Tight spacing as requested */
        font-size: 11px;
        padding: 5px 10px;
        /* More compact */
    }

    .top-banner-right {
        width: 100%;
        justify-content: center;
        /* Center on mobile */
        flex-wrap: wrap;
    }

    /* Better Mobile Header */
    .main-header {
        position: sticky;
        top: 0;
    }

    .header-container {
        flex-direction: column;
        align-items: stretch;
    }

    .logo {
        justify-content: center;
        margin-bottom: 10px;
    }

    .header-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* 2 buttons per row */
        width: 100%;
    }

    .header-balance {
        grid-column: span 2;
        text-align: center;
        margin-top: 5px;
    }

    .header-container {
        gap: 15px;
    }

    .logo {
        font-size: 16px;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .header-actions {
        gap: 8px;
    }

    .btn-play-now,
    .btn-entrar,
    .btn-registro {
        padding: 8px 12px;
        font-size: 12px;
    }

    .sidebar {
        flex-wrap: wrap;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .videos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tutorial-icons {
        grid-template-columns: repeat(2, 1fr);
    }

    .winner-card {
        flex-direction: column;
        text-align: center;
    }

    .winner-icon {
        width: 50px;
        height: 50px;
    }

    .page-section {
        padding: 15px;
    }

    .page-section h1 {
        font-size: 22px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .main-content {
        padding: 10px;
    }

    .hero-banner {
        padding: 20px;
        gap: 20px;
    }

    .hero-content h1 {
        font-size: 22px;
    }

    .hero-person {
        flex: 0 0 200px;
    }
}

/* ==========================================
   RESPONSIVIDADE - MOBILE PEQUENO (até 479px)
   ========================================== */

@media (max-width: 479px) {

    html,
    body {
        font-size: 14px;
    }

    .main-header {
        padding: 5px 8px;
        /* Minimal padding */
    }

    .header-container {
        flex-wrap: wrap;
        gap: 5px;
        /* Tighter gap */
    }

    .logo {
        font-size: 13px;
        flex: 1;
    }

    .logo-icon {
        width: 22px;
        height: 22px;
        font-size: 13px;
    }

    .header-actions {
        width: 100%;
        gap: 4px;
        display: flex;
        /* Ensure flex */
    }

    .btn-play-now {
        flex: 1;
        justify-content: center;
        padding: 6px 8px;
        /* Smaller padding */
        font-size: 11px;
        height: 30px;
        /* Fixed small height */
    }

    .btn-entrar,
    .btn-registro {
        padding: 8px 10px;
        font-size: 11px;
    }

    /* MOBILE HEADER REDESIGN */
    .menu-toggle {
        display: block !important;
        margin-right: 10px;
    }

    .header-container {
        flex-wrap: nowrap;
        /* Keep logo and hamburger on same line */
        justify-content: space-between;
        align-items: center;
    }

    .header-left {
        flex: 1;
    }

    .header-actions {
        width: auto;
        gap: 5px;
        flex: 1;
        justify-content: flex-end;
        /* Push to right */
    }

    /* Hide the big Play Now button on mobile to save space */
    .header-actions .btn-play-now {
        display: none !important;
    }

    /* User Controls Container */
    .user-header-controls {
        display: flex;
        align-items: center;
        gap: 5px;
        width: 100%;
        justify-content: flex-end;
    }

    /* Deposit Button */
    .btn-deposit-header {
        background: var(--color-accent);
        color: #000;
        border: none;
        padding: 6px 10px;
        border-radius: 4px;
        font-weight: 700;
        font-size: 11px;
        display: flex;
        align-items: center;
        gap: 3px;
        height: 32px;
    }

    /* Balance Box */
    .header-balance {
        background: #1a1a1a;
        padding: 2px 8px;
        border-radius: 4px;
        border: 1px solid #333;
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 32px;
    }

    .header-balance span {
        font-size: 8px;
        color: #888;
        line-height: 1;
    }

    .header-balance .balance-value {
        color: var(--color-accent);
        font-weight: bold;
        font-size: 12px;
    }

    /* Hide full profile text on mobile */
    .header-profile-info {
        display: none;
    }

    /* Profile Icon */
    .btn-profile-icon {
        background: none;
        border: none;
        font-size: 20px;
        padding: 0;
        margin-left: 2px;
    }

    .admin-link {
        font-size: 10px;
        color: var(--color-accent);
        text-decoration: none;
    }

    /* Auth Buttons - Mobile Specific */
    .btn-entrar {
        background: transparent;
        border: 1px solid #444;
        color: #fff;
        padding: 6px 15px;
        border-radius: 4px;
        font-size: 13px;
    }

    .btn-registro {
        background: #a4ce3a;
        /* Light Green */
        color: #000;
        font-weight: 700;
        padding: 6px 15px;
        border-radius: 4px;
        font-size: 13px;
        border: none;
    }

    /* QUICK ACTIONS - VERTICAL LIST REFACTOR */
    .quick-actions-section {
        padding: 10px 15px;
        margin-bottom: 20px;
    }

    /* Install App Banner */
    .install-app-banner {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        background: transparent;
        border: 1px solid #a4ce3a;
        border-radius: 50px;
        /* Pill shape */
        padding: 12px;
        margin-bottom: 20px;
        color: #fff;
        font-size: 14px;
        cursor: pointer;
    }

    .install-app-banner strong {
        color: #a4ce3a;
    }

    .app-icon {
        font-size: 18px;
    }

    /* Quick Actions: Horizontal Scroll Layout - ENFORCED */
    .quick-actions-section {
        margin-bottom: 20px;
        padding: 0 10px;
        display: block;
        /* Ensure container is block */
    }

    .horizontal-scroll-container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 15px;
        overflow-x: auto !important;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
        justify-content: flex-start;
        /* Start from left */
    }

    .horizontal-scroll-container::-webkit-scrollbar {
        display: none;
    }

    .quick-action-item {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        min-width: 80px !important;
        max-width: 80px !important;
        flex: 0 0 auto !important;
        cursor: pointer;
        text-align: center;
        margin: 0 !important;
        /* Reset margins */
        background: none !important;
        /* Remove any weird backgrounds */
        border: none !important;
        box-shadow: none !important;
    }

    .quick-action-item .action-icon-circle {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        min-height: 50px !important;
        /* Prevent collapsing */
        background: radial-gradient(circle at 30% 30%, rgba(60, 60, 60, 0.8), #000 60%),
            radial-gradient(circle at 50% 50%, var(--color-accent), transparent 70%);
        border: 1px solid var(--color-accent);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 6px;
        box-shadow: 0 0 10px rgba(163, 255, 0, 0.3) !important;
    }

    .quick-action-item span {
        font-size: 10px !important;
        color: #fff;
        line-height: 1.2;
        max-width: 100%;
        font-weight: 600;
        display: block;
    }

    /* Icon adjustments */
    /* Icon adjustments */
    .quick-action-item svg {
        stroke: #fff !important;
        /* Force white icons for contrast */
        filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.5));
    }

    /* Specific icon colors if needed matching image */
    /* Example: Make 'Conferindo Bilhetes' icon white/silver */
    .quick-action-item:nth-child(2) .action-icon-circle {
        border-color: #fff;
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }

    .quick-action-item:nth-child(2) svg {
        stroke: #fff;
    }

    /* Game Cards Horizontal */
    .game-cards-container {
        padding-bottom: 15px;
    }

    .game-card-styled {
        min-width: 240px;
        height: 140px;
        border-radius: 12px;
        padding: 15px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
        overflow: hidden;
        color: white;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    .bg-fire {
        background: linear-gradient(135deg, #ff4d4d, #ff0000);
    }

    .bg-orange {
        background: linear-gradient(135deg, #ff9f43, #ee5253);
    }

    /* Top Banner Redesign */
    .top-banner {
        /* Background set dynamically via inline style from Admin */
        /* background: #ff4747; */
        /* Bright Red */
        /* background: linear-gradient(90deg, #ff4747 0%, #ff6b6b 100%); */
        color: white;
        padding: 8px 10px;
        font-size: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        position: relative;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .top-banner-content {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        font-weight: 800;
        text-transform: uppercase;
        margin-bottom: 2px;
    }

    .clover-icon {
        font-size: 16px;
        filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.3));
    }

    .top-banner-timer {
        font-size: 11px;
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 600;
    }

    .countdown-timer {
        font-weight: 800;
        font-family: monospace;
        font-size: 13px;
    }

    .close-banner {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        font-size: 16px;
        opacity: 0.8;
    }

    .bg-blue {
        background: linear-gradient(135deg, var(--color-accent), #54a0ff);
    }

    .card-content {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
    }

    .card-title {
        font-size: 20px;
        font-weight: 800;
        text-transform: uppercase;
        font-style: italic;
    }

    .card-provider {
        background: white;
        color: red;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 12px;
    }

    .card-footer {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
    }

    .pagou-info {
        display: flex;
        flex-direction: column;
        font-size: 10px;
    }

    .pagou-info strong {
        font-size: 14px;
        color: #fff;
    }

    .btn-card-action {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.5);
        color: white;
        padding: 5px 15px;
        border-radius: 20px;
        font-size: 12px;
        cursor: pointer;
    }

    /* Winners Horizontal */
    .winners-container {
        padding-bottom: 15px;
    }

    .winner-card-styled {
        min-width: 200px;
        background: #1e1e1e;
        border-radius: 10px;
        padding: 10px;
        display: flex;
        align-items: center;
        gap: 10px;
        border: 1px solid #333;
    }

    .bg-blue-grad {
        background: linear-gradient(90deg, #00d2ff 0%, #3a7bd5 100%);
    }

    .bg-purple-grad {
        background: linear-gradient(90deg, #8e44ad 0%, #c0392b 100%);
    }

    .bg-green-grad {
        background: linear-gradient(90deg, #11998e 0%, #38ef7d 100%);
    }

    .winner-game-icon {
        width: 40px;
        height: 40px;
        object-fit: contain;
        background: white;
        border-radius: 50%;
        padding: 2px;
    }

    .winner-info {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .game-name {
        font-size: 12px;
        font-weight: 800;
        line-height: 1;
        margin-bottom: 2px;
        color: #fff;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }

    .winner-details span {
        display: block;
        font-size: 9px;
        color: #eee;
    }

    .winner-amount {
        color: #fff !important;
        font-weight: bold;
        font-size: 11px !important;
    }

    .hero-banner {
        padding: 5px !important;
        margin-bottom: 5px !important;
    }

    .hero-content img {
        border-radius: 6px;
    }

    /* Tighter Section Spacing */
    .cta-register-section {
        padding: 20px 10px !important;
        margin: 15px 0 !important;
    }

    .section-title {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }

    /* Game Play Container Mobile Fixes */
    .game-play-container {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 1. Hide Header Navigation on Mobile Game */
    .header-nav {
        display: none !important;
    }

    /* 2. Compact Modality Selector */
    .game-modality-sidebar {
        margin-bottom: 2px;
        padding-bottom: 0;
        border-bottom: none;
        width: 100%;
        /* display: block is inherited/default */
    }

    .modality-list {
        width: 100%;
        padding-right: 10px;
        /* Safe area */
    }

    .modality-list li .mod-row {
        padding: 4px 6px;
        font-size: 10px;
    }

    /* 3. Hide Non-Essential Labels to save vertical space */
    .palpites-instruction,
    .input-status-text,
    .group-select-msg {
        display: none !important;
    }

    .palpites-header {
        margin-bottom: 2px;
        padding: 0;
    }

    /* 4. Tiny Inputs - Thinner */
    .digit-input-display {
        gap: 6px;
        margin: 2px 0;
        /* Tightest margin */
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .digit-box {
        width: 35px;
        /* Thinner width */
        height: 35px;
        /* Thinner height */
        font-size: 18px;
        border-radius: 4px;
        border-width: 1px;
    }

    /* 5. Ultra Compact Keypad - Thinner Rows */
    .numeric-keypad {
        gap: 2px;
        /* Minimal gap */
        padding: 0;
        margin-bottom: 0;
        width: 100% !important;
        box-sizing: border-box;
    }

    .keypad-row {
        gap: 2px;
        width: 100%;
        display: flex;
        justify-content: space-between;
    }

    .numeric-keypad .key-btn {
        height: 35px;
        /* Thinner keys */
        font-size: 16px;
        border-radius: 4px;
        flex: 1;
        width: auto;
    }

    /* 6. Action Button - Thinner */
    .btn-select-palpite {
        padding: 4px;
        font-size: 12px;
        margin-top: 2px;
        height: 30px;
        /* Thinner button */
        width: 100%;
    }

    /* 7. Wrapper Tweak */
    .game-content-box {
        padding: 0 !important;
        margin: 0 !important;
        width: 100%;
    }

    .page-section {
        padding: 5px !important;
    }

    .sidebar {
        overflow-x: auto;
        padding: 10px 0;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-menu {
        gap: 0;
    }

    .sidebar-menu a {
        padding: 10px 12px;
        font-size: 12px;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }

    .tutorial-icons {
        grid-template-columns: 1fr;
    }

    .tutorial-icon-item {
        padding: 12px;
    }

    .section-title {
        font-size: 16px;
    }

    .game-card {
        min-height: 250px;
    }

    .game-card-image {
        height: 150px;
    }

    .game-card-content {
        padding: 12px;
    }

    .game-card-title {
        font-size: 14px;
    }

    .page-section {
        padding: 12px 15px;
        border-radius: 6px;
    }

    .page-section h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .page-section h2 {
        font-size: 16px;
        margin-top: 15px;
        margin-bottom: 12px;
    }

    .page-section p {
        font-size: 13px;
    }

    .modal-content {
        padding: 25px 20px;
        max-width: 100%;
        border-radius: 6px;
    }

    .modal-title {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .form-input {
        padding: 10px 12px;
        font-size: 13px;
    }

    .modal-form-submit {
        padding: 10px 16px;
        font-size: 13px;
    }

    .result-card {
        padding: 15px;
    }

    .positions-header {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .position-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .pos-number::before {
        content: 'Posição: ';
        color: var(--color-text-secondary);
        font-weight: normal;
    }

    .pos-numbers::before {
        content: 'Números: ';
        color: var(--color-text-secondary);
        font-weight: normal;
    }

    .pos-group::before {
        content: 'Grupo: ';
        color: var(--color-text-secondary);
        font-weight: normal;
    }

    .pos-animal::before {
        content: 'Bicho: ';
        color: var(--color-text-secondary);
        font-weight: normal;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .footer-section h4 {
        font-size: 12px;
    }

    .footer-section a,
    .footer-section p {
        font-size: 11px;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }

    .payment-card {
        padding: 15px;
    }

    .odds-table {
        font-size: 11px;
    }

    .odds-table th,
    .odds-table td {
        padding: 10px 8px;
    }

    .hero-banner {
        padding: 15px;
        gap: 15px;
    }

    .hero-content h1 {
        font-size: 18px;
    }

    .hero-content p {
        font-size: 12px;
    }

    .hero-person {
        flex: 0 0 150px;
        max-width: 100%;
    }
}

/* ==========================================
   EXTRA PEQUENO (até 360px)
   ========================================== */

@media (max-width: 360px) {
    .header-container {
        flex-direction: column;
        gap: 8px;
    }

    .header-actions {
        width: 100%;
    }

    .btn-play-now {
        width: 100%;
    }

    .tutorial-icons {
        grid-template-columns: 1fr;
    }

    .page-section {
        padding: 10px;
    }

    .footer-container {
        gap: 10px;
    }
}

/* ==========================================
   DARK MODE (já está implementado)
   ========================================== */

@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--color-primary);
    }
}

/* ==========================================
   ORIENTAÇÃO LANDSCAPE
   ========================================== */

@media (orientation: landscape) and (max-height: 600px) {
    .main-header {
        padding: 8px 15px;
    }

    .game-content-box {
        padding: 0;
        /* Zero padding as requested */
        border: none;
    }

    .main-content {
        padding: 10px;
    }

    .page-section {
        padding: 15px;
    }

    .games-grid,
    .tutorial-icons {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* ==========================================
   DESKTOP RESTORATION (Min-Width: 768px)
   Restores grid layout for Quick Actions on PC
   ========================================== */
@media (min-width: 768px) {
    .quick-actions-section {
        padding: 30px 0;
        max-width: 1200px;
        margin: 0 auto;
    }

    .horizontal-scroll-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 40px;
        overflow: visible;
    }

    .quick-action-item {
        width: 120px;
        align-items: center;
        text-align: center;
    }

    .quick-action-item .action-icon-circle {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: radial-gradient(circle at 30% 30%, rgba(60, 60, 60, 0.8), #000 60%),
            radial-gradient(circle at 50% 50%, var(--color-accent), transparent 70%);
        border: 2px solid var(--color-accent);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 15px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .quick-action-item:hover .action-icon-circle {
        transform: translateY(-5px);
        box-shadow: 0 5px 20px var(--color-accent);
    }

    .quick-action-item svg {
        width: 32px;
        height: 32px;
        stroke: #fff !important;
    }

    .quick-action-item span {
        font-size: 14px;
        color: #fff;
        font-weight: 600;
        display: block;
        max-width: 150px;
    }
}

/* ==========================================
   FIXES VISUAL MOBILE - FINAL POLISH (Auto-Applied)
   ========================================== */
@media (max-width: 500px) {

    /* Show hamburger */
    .menu-toggle {
        display: block !important;
        margin-right: 10px;
        z-index: 2000;
        /* Ensure clickable */
    }

    /* 1. Header Buttons Fix - More compact & aligned */
    .header-actions .btn-entrar,
    .header-actions .btn-registro {
        padding: 5px 8px !important;
        font-size: 11px !important;
        height: 32px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-actions {
        gap: 6px !important;
        align-items: center !important;
    }

    /* 2. Quick Actions Labels Alignment & Icon Fix */
    .quick-action-item {
        justify-content: flex-start !important;
        width: 75px !important;
        /* Force width */
    }

    .quick-action-item .action-icon-circle {
        margin-bottom: 5px !important;
        width: 50px !important;
        /* Slightly smaller */
        height: 50px !important;
    }

    .quick-action-item span {
        margin-top: 2px;
        line-height: 1.1;
        font-size: 10px !important;
        height: 24px;
        /* Fixed height for 2 lines */
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    /* 3. Tables Overflow - Force scroll */
    .odds-table {
        min-width: 500px !important;
        /* Ensure table triggers scroll */
    }

    /* Target the container of the table */
    .page-section>div[style*="overflow-x: auto"] {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        -webkit-overflow-scrolling: touch;
    }

    /* 4. Bottom Nav Text Sizing */
    .bottom-nav .nav-item {
        font-size: 9px !important;
        padding: 0 2px !important;
    }

    .bottom-nav .fab-label {
        font-size: 8px !important;
        white-space: nowrap;
    }

    /* Fix "Meus Palpites" length */
    .bottom-nav a[href*="my-bets"] {
        letter-spacing: -0.5px;
    }


    /* 5. Home Footer Buttons Stack */
    .cta-buttons-container {
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .cta-buttons-container .btn-registro,
    .cta-buttons-container .btn-entrar {
        width: 100% !important;
        margin: 0 !important;
        justify-content: center;
        padding: 12px !important;
        font-size: 14px !important;
    }

    /* 1. Header Buttons Fix */
    .header-actions {
        flex-wrap: nowrap !important;
        /* Prevent wrapping */
        gap: 5px !important;
    }

    .header-actions .btn-entrar,
    .header-actions .btn-registro {
        padding: 0 8px !important;
        /* Reduce padding further */
        font-size: 11px !important;
        height: 30px !important;
        /* Fixed smaller height */
        white-space: nowrap !important;
    }

    /* 6. General Padding Tweaks */
    .main-content {
        padding: 10px 10px 90px 10px !important;
    }

    /* Sidebar Fix Z-Index */
    .sidebar.active {
        left: 0;
        z-index: 99999 !important;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 99990 !important;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .sidebar-overlay.active {
        opacity: 1;
    }
}