/* ========================================
   ANTIGRAVITY RESPONSIVE DESIGN
   Optimizado para iPhone 14 Pro Max & Modern Mobile
   ======================================== */

/* --- Mobile Bottom Navigation (Hidden on Desktop) --- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 75px;
    background: rgba(10, 5, 20, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom);
    /* Support for Dynamic Island/Home Indicator */
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    gap: 4px;
    transition: all 0.3s ease;
    flex: 1;
}

.mobile-nav-item i {
    font-size: 20px;
}

.mobile-nav-item.active {
    color: var(--neon-green);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.mobile-nav-item.active i {
    transform: translateY(-2px);
}

/* --- Media Query: Mobile (Up to 768px) --- */
@media (max-width: 768px) {

    /* Body Adjustments */
    body {
        padding-bottom: 85px !important;
        /* Space for bottom nav */
    }

    /* Show Bottom Nav */
    .mobile-bottom-nav {
        display: flex;
    }

    /* Hide Sidebar on Mobile */
    .sp-sidebar {
        display: none !important;
    }

    /* Header Refinements */
    .sp-header {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px 20px !important;
        height: auto !important;
        position: sticky;
        top: 0;
        z-index: 999;
        background: rgba(5, 1, 10, 0.8);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        gap: 15px;
        align-items: flex-start !important;
    }

    .sp-header-left {
        width: 100%;
        justify-content: space-between;
    }

    .sp-header-right {
        width: 100%;
        justify-content: space-around;
    }

    /* Dashboard Layout */
    .sp-dashboard {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 15px !important;
    }

    /* KPI Grid - 2 cols or 1 col depending on width */
    .dashboard-kpi-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    /* Charts & Radar Grid */
    .dashboard-two-cols,
    .ag-radar-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Antigravity Cards Refinements */
    .ag-kpi-card,
    .ag-radar-card,
    .timeline-content,
    .lc-card {
        padding: 15px !important;
        border-radius: 16px !important;
    }

    /* Live Game Cards Grid */
    .live-cards-grid {
        grid-template-columns: 1fr !important;
    }

    /* Tables */
    .sp-table-container {
        margin: 0 -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    /* Stats Modal */
    .modal-content {
        width: 95% !important;
        margin: 20px auto !important;
        padding: 15px !important;
    }
}

/* --- Specific: iPhone 14 Pro Max & Large Devices (390px - 430px) --- */
@media (min-width: 390px) and (max-width: 768px) {
    .dashboard-kpi-row {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* --- Specific: Small Mobile (< 375px) --- */
@media (max-width: 375px) {
    .dashboard-kpi-row {
        grid-template-columns: 1fr !important;
    }

    .tm-match {
        gap: 10px !important;
    }

    .tm-team {
        font-size: 0.9rem !important;
    }
}

/* --- Fix for Page Height on iOS --- */
@supports (-webkit-touch-callout: none) {
    .sp-dashboard {
        min-height: -webkit-fill-available;
    }
}

/* --- Landing Page Refinements (Mobile) --- */
@media (max-width: 768px) {
    .hero-container {
        padding: 60px 20px !important;
        text-align: center;
    }

    .section-title {
        font-size: 1.8rem !important;
    }

    .auth-container {
        width: 100% !important;
        padding: 10px !important;
    }

    .auth-box {
        width: 100% !important;
        margin: 0 auto !important;
        padding: 25px 20px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }

    .stat-card .stat-value {
        font-size: 2rem !important;
    }

    .top-stats {
        grid-template-columns: 1fr !important;
    }
}