/* ================================================================
   RESPONSIVE & MOBILE-FIRST CSS - FIXED VERSION
   Replace entire responsive.css with this
   ================================================================ */

/* ========================================
   1. GLOBAL MOBILE FIXES (CORRECTED)
   ======================================== */

* {
    -webkit-tap-highlight-color: rgba(76, 201, 240, 0.3);
    box-sizing: border-box;
}

/* ✅ REMOVED problematic user-select: none from global */

/* Allow text selection for inputs */
input, textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* Prevent text selection for UI elements only */
button, .btn, .navbar-toggle, .navbar-close {
    -webkit-user-select: none;
    user-select: none;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

/* Prevent text inflation on Android */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ✅ Ensure all clickable elements work on mobile */
a, button, .btn, input[type="submit"], input[type="button"], 
.classification, summary, .export-links a, .navbar-links a,
.navbar-toggle, .back-btn, .learn-more {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(76, 201, 240, 0.3);
}

/* ========================================
   2. RESPONSIVE NAVBAR (Hamburger Menu) - FIXED
   ======================================== */

/* Mobile menu toggle button - HIDDEN ON DESKTOP */
.navbar-toggle {
    display: none; /* ✅ Hidden by default on desktop */
    background: rgba(76, 201, 240, 0.2);
    border: 2px solid rgba(76, 201, 240, 0.4);
    color: #4cc9f0;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    position: relative;
    min-width: 44px;
    min-height: 44px;
}

.navbar-toggle:hover {
    background: rgba(76, 201, 240, 0.3);
}

.navbar-toggle:active {
    transform: scale(0.95);
}

/* Close button - HIDDEN BY DEFAULT */
.navbar-close {
    display: none; /* ✅ Hidden by default */
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 1002;
    min-width: 44px;
    min-height: 44px;
}

.navbar-close:hover {
    background: rgba(239, 68, 68, 0.3);
}

.navbar-close:active {
    transform: scale(0.95);
}

/* Mobile overlay - HIDDEN BY DEFAULT */
.navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 998;
    display: none; /* ✅ Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease;
    touch-action: none;
}

.navbar-overlay.active {
    display: block;
    opacity: 1;
}

@media (max-width: 768px) {
    /* ✅ Show hamburger button ONLY on mobile */
    .navbar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* ✅ Show close button ONLY when menu is active */
    .navbar-user.active .navbar-close {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Hide/show navbar links */
    .navbar-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        padding: 5rem 2rem 2rem 2rem;
        transition: right 0.4s ease;
        z-index: 999;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
        overflow-y: auto;
    }

    .navbar-links.active {
        right: 0;
    }

    .navbar-links a {
        display: block;
        margin: 0 0 1.5rem 0;
        padding: 1rem;
        background: rgba(30, 41, 59, 0.6);
        border-radius: 12px;
        font-size: 1.1rem;
        border-left: 3px solid #4cc9f0;
        cursor: pointer;
        touch-action: manipulation;
    }

    /* Dashboard navbar */
    .navbar-content {
        flex-direction: row !important;
        flex-wrap: wrap;
    }

    .navbar-brand {
        font-size: 1rem !important;
        flex: 1;
    }

    .navbar-user {
        width: 100%;
        margin-top: 1rem;
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .user-info {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

    .btn-logout {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ✅ DESKTOP: Ensure navbar elements are visible and properly positioned */
@media (min-width: 769px) {
    .navbar-toggle {
        display: none !important; /* ✅ Force hide on desktop */
    }
    
    .navbar-close {
        display: none !important; /* ✅ Force hide on desktop */
    }
    
    .navbar-overlay {
        display: none !important; /* ✅ Force hide on desktop */
    }
    
    .navbar-user {
        position: static !important;
        display: flex !important;
        flex-direction: row !important;
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        margin-left: auto !important;
    }
    
    .menu-items {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 1.5rem !important;
    }
}

/* ========================================
   3. RESPONSIVE CONTAINERS & GRIDS
   ======================================== */

@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .charts-grid,
    .chart-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 1.8rem !important;
    }
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    }
    .navbar-content {
        padding: 0 1.5rem !important;
        gap: 1rem !important;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    /* Stats grids */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Charts grids */
    .charts-grid,
    .chart-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Features grid */
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Summary card */
    .summary-card {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        padding: 1.5rem !important;
    }

    /* Two-column layouts */
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="display: grid"][style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================
   4. RESPONSIVE TYPOGRAPHY
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 1.8rem !important;
    }

    h2, .section-title {
        font-size: 1.5rem !important;
    }

    h3, .chart-title {
        font-size: 1.2rem !important;
    }

    .subtitle {
        font-size: 1rem !important;
    }

    .navbar-brand {
        font-size: 1.1rem !important;
    }

    .stat-value {
        font-size: 2rem !important;
    }

    .stat-label {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.3rem !important;
    }

    .stat-value {
        font-size: 1.5rem !important;
    }
}

/* ========================================
   5. RESPONSIVE FORMS & INPUTS
   ======================================== */

@media (max-width: 768px) {
    textarea,
    input[type="text"],
    input[type="email"],
    input[type="password"] {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 1rem 1rem 1rem 3rem !important;
        touch-action: manipulation;
    }

    .input-with-icon i {
        left: 15px !important;
        font-size: 1.1rem !important;
        pointer-events: none;
    }

    .btn, button {
        padding: 1rem 1.5rem !important;
        font-size: 1rem !important;
        min-height: 48px; /* iOS minimum touch target */
        touch-action: manipulation;
    }

    .button-group {
        flex-direction: column !important;
    }

    .button-group .btn {
        width: 100% !important;
        min-width: unset !important;
    }
}

/* Touch-friendly buttons */
.btn, button, a.btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   6. RESPONSIVE TABLES
   ======================================== */

@media (max-width: 768px) {
    .threat-table,
    .report-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    th, td {
        padding: 0.8rem !important;
        font-size: 0.9rem !important;
    }

    /* Mobile card view for tables */
    .table-mobile-cards {
        display: none;
    }

    @supports (display: grid) {
        .table-desktop {
            display: none;
        }

        .table-mobile-cards {
            display: block;
        }

        .table-card {
            background: rgba(15, 23, 42, 0.6);
            padding: 1rem;
            border-radius: 12px;
            margin-bottom: 1rem;
            border-left: 3px solid #4cc9f0;
            touch-action: manipulation;
        }

        .table-card-row {
            display: flex;
            justify-content: space-between;
            padding: 0.5rem 0;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .table-card-row:last-child {
            border-bottom: none;
        }

        .table-card-label {
            font-weight: 600;
            color: #4cc9f0;
        }

        .table-card-value {
            color: #e2e8f0;
            text-align: right;
        }
    }
}

/* ========================================
   7. RESPONSIVE CARDS & SECTIONS
   ======================================== */

@media (max-width: 768px) {
    .scanner-container,
    .feature-card,
    .report-card,
    .chart-container,
    .landing-box {
        padding: 1.5rem !important;
        transform: none !important;
        margin-bottom: 2rem !important;
    }

    .scanner-container:hover,
    .feature-card:hover,
    .report-card:hover,
    .chart-container:hover {
        transform: none !important;
    }

    .stat-card {
        padding: 1.5rem !important;
    }

    .feature-icon {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
        transform: none !important;
    }

    .chart-container {
        height: 300px !important;
    }

    .chart-wrapper {
        height: 250px !important;
    }
}

@media (max-width: 600px) {
    .scanner-container,
    .feature-card,
    .report-card,
    .chart-card,
    .landing-box,
    .form-container {
        width: 100% !important;
        padding: 1.6rem !important;
        margin: 1.2rem 0 !important;
        box-shadow: none !important;
        transform: none !important;
    }
    .summary-card,
    .stats-grid,
    .charts-grid,
    .chart-grid {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
    }
    .chart-wrapper,
    .chart-container {
        height: 260px !important;
    }
    .navbar-content {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.8rem !important;
    }
    .navbar-user,
    .menu-items {
        width: 100% !important;
    }
    .flash,
    .export-links a {
        font-size: 0.95rem !important;
    }
}

/* ========================================
   8. LOADING OVERLAY MOBILE FIX
   ======================================== */

@media (max-width: 768px) {
    .loading-progress {
        width: 90% !important;
        max-width: 350px;
    }

    .radar-scanner {
        width: 180px !important;
        height: 180px !important;
    }

    .loading-text {
        font-size: 1.5rem !important;
    }

    .loading-status {
        font-size: 1rem !important;
        padding: 0 1rem;
    }
}

/* ========================================
   9. RESPONSIVE EXPORT LINKS
   ======================================== */

@media (max-width: 768px) {
    .export-links {
        padding: 1.5rem !important;
    }

    .export-links a {
        display: block;
        width: 100%;
        margin: 0.5rem 0 !important;
        padding: 1rem !important;
        text-align: center;
        touch-action: manipulation;
        min-height: 48px;
    }
}

/* ========================================
   10. JSON VIEWER & CODE BLOCKS
   ======================================== */

@media (max-width: 768px) {
    .json-view,
    pre {
        font-size: 0.8rem !important;
        padding: 1rem !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    details {
        margin-top: 1.5rem !important;
    }

    summary {
        font-size: 1rem !important;
        padding: 1rem !important;
        cursor: pointer;
        touch-action: manipulation;
    }
}

/* ========================================
   11. HIDE BACKGROUND CUBES ON MOBILE
   ======================================== */

@media (max-width: 768px) {
    .cube,
    .bg-cubes {
        display: none !important;
    }
}

/* ========================================
   12. FLASH MESSAGES MOBILE
   ======================================== */

@media (max-width: 768px) {
    .flash-messages {
        padding: 0 1rem;
    }

    .flash {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }
}

/* ========================================
   13. BACK BUTTON MOBILE
   ======================================== */

@media (max-width: 768px) {
    .back-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
        transform: none !important;
        touch-action: manipulation;
    }

    .back-btn:hover {
        transform: none !important;
    }

    header {
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }
}

/* ========================================
   14. DASHBOARD SPECIFIC
   ======================================== */

@media (max-width: 768px) {
    /* Dashboard navbar adjustments */
    .navbar {
        padding: 1rem !important;
    }
    
    .navbar-content {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .navbar-brand {
        font-size: 1rem !important;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Stats grid mobile */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-bottom: 2rem !important;
    }
    
    .stat-card {
        padding: 1.5rem !important;
        text-align: center;
    }
    
    .stat-icon {
        font-size: 2rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .stat-value {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.9rem !important;
    }
    
    /* Charts grid mobile */
    .charts-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        margin-bottom: 2rem !important;
    }
    
    .chart-card {
        padding: 1.5rem !important;
    }
    
    .chart-title {
        font-size: 1.1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .chart-wrapper {
        height: 280px !important;
        margin-bottom: 0;
    }
    
    /* Table and feed section */
    div[style*="display: grid"][style*="grid-template-columns: 1fr 1fr"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        margin-top: 1.5rem !important;
    }
    
    /* Threat table mobile */
    .threat-table {
        padding: 1.5rem !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .threat-table table {
        min-width: 600px;
        font-size: 0.85rem;
    }
    
    .threat-table th,
    .threat-table td {
        padding: 0.75rem !important;
        font-size: 0.85rem !important;
    }
    
    .threat-table th {
        position: sticky;
        top: 0;
        background: rgba(15, 23, 42, 0.95);
        z-index: 1;
    }
    
    /* Live feed mobile */
    .live-feed {
        max-height: 400px !important;
        padding: 1.5rem !important;
    }

    .feed-item {
        font-size: 0.9rem;
        padding: 0.8rem;
        margin-bottom: 0.8rem;
    }
    
    .feed-item > div {
        flex-direction: column !important;
        gap: 0.5rem;
    }
    
    .feed-item strong {
        word-break: break-all;
        font-size: 0.85rem;
    }
    
    .feed-time {
        font-size: 0.8rem !important;
    }
    
    /* Badge adjustments */
    .badge {
        padding: 0.3rem 0.7rem !important;
        font-size: 0.75rem !important;
        white-space: nowrap;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .navbar-brand {
        font-size: 0.85rem !important;
    }
    
    .navbar-brand i {
        display: none; /* Hide icon on very small screens */
    }
    
    .stat-value {
        font-size: 1.8rem !important;
    }
    
    .chart-wrapper {
        height: 250px !important;
    }
    
    .chart-title {
        font-size: 1rem !important;
    }
    
    .threat-table,
    .live-feed {
        padding: 1rem !important;
    }
}

/* ========================================
   15. CLASSIFICATION BADGE
   ======================================== */

@media (max-width: 768px) {
    .classification {
        font-size: 1rem !important;
        padding: 0.8rem 1.5rem !important;
        transform: none !important;
        display: inline-block;
        cursor: default;
    }

    .classification:hover {
        transform: none !important;
    }
}

/* ========================================
   16. AI ENRICHMENT SECTION
   ======================================== */

@media (max-width: 768px) {
    #enrichment-container,
    #otx-container {
        padding: 1.5rem !important;
        transform: none !important;
    }

    #enrichment-container:hover {
        transform: none !important;
    }

    .enrichment-loading,
    #otx-loading {
        padding: 2rem 1rem !important;
    }
}

/* ========================================
   17. GOOGLE SEARCH INTELLIGENCE
   ======================================== */

@media (max-width: 768px) {
    /* Search result cards */
    div[style*="padding: 1.5rem"][style*="border-left: 3px solid"] {
        padding: 1rem !important;
        font-size: 0.9rem;
    }

    /* Threat/Safe indicator badges */
    span[style*="padding: 0.6rem 1.2rem"] {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.85rem !important;
        display: inline-block;
    }

    /* Domain tags */
    span[style*="font-family: monospace"] {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
    }
}

/* ========================================
   18. LANDING PAGE MOBILE
   ======================================== */

@media (max-width: 768px) {
    .landing-box {
        padding: 2rem !important;
        transform: none !important;
    }

    .landing-box:hover {
        transform: none !important;
    }

    .btn-container {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .btn-login,
    .btn-signup {
        width: 100%;
        justify-content: center;
        touch-action: manipulation;
    }

    .logo h1 {
        font-size: 1.8rem !important;
    }

    .logo-icon {
        font-size: 2rem !important;
    }
}

/* ========================================
   19. LOGIN/SIGNUP FORMS
   ======================================== */

@media (max-width: 768px) {
    .form-container {
        margin: 5% auto !important;
        padding: 2rem !important;
        max-width: 90% !important;
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input {
        font-size: 16px !important; /* Prevents iOS zoom */
    }

    .form-container .btn {
        width: 100%;
        touch-action: manipulation;
    }
}

/* ========================================
   20. HISTORY PAGE
   ======================================== */

@media (max-width: 768px) {
    h1 {
        font-size: 1.6rem !important;
        margin-bottom: 1rem;
    }

    .export-links {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.8rem;
        margin-top: 1.5rem;
    }

    .export-links a {
        margin: 0 !important;
        width: 100%;
    }
}

/* ========================================
   21. ANDROID WEBVIEW OPTIMIZATIONS
   ======================================== */

/* Smooth scrolling for Android */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Fix for Android keyboard pushing content */
@media (max-width: 768px) {
    body {
        position: relative;
        min-height: 100vh;
    }
}

/* Hardware acceleration */
.chart-container,
.report-card,
.feature-card,
.scanner-container {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ========================================
   22. LANDSCAPE MODE (PHONES)
   ======================================== */

@media (max-width: 896px) and (orientation: landscape) {
    .container {
        padding: 1rem 2rem;
    }

    .navbar {
        padding: 0.8rem 1.5rem;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    .scanner-container {
        padding: 1.5rem !important;
    }
}

/* ========================================
   23. VERY SMALL SCREENS (< 360px)
   ======================================== */

@media (max-width: 360px) {
    .container {
        padding: 0.8rem;
    }

    h1 {
        font-size: 1.3rem !important;
    }

    h2 {
        font-size: 1.1rem !important;
    }

    .btn {
        padding: 0.8rem 1rem !important;
        font-size: 0.9rem !important;
    }

    .navbar-brand {
        font-size: 0.9rem !important;
    }

    .stat-value {
        font-size: 1.3rem !important;
    }
}

/* ========================================
   24. ENSURE CLICKABILITY ON MOBILE
   ======================================== */

/* Force pointer events for all interactive elements */
a, button, input, textarea, select, 
.btn, .classification, .back-btn, 
.export-links a, .navbar-links a,
.learn-more, summary, details,
.btn-login, .btn-signup, .btn-logout,
.navbar-toggle, .navbar-close,
.table-card, .feed-item {
    pointer-events: auto !important;
    cursor: pointer;
}

/* Ensure forms are interactive */
form * {
    pointer-events: auto !important;
}

/* ========================================
   25. ACCESSIBILITY IMPROVEMENTS
   ======================================== */

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid #4cc9f0;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }

    .classification {
        border: 2px solid white;
    }
}

/* ========================================
   26. DASHBOARD CHART MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 768px) {
    /* Ensure charts are responsive on mobile */
    canvas {
        max-width: 100%;
        height: auto !important;
    }
    
    /* Chart containers should allow proper touch scrolling */
    .chart-card {
        touch-action: pan-y;
    }
    
    /* Better chart legend positioning on mobile */
    .chart-card canvas {
        touch-action: manipulation;
    }
}

/* ========================================
   27. MOBILE SCROLLBAR CUSTOMIZATION
   ======================================== */

@media (max-width: 768px) {
    /* Custom scrollbar for tables on mobile */
    .threat-table::-webkit-scrollbar,
    .live-feed::-webkit-scrollbar,
    .table-wrapper::-webkit-scrollbar {
        height: 8px;
        width: 8px;
    }
    
    .threat-table::-webkit-scrollbar-track,
    .live-feed::-webkit-scrollbar-track,
    .table-wrapper::-webkit-scrollbar-track {
        background: rgba(15, 23, 42, 0.5);
        border-radius: 10px;
    }
    
    .threat-table::-webkit-scrollbar-thumb,
    .live-feed::-webkit-scrollbar-thumb,
    .table-wrapper::-webkit-scrollbar-thumb {
        background: #4cc9f0;
        border-radius: 10px;
    }
    
    .threat-table::-webkit-scrollbar-thumb:hover,
    .live-feed::-webkit-scrollbar-thumb:hover,
    .table-wrapper::-webkit-scrollbar-thumb:hover {
        background: #3ba0c0;
    }
}

/* ========================================
   28. MOBILE TOUCH FEEDBACK
   ======================================== */

@media (max-width: 768px) {
    /* Add visual feedback for touch interactions */
    .stat-card:active,
    .chart-card:active,
    .threat-table:active {
        opacity: 0.95;
    }
    
    /* Improve button touch feedback */
    .btn:active,
    button:active {
        transform: scale(0.98);
    }
    
    /* Badge touch feedback */
    .badge {
        user-select: none;
        pointer-events: none;
    }
}

/* ========================================
   29. MOBILE NAVBAR IMPROVEMENTS FOR DASHBOARD
   ======================================== */

@media (max-width: 768px) {
    /* Ensure dashboard navbar is properly aligned */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    /* Make navbar links in mobile menu more touch-friendly */
    .navbar-links.active {
        overflow-y: auto;
    }
    
    .navbar-links.active::-webkit-scrollbar {
        width: 6px;
    }
    
    .navbar-links.active::-webkit-scrollbar-track {
        background: rgba(15, 23, 42, 0.5);
    }
    
    .navbar-links.active::-webkit-scrollbar-thumb {
        background: #4cc9f0;
        border-radius: 3px;
    }
}

/* ========================================
   30. MOBILE PERFORMANCE OPTIMIZATIONS
   ======================================== */

@media (max-width: 768px) {
    /* Use GPU acceleration for smoother animations */
    .navbar-links,
    .navbar-overlay,
    .stat-card,
    .chart-card {
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
    }
    
    /* Prevent text selection during scrolling */
    .stats-grid,
    .charts-grid {
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Allow text selection in content areas */
    .threat-table,
    .live-feed {
        -webkit-user-select: text;
        user-select: text;
    }
}