/* Mobile-specific enhancements */
@media (max-width: 768px) {
    /* Improve touch targets */
    .sidebar-menu a {
        min-height: 44px;
        padding: 12px 20px;
    }
    
    /* Mobile-friendly typography */
    body {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    #markdown-output {
        font-size: 16px;
        line-height: 1.6;
    }
    
    #markdown-output h1 {
        font-size: 1.8rem;
        margin: 20px 0 15px 0;
    }
    
    #markdown-output h2 {
        font-size: 1.5rem;
        margin: 18px 0 13px 0;
    }
    
    #markdown-output h3 {
        font-size: 1.3rem;
        margin: 16px 0 12px 0;
    }
    
    #markdown-output h4,
    #markdown-output h5,
    #markdown-output h6 {
        font-size: 1.1rem;
        margin: 14px 0 10px 0;
    }
    
    /* Adjust container padding */
    .container {
        padding: 15px;
    }
    
    /* Make tables scrollable on mobile */
    .table-container {
        overflow-x: auto;
        margin: 15px 0;
        -webkit-overflow-scrolling: touch;
    }
    
    #markdown-output table {
        min-width: 500px;
    }
    
    /* Adjust welcome message for mobile */
    .welcome-message {
        padding: 40px 20px;
    }
    
    .welcome-message h1 {
        font-size: 1.8rem;
    }
}

/* Large mobile devices */
@media (max-width: 480px) {
    .sidebar-header {
        padding: 20px 15px;
    }
    
    .sidebar-header h3 {
        font-size: 1.1rem;
    }
    
    .sidebar-menu a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .main-content #markdown-output {
        padding: 15px 10px;
    }
    
    .welcome-message {
        padding: 30px 15px;
    }
    
    .welcome-message h1 {
        font-size: 1.5rem;
    }
}

/* Prevent horizontal scrolling */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Improve scrolling performance */
.sidebar, .main-content {
    -webkit-overflow-scrolling: touch;
}
